[asterisk-commits] branch group/autoconf_and_menuselect r8844 - /team/group/autoconf_and_menusel...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jan 28 12:03:27 MST 2006


Author: dancho
Date: Sat Jan 28 13:03:25 2006
New Revision: 8844

URL: http://svn.digium.com/view/asterisk?rev=8844&view=rev
Log:
Added several checks and exporting of compiler/linker flags.

Modified:
    team/group/autoconf_and_menuselect/autoconf/configure.ac

Modified: team/group/autoconf_and_menuselect/autoconf/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/autoconf/configure.ac?rev=8844&r1=8843&r2=8844&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/autoconf/configure.ac (original)
+++ team/group/autoconf_and_menuselect/autoconf/configure.ac Sat Jan 28 13:03:25 2006
@@ -27,7 +27,7 @@
 
 
 ### ** Platform.
-AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host},
+AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host}",
 [Define this to be the canonical name (cpu-vendor-os) of your system.])
 AC_DEFINE_UNQUOTED(PBX_CPU, "${host_cpu}",
 [Define this to be the name of the CPU of your system.])
@@ -36,17 +36,31 @@
 AC_DEFINE_UNQUOTED(PBX_OS, "${host_os}",
 [Define this to be the name of the OS of your system.])
 
-AC_SUBST(PBX_PLATFORM)
-AC_SUBST(PBX_CPU)
-AC_SUBST(PBX_VENDOR)
-AC_SUBST(PBX_OS)
+# esport some useful defines
+zPBX_PLATFORM=${host}
+zPBX_CPU=${host_cpu}
+zPBX_VENDOR=${host_vendor}
+zPBX_OS=${host_os}
+AC_SUBST(zPBX_PLATFORM)
+AC_SUBST(zPBX_CPU)
+AC_SUBST(zPBX_VENDOR)
+AC_SUBST(zPBX_OS)
+
+
+#  check for uname
+AC_PATH_TOOL([UNAME], [uname], No)
+if test ! x"${UNAME}" = xNo; then
+   PBX_OSREV=$(${UNAME} -r)
+fi
+AC_SUBST(PBX_OSREV)
+
 
 # guest OS type
 case "${host}" in
   cygwin*|mingw*|windows*|winnt)
     AC_DEFINE(Win32, 1,
               [Define according to your operating system type.])
-    PBX_OSTYPE="windows"
+    PBX_OSTYPE="CYGWIN"
     ;;
   *linux*)
     AC_DEFINE(Linux, 1,
@@ -67,6 +81,11 @@
     AC_DEFINE(OpenBSD, 1,
               [Define according to your operating system type.])
     PBX_OSTYPE="OpenBSD"
+    ;;
+  *sun*)
+    AC_DEFINE(SunOS, 1,
+              [Define according to your operating system type.])
+    PBX_OSTYPE="SunOS"
     ;;
   *)
     AC_DEFINE(Unix, 1,
@@ -84,14 +103,17 @@
    AC_CHECK_TOOL(CXX, g++, :)
    AC_CHECK_TOOL(AR, ar)
    AC_CHECK_TOOL(RANLIB, ranlib, :)
+   AC_CHECK_TOOL(AR, ar, :)
    
-   if test "x${PBX_OSTYPE}" = xWin32;
+   if test x"${PBX_OSTYPE}" = xWin32;
    then
       AC_CHECK_TOOL(NM, nm, :)
       AC_CHECK_TOOL(WINDRES, windres, :)
       AC_CHECK_TOOL(DLLWRAP, dllwrap, :)
    fi
    crossCompile="Yes"
+
+   z_OPTIONS=-DLOW_MEMORY
 fi
 
 # setup cross compilation root..
@@ -102,14 +124,12 @@
 		crossPrefix=$withval
 	     fi
 	fi])
-
-if test "x${crossCompile}" = xYes; then
+if test x"${crossCompile}" = xYes; then
    if test -z $crossPrefix; then 
-#   if test  "x${crossPrefix}" = x; then 
       AC_MSG_ERROR(You have to specify cross compile prefix!. Set with --with-cross-prefix.)
    else
 	CROSS_COMPILE_ROOT=$crossPrefix
-	CROSS_COMPILE_BIN=$crossPrefix/bin
+	CROSS_COMPILE_BIN=$crossPrefix/bin/
 	CROSS_COMPILE_TARGET=$crossPrefix
 
 	AC_SUBST(CROSS_COMPILE_ROOT)
@@ -120,15 +140,26 @@
 
 
 # Checks for programs.
+AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_AWK
 AC_PROG_YACC
-AC_PROG_CC
 AC_PROG_LEX
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
+AC_PROG_INSTALL
+
+AC_PATH_PROG([GREP], [grep], :)
+AC_PATH_PROG([MAKE], [make], :)
+AC_PATH_PROG([AR], [ar], :)
+AC_PATH_PROG([FIND], [find], :)
+AC_PATH_PROG([COMPRESS], [compress], :)
+AC_PATH_PROG([BASENAME], [basename], :)
+AC_PATH_PROG([DIRNAME], [dirname], :)
+AC_PATH_PROG([SHELL], [sh], :)
+AC_PATH_PROG([LN], [ln], :)
 
 
 # turn on/off debug...
@@ -165,6 +196,10 @@
 xInclude=$CROSS_COMPILE_ROOT/usr/include
 xLInclude=$CROSS_COMPILE_ROOT/usr/local/include
 
+xLib=$CROSS_COMPILE_ROOT/lib
+xULib=$CROSS_COMPILE_ROOT/usr/lib
+xLLib=$CROSS_COMPILE_ROOT/usr/local/lib
+
 #######################
 # OGG/Vorbis 
 
@@ -178,21 +213,25 @@
 
 PBX_ZAPTEL=1
 # check header & lib
-AC_CHECK_HEADERS([${xInclude}/zaptel.h ${xInclude}/linux/zaptel.h ${xLInclude}/zaptel.h], [], [PBX_ZAPTEL=0])
+AC_CHECK_HEADER([${xInclude}/zaptel.h], [],
+  [AC_CHECK_HEADER([${xInclude}/linux/zaptel.h], [],
+    [AC_CHECK_HEADER([${xLInclude}/zaptel.h], [], [PBX_ZAPTEL=0])])])
 AC_CHECK_LIB([tonezone], [tone_zone_register], [], [PBX_ZAPTEL=0])
 AC_SUBST(PBX_ZAPTEL)
 
 #######################
 # turn on unix ODBC..
 PBX_UNIXODBC=1
-AC_CHECK_HEADERS([odbcinst.h ${LInclude}/odbcinst.h], [], [PBX_UNIXODBC=0])
+AC_CHECK_HEADER([${xInclude}/odbcinst.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/odbcinst.h], [], [PBX_UNIXODBC=0])])
 AC_CHECK_LIB([odbc], [SQLInstallODBC], [], [PBX_UNIXODBC=0])
 AC_SUBST(PBX_UNIXODBC)
 
 #######################
 # turn on postgresql..
 PBX_PGSQL=1
-AC_CHECK_HEADERS([libpq-fe.h ${LInclude}/libpq-fe.h], [], [PBX_PGSQL=0])
+AC_CHECK_HEADER([${xInclude}/libpq-fe.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/libpq-fe.h], [], [PBX_PGSQL=0])])
 AC_CHECK_LIB([pq], [PQexec], [], [PBX_PGSQL=0])
 AC_SUBST(PBX_PGSQL)
 
@@ -200,51 +239,55 @@
 #######################
 # turn on sqlite..
 PBX_SQLITE=1
-AC_CHECK_HEADERS([sqlite.h ${LInclude}/sqlite.h], [], [PBX_SQLITE=0])
-#AC_CHECK_LIB([sqlite], [sqlite3_exec], [], [PBX_SQLITE=0])
-AC_CHECK_LIB([sqlite], [sqlite_exec], [], [PBX_SQLITE=0])
+AC_CHECK_HEADER([${xInclude}/sqlite.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/sqlite.h], [], [PBX_SQLITE=0])])
+AC_CHECK_LIB([sqlite], [sqlite_exec], [], 
+  [AC_CHECK_LIB([sqlite], [sqlite3_exec], [], [PBX_SQLITE=0])])
 AC_SUBST(PBX_SQLITE)
 
 
 #######################
 # turn on tds..
 PBX_FREETDS=1
