]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add libtool major version detection to configure in prep for supporting both libtool...
authorMichael Jerris <mike@jerris.com>
Mon, 6 Apr 2009 19:54:30 +0000 (19:54 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 6 Apr 2009 19:54:30 +0000 (19:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12922 d0543943-73ff-0310-b7d9-9358b9ac24b2

configure.in

index aaf641eb8f9e80e32301171c934d73e2fead2fa2..ae65e9b4188a93a3ccda879723927c37f275782a 100644 (file)
@@ -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