X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=configure.ac;h=30ebc44a803795b4973a6287aa67369df375c34a;hb=1df2a0fce427fab7754f6ac572cf68cef2e95696;hp=dcf88155f7e724977011890c08beb8516b8d31d3;hpb=8041b5bada31db152de80e45b3047ed32cef6880;p=elogind.git diff --git a/configure.ac b/configure.ac index dcf88155f..30ebc44a8 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ # . 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"])