From e770e627dd17099480743e5157857aa2c690bcfb Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 19 Jan 2013 16:37:13 -0800 Subject: [PATCH] libtoolize and get ready for a lot of autotools fun. Not. --- autogen.sh | 8 +++++++- configure.ac | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index ee77b698..b81414c4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,8 +4,14 @@ if [ -x "`which autoreconf 2>/dev/null`" ] ; then exec autoreconf -ivf fi +if glibtoolize --version > /dev/null 2>&1; then + LIBTOOLIZE='glibtoolize' +else + LIBTOOLIZE='libtoolize' +fi + +$LIBTOOLIZE --ltdl && \ aclocal && \ autoheader && \ automake --add-missing --force-missing --include-deps && \ autoconf - diff --git a/configure.ac b/configure.ac index c6ebfec8..6ab02574 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,7 @@ AC_PREREQ([2.61]) -AC_INIT([nacl-ref],[0.0.1],[https://github.com/jedisct1/nacl-ref]) +AC_INIT([libnacl-ref],[0.0.1],[https://github.com/jedisct1/nacl-ref]) AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([libltdl/config]) AC_CONFIG_SRCDIR([src/libnacl/PROTOTYPES.c]) AC_CONFIG_HEADER([config.h]) AC_CANONICAL_HOST @@ -115,6 +116,9 @@ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"]) AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"]) +LT_INIT +AC_SUBST(LIBTOOL_DEPS) + AC_ARG_VAR([AR], [path to the ar utility]) AC_CHECK_TOOL([AR], [ar], [ar]) @@ -184,6 +188,12 @@ NACL_PATH=libnacl/build/${NACL_HOSTNAME} AC_SUBST([MAINT]) AC_SUBST([NACL_PATH]) +dnl Libtool. + +LT_INIT([dlopen]) +LT_CONFIG_LTDL_DIR([libltdl]) +LTDL_INIT + dnl Output. AH_VERBATIM([NDEBUG], [/* Never ever ignore assertions */