From 02141e3048d37c8dd0fbc40e78f3324b6ac7d6fe Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 6 Apr 2009 19:54:30 +0000 Subject: [PATCH] add libtool major version detection to configure in prep for supporting both libtool 2.x and 1.5.x at the same time git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12922 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- configure.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.in b/configure.in index aaf641eb8f..ae65e9b418 100644 --- a/configure.in +++ b/configure.in @@ -76,6 +76,9 @@ m4_defun([_LT_AC_LANG_RC_CONFIG], [:]) AM_PROG_CC_C_O AC_PROG_LIBTOOL +libtool=$(switch_builddir)/libtool +LIBTOOL_MAJOR_VERSION=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'| awk -F . '{print $1}'` + #Check for compiler vendor AX_COMPILER_VENDOR @@ -123,6 +126,13 @@ case "$host" in ;; esac + +LIBTOOL_LIB_EXTEN="$DYNAMIC_LIB_EXTEN" + +if test "$LIBTOOL_MAJOR_VERSION" -eq "2"; then + LIBTOOL_LIB_EXTEN="la" +fi + # Enable 64 bit build AC_ARG_ENABLE(64, [AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"]) @@ -278,6 +288,7 @@ AC_SUBST(ESL_LDFLAGS) AC_SUBST(PLATFORM_CORE_DEPLIBS) AC_SUBST(SOLINK) AC_SUBST(DYNAMIC_LIB_EXTEN) +AC_SUBST(LIBTOOL_LIB_EXTEN) # Checks for header files. AC_HEADER_DIRENT