-#AC_CHECK_HEADERS([tds.h ${LInclude}/tds.h], [], [PBX_FREETDS=0])
-AC_CHECK_HEADERS([tds.h ${LInclude}/tds.h] , [], [PBX_FREETDS=0])
+AC_CHECK_HEADER([${xInclude}/tds.h], [],
+   [AC_CHECK_HEADER([${xLInclude}/tds.h], [], [PBX_FREETDS=0])])
 AC_CHECK_LIB([tds], [tds_connect], [], [PBX_FREETDS=0])
 AC_SUBST(PBX_FREETDS)
 
 #######################
 # turn on ixjuser..
 PBX_IXJUSER=1
-AC_CHECK_HEADERS([ixjuser.h ${LInclude}/ixjuser.h], [], [PBX_IXJUSER=0])
+AC_CHECK_HEADER([${xInclude}/ixjuser.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/ixjuser.h], [], [PBX_IXJUSER=0])])
 AC_SUBST(PBX_IXJUSER)
 
 #######################
 # turn on asound..
 PBX_ASOUND=1
-AC_CHECK_HEADERS([alsa/asoundlib.h sys/asoundlib.h], [], [PBX_ASOUND=0])
+AC_CHECK_HEADER([${xInclude}/alsa/asoundlib.h], [], 
+  [AC_CHECK_HEADER([${xInclude}/sys/asoundlib.h], [], [PBX_ASOUND=0])])
 AC_CHECK_LIB([asound], [alsa_lisp], [], [PBX_ASOUND=0])
 AC_SUBST(PBX_ASOUND)
 
 ####################### 
 # turn on vpb.. xxx
 PBX_VPBAPI=1
-AC_CHECK_HEADERS([vpbapi.h], [], [PBX_VPBAPI=0])
+AC_CHECK_HEADER([${xInclude}/vpbapi.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/vpbapi.h], [], [PBX_VPBAPI=0])])
 AC_CHECK_LIB([vpb], [vpb_open], [], [PBX_VPBAPI=0])
 AC_SUBST(PBX_VPBAPI)
 
 ####################### 
 # turn on nbs.. xxx
 PBX_NBS=1
-AC_CHECK_HEADERS([nbs.h], [], [PBX_NBS=0])
+AC_CHECK_HEADER([${xInclude}/nbs.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/nbs.h], [], [PBX_NBS=0])])
 AC_CHECK_LIB([nbs], [nbs_setup], [], [PBX_NBS=0])
 AC_SUBST(PBX_NBS)
 
 ####################### 
 # turn on oss.. xxx
 PBX_OSSAUDIO=1
-#AC_CHECK_HEADERS([.h], [], [PBX_OSSAUDIO=0])
 AC_CHECK_LIB([ossaudio], [oss_ioctl_mixer], [], [PBX_OSSAUDIO=0])
 AC_SUBST(PBX_OSSAUDIO)
 
@@ -252,7 +295,8 @@
 ####################### 
 # turn on libpri.. xxx
 PBX_LIBPRI=1
-AC_CHECK_HEADERS([libpri.h], [], [PBX_LIBPRI=0])
+AC_CHECK_HEADER([${xInclude}/libpri.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/libpri.h], [], [PBX_LIBPRI=0])])
 AC_CHECK_LIB([pri], [pri_call], [], [PBX_LIBPRI=0])
 AC_SUBST(PBX_LIBPRI)
 
@@ -261,7 +305,8 @@
 ####################### 
 # turn on libmfcr2.. xxx
 PBX_LIBMFCR2=1
-AC_CHECK_HEADERS([libmfcr2.h], [], [PBX_LIBMFCR2=0])
+AC_CHECK_HEADER([${xInclude}/libmfcr2.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/libmfcr2.h], [], [PBX_LIBMFCR2=0])])
 AC_CHECK_LIB([mfcr2], [mfcr2_MakeCall], [], [PBX_LIBMFCR2=0])
 AC_SUBST(PBX_LIBMFCR2)
 
@@ -269,7 +314,8 @@
 ####################### 
 # turn on libspeex.. xxx
 PBX_LIBSPEEX=1
-AC_CHECK_HEADERS([speex.h], [], [PBX_LIBSPEEX=0])
+AC_CHECK_HEADER([${xInclude}/speex.h], [], 
+  [AC_CHECK_HEADER([${xLInclude}/speex.h], [], [PBX_LIBSPEEX=0])])
 AC_CHECK_LIB([speex], [speex_encode], [], [PBX_LIBSPEEX=0])
 AC_SUBST(PBX_LIBSPEEX)
 
@@ -277,7 +323,8 @@
 ####################### 
 # turn on libvorbix.. xxx
 PBX_LIBVORBIS=1
-AC_CHECK_HEADERS([${xInclude}/vorbis/codec.h ${xLInclude}/vorbis/codec.h], [], [PBX_LIBVORBIS=0])
+AC_CHECK_HEADER([${xInclude}/vorbis/codec.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/vorbis/codec.h], [], [PBX_LIBVORBIS=0])])
 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [PBX_LIBVORBIS=0])
 AC_CHECK_LIB([vorbisenc], [vorbis_encode_ctl], [], [PBX_LIBVORBIS=0])
 AC_SUBST(PBX_LIBVORBIS)
@@ -286,14 +333,16 @@
 ####################### 
 # turn on libosptk.. xxx
 PBX_LIBOSPTK=1
-AC_CHECK_HEADERS([osp/osp.h], [], [PBX_LIBOSPTK=0])
+AC_CHECK_HEADER([${xInclude}/osp/osp.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/osp/osp.h], [], [PBX_LIBOSPTK=0])])
 AC_CHECK_LIB([osptk], [OSPPCryptoDecrypt], [], [PBX_LIBOSPTK=0])
 AC_SUBST(PBX_LIBOSPTK)
 
 ####################### 
 # turn on libpopt.. xxx
 PBX_LIBPOPT=1
-AC_CHECK_HEADERS([popt.h], [], [PBX_LIBPOPT=0])
+AC_CHECK_HEADER([${xInclude}/popt.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/popt.h], [], [PBX_LIBPOPT=0])])
 AC_CHECK_LIB([popt], [poptStrerror], [], [PBX_LIBPOPT=0])
 AC_SUBST(PBX_LIBPOPT)
 
@@ -301,7 +350,8 @@
 ####################### 
 # turn on libnewt.. xxx
 PBX_LIBNEWT=1
-AC_CHECK_HEADERS([newt.h], [], [PBX_LIBNEWT=0])
+AC_CHECK_HEADER([${xInclude}/newt.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/newt.h], [], [PBX_LIBNEWT=0])])
 AC_CHECK_LIB([newt], [newtBell], [], [PBX_LIBNEWT=0])
 AC_SUBST(PBX_LIBNEWT)
 
@@ -309,7 +359,7 @@
 ####################### 
 # turn on poll.. xxx
 PBX_POLL=1
-AC_CHECK_HEADERS([sys/poll.h], [], [PBX_POLL=0])
+AC_CHECK_HEADERS([${xInclude}/sys/poll.h], [], [PBX_POLL=0])
 AC_SUBST(PBX_POLL)
 
 
@@ -317,59 +367,84 @@
 
 ####################### 
 # turn on Qt.. xxx
