From 3b33ef2f7612921eca97fe3e850bd3af41229a7a Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 12 May 2005 22:03:33 +0000 Subject: [PATCH] make sure the header gets tested twice git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@551 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/acinclude.m4 | 7 +++++-- program/configure.ac | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/program/acinclude.m4 b/program/acinclude.m4 index 6ada55c5..0143cb40 100644 --- a/program/acinclude.m4 +++ b/program/acinclude.m4 @@ -21,7 +21,7 @@ AC_DEFUN([EX_CHECK_ALL], ex_check_save_CPPFLAGS=${CPPFLAGS} ex_check_save_LDFLAGS=${LDPFLAGS} if test "x$7" != "x"; then - CPPFLAGS="-I$7 $CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$7" fi dnl try compiling naked first AC_CHECK_LIB($1,$2, [ @@ -37,7 +37,10 @@ AC_DEFUN([EX_CHECK_ALL], LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l $4` dnl remove the cached value and test again unset ac_cv_lib_$1_$2 - AC_CHECK_LIB($1,$2,[ AC_CHECK_HEADER($3,[EX_CHECK_STATE=YES],[])],[]) + AC_CHECK_LIB($1,$2,[ + unset ac_cv_header_`echo $3 | sed "s/[^a-z]/_/"` + AC_CHECK_HEADER($3,[EX_CHECK_STATE=YES],[]) + ],[]) else AC_MSG_WARN([ ---------------------------------------------------------------------------- diff --git a/program/configure.ac b/program/configure.ac index 912e68b7..fd6f52e7 100644 --- a/program/configure.ac +++ b/program/configure.ac @@ -166,6 +166,10 @@ AC_STRUCT_TM dnl Checks for libraries. AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos)) +dnl Use libiconv if we have one but fall back to libc otherwhise +AC_CHECK_LIB(iconv, iconv_open, , [ + AC_CHECK_FUNC(iconv_open,,) + ]) dnl add pic flag in any case this makes sure all our code is relocatable eval `./libtool --config | grep pic_flag` -- 2.30.2