chiark / gitweb /
Use legacy getifaddrs() on GNU/kFreeBSD
[elogind.git] / configure.ac
index e1fbb79e33f2788d4874837b81047009fdd37227..30ebc44a803795b4973a6287aa67369df375c34a 100644 (file)
 # <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.62)
-AC_INIT([nss-myhostname],[0.2],[mzzlubfganzr (at) 0pointer (dot) de])
+AC_INIT([nss-myhostname],[0.3],[mzzlubfganzr (at) 0pointer (dot) de])
 AC_CONFIG_SRCDIR([nss-myhostname.c])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR(m4)
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 
-AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
+AM_INIT_AUTOMAKE([foreign 1.9 -Wall -Wno-portability silent-rules tar-pax subdir-objects dist-bzip2])
 
 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/nss-myhostname/])
 
 ac_default_prefix="/"
 
+AC_CANONICAL_HOST
+case "$host_os" in
+       linux*) legacy=false ;;
+       *)      legacy=true ;;
+esac
+AM_CONDITIONAL([LEGACY], [test x$legacy = xtrue])
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_CC_C99
-AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CPP
+
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
 # GCC flags
 
-DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissin
-g-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-un
-used-parameter -ffast-math"
+DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math -fvisibility=hidden -fdiagnostics-show-option"
 
 for flag in $DESIRED_FLAGS ; do
   CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
@@ -52,7 +59,8 @@ done
 
 # libtool stuff
 AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+LT_PREREQ(2.2)
+LT_INIT
 
 # Checks for header files.
 AC_HEADER_STDC