[asterisk-commits] trunk r28747 - /trunk/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri May 19 11:54:22 MST 2006


Author: russell
Date: Fri May 19 13:54:21 2006
New Revision: 28747

URL: http://svn.digium.com/view/asterisk?rev=28747&view=rev
Log:
add support for more refined ability to set install paths using the standard
options to configure such as --libdir, --sbindir, etc. All of the default paths
are still the same. (issue #7057, jcollie)

Modified:
    trunk/Makefile
    trunk/acinclude.m4
    trunk/configure
    trunk/configure.ac
    trunk/makeopts.in

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=28747&r1=28746&r2=28747&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Fri May 19 13:54:21 2006
@@ -82,41 +82,27 @@
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
 ifeq ($(OSARCH),SunOS)
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
-  ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
-  ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+  ASTETCDIR=/etc/opt/asterisk
+  ASTLIBDIR=/opt/asterisk/lib
+  ASTVARLIBDIR=/var/opt/asterisk/lib
+  ASTSPOOLDIR=/var/opt/asterisk/spool
+  ASTLOGDIR=/var/opt/asterisk/log
+  ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
+  ASTBINDIR=/opt/asterisk/usr/bin
+  ASTSBINDIR=/opt/asterisk/usr/sbin
+  ASTVARRUNDIR=/var/opt/asterisk/run
+  ASTMANDIR=/opt/asterisk/usr/share/man
 else
-ifeq ($(OSARCH),FreeBSD)
-  PREFIX?=/usr/local
-  ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
-else
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
-endif
+  ASTETCDIR=$(sysconfdir)/asterisk
+  ASTLIBDIR=$(libdir)/asterisk
+  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+  ASTLOGDIR=$(localstatedir)/log/asterisk
+  ASTHEADERDIR=$(includedir)/asterisk
+  ASTBINDIR=$(bindir)
+  ASTSBINDIR=$(sbindir)
+  ASTVARRUNDIR=$(localstatedir)/run
+  ASTMANDIR=$(mandir)
 endif
 ASTDATADIR?=$(ASTVARLIBDIR)
 

Modified: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk/trunk/acinclude.m4?rev=28747&r1=28746&r2=28747&view=diff
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Fri May 19 13:54:21 2006
@@ -20,17 +20,17 @@
 PBX_LIB$1=0
 
 if test "${USE_$1}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${$1_DIR}" != "x"; then
-      libdir="-L${$1_DIR}/lib"
+      pbxlibdir="-L${$1_DIR}/lib"
    fi
-   AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
+   AC_CHECK_LIB([$1], [$2], [:], [], ${pbxlibdir} $6)
 
    if test "${ac_cv_lib_$1_$2}" = "yes"; then
       $1_LIB="-l$1 $6"
       $4_HEADER_FOUND="1"
       if test "x${$1_DIR}" != "x"; then
-         $1_LIB="${libdir} ${$1_LIB}"
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
 	 $1_INCLUDE="-I${$1_DIR}/include"
 	 if test "x$3" != "x" ; then
 	    AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?rev=28747&r1=28746&r2=28747&view=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri May 19 13:54:21 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 26020 .
+# From configure.ac Revision: 26808 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -276,7 +276,6 @@
 
 ac_unique_file="asterisk"
 ac_unique_file="asterisk.c"
-ac_default_prefix=
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -1467,7 +1466,26 @@
 
 
 
-
+case "${host}" in
+     *freebsd*)
+     ac_default_prefix=/usr/local
+     ;;
+     *)
+     ac_default_prefix=/usr
+     ;;
+esac
+
+if test ${sysconfdir} = '${prefix}/etc'; then
+   sysconfdir=/etc
+fi
+
+if test ${localstatedir} = '${prefix}/var'; then
+   localstatedir=/var
+fi
+
+if test ${mandir} = '${prefix}/man'; then
+   mandir=/usr/share/man
+fi
 
 ### ** Platform.
 
@@ -4888,9 +4906,9 @@
 PBX_LIBasound=0
 
 if test "${USE_asound}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${asound_DIR}" != "x"; then
-      libdir="-L${asound_DIR}/lib"
+      pbxlibdir="-L${asound_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for snd_spcm_init in -lasound" >&5
 echo $ECHO_N "checking for snd_spcm_init in -lasound... $ECHO_C" >&6
@@ -4898,7 +4916,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lasound ${libdir} -lm -ldl $LIBS"
+LIBS="-lasound ${pbxlibdir} -lm -ldl $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4964,7 +4982,7 @@
       asound_LIB="-lasound -lm -ldl"
       ALSA_HEADER_FOUND="1"
       if test "x${asound_DIR}" != "x"; then
-         asound_LIB="${libdir} ${asound_LIB}"
+         asound_LIB="${pbxlibdir} ${asound_LIB}"
 	 asound_INCLUDE="-I${asound_DIR}/include"
 	 if test "xalsa/asoundlib.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${asound_DIR}/include/alsa/asoundlib.h" | $as_tr_sh`
@@ -5316,9 +5334,9 @@
 PBX_LIBcurses=0
 
 if test "${USE_curses}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${curses_DIR}" != "x"; then
-      libdir="-L${curses_DIR}/lib"
+      pbxlibdir="-L${curses_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5
 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
@@ -5326,7 +5344,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurses ${libdir}  $LIBS"
+LIBS="-lcurses ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5392,7 +5410,7 @@
       curses_LIB="-lcurses "
       CURSES_HEADER_FOUND="1"
       if test "x${curses_DIR}" != "x"; then
-         curses_LIB="${libdir} ${curses_LIB}"
+         curses_LIB="${pbxlibdir} ${curses_LIB}"
 	 curses_INCLUDE="-I${curses_DIR}/include"
 	 if test "xcurses.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${curses_DIR}/include/curses.h" | $as_tr_sh`
@@ -5744,9 +5762,9 @@
 PBX_LIBnbs=0
 
 if test "${USE_nbs}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${nbs_DIR}" != "x"; then
-      libdir="-L${nbs_DIR}/lib"
+      pbxlibdir="-L${nbs_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for nbs_connect in -lnbs" >&5
 echo $ECHO_N "checking for nbs_connect in -lnbs... $ECHO_C" >&6
@@ -5754,7 +5772,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnbs ${libdir}  $LIBS"
+LIBS="-lnbs ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5820,7 +5838,7 @@
       nbs_LIB="-lnbs "
       NBS_HEADER_FOUND="1"
       if test "x${nbs_DIR}" != "x"; then
-         nbs_LIB="${libdir} ${nbs_LIB}"
+         nbs_LIB="${pbxlibdir} ${nbs_LIB}"
 	 nbs_INCLUDE="-I${nbs_DIR}/include"
 	 if test "xnbs.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${nbs_DIR}/include/nbs.h" | $as_tr_sh`
@@ -6172,9 +6190,9 @@
 PBX_LIBncurses=0
 
 if test "${USE_ncurses}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${ncurses_DIR}" != "x"; then
-      libdir="-L${ncurses_DIR}/lib"
+      pbxlibdir="-L${ncurses_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
@@ -6182,7 +6200,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses ${libdir}  $LIBS"
+LIBS="-lncurses ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6248,7 +6266,7 @@
       ncurses_LIB="-lncurses "
       NCURSES_HEADER_FOUND="1"
       if test "x${ncurses_DIR}" != "x"; then
-         ncurses_LIB="${libdir} ${ncurses_LIB}"
+         ncurses_LIB="${pbxlibdir} ${ncurses_LIB}"
 	 ncurses_INCLUDE="-I${ncurses_DIR}/include"
 	 if test "xcurses.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${ncurses_DIR}/include/curses.h" | $as_tr_sh`
@@ -6600,9 +6618,9 @@
 PBX_LIBnewt=0
 
 if test "${USE_newt}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${newt_DIR}" != "x"; then
-      libdir="-L${newt_DIR}/lib"
+      pbxlibdir="-L${newt_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for newtBell in -lnewt" >&5
 echo $ECHO_N "checking for newtBell in -lnewt... $ECHO_C" >&6
