From: Wouter Wijngaards Date: Mon, 5 Dec 2011 15:55:46 +0000 (+0000) Subject: And LIBOBJ. X-Git-Tag: release-1.4.14rc1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fa08a0be9b091ee790b1b6039097f7309cf12b9;p=thirdparty%2Funbound.git And LIBOBJ. git-svn-id: file:///svn/unbound/trunk@2567 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index 116c1a04a..279b20fc2 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -1070,9 +1070,12 @@ char *malloc (); ]], [ if(malloc(0) != 0) return 1;]) ], [AC_MSG_RESULT([no]) + AC_LIBOBJ(malloc) AC_DEFINE_UNQUOTED([malloc], [rpl_malloc_$1], [Define if replacement function should be used.])] , - [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_MALLOC], 1, [If have GNU libc compatible malloc])], [AC_MSG_RESULT([no (crosscompile)]) + AC_LIBOBJ(malloc) AC_DEFINE_UNQUOTED([malloc], [rpl_malloc_$1], [Define if replacement function should be used.])] ) ]) diff --git a/config.h.in b/config.h.in index ac721b128..63538a692 100644 --- a/config.h.in +++ b/config.h.in @@ -170,6 +170,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOGIN_CAP_H +/* If have GNU libc compatible malloc */ +#undef HAVE_MALLOC + /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE diff --git a/configure b/configure index 172c828ff..e232d37d1 100755 --- a/configure +++ b/configure @@ -14787,6 +14787,12 @@ $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5 $as_echo "no (crosscompile)" >&6; } + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + cat >>confdefs.h <<_ACEOF #define malloc rpl_malloc_unbound @@ -14813,6 +14819,12 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + cat >>confdefs.h <<_ACEOF #define malloc rpl_malloc_unbound @@ -14821,6 +14833,9 @@ _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext