[Freeswitch-svn] [commit] r12922 - freeswitch/trunk

FreeSWITCH SVN mikej at freeswitch.org
Mon Apr 6 12:54:30 PDT 2009


Author: mikej
Date: Mon Apr  6 14:54:30 2009
New Revision: 12922

Log:
add libtool major version detection to configure in prep for supporting both libtool 2.x and 1.5.x at the same time

Modified:
   freeswitch/trunk/configure.in

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Mon Apr  6 14:54:30 2009
@@ -76,6 +76,9 @@
 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 @@
     ;;
 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(PLATFORM_CORE_DEPLIBS)
 AC_SUBST(SOLINK)
 AC_SUBST(DYNAMIC_LIB_EXTEN)
+AC_SUBST(LIBTOOL_LIB_EXTEN)
 
 # Checks for header files.
 AC_HEADER_DIRENT



More information about the Freeswitch-svn mailing list