@@ -6610,7 +6628,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnewt ${libdir}  $LIBS"
+LIBS="-lnewt ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6676,7 +6694,7 @@
       newt_LIB="-lnewt "
       NEWT_HEADER_FOUND="1"
       if test "x${newt_DIR}" != "x"; then
-         newt_LIB="${libdir} ${newt_LIB}"
+         newt_LIB="${pbxlibdir} ${newt_LIB}"
 	 newt_INCLUDE="-I${newt_DIR}/include"
 	 if test "xnewt.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${newt_DIR}/include/newt.h" | $as_tr_sh`
@@ -7028,9 +7046,9 @@
 PBX_LIBodbc=0
 
 if test "${USE_odbc}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${odbc_DIR}" != "x"; then
-      libdir="-L${odbc_DIR}/lib"
+      pbxlibdir="-L${odbc_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for SQLConnect in -lodbc" >&5
 echo $ECHO_N "checking for SQLConnect in -lodbc... $ECHO_C" >&6
@@ -7038,7 +7056,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lodbc ${libdir}  $LIBS"
+LIBS="-lodbc ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7104,7 +7122,7 @@
       odbc_LIB="-lodbc "
       UNIXODBC_HEADER_FOUND="1"
       if test "x${odbc_DIR}" != "x"; then
-         odbc_LIB="${libdir} ${odbc_LIB}"
+         odbc_LIB="${pbxlibdir} ${odbc_LIB}"
 	 odbc_INCLUDE="-I${odbc_DIR}/include"
 	 if test "xsql.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${odbc_DIR}/include/sql.h" | $as_tr_sh`
@@ -7456,9 +7474,9 @@
 PBX_LIBogg=0
 
 if test "${USE_ogg}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${ogg_DIR}" != "x"; then
-      libdir="-L${ogg_DIR}/lib"
+      pbxlibdir="-L${ogg_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for ogg_sync_init in -logg" >&5
 echo $ECHO_N "checking for ogg_sync_init in -logg... $ECHO_C" >&6
@@ -7466,7 +7484,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-logg ${libdir}  $LIBS"
+LIBS="-logg ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7532,7 +7550,7 @@
       ogg_LIB="-logg "
       OGG_HEADER_FOUND="1"
       if test "x${ogg_DIR}" != "x"; then
-         ogg_LIB="${libdir} ${ogg_LIB}"
+         ogg_LIB="${pbxlibdir} ${ogg_LIB}"
 	 ogg_INCLUDE="-I${ogg_DIR}/include"
 	 if test "x" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${ogg_DIR}/include/" | $as_tr_sh`
@@ -7884,9 +7902,9 @@
 PBX_LIBosptk=0
 
 if test "${USE_osptk}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${osptk_DIR}" != "x"; then
-      libdir="-L${osptk_DIR}/lib"
+      pbxlibdir="-L${osptk_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for OSPPCryptoDecrypt in -losptk" >&5
 echo $ECHO_N "checking for OSPPCryptoDecrypt in -losptk... $ECHO_C" >&6
@@ -7894,7 +7912,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-losptk ${libdir} -lcrypto -lssl $LIBS"
+LIBS="-losptk ${pbxlibdir} -lcrypto -lssl $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7960,7 +7978,7 @@
       osptk_LIB="-losptk -lcrypto -lssl"
       OSPTK_HEADER_FOUND="1"
       if test "x${osptk_DIR}" != "x"; then
-         osptk_LIB="${libdir} ${osptk_LIB}"
+         osptk_LIB="${pbxlibdir} ${osptk_LIB}"
 	 osptk_INCLUDE="-I${osptk_DIR}/include"
 	 if test "xosp/osp.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${osptk_DIR}/include/osp/osp.h" | $as_tr_sh`
@@ -8312,9 +8330,9 @@
 PBX_LIBpopt=0
 
 if test "${USE_popt}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${popt_DIR}" != "x"; then
-      libdir="-L${popt_DIR}/lib"
+      pbxlibdir="-L${popt_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for poptStrerror in -lpopt" >&5
 echo $ECHO_N "checking for poptStrerror in -lpopt... $ECHO_C" >&6
@@ -8322,7 +8340,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpopt ${libdir}  $LIBS"
+LIBS="-lpopt ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8388,7 +8406,7 @@
       popt_LIB="-lpopt "
       POPT_HEADER_FOUND="1"
       if test "x${popt_DIR}" != "x"; then
-         popt_LIB="${libdir} ${popt_LIB}"
+         popt_LIB="${pbxlibdir} ${popt_LIB}"
 	 popt_INCLUDE="-I${popt_DIR}/include"
 	 if test "xpopt.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${popt_DIR}/include/popt.h" | $as_tr_sh`
@@ -8740,9 +8758,9 @@
 PBX_LIBpri=0
 
 if test "${USE_pri}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${pri_DIR}" != "x"; then
-      libdir="-L${pri_DIR}/lib"
+      pbxlibdir="-L${pri_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for pri_call in -lpri" >&5
 echo $ECHO_N "checking for pri_call in -lpri... $ECHO_C" >&6
@@ -8750,7 +8768,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpri ${libdir}  $LIBS"
+LIBS="-lpri ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8816,7 +8834,7 @@
       pri_LIB="-lpri "
       LIBPRI_HEADER_FOUND="1"
       if test "x${pri_DIR}" != "x"; then
-         pri_LIB="${libdir} ${pri_LIB}"
+         pri_LIB="${pbxlibdir} ${pri_LIB}"
 	 pri_INCLUDE="-I${pri_DIR}/include"
 	 if test "xlibpri.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${pri_DIR}/include/libpri.h" | $as_tr_sh`
@@ -9168,9 +9186,9 @@
 PBX_LIBspeex=0
 
 if test "${USE_speex}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${speex_DIR}" != "x"; then
-      libdir="-L${speex_DIR}/lib"
+      pbxlibdir="-L${speex_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for speex_encode in -lspeex" >&5
 echo $ECHO_N "checking for speex_encode in -lspeex... $ECHO_C" >&6
@@ -9178,7 +9196,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lspeex ${libdir} -lm $LIBS"
+LIBS="-lspeex ${pbxlibdir} -lm $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -9244,7 +9262,7 @@
       speex_LIB="-lspeex -lm"
       SPEEX_HEADER_FOUND="1"
       if test "x${speex_DIR}" != "x"; then
-         speex_LIB="${libdir} ${speex_LIB}"
+         speex_LIB="${pbxlibdir} ${speex_LIB}"
 	 speex_INCLUDE="-I${speex_DIR}/include"
 	 if test "xspeex/speex.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${speex_DIR}/include/speex/speex.h" | $as_tr_sh`
@@ -9596,9 +9614,9 @@
 PBX_LIBsqlite=0
 
 if test "${USE_sqlite}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${sqlite_DIR}" != "x"; then
-      libdir="-L${sqlite_DIR}/lib"
+      pbxlibdir="-L${sqlite_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for sqlite_exec in -lsqlite" >&5
 echo $ECHO_N "checking for sqlite_exec in -lsqlite... $ECHO_C" >&6
@@ -9606,7 +9624,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsqlite ${libdir}  $LIBS"
+LIBS="-lsqlite ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -9672,7 +9690,7 @@
       sqlite_LIB="-lsqlite "
       SQLITE_HEADER_FOUND="1"
       if test "x${sqlite_DIR}" != "x"; then
-         sqlite_LIB="${libdir} ${sqlite_LIB}"
+         sqlite_LIB="${pbxlibdir} ${sqlite_LIB}"
 	 sqlite_INCLUDE="-I${sqlite_DIR}/include"
 	 if test "xsqlite.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${sqlite_DIR}/include/sqlite.h" | $as_tr_sh`
@@ -10024,9 +10042,9 @@
 PBX_LIBssl=0
 
 if test "${USE_ssl}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${ssl_DIR}" != "x"; then
-      libdir="-L${ssl_DIR}/lib"
+      pbxlibdir="-L${ssl_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for ssl2_connect in -lssl" >&5
 echo $ECHO_N "checking for ssl2_connect in -lssl... $ECHO_C" >&6
@@ -10034,7 +10052,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl ${libdir} -lcrypto $LIBS"
+LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -10100,7 +10118,7 @@
       ssl_LIB="-lssl -lcrypto"
       OPENSSL_HEADER_FOUND="1"
       if test "x${ssl_DIR}" != "x"; then
-         ssl_LIB="${libdir} ${ssl_LIB}"
+         ssl_LIB="${pbxlibdir} ${ssl_LIB}"
 	 ssl_INCLUDE="-I${ssl_DIR}/include"
 	 if test "xopenssl/ssl.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${ssl_DIR}/include/openssl/ssl.h" | $as_tr_sh`