-PBX_Qt=1
-AC_CHECK_HEADERS([qapplication.h qt/qapplication.h], [], [PBX_Qt=0])
-AC_SUBST(PBX_Qt)
-
-####################### 
-# turn on KDECORE.. xxx
-PBX_KDECORE=1
-AC_CHECK_HEADERS([kdebug.h], [], [PBX_KDECORE=0])
-AC_SUBST(PBX_KDECORE)
-
-####################### 
-# turn on KDEUI.. xxx
-PBX_KDEUI=1
-AC_CHECK_HEADERS([kcursor.h], [], [PBX_KDEUI=0])
-AC_SUBST(PBX_KDEUI)
+PBX_QT=0
+AC_PATH_TOOL(QTMOC, moc, No)
+if test ! x"${QTMOC}" = xNo; then
+   QTDIR=$(${DIRNAME} ${QTMOC})
+   QTDIR=$(${DIRNAME} ${QTDIR})
+   
+   AC_CHECK_HEADER([${QTDIR}/include/qapplication.h], [PBX_QT=1])
+fi
+AC_SUBST(PBX_QT)
+AC_SUBST(QTDIR)
+
+####################### 
+# turn on KDE.. xxx
+PBX_KDE=0
+AC_PATH_TOOL(KDEINIT, kdeinit, No)
+if test ! x"${KDEINIT}" = xNo; then
+   KDEDIR=$(${DIRNAME} ${KDEINIT})
+   KDEDIR=$(${DIRNAME} ${KDEDIR})
+   KDE_CFLAGS="-I${KDEDIR}/include -I${KDEDIR}/include/kde -I${QTDIR}/include"
+   KDE_LIBS="-L${KDEDIR}/lib -L${QTDIR}/lib -lqt -lkdecore -lkdeui"
+
+   AC_CHECK_HEADER([${KDEDIR}/include/kdebug.h], [PBX_KDE=1])
+   AC_CHECK_HEADER([${KDEDIR}/include/kdebug.h], [PBX_KDE=1])
+fi
+AC_SUBST(PBX_KDE)
+AC_SUBST(KDEDIR)
+AC_SUBST(KDE_CFLAGS)
+AC_SUBST(KDE_LIBS)
+
 
 ####################### 
 # turn on ptlib.. xxx
 PBX_PTLIB=1
-AC_CHECK_HEADERS([ptlib.h ${LInclude}/ptlib.h], [], [PBX_PTLIB=0])
+AC_CHECK_HEADER([${xInclude}/ptlib.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/ptlib.h], [], [PBX_PTLIB=0])])
 AC_SUBST(PBX_PTLIB)
 
 ####################### 
 # turn on h323.. xxx
 PBX_H323=1
-AC_CHECK_HEADERS([h323.h], [], [PBX_H323=0])
+AC_CHECK_HEADER([${xInclude}/h323.h], [],
+  [AC_CHECK_HEADER([${xLInclude}/h323.h], [], [PBX_H323=0])])
 AC_SUBST(PBX_H323)
 
 AC_LANG(C)
 
-# export CFLAGS
-if test "x${PBX_OSTYPE}" = xLinux; then
-	z_CFLAGS_DEFINE="-D_REENTRANT -D_GNU_SOURCE"
-	z_CFLAGS_WARN="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-	z_CFLAGS_INCLUDE="-Iinclude -I../include"
-	z_CFLAGS_OPTIMIZATION="-O6 -march=${host_cpu}"
-	z_CFLAGS_DEBUG="-g"	
-
-	if test "x${PBX_PROFILE}" = xYes; then
-		z_CFLAGS_PROFILE="-pg"
-	fi
-			
-	z_CFLAGS_MISC="-fomit-frame-pointer"
-fi
-
-z_CFLAGS="${z_CFLAGS_DEFINE} ${z_CFLAGS_WARN} ${z_CFLAGS_INCLUDE} ${z_CFLAGS_OPTIMIZATION} ${z_CFLAGS_DEBUG} ${z_CFLAGS_PROFILE} ${z_CFLAGS_MISC}"
-AC_SUBST(z_CFLAGS)
+####################### 
+# turn on CURL library.. xxx
+PBX_CURL=0
+AC_PATH_TOOL([CURL], [curl-config], No)
+if test ! x"${CURL}" = xNo; then
+# check for version
+   CURLLIBS=$(${CURL} --libs)
+   PBX_CURL=1
+fi
+AC_SUBST(PBX_CURL)
+AC_SUBST(CURLLIBS)
+
+
+####################### 
+# setup GTK
+PBX_GTK=0
+AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
+if test ! "x${GTKCONFIG}" = xNo; then
+   GTK_CFLAGS=$(${GTKCONFIG} --cflags gthread)
+   GTK_LIBS=$(${GTKCONFIG} --libs gthread)
+   PBX_GTK=1
+fi
+AC_SUBST(PBX_GTK)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+
 
 
 # Checks for prerequisite libraries..
 AC_CHECK_LIB([c], [memcpy], [], [AC_MSG_ERROR("you need c library to compile asterisk")])
 AC_CHECK_LIB([crypto], [CRYPTO_malloc], [], [AC_MSG_ERROR("you need crypto library to compile asterisk")])
