[asterisk-commits] tilghman: trunk r261913 - in /trunk: ./ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 7 15:35:22 CDT 2010
Author: tilghman
Date: Fri May 7 15:35:17 2010
New Revision: 261913
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261913
Log:
Use the detected pthread building flags in every place, instead of hardcoding -lpthread.
We nicely detect the right flags on each system for building Asterisk with
pthreads, then ignore it for every other build option that requires us to
build with pthreads. This caused some items to return a false negative.
Also cleanup some minor naming issues that caused "library library" redundancy
in the output.
(closes issue #17303)
Reported by: stuarth
Patches:
20100507__issue17303.diff.txt uploaded by tilghman (license 14)
Tested by: stuarth
Modified:
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=261913&r1=261912&r2=261913
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri May 7 15:35:17 2010
@@ -299,32 +299,32 @@
# BKTR is used for backtrace support on platforms that do not
# have it natively.
-AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace support], [execinfo])
-AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth Support], [bluetooth])
+AST_EXT_LIB_SETUP([BKTR], [Stack Backtrace], [execinfo])
+AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth], [bluetooth])
AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
-AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography support], [crypto])
+AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography], [crypto])
AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
-AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec library], [avcodec])
-AST_EXT_LIB_SETUP([GSM], [External GSM library], [gsm], [, use 'internal' GSM otherwise])
-AST_EXT_LIB_SETUP([GTK2], [gtk2 libraries], [gtk2])
-AST_EXT_LIB_SETUP([GMIME], [GMime library], [gmime])
+AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec])
+AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
+AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
+AST_EXT_LIB_SETUP([GMIME], [GMime], [gmime])
AST_EXT_LIB_SETUP([HOARD], [Hoard Memory Allocator], [hoard])
-AST_EXT_LIB_SETUP([ICAL], [ical libraries], [ical])
-AST_EXT_LIB_SETUP([ICONV], [Iconv Library], [iconv])
-AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
+AST_EXT_LIB_SETUP([ICAL], [iCal], [ical])
+AST_EXT_LIB_SETUP([ICONV], [Iconv], [iconv])
+AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber], [iksemel])
AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
AST_EXT_LIB_SETUP([INOTIFY], [inotify support], [inotify])
AST_EXT_LIB_SETUP([IODBC], [iODBC], [iodbc])
-AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
+AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux], [isdnnet])
AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
-AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
-AST_EXT_LIB_SETUP([MYSQLCLIENT], [mysqlclient], [mysqlclient])
+AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn])
+AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient])
AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
AST_EXT_LIB_SETUP([NEON], [neon], [neon])
@@ -359,16 +359,16 @@
AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
-AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
+AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image], [SDL_image])
AST_EXT_LIB_SETUP([OPENAIS], [OpenAIS], [openais])
AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
AST_EXT_LIB_SETUP([SPEEX_PREPROCESS], [Speex preprocess routines], [speex])
-AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
+AST_EXT_LIB_SETUP([SPEEXDSP], [SpeexDSP], [speexdsp])
AST_EXT_LIB_SETUP_DEPENDENT([SPEEX_PREPROCESS], [speex_preprocess_ctl], [], [speex])
AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
AST_EXT_LIB_SETUP([SQLITE3], [SQLite], [sqlite3])
AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
-AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer support], [ssl])
+AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer], [ssl])
AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
@@ -377,8 +377,8 @@
AST_EXT_LIB_SETUP([USB], [usb], [usb])
AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
-AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
-AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
+AST_EXT_LIB_SETUP([X11], [X11], [x11])
+AST_EXT_LIB_SETUP([ZLIB], [zlib compression], [z])
AST_EXT_LIB_SETUP([TIMERFD], [timerfd], [timerfd])
# check for basic system features and functionality before
@@ -558,6 +558,10 @@
)
AC_MSG_CHECKING(for pthread_rwlock_timedwrlock() in pthread.h)
+save_LIBS="$LIBS"
+save_CFLAGS="$CFLAGS"
+LIBS="$PTHREAD_LIBS $LIBS"
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>
@@ -571,6 +575,8 @@
ac_cv_pthread_rwlock_timedwrlock="no"
]
)
+LIBS="$save_LIBS"
+CFLAGS="$save_CFLAGS"
if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
AC_DEFINE([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK], 1, [Define if your system has pthread_rwlock_timedwrlock()])
fi
@@ -893,7 +899,10 @@
# Some versions of Linux package iconv in glibc
AST_EXT_LIB_CHECK([ICONV], [c], [iconv_close], [iconv.h])
-AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [libical/ical.h], [-lpthread])
+AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
+
+# Some distributions (like RedHat) add a libical subdirectory for the headers
+AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_get_utc_timezone], [libical/ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
@@ -1419,7 +1428,7 @@
LIBS="${saved_libs}"
fi
-AST_EXT_LIB_CHECK([IODBC], [iodbc], [SQLConnect], [sql.h], [-lpthread])
+AST_EXT_LIB_CHECK([IODBC], [iodbc], [SQLConnect], [sql.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
AST_EXT_LIB_CHECK([INOTIFY], [c], [inotify_init], [sys/inotify.h])
@@ -1721,6 +1730,7 @@
if test "${USE_VPB}" != "no"; then
AC_MSG_CHECKING(for vpb_open in -lvpb)
saved_libs="${LIBS}"
+ saved_cflags="${CFLAGS}"
saved_cppflags="${CPPFLAGS}"
if test "x${VPB_DIR}" != "x"; then
if test -d ${VPB_DIR}/lib; then
@@ -1731,7 +1741,8 @@
LIBS="${LIBS} -L${vpblibdir}"
CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
fi
- LIBS="${LIBS} -lvpb -lpthread"
+ LIBS="${PTHREAD_LIBS} ${LIBS} -lvpb"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
@@ -1745,6 +1756,7 @@
ac_cv_lib_vpb_vpb_open="no"
]
)
+ CFLAGS="${saved_cflags}"
LIBS="${saved_libs}"
CPPFLAGS="${saved_cppflags}"
if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
@@ -1810,7 +1822,7 @@
AST_EXT_TOOL_CHECK([SDL], [sdl-config])
AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
-AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [-lpthread -lz -lm])
+AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [${PTHREAD_LIBS} -lz -lm], [${PTHREAD_CFLAGS}])
# possible places for video4linux version 1
AC_CHECK_HEADER([linux/videodev.h],
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=261913&r1=261912&r2=261913
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Fri May 7 15:35:17 2010
@@ -106,16 +106,16 @@
/* Define to 1 if your GCC C compiler supports the 'weakref' attribute. */
#undef HAVE_ATTRIBUTE_weakref
-/* Define to 1 if you have the Stack Backtrace support library. */
+/* Define to 1 if you have the Stack Backtrace library. */
#undef HAVE_BKTR
-/* Define to the version of the Stack Backtrace support library. */
+/* Define to the version of the Stack Backtrace library. */
#undef HAVE_BKTR_VERSION
-/* Define to 1 if you have the Bluetooth Support library. */
+/* Define to 1 if you have the Bluetooth library. */
#undef HAVE_BLUETOOTH
-/* Define to the version of the Bluetooth Support library. */
+/* Define to the version of the Bluetooth library. */
#undef HAVE_BLUETOOTH_VERSION
/* Define to 1 if byteswap.h macros are available. */
@@ -145,10 +145,10 @@
/* Define to 1 if you have the `cosl' function. */
#undef HAVE_COSL
-/* Define to 1 if you have the OpenSSL Cryptography support library. */
+/* Define to 1 if you have the OpenSSL Cryptography library. */
#undef HAVE_CRYPTO
-/* Define to the version of the OpenSSL Cryptography support library. */
+/* Define to the version of the OpenSSL Cryptography library. */
#undef HAVE_CRYPTO_VERSION
/* Define to 1 if you have a functional curl library. */
@@ -230,10 +230,10 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
-/* Define to 1 if you have the Ffmpeg and avcodec library library. */
+/* Define to 1 if you have the Ffmpeg and avcodec library. */
#undef HAVE_FFMPEG
-/* Define to the version of the Ffmpeg and avcodec library library. */
+/* Define to the version of the Ffmpeg and avcodec library. */
#undef HAVE_FFMPEG_VERSION
/* Define to 1 if you have the `ffsll' function. */
@@ -326,7 +326,7 @@
/* Define if your system has the GMIME libraries. */
#undef HAVE_GMIME
-/* Define to the version of the GMime library library. */
+/* Define to the version of the GMime library. */
#undef HAVE_GMIME_VERSION
/* Define to indicate the GSM library */
@@ -338,13 +338,13 @@
/* Define to indicate that gsm.h has no prefix for its location */
#undef HAVE_GSM_HEADER
-/* Define to the version of the External GSM library library. */
+/* Define to the version of the External GSM library. */
#undef HAVE_GSM_VERSION
/* Define if your system has the GTK2 libraries. */
#undef HAVE_GTK2
-/* Define to the version of the gtk2 libraries library. */
+/* Define to the version of the gtk2 library. */
#undef HAVE_GTK2_VERSION
/* Define to 1 if you have the Hoard Memory Allocator library. */
@@ -356,22 +356,22 @@
/* Define to 1 if you have the `htonll' function. */
#undef HAVE_HTONLL
-/* Define to 1 if you have the ical libraries library. */
+/* Define to 1 if you have the iCal library. */
#undef HAVE_ICAL
-/* Define to the version of the ical libraries library. */
+/* Define to the version of the iCal library. */
#undef HAVE_ICAL_VERSION
-/* Define to 1 if you have the Iconv Library library. */
+/* Define to 1 if you have the Iconv library. */
#undef HAVE_ICONV
-/* Define to the version of the Iconv Library library. */
+/* Define to the version of the Iconv library. */
#undef HAVE_ICONV_VERSION
-/* Define to 1 if you have the Iksemel Jabber Library library. */
+/* Define to 1 if you have the Iksemel Jabber library. */
#undef HAVE_IKSEMEL
-/* Define to the version of the Iksemel Jabber Library library. */
+/* Define to the version of the Iksemel Jabber library. */
#undef HAVE_IKSEMEL_VERSION
/* Define if your system has the UW IMAP Toolkit c-client library. */
@@ -417,10 +417,10 @@
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
-/* Define to 1 if you have the ISDN4Linux Library library. */
+/* Define to 1 if you have the ISDN4Linux library. */
#undef HAVE_ISDNNET
-/* Define to the version of the ISDN4Linux Library library. */
+/* Define to the version of the ISDN4Linux library. */
#undef HAVE_ISDNNET_VERSION
/* Define to 1 if you have the Jack Audio Connection Kit library. */
@@ -508,7 +508,7 @@
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
-/* Define to 1 if you have the mISDN User Library library. */
+/* Define to 1 if you have the mISDN user library. */
#undef HAVE_MISDN
/* Define if your system has the MISDN_FAC_ERROR headers. */
@@ -523,7 +523,7 @@
/* Define MISDN_FAC_RESULT headers version */
#undef HAVE_MISDN_FAC_RESULT_VERSION
-/* Define to the version of the mISDN User Library library. */
+/* Define to the version of the mISDN user library. */
#undef HAVE_MISDN_VERSION
/* Define to 1 if you have the `mkdir' function. */
@@ -544,7 +544,7 @@
/* Define if your system has the MYSQLCLIENT libraries. */
#undef HAVE_MYSQLCLIENT
-/* Define to the version of the mysqlclient library. */
+/* Define to the version of the MySQL client library. */
#undef HAVE_MYSQLCLIENT_VERSION
/* Define to 1 if you have the Network Broadcast Sound library. */
@@ -619,12 +619,10 @@
/* Define to the version of the MFR2 library. */
#undef HAVE_OPENR2_VERSION
-/* Define to 1 if you have the OpenSSL Secure Sockets Layer support library.
- */
+/* Define to 1 if you have the OpenSSL Secure Sockets Layer library. */
#undef HAVE_OPENSSL
-/* Define to the version of the OpenSSL Secure Sockets Layer support library.
- */
+/* Define to the version of the OpenSSL Secure Sockets Layer library. */
#undef HAVE_OPENSSL_VERSION
/* Define this to indicate the ${OSPTK_DESCRIP} library */
@@ -794,10 +792,10 @@
/* Define if your system has the SDL libraries. */
#undef HAVE_SDL
-/* Define to 1 if you have the Sdl Image library library. */
+/* Define to 1 if you have the Sdl Image library. */
#undef HAVE_SDL_IMAGE
-/* Define to the version of the Sdl Image library library. */
+/* Define to the version of the Sdl Image library. */
#undef HAVE_SDL_IMAGE_VERSION
/* Define to the version of the Sdl library. */
@@ -836,10 +834,10 @@
/* Define to 1 if you have the Speex library. */
#undef HAVE_SPEEX
-/* Define to 1 if you have the Speexdsp library. */
+/* Define to 1 if you have the SpeexDSP library. */
#undef HAVE_SPEEXDSP
-/* Define to the version of the Speexdsp library. */
+/* Define to the version of the SpeexDSP library. */
#undef HAVE_SPEEXDSP_VERSION
/* Define to 1 if you have the speex_preprocess_ctl library. */
@@ -1201,16 +1199,16 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
-/* Define to 1 if you have the X11 support library. */
+/* Define to 1 if you have the X11 library. */
#undef HAVE_X11
-/* Define to the version of the X11 support library. */
+/* Define to the version of the X11 library. */
#undef HAVE_X11_VERSION
-/* Define to 1 if you have the zlib library. */
+/* Define to 1 if you have the zlib compression library. */
#undef HAVE_ZLIB
-/* Define to the version of the zlib library. */
+/* Define to the version of the zlib compression library. */
#undef HAVE_ZLIB_VERSION
/* Define to 1 if the system has the type `_Bool'. */
More information about the asterisk-commits
mailing list