@@ -10452,9 +10470,9 @@
 PBX_LIBtds=0
 
 if test "${USE_tds}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${tds_DIR}" != "x"; then
-      libdir="-L${tds_DIR}/lib"
+      pbxlibdir="-L${tds_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for tds_version in -ltds" >&5
 echo $ECHO_N "checking for tds_version in -ltds... $ECHO_C" >&6
@@ -10462,7 +10480,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltds ${libdir}  $LIBS"
+LIBS="-ltds ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -10528,7 +10546,7 @@
       tds_LIB="-ltds "
       FREETDS_HEADER_FOUND="1"
       if test "x${tds_DIR}" != "x"; then
-         tds_LIB="${libdir} ${tds_LIB}"
+         tds_LIB="${pbxlibdir} ${tds_LIB}"
 	 tds_INCLUDE="-I${tds_DIR}/include"
 	 if test "xtds.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${tds_DIR}/include/tds.h" | $as_tr_sh`
@@ -10880,9 +10898,9 @@
 PBX_LIBtermcap=0
 
 if test "${USE_termcap}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${termcap_DIR}" != "x"; then
-      libdir="-L${termcap_DIR}/lib"
+      pbxlibdir="-L${termcap_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
@@ -10890,7 +10908,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltermcap ${libdir}  $LIBS"
+LIBS="-ltermcap ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -10956,7 +10974,7 @@
       termcap_LIB="-ltermcap "
       TERMCAP_HEADER_FOUND="1"
       if test "x${termcap_DIR}" != "x"; then
-         termcap_LIB="${libdir} ${termcap_LIB}"
+         termcap_LIB="${pbxlibdir} ${termcap_LIB}"
 	 termcap_INCLUDE="-I${termcap_DIR}/include"
 	 if test "x" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${termcap_DIR}/include/" | $as_tr_sh`
@@ -11308,9 +11326,9 @@
 PBX_LIBtinfo=0
 
 if test "${USE_tinfo}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${tinfo_DIR}" != "x"; then
-      libdir="-L${tinfo_DIR}/lib"
+      pbxlibdir="-L${tinfo_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5
 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6
@@ -11318,7 +11336,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltinfo ${libdir}  $LIBS"
+LIBS="-ltinfo ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -11384,7 +11402,7 @@
       tinfo_LIB="-ltinfo "
       TINFO_HEADER_FOUND="1"
       if test "x${tinfo_DIR}" != "x"; then
-         tinfo_LIB="${libdir} ${tinfo_LIB}"
+         tinfo_LIB="${pbxlibdir} ${tinfo_LIB}"
 	 tinfo_INCLUDE="-I${tinfo_DIR}/include"
 	 if test "x" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${tinfo_DIR}/include/" | $as_tr_sh`
@@ -11736,9 +11754,9 @@
 PBX_LIBvorbis=0
 
 if test "${USE_vorbis}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${vorbis_DIR}" != "x"; then
-      libdir="-L${vorbis_DIR}/lib"
+      pbxlibdir="-L${vorbis_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for vorbis_info_init in -lvorbis" >&5
 echo $ECHO_N "checking for vorbis_info_init in -lvorbis... $ECHO_C" >&6
@@ -11746,7 +11764,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lvorbis ${libdir} -lm -lvorbisenc $LIBS"
+LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -11812,7 +11830,7 @@
       vorbis_LIB="-lvorbis -lm -lvorbisenc"
       VORBIS_HEADER_FOUND="1"
       if test "x${vorbis_DIR}" != "x"; then
-         vorbis_LIB="${libdir} ${vorbis_LIB}"
+         vorbis_LIB="${pbxlibdir} ${vorbis_LIB}"
 	 vorbis_INCLUDE="-I${vorbis_DIR}/include"
 	 if test "xvorbis/codec.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${vorbis_DIR}/include/vorbis/codec.h" | $as_tr_sh`
@@ -12164,9 +12182,9 @@
 PBX_LIBz=0
 
 if test "${USE_z}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${z_DIR}" != "x"; then
-      libdir="-L${z_DIR}/lib"
+      pbxlibdir="-L${z_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for compress in -lz" >&5
 echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6
@@ -12174,7 +12192,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz ${libdir}  $LIBS"
+LIBS="-lz ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -12240,7 +12258,7 @@
       z_LIB="-lz "
       ZLIB_HEADER_FOUND="1"
       if test "x${z_DIR}" != "x"; then
-         z_LIB="${libdir} ${z_LIB}"
+         z_LIB="${pbxlibdir} ${z_LIB}"
 	 z_INCLUDE="-I${z_DIR}/include"
 	 if test "xzlib.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${z_DIR}/include/zlib.h" | $as_tr_sh`
@@ -12908,9 +12926,9 @@
 PBX_LIBossaudio=0
 
 if test "${USE_ossaudio}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${ossaudio_DIR}" != "x"; then
-      libdir="-L${ossaudio_DIR}/lib"
+      pbxlibdir="-L${ossaudio_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for oss_ioctl_mixer in -lossaudio" >&5
 echo $ECHO_N "checking for oss_ioctl_mixer in -lossaudio... $ECHO_C" >&6
@@ -12918,7 +12936,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lossaudio ${libdir}  $LIBS"
+LIBS="-lossaudio ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -12984,7 +13002,7 @@
       ossaudio_LIB="-lossaudio "
       OSS_HEADER_FOUND="1"
       if test "x${ossaudio_DIR}" != "x"; then
-         ossaudio_LIB="${libdir} ${ossaudio_LIB}"
+         ossaudio_LIB="${pbxlibdir} ${ossaudio_LIB}"
 	 ossaudio_INCLUDE="-I${ossaudio_DIR}/include"
 	 if test "xsoundcard.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${ossaudio_DIR}/include/soundcard.h" | $as_tr_sh`
@@ -13341,9 +13359,9 @@
 PBX_LIBtonezone=0
 
 if test "${USE_tonezone}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${tonezone_DIR}" != "x"; then
-      libdir="-L${tonezone_DIR}/lib"
+      pbxlibdir="-L${tonezone_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for tone_zone_find in -ltonezone" >&5
 echo $ECHO_N "checking for tone_zone_find in -ltonezone... $ECHO_C" >&6
@@ -13351,7 +13369,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltonezone ${libdir}  $LIBS"
+LIBS="-ltonezone ${pbxlibdir}  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13417,7 +13435,7 @@
       tonezone_LIB="-ltonezone "
       ZAPTEL_HEADER_FOUND="1"
       if test "x${tonezone_DIR}" != "x"; then
-         tonezone_LIB="${libdir} ${tonezone_LIB}"
+         tonezone_LIB="${pbxlibdir} ${tonezone_LIB}"
 	 tonezone_INCLUDE="-I${tonezone_DIR}/include"
 	 if test "xlinux/zaptel.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${tonezone_DIR}/include/linux/zaptel.h" | $as_tr_sh`
@@ -13770,9 +13788,9 @@
 PBX_LIBtonezone=0
 
 if test "${USE_tonezone}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${tonezone_DIR}" != "x"; then
-      libdir="-L${tonezone_DIR}/lib"
+      pbxlibdir="-L${tonezone_DIR}/lib"
    fi
    echo "$as_me:$LINENO: checking for tone_zone_find in -ltonezone" >&5
 echo $ECHO_N "checking for tone_zone_find in -ltonezone... $ECHO_C" >&6
