AC_INIT([udev-extras], [20090125], [linux-hotplug@vger.kernel.org]) AC_PREREQ(2.60) AM_INIT_AUTOMAKE([check-news foreign 1.9 subdir-objects dist-bzip2]) AC_GNU_SOURCE AC_DISABLE_STATIC AC_SYS_LARGEFILE AC_CONFIG_HEADERS(config.h) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LIBTOOL dnl prefix is /usr, exec_prefix in /, if overridden exec_prefix follows prefix AC_PREFIX_DEFAULT([/usr]) test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix= dnl ensure that when the Automake generated makefile calls aclocal, dnl it honours the $ACLOCAL_FLAGS environment variable ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" if test -n "$ac_macro_dir"; then ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS" fi AC_SUBST([ACLOCAL_AMFLAGS]) PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.12) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12) AC_SUBST(LIBUSB_CFLAGS) AC_SUBST(LIBUSB_LIBS) AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_ARG_ENABLE(more-warnings, AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), set_more_warnings="$enableval",set_more_warnings=yes) AC_MSG_CHECKING(for more warnings, including -Werror) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then AC_MSG_RESULT(yes) CFLAGS="-Wall -Werror $CFLAGS" for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \ -Wdeclaration-after-statement -Wstrict-prototypes \ -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \ -fno-strict-aliasing; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) if test $has_option = no; then CFLAGS="$SAVE_CFLAGS" fi AC_MSG_RESULT($has_option) unset has_option unset SAVE_CFLAGS done unset option else AC_MSG_RESULT(no) fi AC_ARG_WITH(udev-prefix, AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]), [], [with_udev_prefix='${exec_prefix}']) udev_prefix=$with_udev_prefix AC_SUBST(udev_prefix) AC_CONFIG_FILES([ Makefile modem-probe/Makefile modem-modeswitch/Makefile udev-acl/Makefile ]) AC_OUTPUT echo " udev-extras $VERSION ==================== prefix: ${prefix} exec_prefix: ${exec_prefix} udev_prefix: ${udev_prefix} datarootdir: ${datarootdir} mandir: ${mandir} compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} xsltproc: ${XSLTPROC} "