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
This commit is contained in:
Michael Jerris 2009-04-06 19:54:30 +00:00
parent 7cd48301d9
commit 02141e3048
1 changed files with 11 additions and 0 deletions

View File

@ -76,6 +76,9 @@ m4_defun([_LT_AC_LANG_RC_CONFIG], [:])
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_LIBTOOL 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 #Check for compiler vendor
AX_COMPILER_VENDOR AX_COMPILER_VENDOR
@ -123,6 +126,13 @@ case "$host" in
;; ;;
esac esac
LIBTOOL_LIB_EXTEN="$DYNAMIC_LIB_EXTEN"
if test "$LIBTOOL_MAJOR_VERSION" -eq "2"; then
LIBTOOL_LIB_EXTEN="la"
fi
# Enable 64 bit build # Enable 64 bit build
AC_ARG_ENABLE(64, AC_ARG_ENABLE(64,
[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"]) [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(PLATFORM_CORE_DEPLIBS)
AC_SUBST(SOLINK) AC_SUBST(SOLINK)
AC_SUBST(DYNAMIC_LIB_EXTEN) AC_SUBST(DYNAMIC_LIB_EXTEN)
AC_SUBST(LIBTOOL_LIB_EXTEN)
# Checks for header files. # Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT