mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix libunbound undefined symbol errors for main.
Referencing main does not seem to be possible for libunbound. git-svn-id: file:///svn/unbound/trunk@3280 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
9141273883
commit
581ef79213
4 changed files with 4 additions and 1442 deletions
|
|
@ -1,8 +1,5 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* define if a library can reference the 'main' symbol */
|
||||
#undef CAN_REFERENCE_MAIN
|
||||
|
||||
/* Directory to chroot to */
|
||||
#undef CHROOT_DIR
|
||||
|
||||
|
|
|
|||
33
configure.ac
33
configure.ac
|
|
@ -1023,39 +1023,6 @@ if test "$USE_NSS" = "no"; then
|
|||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
;;
|
||||
esac
|
||||
# generate libtool to test if linking main
|
||||
# from a dynamic library works.
|
||||
LT_OUTPUT
|
||||
AC_MSG_CHECKING([if dynamic lib can refer to main])
|
||||
cat >tmp.$$.def <<EOF
|
||||
myfunc
|
||||
EOF
|
||||
cat >tmp.$$.c <<EOF
|
||||
int myfunc(void);
|
||||
extern int main(int, char *argv[]);
|
||||
int myfunc(void)
|
||||
{
|
||||
return ((int)main) + 1;
|
||||
}
|
||||
EOF
|
||||
mylibtool=./libtool
|
||||
mylibdir=/usr/local/lib
|
||||
myok=yes
|
||||
$mylibtool --quiet --tag=CC --mode=compile $CC $CFLAGS -o tmp.$$.lo -c tmp.$$.c >/dev/null 2>&1
|
||||
if test $? = 0; then myok=yes; else myok=no; fi
|
||||
if test "$myok" = "yes"; then
|
||||
$mylibtool --quiet --tag=CC --mode=link $CC $CFLAGS -version-info 1:0:0 -no-undefined -export-symbols tmp.$$.def -o libtmp$$.la tmp.$$.lo $LDFLAGS -rpath $mylibdir $LIBS >/dev/null 2>&1
|
||||
if test $? = 0; then myok=yes; else myok=no; fi
|
||||
fi
|
||||
if test "$myok" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(CAN_REFERENCE_MAIN, [1], [define if a library can reference the 'main' symbol])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
$mylibtool --quiet --mode=clean rm -rf libtmp$$.la tmp.$$.lo
|
||||
rm -f tmp.$$.def tmp.$$.c libtmp$$.la tmp.$$.lo tmp.$$.o
|
||||
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
26 November 2014: Wouter
|
||||
- Fix libunbound undefined symbol errors for main.
|
||||
Referencing main does not seem to be possible for libunbound.
|
||||
|
||||
24 November 2014: Wouter
|
||||
- Fix log at high verbosity and memory allocation failure.
|
||||
- iana portlist update.
|
||||
|
|
|
|||
Loading…
Reference in a new issue