summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-28 00:31:26 +0100
committerLennart Poettering <lennart@poettering.net>2008-10-28 00:31:26 +0100
commit15f853c3efc16eca10305748406adbea229196c3 (patch)
treefdb85a070a356d78284baa50b16d46cc93760c75 /configure.ac
parenta1ec5ccea1b3d4495069df95472b3fbc48d7cde3 (diff)
parentc813eefb86359c1fa58fbeaa77b53267c405d60e (diff)
Merge commit 'flameeyes/autoconf-2.62'
Conflicts: configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac54
1 files changed, 11 insertions, 43 deletions
diff --git a/configure.ac b/configure.ac
index f4bcf3f..4508930 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,10 +19,11 @@
# License along with libasyncns. If not, see
# <http://www.gnu.org/licenses/>.
-AC_PREREQ(2.59)
+AC_PREREQ(2.62)
AC_INIT([libasyncns],[0.6],[mznflapaf (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([libasyncns/asyncns.c])
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libasyncns/])
@@ -36,40 +37,24 @@ fi
# Checks for programs.
AC_PROG_CC
+AC_PROG_CC_C99
AC_PROG_CPP
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
-test_gcc_flag() {
- AC_LANG_CONFTEST([int main() {}])
- $CC -c conftest.c $CFLAGS "$1" -o conftest.o > /dev/null 2> /dev/null
- ret=$?
- rm -f conftest.o
- return $ret
-}
-
-# If using GCC specify some additional parameters
-if test "x$GCC" = "xyes" ; then
-
- DESIRED_FLAGS="-std=c99 -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 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
-
- for flag in $DESIRED_FLAGS ; do
- AC_MSG_CHECKING([whether $CC accepts $flag])
- if test_gcc_flag $flag ; then
- CFLAGS="$CFLAGS $flag"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- done
-fi
+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 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+
+for flag in $DESIRED_FLAGS ; do
+ CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
+done
# Checks for header files.
+AC_HEADER_ASSERT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h stdlib.h string.h sys/socket.h unistd.h sys/prctl.h netinet/in.h arpa/nameser_compat.h])
@@ -110,24 +95,7 @@ AC_CHECK_FUNC(res_query, ,
ACX_PTHREAD
-# LYNX documentation generation
-AC_ARG_ENABLE(lynx,
- AC_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
-[case "${enableval}" in
- yes) lynx=yes ;;
- no) lynx=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
-esac],[lynx=yes])
-
-if test x$lynx = xyes ; then
- AC_CHECK_PROG(have_lynx, lynx, yes, no)
-
- if test x$have_lynx = xno ; then
- AC_MSG_WARN([*** lynx not found, plain text README will not be built ***])
- fi
-fi
-
-AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
+ZP_LYNX_DOC
AC_CONFIG_FILES([Makefile libasyncns/Makefile doc/Makefile doc/README.html doxygen/Makefile doxygen/doxygen.conf libasyncns.pc])
AC_OUTPUT