chiark / gitweb /
Use legacy getifaddrs() on GNU/kFreeBSD
[elogind.git] / configure.ac
index dcf88155f7e724977011890c08beb8516b8d31d3..30ebc44a803795b4973a6287aa67369df375c34a 100644 (file)
@@ -20,7 +20,7 @@
 # <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)
@@ -33,6 +33,13 @@ 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
@@ -44,7 +51,7 @@ AC_PROG_MAKE_SET
 
 # GCC flags
 
-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"
+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"])