-#AC_CHECK_LIB([db], [dbopen], [], [AC_MSG_ERROR("you need db library to compile asterisk")])
 AC_CHECK_LIB([dl], [dlopen], [], [AC_MSG_ERROR("you need dl library to compile asterisk")])
 #AC_CHECK_LIB([expat], [XML_SetBase], [], [AC_MSG_ERROR("you need expat library to compile asterisk")])
 AC_CHECK_LIB([m], [powl], [], [AC_MSG_ERROR("you need m library to compile asterisk")])
@@ -429,6 +504,57 @@
 AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strrchr strspn strstr strtol utime])
 
 
+
+# export some FLAGS..
+z_CFLAGS_DEFINE="-D_REENTRANT -D_GNU_SOURCE"
+z_CFLAGS_WARN="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
+z_CFLAGS_INCLUDE="-Iinclude -I../include -I${xInclude} -I${xLInclude}"
+z_CFLAGS_OPTIMIZATION="-O6 -march=${host_cpu}"
+
+if test "x${PBX_DEBUG}" = xYes; then
+	z_CFLAGS_DEBUG="-g3"
+fi
+
+if test "x${PBX_PROFILE}" = xYes; then
+	z_CFLAGS_PROFILE="-pg"
+fi
+z_CFLAGS_MISC="-fomit-frame-pointer"
+z_LDFLAGS="-L${xLib} -L${xULib} -L${xLLib}"
+
+z_CFLAGS_SHLIB="-fPIC"
+z_LDFLAGS_SHLIB="-shared -Xlinker -x"
+
+# NetBSD...
+if test "x${PBX_OSTYPE}" = xNetBSD; then
+	z_CFLAGS_MISC+="-pthread"
+	z_CFLAGS_INCLUDE+="-I${CROSS_COMPILE_ROOT}/usr/pkg/include"
+	z_LDFLAGS+="-L${CROSS_COMPILE_ROOT}/usr/pkg/lib"
+fi
+# OpenBSD...
+if test "x${PBX_OSTYPE}" = xOpenBSD; then
+	z_CFLAGS_MISC+="-pthread"
+fi
+# SunOS...
+if test "x${PBX_OSTYPE}" = xSunOS; then
+	 z_CFLAGS_DEFINE+="-Wcast-align -DSOLARIS"
+	 z_CFLAGS_INCLUDE+="-Iinclude/solaris-compat -I${CROSS_COMPILE_TARGET}/usr/local/ssl/include"
+	 z_LDFLAGS+="-L${CROSS_COMPILE_ROOT}/usr/local/ssl/lib"
+	 z_CFLAGS_SHLIB="-fpic"
+	 z_LDFLAGS_SHLIB="-shared"
+fi
+# CYGWIN...
+if test "x${PBX_OSTYPE}" = xCYGWIN; then
+	z_CFLAGS_SHLIB="-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols"
+	z_LDFLAGS_SHLIB="-L.. -L."
+fi
+
+z_CFLAGS="${z_CFLAGS_DEFINE} ${z_CFLAGS_WARN} ${z_CFLAGS_INCLUDE} ${z_CFLAGS_OPTIMIZATION} ${z_CFLAGS_DEBUG} ${z_CFLAGS_PROFILE} ${z_CFLAGS_MISC}"
+AC_SUBST(z_CFLAGS)
+AC_SUBST(z_LDFLAGS)
+AC_SUBST(z_CFLAGS_SHLIB)
+AC_SUBST(z_LDFLAGS_SHLIB)
+
+
 AC_CONFIG_FILES([menuselect-deps makeopts Makefile])
 AC_OUTPUT
 
@@ -439,6 +565,9 @@
 echo " CXXFLAGS : $CXXFLAGS"
 echo " LIBS     : $LIBS"
 
+echo " CFALGS  shared libs : $z_CFLAGS_SHLIB"
+echo " LDFLAGS shared libs : $z_LDFLAGS_SHLIB"
+
 if test "x${crossCompile}" = xYes; then
    echo ""
    echo " Cross Compilation = YES"



More information about the asterisk-commits mailing list