From: Lubomir Sedlacik Date: Thu, 5 Dec 2002 18:15:28 +0000 (+0000) Subject: AC_CHECK_HEADERS requires [] if argument is another m4 macro, e.g. X-Git-Tag: silc.client.0.9.10~2 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=f85d22f16982352c9ff9f3e033623543761208e8 AC_CHECK_HEADERS requires [] if argument is another m4 macro, e.g. AC_CHECK_FUNC. Make it work with autoconf-2.57. --- diff --git a/configure.in.pre b/configure.in.pre index 8f94ae8b..c8161875 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -175,20 +175,21 @@ sim_support=false AC_MSG_CHECKING(for SIM support) AC_MSG_RESULT() AC_CHECK_HEADERS(dlfcn.h, - AC_CHECK_LIB(dl, dlopen, - [ - AC_DEFINE(SILC_SIM) - sim_support=true - LIBS="$LIBS -ldl" - ], - [ - AC_CHECK_LIB(c, dlopen, - [ - AC_DEFINE(SILC_SIM) - sim_support=true - ]) - ]) - ) + [ + AC_CHECK_LIB(dl, dlopen, + [ + AC_DEFINE(SILC_SIM) + sim_support=true + LIBS="$LIBS -ldl" + ], + [ + AC_CHECK_LIB(c, dlopen, + [ + AC_DEFINE(SILC_SIM) + sim_support=true + ]) + ]) + ]) AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue) if test x$sim_support = xtrue; then @@ -648,13 +649,14 @@ AC_ARG_WITH(iconv, case "${withval}" in no) AC_MSG_RESULT(no) - - AC_CHECK_HEADERS(iconv.h, AC_CHECK_FUNC(iconv, has_iconv=true)) + AC_CHECK_HEADERS(iconv.h, + [ + AC_CHECK_FUNC(iconv, has_iconv=true) + ]) check_iconv=false ;; *) AC_MSG_RESULT(yes) - if test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I$withval/include" CFLAGS="$CFLAGS -I$withval/include" @@ -662,16 +664,19 @@ AC_ARG_WITH(iconv, if test -d $withval/lib; then LDFLAGS="$LDFLAGS -L$withval/lib" fi + ;; esac ], [ AC_MSG_RESULT(no) - - AC_CHECK_HEADERS(iconv.h, AC_CHECK_FUNCS(iconv, - [ - has_iconv=true - check_iconv=false - ])) + AC_CHECK_HEADERS(iconv.h, + [ + AC_CHECK_FUNCS(iconv, + [ + has_iconv=true + check_iconv=false + ]) + ]) ]) if test x$check_iconv = xtrue; then