@@ -13780,7 +13798,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltonezone ${libdir} -lm $LIBS"
+LIBS="-ltonezone ${pbxlibdir} -lm $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13846,7 +13864,7 @@
       tonezone_LIB="-ltonezone -lm"
       ZAPTEL_HEADER_FOUND="1"
       if test "x${tonezone_DIR}" != "x"; then
-         tonezone_LIB="${libdir} ${tonezone_LIB}"
+         tonezone_LIB="${pbxlibdir} ${tonezone_LIB}"
 	 tonezone_INCLUDE="-I${tonezone_DIR}/include"
 	 if test "xzaptel.h" != "x" ; then
 	    as_ac_Header=`echo "ac_cv_header_${tonezone_DIR}/include/zaptel.h" | $as_tr_sh`
@@ -14204,9 +14222,9 @@
 
 if test "${USE_GSM}" != "no"; then
    if test "${GSM_SYSTEM}" = "yes"; then
-      libdir=""
+      gsmlibdir=""
       if test "x${GSM_DIR}" != "x"; then
-         libdir="-L${GSM_DIR}/lib"
+         gsmlibdir="-L${GSM_DIR}/lib"
       fi
       echo "$as_me:$LINENO: checking for gsm_create in -lgsm" >&5
 echo $ECHO_N "checking for gsm_create in -lgsm... $ECHO_C" >&6
@@ -14214,7 +14232,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgsm ${libdir} $LIBS"
+LIBS="-lgsm ${gsmlibdir} $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14282,7 +14300,7 @@
       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
 	 gsm_LIB="-lgsm"
 	 if test "x${GSM_DIR}" != "x"; then
-	    gsm_LIB="${libdir} ${gsm_LIB}"
+	    gsm_LIB="${gsmlibdir} ${gsm_LIB}"
 	    gsm_INCLUDE="-I${GSM_DIR}/include"
 	 fi
 	 PBX_LIBgsm=1

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=28747&r1=28746&r2=28747&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri May 19 13:54:21 2006
@@ -22,7 +22,26 @@
 AC_COPYRIGHT("Asterisk")
 AC_REVISION($Revision$)
 
-AC_PREFIX_DEFAULT()
+case "${host}" in
+     *freebsd*)
+     ac_default_prefix=/usr/local
+     ;;
+     *)
+     ac_default_prefix=/usr
+     ;;
+esac
+
+if test ${sysconfdir} = '${prefix}/etc'; then
+   sysconfdir=/etc
+fi
+
+if test ${localstatedir} = '${prefix}/var'; then
+   localstatedir=/var
+fi
+
+if test ${mandir} = '${prefix}/man'; then
+   mandir=/usr/share/man
+fi
 
 ### ** Platform.
 AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host}",
@@ -251,16 +270,16 @@
 
 if test "${USE_GSM}" != "no"; then
    if test "${GSM_SYSTEM}" = "yes"; then
-      libdir=""
+      gsmlibdir=""
       if test "x${GSM_DIR}" != "x"; then
-         libdir="-L${GSM_DIR}/lib"
+         gsmlibdir="-L${GSM_DIR}/lib"
       fi
       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
-      [Define to indicate the GSM library]), [], ${libdir})
+      [Define to indicate the GSM library]), [], ${gsmlibdir})
       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
 	 gsm_LIB="-lgsm"
 	 if test "x${GSM_DIR}" != "x"; then
-	    gsm_LIB="${libdir} ${gsm_LIB}"
+	    gsm_LIB="${gsmlibdir} ${gsm_LIB}"
 	    gsm_INCLUDE="-I${GSM_DIR}/include"
 	 fi
 	 PBX_LIBgsm=1

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?rev=28747&r1=28746&r2=28747&view=diff
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Fri May 19 13:54:21 2006
@@ -20,7 +20,20 @@
 OSARCH=@PBX_OSTYPE@
 OSREV=@PBX_OSREV@
 
-INSTALL_PREFIX=@prefix@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+datadir = @datadir@
+includedir = @includedir@
+infodir = @infodir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
 
 AST_DEVMODE=@AST_DEVMODE@
 



More information about the asterisk-commits mailing list