diff options
author | Dan Williams <dcbw@redhat.com> | 2008-12-15 16:02:45 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-12-15 16:02:45 -0500 |
commit | bcb7f24b97c246e55960c362a70e2c6f485ecf4e (patch) | |
tree | edfb642173862cdce7fcd1547dabd7ec78b2bc94 /configure.ac |
initial bits
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..489e9b1 --- /dev/null +++ b/configure.ac @@ -0,0 +1,96 @@ +AC_PREREQ(2.52) + +AC_INIT(udev-extras, 0.1, dcbw@redhat.com, udev-extras) +AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar]) +AM_MAINTAINER_MODE + +AC_CONFIG_HEADERS(config.h) + +dnl +dnl Require programs +dnl +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_INSTALL +AC_PROG_LIBTOOL + +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]) + +dnl maintainer mode stuff +if test $USE_MAINTAINER_MODE = yes; then + DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED" +else + DISABLE_DEPRECATED="" +fi +AC_SUBST(DISABLE_DEPRECATED) + +dnl +dnl Required headers +dnl +AC_HEADER_STDC +AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h) + +dnl +dnl Checks for typedefs, structures, and compiler characteristics. +dnl +AC_TYPE_MODE_T +AC_TYPE_PID_T +AC_HEADER_TIME + +dnl +dnl Checks for library functions. +dnl +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MEMCMP +AC_CHECK_FUNCS(select socket uname) + +dnl +dnl Make sha1.c happy on big endian systems +dnl +AC_C_BIGENDIAN + +PKG_CHECK_MODULES(GLIB, glib-2 >= 2.12) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +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 -std=gnu89 $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_CONFIG_FILES([ +Makefile +probe-modem/Makefile +]) +AC_OUTPUT + |