From cfb6c1bbff338248d922fbe5b8fa68d2dc8cda8c Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:16 +0100 Subject: [PATCH 001/136] Import of version 3.0.1 --- ChangeLog | 13 +++- README.TXT | 4 +- configure | 121 ++++++++++++++++++++++++++----- configure.in | 44 ++++++++---- doc/jrtplib.tex | 4 +- jrtplib.dsp | 4 +- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtpipv4destination.h | 19 +++++ src/rtpipv6destination.h | 25 +++++-- src/rtppacket.cpp | 2 +- src/rtppollthread.cpp | 2 + src/rtpsession.cpp | 6 ++ src/rtpsession.h | 1 + src/rtptransmitter.h | 3 + src/rtptypes_win.h | 0 src/rtpudpv4transmitter.cpp | 136 ++++++++++++++++++++++++++++++++++- src/rtpudpv4transmitter.h | 4 +- src/rtpudpv6transmitter.cpp | 139 +++++++++++++++++++++++++++++++++++- src/rtpudpv6transmitter.h | 4 +- 20 files changed, 483 insertions(+), 52 deletions(-) mode change 100644 => 100755 src/rtptypes_win.h diff --git a/ChangeLog b/ChangeLog index 701f02f..b120025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,19 @@ - August 18, 2004 + September 4, 2004 JRTPLIB ChangeLog ----------- - + + 3.0.1 (September 2004) + * Bugfix in rtpudpv4transmitter.cpp and rtpudpv6transmitter.cpp in + method SetReceiveMode + * Removed unused 'acceptownpackets' variable from + rtpudpv4transmitter.cpp and rtpudpv6transmitter.cpp + * Added a 'Dump' function (for debugging) in RTPUDPv4Transmitter + and RTPUDPv6Transmitter + * Now using JThread 1.1.0 + 3.0.0 (August 2004) * Complete rewrite of the library to provide better extensibility and compliance with RFC 3550 diff --git a/README.TXT b/README.TXT index 67bca3d..4810685 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - August 18, 2004 + September 4, 2004 - JRTPLIB (v3.0.0) + JRTPLIB (v3.0.1) Developed at the The Expertise Centre for diff --git a/configure b/configure index b29004c..6529e79 100755 --- a/configure +++ b/configure @@ -1797,7 +1797,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.0.0 + VERSION=3.0.1 cat >>confdefs.h <<_ACEOF @@ -19121,40 +19121,129 @@ if test "${with_jthread_includes+set}" = set; then withval="$with_jthread_includes" if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then - RTP_JTHREADINCLUDES="-I $withval" echo "$as_me:$LINENO: result: in \"$withval\"" >&5 echo "${ECHO_T}in \"$withval\"" >&6 - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + echo "$as_me:$LINENO: checking JThread version" >&5 +echo $ECHO_N "checking JThread version... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + #include "$withval/jthread.h" + class MyThread : public JThread + { + public: + void *Thread() { JThread::ThreadStarted(); } + }; +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + RTP_JTHREADINCLUDES="-I $withval" + RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + echo "$as_me:$LINENO: result: >= 1.1.0" >&5 +echo "${ECHO_T}>= 1.1.0" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: < 1.1.0" >&5 +echo "${ECHO_T}< 1.1.0" >&6 + { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 +echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 - { echo "$as_me:$LINENO: WARNING: The JThread include files were not found in $withval. Support for JThread has been - disabled" >&5 -echo "$as_me: WARNING: The JThread include files were not found in $withval. Support for JThread has been - disabled" >&2;} + { echo "$as_me:$LINENO: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&5 +echo "$as_me: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&2;} fi else for i in $searchdirs ; do if test -e $i/jthread.h && test -e $i/jmutex.h ; then - RTP_JTHREADINCLUDES="-I $i" + RTP_JTHREADINCLUDEDIR="$i" echo "$as_me:$LINENO: result: $i" >&5 echo "${ECHO_T}$i" >&6 break fi done - if test "BLAAI$RTP_JTHREADINCLUDES" = "BLAAI" ; then + if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 - { echo "$as_me:$LINENO: WARNING: Unable to locate the JThread include files. - Please specify the include path with --with-jthread-includes if they - exist on your system. JThread support has been disabled" >&5 -echo "$as_me: WARNING: Unable to locate the JThread include files. - Please specify the include path with --with-jthread-includes if they - exist on your system. JThread support has been disabled" >&2;} + { echo "$as_me:$LINENO: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&5 +echo "$as_me: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&2;} else - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + echo "$as_me:$LINENO: checking JThread version" >&5 +echo $ECHO_N "checking JThread version... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + #include "$RTP_JTHREADINCLUDEDIR/jthread.h" + class MyThread : public JThread + { + public: + void *Thread() { JThread::ThreadStarted(); } + }; +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" + RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + echo "$as_me:$LINENO: result: >= 1.1.0" >&5 +echo "${ECHO_T}>= 1.1.0" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: < 1.1.0" >&5 +echo "${ECHO_T}< 1.1.0" >&6 + { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 +echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi fi; diff --git a/configure.in b/configure.in index 59bcdb3..b91754c 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.0.0) +AM_INIT_AUTOMAKE(jrtplib,3.0.1) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -84,32 +84,50 @@ if test "$checkjthread" = "yes" ; then AC_ARG_WITH(jthread-includes,[ --with-jthread-includes Directory where JThread include files are located], [ if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then - RTP_JTHREADINCLUDES="-I $withval" AC_MSG_RESULT(in "$withval") - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + AC_MSG_CHECKING(JThread version) + AC_COMPILE_IFELSE([ + #include "$withval/jthread.h" + class MyThread : public JThread + { + public: + void *Thread() { JThread::ThreadStarted(); } + };],[ + RTP_JTHREADINCLUDES="-I $withval" + RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + AC_MSG_RESULT(>= 1.1.0) ],[ + AC_MSG_RESULT(< 1.1.0) + AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) else AC_MSG_RESULT(not found) - AC_MSG_WARN( - The JThread include files were not found in $withval. Support for JThread has been - disabled) + AC_MSG_WARN(The JThread include files were not found in $withval. Support for JThread has been disabled) fi ], [ for i in $searchdirs ; do if test -e $i/jthread.h && test -e $i/jmutex.h ; then - RTP_JTHREADINCLUDES="-I $i" + RTP_JTHREADINCLUDEDIR="$i" AC_MSG_RESULT($i) break fi done - if test "BLAAI$RTP_JTHREADINCLUDES" = "BLAAI" ; then + if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then AC_MSG_RESULT(not found) - AC_MSG_WARN( - Unable to locate the JThread include files. - Please specify the include path with --with-jthread-includes if they - exist on your system. JThread support has been disabled) + AC_MSG_WARN(Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled) else - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + AC_MSG_CHECKING(JThread version) + AC_COMPILE_IFELSE([ + #include "$RTP_JTHREADINCLUDEDIR/jthread.h" + class MyThread : public JThread + { + public: + void *Thread() { JThread::ThreadStarted(); } + };],[ + RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" + RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + AC_MSG_RESULT(>= 1.1.0) ],[ + AC_MSG_RESULT(< 1.1.0) + AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) fi ]) fi diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index cfcdb57..eb7a6bd 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.0.0} +\newcommand{\jversion}{3.0.1} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.luc.ac.be}} - \date{August 18, 2004\\\vspace{0.5cm}\ \\ + \date{September 4, 2004\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute of\\ the Limburgs Universitair Centrum (LUC)}\\\ \\ {\tt http://www.edm.luc.ac.be/}\\ diff --git a/jrtplib.dsp b/jrtplib.dsp index 20b94b3..f20597f 100644 --- a/jrtplib.dsp +++ b/jrtplib.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.0.1\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.1.0\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD BASE RSC /l 0x813 /d "NDEBUG" # ADD RSC /l 0x813 /d "NDEBUG" BSC32=bscmake.exe @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\jthread-1.0.1\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\jthread-1.1.0\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD BASE RSC /l 0x813 /d "_DEBUG" # ADD RSC /l 0x813 /d "_DEBUG" BSC32=bscmake.exe diff --git a/src/Makefile.am b/src/Makefile.am index 16bb23c..5a14eb6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -version-info 3:0:0 +libjrtp_la_LDFLAGS = -release 3.0.1 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 12753f0..427d139 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -243,7 +243,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -version-info 3:0:0 +libjrtp_la_LDFLAGS = -release 3.0.1 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 4fc3770..8b4186d 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -40,6 +40,10 @@ #else #include #endif // WIN32 +#ifdef RTPDEBUG + #include + #include +#endif // RTPDEBUG class RTPIPv4Destination { @@ -52,6 +56,9 @@ class RTPIPv4Destination u_int16_t GetRTPPort_NBO() const { return rtpport_nbo; } u_int16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } bool operator==(const RTPIPv4Destination &src) const { if (src.ipaddr_nbo == ipaddr_nbo && src.rtpport_nbo == rtpport_nbo) return true; return false; } // NOTE: I only check IP and portbase +#ifdef RTPDEBUG + std::string GetDestinationString() const; +#endif // RTPDEBUG private: u_int32_t ipaddr_hbo; u_int32_t ipaddr_nbo; @@ -59,4 +66,16 @@ class RTPIPv4Destination u_int16_t rtcpport_nbo; }; +#ifdef RTPDEBUG +inline std::string RTPIPv4Destination::GetDestinationString() const +{ + char str[1024]; + u_int32_t ip = ipaddr_hbo; + u_int16_t portbase = ntohs(rtpport_nbo); + + sprintf(str,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); + return std::string(str); +} +#endif // RTPDEBUG + #endif // RTPIPV4DESTINATION diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 7a5d757..0f96e3a 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -45,23 +45,40 @@ #else #include #endif // WIN32 +#ifdef RTPDEBUG + #include + #include +#endif // RTPDEBUG class RTPIPv6Destination { public: - RTPIPv6Destination(in6_addr ip,u_int16_t portbase) { RTPIPv6Destination::ip = ip; rtpport_hbo = portbase; rtcpport_hbo = portbase+1; rtpport_nbo = htons(portbase); rtcpport_nbo = htons(portbase+1); } + RTPIPv6Destination(in6_addr ip,u_int16_t portbase) { RTPIPv6Destination::ip = ip; rtpport_nbo = htons(portbase); rtcpport_nbo = htons(portbase+1); } in6_addr GetIP() const { return ip; } - u_int16_t GetRTPPort_HBO() const { return rtpport_hbo; } u_int16_t GetRTPPort_NBO() const { return rtpport_nbo; } - u_int16_t GetRTCPPort_HBO() const { return rtcpport_hbo; } u_int16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } bool operator==(const RTPIPv6Destination &src) const { if (src.rtpport_nbo == rtpport_nbo && (memcmp(&(src.ip),&ip,sizeof(in6_addr)) == 0)) return true; return false; } // NOTE: I only check IP and portbase +#ifdef RTPDEBUG + std::string GetDestinationString() const; +#endif // RTPDEBUG private: in6_addr ip; - u_int16_t rtpport_hbo,rtcpport_hbo; u_int16_t rtpport_nbo,rtcpport_nbo; }; +#ifdef RTPDEBUG +inline std::string RTPIPv6Destination::GetDestinationString() const +{ + u_int16_t ip16[8]; + char str[1024]; + u_int16_t portbase = ntohs(rtpport_nbo); + int i,j; + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } + sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); + return std::string(str); +} +#endif // RTPDEBUG + #endif // RTP_SUPPORT_IPV6 #endif // RTPIPV6DESTINATION diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 8da9826..bc15ca9 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -338,7 +338,7 @@ void RTPPacket::Dump() if (HasExtension()) { printf(" Extension ID: 0x%04x\n",GetExtensionID()); - printf(" Extension data: %s\n",ExtensionData()); + printf(" Extension data: %s\n",GetExtensionData()); printf(" Extension length: %d\n",GetExtensionLength()); } } diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index b97d256..6ccbcc4 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -99,6 +99,8 @@ void RTPPollThread::Stop() void *RTPPollThread::Thread() { + JThread::ThreadStarted(); + bool stopthread; stopmutex.Lock(); diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 76834e2..745b010 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1216,5 +1216,11 @@ void RTPSession::DumpSources() sources.Dump(); EndDataAccess(); } + +void RTPSession::DumpTransmitter() +{ + if (created) + rtptrans->Dump(); +} #endif // RTPDEBUG diff --git a/src/rtpsession.h b/src/rtpsession.h index 466df17..43b6119 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -144,6 +144,7 @@ class RTPSession #ifdef RTPDEBUG void DumpSources(); + void DumpTransmitter(); #endif // RTPDEBUG protected: virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 661a2d4..799683f 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -102,6 +102,9 @@ class RTPTransmitter virtual bool NewDataAvailable() = 0; virtual RTPRawPacket *GetNextPacket() = 0; +#ifdef RTPDEBUG + virtual void Dump() = 0; +#endif // RTPDEBUG }; // Abstract class from which actual transmission parameters should be derived diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h old mode 100644 new mode 100755 diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 970a8f2..7a4f257 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -71,6 +71,9 @@ #define RTPIOCTL ioctl #endif // WIN32 +#ifdef RTPDEBUG + #include +#endif // RTPDEBUG #include "rtpdebug.h" @@ -427,13 +430,14 @@ int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new u_int8_t [localhostnamelength]; + localhostname = new u_int8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK return ERR_RTP_OUTOFMEM; } memcpy(localhostname,(*it).c_str(),localhostnamelength); + localhostname[localhostnamelength] = 0; } } } @@ -451,13 +455,14 @@ int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) len = strlen(str); localhostnamelength = len; - localhostname = new u_int8_t [localhostnamelength]; + localhostname = new u_int8_t [localhostnamelength + 1]; if (localhostname == 0) { MAINMUTEX_UNLOCK return ERR_RTP_OUTOFMEM; } memcpy(localhostname,str,localhostnamelength); + localhostname[localhostnamelength] = 0; } } @@ -988,7 +993,7 @@ int RTPUDPv4Transmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) } if (m != receivemode) { - m = receivemode; + receivemode = m; acceptignoreinfo.Clear(); } MAINMUTEX_UNLOCK @@ -1360,6 +1365,7 @@ int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port return status; } } + return 0; } @@ -1755,3 +1761,127 @@ void RTPUDPv4Transmitter::AddLoopbackAddress() localIPs.push_back(loopbackaddr); } +#ifdef RTPDEBUG +void RTPUDPv4Transmitter::Dump() +{ + if (!init) + std::cout << "Not initialized" << std::endl; + else + { + MAINMUTEX_LOCK + + if (!created) + std::cout << "Not created" << std::endl; + else + { + char str[1024]; + u_int32_t ip; + std::list::const_iterator it; + + std::cout << "Portbase: " << portbase << std::endl; + std::cout << "RTP socket descriptor: " << rtpsock << std::endl; + std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; + ip = bindIP; + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << "Bind IP address: " << str << std::endl; + std::cout << "Local IP addresses:" << std::endl; + for (it = localIPs.begin() ; it != localIPs.end() ; it++) + { + ip = (*it); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << " " << str << std::endl; + } + std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; + std::cout << "Receive mode: "; + switch (receivemode) + { + case RTPTransmitter::AcceptAll: + std::cout << "Accept all"; + break; + case RTPTransmitter::AcceptSome: + std::cout << "Accept some"; + break; + case RTPTransmitter::IgnoreSome: + std::cout << "Ignore some"; + } + std::cout << std::endl; + if (receivemode != RTPTransmitter::AcceptAll) + { + acceptignoreinfo.GotoFirstElement(); + while(acceptignoreinfo.HasCurrentElement()) + { + ip = acceptignoreinfo.GetCurrentKey(); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); + std::cout << " " << str << ": "; + if (pinfo->all) + { + std::cout << "All ports"; + if (!pinfo->portlist.empty()) + std::cout << ", except "; + } + + std::list::const_iterator it; + + for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) + { + std::cout << (*it); + it++; + if (it != pinfo->portlist.end()) + std::cout << ", "; + } + std::cout << std::endl; + } + } + + std::cout << "Local host name: "; + if (localhostname == 0) + std::cout << "Not set"; + else + std::cout << localhostname; + std::cout << std::endl; + + std::cout << "List of destinations: "; + destinations.GotoFirstElement(); + if (destinations.HasCurrentElement()) + { + std::cout << std::endl; + do + { + std::cout << " " << destinations.GetCurrentElement().GetDestinationString() << std::endl; + destinations.GotoNextElement(); + } while (destinations.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl; + + std::cout << "Supports multicasting: " << ((supportsmulticasting)?"Yes":"No") << std::endl; +#ifdef RTP_SUPPORT_IPV4MULTICAST + std::cout << "List of multicast groups: "; + multicastgroups.GotoFirstElement(); + if (multicastgroups.HasCurrentElement()) + { + std::cout << std::endl; + do + { + ip = multicastgroups.GetCurrentElement(); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << " " << str << std::endl; + multicastgroups.GotoNextElement(); + } while (multicastgroups.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl; +#endif // RTP_SUPPORT_IPV4MULTICAST + + std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; + std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; + std::cout << "RTP packet count: " << rtppackcount << std::endl; + std::cout << "RTCP packet count: " << rtcppackcount << std::endl; + } + + MAINMUTEX_UNLOCK + } +} +#endif // RTPDEBUG + diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 6e6eab8..c96f531 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -123,6 +123,9 @@ class RTPUDPv4Transmitter : public RTPTransmitter bool NewDataAvailable(); RTPRawPacket *GetNextPacket(); +#ifdef RTPDEBUG + void Dump(); +#endif // RTPDEBUG private: int CreateLocalIPList(); bool GetLocalIPList_Interfaces(); @@ -149,7 +152,6 @@ class RTPUDPv4Transmitter : public RTPTransmitter u_int32_t bindIP; std::list localIPs; u_int16_t portbase; - bool acceptownpackets; u_int8_t multicastTTL; RTPTransmitter::ReceiveMode receivemode; diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 61c5894..4165439 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -433,13 +433,14 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new u_int8_t [localhostnamelength]; + localhostname = new u_int8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK return ERR_RTP_OUTOFMEM; } memcpy(localhostname,(*it).c_str(),localhostnamelength); + localhostname[localhostnamelength] = 0; } } } @@ -465,13 +466,14 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) len = strlen(str); localhostnamelength = len; - localhostname = new u_int8_t [localhostnamelength]; + localhostname = new u_int8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK return ERR_RTP_OUTOFMEM; } memcpy(localhostname,str,localhostnamelength); + localhostname[localhostnamelength] = 0; } } @@ -1004,7 +1006,7 @@ int RTPUDPv6Transmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) } if (m != receivemode) { - m = receivemode; + receivemode = m; acceptignoreinfo.Clear(); } MAINMUTEX_UNLOCK @@ -1779,5 +1781,136 @@ void RTPUDPv6Transmitter::AddLoopbackAddress() localIPs.push_back(in6addr_loopback); } +#ifdef RTPDEBUG +void RTPUDPv6Transmitter::Dump() +{ + if (!init) + std::cout << "Not initialized" << std::endl; + else + { + MAINMUTEX_LOCK + + if (!created) + std::cout << "Not created" << std::endl; + else + { + char str[1024]; + in6_addr ip; + u_int16_t ip16[8]; + std::list::const_iterator it; + int i,j; + + std::cout << "Portbase: " << portbase << std::endl; + std::cout << "RTP socket descriptor: " << rtpsock << std::endl; + std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; + ip = bindIP; + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } + sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + std::cout << "Bind IP address: " << str << std::endl; + std::cout << "Local IP addresses:" << std::endl; + for (it = localIPs.begin() ; it != localIPs.end() ; it++) + { + ip = (*it); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } + sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + std::cout << " " << str << std::endl; + } + std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; + std::cout << "Receive mode: "; + switch (receivemode) + { + case RTPTransmitter::AcceptAll: + std::cout << "Accept all"; + break; + case RTPTransmitter::AcceptSome: + std::cout << "Accept some"; + break; + case RTPTransmitter::IgnoreSome: + std::cout << "Ignore some"; + } + std::cout << std::endl; + if (receivemode != RTPTransmitter::AcceptAll) + { + acceptignoreinfo.GotoFirstElement(); + while(acceptignoreinfo.HasCurrentElement()) + { + ip = acceptignoreinfo.GetCurrentKey(); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } + sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); + std::cout << " " << str << ": "; + if (pinfo->all) + { + std::cout << "All ports"; + if (!pinfo->portlist.empty()) + std::cout << ", except "; + } + + std::list::const_iterator it; + + for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) + { + std::cout << (*it); + it++; + if (it != pinfo->portlist.end()) + std::cout << ", "; + } + std::cout << std::endl; + } + } + + std::cout << "Local host name: "; + if (localhostname == 0) + std::cout << "Not set"; + else + std::cout << localhostname; + std::cout << std::endl; + + std::cout << "List of destinations: "; + destinations.GotoFirstElement(); + if (destinations.HasCurrentElement()) + { + std::cout << std::endl; + do + { + std::cout << " " << destinations.GetCurrentElement().GetDestinationString() << std::endl; + destinations.GotoNextElement(); + } while (destinations.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl; + + std::cout << "Supports multicasting: " << ((supportsmulticasting)?"Yes":"No") << std::endl; +#ifdef RTP_SUPPORT_IPV6MULTICAST + std::cout << "List of multicast groups: "; + multicastgroups.GotoFirstElement(); + if (multicastgroups.HasCurrentElement()) + { + std::cout << std::endl; + do + { + ip = multicastgroups.GetCurrentElement(); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } + sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + std::cout << " " << str << std::endl; + multicastgroups.GotoNextElement(); + } while (multicastgroups.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl; +#endif // RTP_SUPPORT_IPV6MULTICAST + + std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; + std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; + std::cout << "RTP packet count: " << rtppackcount << std::endl; + std::cout << "RTCP packet count: " << rtcppackcount << std::endl; + } + + MAINMUTEX_UNLOCK + } + +} +#endif // RTPDEBUG + #endif // RTP_SUPPORT_IPV6 diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 3a129d3..79b9ec8 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -132,6 +132,9 @@ class RTPUDPv6Transmitter : public RTPTransmitter bool NewDataAvailable(); RTPRawPacket *GetNextPacket(); +#ifdef RTPDEBUG + void Dump(); +#endif // RTPDEBUG private: int CreateLocalIPList(); bool GetLocalIPList_Interfaces(); @@ -158,7 +161,6 @@ class RTPUDPv6Transmitter : public RTPTransmitter in6_addr bindIP; std::list localIPs; u_int16_t portbase; - bool acceptownpackets; u_int8_t multicastTTL; RTPTransmitter::ReceiveMode receivemode; From ff3e4a0629bec4b6a64a6eef75bdae625709b45f Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:16 +0100 Subject: [PATCH 002/136] Import of version 3.0.2 --- ChangeLog | 8 +++++++- README.TXT | 4 ++-- configure | 2 +- configure.in | 2 +- doc/jrtplib.tex | 4 ++-- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtpinternalsourcedata.cpp | 1 - 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b120025..09eb9d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ - September 4, 2004 + September 6, 2004 JRTPLIB ChangeLog ----------- + 3.0.2 (September 2004) + * Bugfix in rtpinternalsourcedata.cpp. The bug caused a crash when + duplicate packets were received. Thanks to Dominique Prunier + (dominique.prunier@micromedia-int.com) for informing me about + this. + 3.0.1 (September 2004) * Bugfix in rtpudpv4transmitter.cpp and rtpudpv6transmitter.cpp in method SetReceiveMode diff --git a/README.TXT b/README.TXT index 4810685..35c4c05 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - September 4, 2004 + September 6, 2004 - JRTPLIB (v3.0.1) + JRTPLIB (v3.0.2) Developed at the The Expertise Centre for diff --git a/configure b/configure index 6529e79..8c700f3 100755 --- a/configure +++ b/configure @@ -1797,7 +1797,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.0.1 + VERSION=3.0.2 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index b91754c..d7fe79e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.0.1) +AM_INIT_AUTOMAKE(jrtplib,3.0.2) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index eb7a6bd..0d6d87e 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.0.1} +\newcommand{\jversion}{3.0.2} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.luc.ac.be}} - \date{September 4, 2004\\\vspace{0.5cm}\ \\ + \date{September 6, 2004\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute of\\ the Limburgs Universitair Centrum (LUC)}\\\ \\ {\tt http://www.edm.luc.ac.be/}\\ diff --git a/src/Makefile.am b/src/Makefile.am index 5a14eb6..a24953c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -release 3.0.1 +libjrtp_la_LDFLAGS = -release 3.0.2 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 427d139..9e5994d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -243,7 +243,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -release 3.0.1 +libjrtp_la_LDFLAGS = -release 3.0.2 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index d479dc3..d32ee9a 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -113,7 +113,6 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re } else // they're equal !! Drop packet { - delete rtppack; done = true; } } From d973e6985201a13ea1c8353d22142cbf139420b8 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:16 +0100 Subject: [PATCH 003/136] Import of version 3.1.0 --- ChangeLog | 14 +- Makefile.am | 2 +- Makefile.in | 2 +- README.TXT | 8 +- configure | 5 +- configure.in | 3 +- doc/jrtplib.tex | 74 ++++++++- examples/Makefile.am | 2 + examples/Makefile.in | 321 ++++++++++++++++++++++++++++++++++++ examples/example1.cpp | 149 +++++++++++++++++ examples/example2.cpp | 98 +++++++++++ src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtplibraryversion.cpp | 2 +- src/rtppollthread.cpp | 1 + src/rtpsession.cpp | 7 + src/rtpsession.h | 8 +- src/rtptransmitter.h | 17 +- src/rtpudpv4transmitter.cpp | 12 ++ src/rtpudpv4transmitter.h | 29 ++++ src/rtpudpv6transmitter.cpp | 12 ++ src/rtpudpv6transmitter.h | 31 +++- 22 files changed, 781 insertions(+), 20 deletions(-) create mode 100644 examples/Makefile.am create mode 100644 examples/Makefile.in create mode 100644 examples/example1.cpp create mode 100644 examples/example2.cpp diff --git a/ChangeLog b/ChangeLog index 09eb9d2..c502be1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,22 @@ - September 6, 2004 + October 1, 2004 JRTPLIB ChangeLog ----------- + 3.1.0 (October 2004) + * Added a callback OnPollThreadStep which is called at the end of + each loop of the poll thread + * Added the examples subdirectory to the package + * Fixed bug in rtpudpv4transmitter.cpp and rtpudpv6transmitter.cpp + which caused an infinite loop in LeaveAllMulticastGroups. Thanks + to Stijn Agten (stijn.agten@luc.ac.be) for pointing this out. + * Added a function GetTransmissionInfo to the RTPTransmitter class + (and subclasses). The function will return some additional + information about the transmitter, like local IP addresses and + socket descriptors. + 3.0.2 (September 2004) * Bugfix in rtpinternalsourcedata.cpp. The bug caused a crash when duplicate packets were received. Thanks to Dominique Prunier diff --git a/Makefile.am b/Makefile.am index 6b51c45..87ea1fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src tools doc +SUBDIRS = src tools doc examples EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp dist-hook: distclean diff --git a/Makefile.in b/Makefile.in index 2cfe905..ae913c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -179,7 +179,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -SUBDIRS = src tools doc +SUBDIRS = src tools doc examples EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp all: all-recursive diff --git a/README.TXT b/README.TXT index 35c4c05..a5bd6a6 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - September 6, 2004 + October 1, 2004 - JRTPLIB (v3.0.2) + JRTPLIB (v3.1.0) Developed at the The Expertise Centre for @@ -57,9 +57,11 @@ INSTALLATION NOTES * To compile the library on an MS-Windows platfrom: an Visual Studio workspace file jrtplib.dsw is included. The project will search - for JThread files in ..\jthread-1.0.1 + for JThread files in ..\jthread-1.1.0 To compile the library without using JThread, comment the line with RTP_SUPPORT_THREAD in rtpconfig_win.h + Note that you must have service pack 6 for Visual Studio installed + to be able to compile the library. * For a manual about the library, please refer to doc/ subdirectory. Using 'make doc', a PDF version of the documentation will be built. diff --git a/configure b/configure index 8c700f3..a7ffeab 100755 --- a/configure +++ b/configure @@ -1797,7 +1797,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.0.2 + VERSION=3.1.0 cat >>confdefs.h <<_ACEOF @@ -20538,7 +20538,7 @@ fi - ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile" + ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -21126,6 +21126,7 @@ do "src/rtpconfig_unix.h" ) CONFIG_FILES="$CONFIG_FILES src/rtpconfig_unix.h" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.in b/configure.in index d7fe79e..406ffb2 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.0.2) +AM_INIT_AUTOMAKE(jrtplib,3.1.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -425,5 +425,6 @@ AC_OUTPUT(Makefile \ src/rtpconfig_unix.h \ doc/Makefile \ tools/Makefile \ + examples/Makefile \ ) diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index 0d6d87e..2ddf815 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.0.2} +\newcommand{\jversion}{3.1.0} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.luc.ac.be}} - \date{September 6, 2004\\\vspace{0.5cm}\ \\ + \date{October 1, 2004\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute of\\ the Limburgs Universitair Centrum (LUC)}\\\ \\ {\tt http://www.edm.luc.ac.be/}\\ @@ -555,6 +555,13 @@ By calling this function, buffers are cleared and the component cannot be used anymore. Only when the {\tt Create} function is called again can the component be used again. + \item {\tt RTPTransmissionInfo *GetTransmissionInfo()}\\ + This function returns an instance of a subclass of {\tt RTPTransmissionInfo} + which will give some additional information about the transmitter + (a list of local IP addresses for example). Currently, either + an instance of {\tt RTP\-UDPv4\-Trans\-mission\-Info} or {\tt RTP\-UDPv6\-Trans\-mission\-Info} + is returned, depending on the type of the transmitter. The user + has to delete the returned instance when it is no longer needed. \item {\tt int GetLocalHostName(u\_int8\_t *buffer, size\_t *bufferlength)}\\ Looks up the local host name based upon internal information about the local host's addresses. This function might take some time @@ -649,7 +656,10 @@ \ref{rtpudpv4transmissionparams}. The functions which have an {\tt RTPAddress} argument require an argument of type {\tt RTPIPv4Address} which is described in section - \ref{rtpipv4address}. + \ref{rtpipv4address}. The {\tt Get\-Trans\-mission\-Info} member function + of the {\tt RTP\-UDPv4\-Trans\-mitter} class returns an instance + of type {\tt RTP\-UDPv4\-Trans\-mission\-Info} which is described + in section \ref{rtpudpv4transmissioninfo}. \Paragraph{UDP over IPv6 transmitter}\headerfile{rtpudpv6transmitter.h}\inherits{RTPTransmitter} @@ -662,7 +672,10 @@ \ref{rtpudpv6transmissionparams}. The functions which have an {\tt RTPAddress} argument require an argument of type {\tt RTPIPv6Address} which is described in section - \ref{rtpipv6address}. + \ref{rtpipv6address}. The {\tt Get\-Trans\-mission\-Info} member function + of the {\tt RTP\-UDPv6\-Trans\-mitter} class returns an instance + of type {\tt RTP\-UDPv6\-Trans\-mission\-Info} which is described + in section \ref{rtpudpv6transmissioninfo}. \subsubsection{\tt RTPTransmissionParams}\headerfile{rtptransmitter.h} @@ -743,6 +756,53 @@ Returns the list of local IP addresses. \end{itemize} + \subsubsection{\tt RTPTransmissionInfo}\headerfile{rtptransmitter.h} + + The {\tt RTPTransmissionInfo} class is an abstract class which + will have a specific implementation for a specific kind of + transmission component. All actual implementations inherit the + following function which identify the component type for which + these parameters are valid: + \begin{verbatim} + RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() + \end{verbatim} + + \Paragraph{Info about the UDP over IPv4 transmitter}\headerfile{rtpudpv4transmitter.h} + \label{rtpudpv4transmissioninfo} + + The class {\tt RTPUDPv4TransmissionInfo} gives some additional + information about the UDP over IPv4 transmission component. The + following member functions are available: + \begin{itemize} + \item {\tt std::list GetLocalIPList() const}\\ + Returns the list of IPv4 addresses the transmitter + considers to be the local IP addresses. + \item {\tt int GetRTPSocket() const}\\ + Returns the socket descriptor used for receiving and transmitting + RTP packets. + \item {\tt int GetRTCPSocket() const}\\ + Returns the socket descriptor used for receiving and transmitting + RTCP packets. + \end{itemize} + + \Paragraph{Info about the UDP over IPv6 transmitter}\headerfile{rtpudpv6transmitter.h} + \label{rtpudpv6transmissioninfo} + + The class {\tt RTPUDPv6TransmissionInfo} gives some additional + information about the UDP over IPv6 transmission component. The + following member functions are available: + \begin{itemize} + \item {\tt std::list GetLocalIPList() const}\\ + Returns the list of IPv4 addresses the transmitter + considers to be the local IP addresses. + \item {\tt int GetRTPSocket() const}\\ + Returns the socket descriptor used for receiving and transmitting + RTP packets. + \item {\tt int GetRTCPSocket() const}\\ + Returns the socket descriptor used for receiving and transmitting + RTCP packets. + \end{itemize} + \subsubsection{\tt RTPAddress}\headerfile{rtpaddress.h} The class {\tt RTPAddress} is an abstract class which is used to @@ -2516,9 +2576,13 @@ \item {\tt void OnNoteTimeout(RTPSourceData *srcdat)}\\ Is called when the SDES NOTE item for source {\tt srcdat} has been timed out. - \item {\tt virtual void OnPollThreadError(int errcode)}\\ + \item {\tt void OnPollThreadError(int errcode)}\\ Is called when error {\tt errcode} was detected in the poll thread. + \item {\tt void OnPollThreadStep()}\\ + Is called each time the poll thread loops. This happens when + incoming data was detected or when its time to send an RTCP + compound packet. \end{itemize} \section{Contact} diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..a5147b4 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = example1.cpp example2.cpp + diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..3b96461 --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,321 @@ +# Makefile.in generated by automake 1.8.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +subdir = examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +RTP_ENDIAN = @RTP_ENDIAN@ +RTP_FILIO = @RTP_FILIO@ +RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ +RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_SOCKIO = @RTP_SOCKIO@ +RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ +RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ +RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ +RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ +RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ +RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ +RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +EXTRA_DIST = example1.cpp example2.cpp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/example1.cpp b/examples/example1.cpp new file mode 100644 index 0000000..d3504aa --- /dev/null +++ b/examples/example1.cpp @@ -0,0 +1,149 @@ +/* + Here's a small IPv4 example: it asks for a portbase and a destination and + starts sending packets to that destination. +*/ + +#include "rtpsession.h" +#include "rtppacket.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtpsessionparams.h" +#include "rtperrors.h" +#ifndef WIN32 + #include + #include +#else + #include +#endif // WIN32 +#include +#include +#include +#include + +// +// This function checks if there was a RTP error. If so, it displays an error +// message and exists. +// + +void checkerror(int rtperr) +{ + if (rtperr < 0) + { + std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl; + exit(-1); + } +} + +// +// The main routine +// + +int main(void) +{ +#ifdef WIN32 + WSADATA dat; + WSAStartup(MAKEWORD(2,2),&dat); +#endif // WIN32 + + RTPSession sess; + u_int16_t portbase,destport; + u_int32_t destip; + std::string ipstr; + int status,i,num; + + // First, we'll ask for the necessary information + + std::cout << "Enter local portbase:" << std::endl; + std::cin >> portbase; + std::cout << std::endl; + + std::cout << "Enter the destination IP address" << std::endl; + std::cin >> ipstr; + destip = inet_addr(ipstr.c_str()); + if (destip == INADDR_NONE) + { + std::cerr << "Bad IP address specified" << std::endl; + return -1; + } + + // The inet_addr function returns a value in network byte order, but + // we need the IP address in host byte order, so we use a call to + // ntohl + destip = ntohl(destip); + + std::cout << "Enter the destination port" << std::endl; + std::cin >> destport; + + std::cout << std::endl; + std::cout << "Number of packets you wish to be sent:" << std::endl; + std::cin >> num; + + // Now, we'll create a RTP session, set the destination, send some + // packets and poll for incoming data. + + RTPUDPv4TransmissionParams transparams; + RTPSessionParams sessparams; + + // IMPORTANT: The local timestamp unit MUST be set, otherwise + // RTCP Sender Report info will be calculated wrong + // In this case, we'll be sending 10 samples each second, so we'll + // put the timestamp unit to (1.0/10.0) + sessparams.SetOwnTimestampUnit(1.0/10.0); + + sessparams.SetAcceptOwnPackets(true); + transparams.SetPortbase(portbase); + status = sess.Create(sessparams,&transparams); + checkerror(status); + + RTPIPv4Address addr(destip,destport); + + status = sess.AddDestination(addr); + checkerror(status); + + for (i = 1 ; i <= num ; i++) + { + printf("\nSending packet %d/%d\n",i,num); + + // send the packet + status = sess.SendPacket((void *)"1234567890",10,0,false,10); + checkerror(status); + + sess.BeginDataAccess(); + + // check incoming packets + if (sess.GotoFirstSourceWithData()) + { + do + { + RTPPacket *pack; + + while ((pack = sess.GetNextPacket()) != NULL) + { + // You can examine the data here + printf("Got packet !\n"); + + // we don't longer need the packet, so + // we'll delete it + delete pack; + } + } while (sess.GotoNextSourceWithData()); + } + + sess.EndDataAccess(); + +#ifndef RTP_SUPPORT_THREAD + status = sess.Poll(); + checkerror(status); +#endif // RTP_SUPPORT_THREAD + + RTPTime::Wait(RTPTime(1,0)); + } + + sess.BYEDestroy(RTPTime(10,0),0,0); + +#ifdef WIN32 + WSACleanup(); +#endif // WIN32 + return 0; +} + diff --git a/examples/example2.cpp b/examples/example2.cpp new file mode 100644 index 0000000..1a944db --- /dev/null +++ b/examples/example2.cpp @@ -0,0 +1,98 @@ +#include "rtpsession.h" +#include "rtpsessionparams.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtptimeutilities.h" +#include "rtppacket.h" +#include +#include + +int main(void) +{ +#ifdef WIN32 + WSADATA dat; + WSAStartup(MAKEWORD(2,2),&dat); +#endif // WIN32 + + RTPSession session; + + RTPSessionParams sessionparams; + sessionparams.SetOwnTimestampUnit(1.0/8000.0); + + RTPUDPv4TransmissionParams transparams; + transparams.SetPortbase(8000); + + int status = session.Create(sessionparams,&transparams); + if (status < 0) + { + std::cerr << RTPGetErrorString(status) << std::endl; + exit(-1); + } + + u_int8_t localip[]={127,0,0,1}; + RTPIPv4Address addr(localip,9000); + + status = session.AddDestination(addr); + if (status < 0) + { + std::cerr << RTPGetErrorString(status) << std::endl; + exit(-1); + } + + session.SetDefaultPayloadType(96); + session.SetDefaultMark(false); + session.SetDefaultTimestampIncrement(160); + + u_int8_t silencebuffer[160]; + for (int i = 0 ; i < 160 ; i++) + silencebuffer[i] = 128; + + RTPTime delay(0.020); + RTPTime starttime = RTPTime::CurrentTime(); + + bool done = false; + while (!done) + { + status = session.SendPacket(silencebuffer,160); + if (status < 0) + { + std::cerr << RTPGetErrorString(status) << std::endl; + exit(-1); + } + + session.BeginDataAccess(); + if (session.GotoFirstSource()) + { + do + { + RTPPacket *packet = session.GetNextPacket(); + if (packet) + { + std::cout << "Got packet with " + << "extended sequence number " + << packet->GetExtendedSequenceNumber() + << " from SSRC " << packet->GetSSRC() + << std::endl; + delete packet; + } + } while (session.GotoNextSource()); + } + session.EndDataAccess(); + + RTPTime::Wait(delay); + + RTPTime t = RTPTime::CurrentTime(); + t -= starttime; + if (t > RTPTime(60.0)) + done = true; + } + + delay = RTPTime(10.0); + session.BYEDestroy(delay,"Time's up",9); + +#ifdef WIN32 + WSACleanup(); +#endif // WIN32 + return 0; +} + diff --git a/src/Makefile.am b/src/Makefile.am index a24953c..6af454b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -release 3.0.2 +libjrtp_la_LDFLAGS = -release 3.1.0 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 9e5994d..5c41dd4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -243,7 +243,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -release 3.0.2 +libjrtp_la_LDFLAGS = -release 3.1.0 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 26182e5..278b98e 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -34,6 +34,6 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,0,0); + return RTPLibraryVersion(3,1,0); } diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index 6ccbcc4..27ed810 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -139,6 +139,7 @@ void *RTPPollThread::Thread() } else { + rtpsession.OnPollThreadStep(); stopmutex.Lock(); stopthread = stop; stopmutex.Unlock(); diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 745b010..07fdb4e 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -631,6 +631,13 @@ int RTPSession::IncrementTimestampDefault() return status; } +RTPTransmissionInfo *RTPSession::GetTransmissionInfo() +{ + if (!created) + return 0; + return rtptrans->GetTransmissionInfo(); +} + int RTPSession::Poll() { int status; diff --git a/src/rtpsession.h b/src/rtpsession.h index 43b6119..54ca88d 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -56,6 +56,7 @@ class RTPAddress; class RTPSourceData; class RTPPacket; class RTPPollThread; +class RTPTransmissionInfo; class RTCPCompoundPacket; class RTCPPacket; class RTCPAPPPacket; @@ -96,6 +97,7 @@ class RTPSession int IncrementTimestamp(u_int32_t inc); int IncrementTimestampDefault(); + RTPTransmissionInfo *GetTransmissionInfo(); int Poll(); int WaitForIncomingData(const RTPTime &delay); int AbortWait(); @@ -164,8 +166,11 @@ class RTPSession const RTPAddress *senderaddress) { } virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } - virtual void OnPollThreadError(int errcode) { } virtual void OnNoteTimeout(RTPSourceData *srcdat) { } +#ifdef RTP_SUPPORT_THREAD + virtual void OnPollThreadError(int errcode) { } + virtual void OnPollThreadStep() { } +#endif // RTP_SUPPORT_THREAD private: int CreateCNAME(u_int8_t *buffer,size_t *bufferlength,bool resolve); int ProcessPolledData(); @@ -203,3 +208,4 @@ class RTPSession }; #endif // RTPSESSION_H + diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 799683f..d9d4bd3 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -41,6 +41,7 @@ class RTPRawPacket; class RTPAddress; class RTPTransmissionParams; class RTPTime; +class RTPTransmissionInfo; // Abstract class from which actual transmission components should be derived @@ -60,6 +61,9 @@ class RTPTransmitter virtual int Create(size_t maxpacksize,const RTPTransmissionParams *transparams) = 0; virtual void Destroy() = 0; + // The user MUST delete the returned instance when it is no longer needed + virtual RTPTransmissionInfo *GetTransmissionInfo() = 0; + // If the buffersize ins't large enough, the transmitter must fill in the // required length in 'bufferlength' // If the size is ok, bufferlength is adjusted so that it indicates the @@ -112,7 +116,7 @@ class RTPTransmitter class RTPTransmissionParams { protected: - RTPTransmissionParams(RTPTransmitter::TransmissionProtocol p) { protocol = p; } + RTPTransmissionParams(RTPTransmitter::TransmissionProtocol p) { protocol = p; } public: virtual ~RTPTransmissionParams() { } RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const { return protocol; } @@ -120,5 +124,16 @@ class RTPTransmissionParams RTPTransmitter::TransmissionProtocol protocol; }; +class RTPTransmissionInfo +{ +protected: + RTPTransmissionInfo(RTPTransmitter::TransmissionProtocol p) { protocol = p; } +public: + virtual ~RTPTransmissionInfo() { } + RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const { return protocol; } +private: + RTPTransmitter::TransmissionProtocol protocol; +}; + #endif // RTPTRANSMITTER_H diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 7a4f257..60a46fd 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -377,6 +377,17 @@ void RTPUDPv4Transmitter::Destroy() MAINMUTEX_UNLOCK } +RTPTransmissionInfo *RTPUDPv4Transmitter::GetTransmissionInfo() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + RTPTransmissionInfo *tinf = new RTPUDPv4TransmissionInfo(localIPs,rtpsock,rtcpsock); + MAINMUTEX_UNLOCK + return tinf; +} + int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { if (!init) @@ -956,6 +967,7 @@ void RTPUDPv4Transmitter::LeaveAllMulticastGroups() mcastIP = multicastgroups.GetCurrentElement(); RTPUDPV4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); RTPUDPV4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + multicastgroups.GotoNextElement(); } multicastgroups.Clear(); } diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index c96f531..a72e079 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -67,6 +67,34 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams std::list localIPs; u_int8_t multicastTTL; }; + +class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo +{ +public: +#ifndef WIN32 + RTPUDPv4TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) +#else + RTPUDPv4TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) +#endif // WIN32 + { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } + + ~RTPUDPv4TransmissionInfo() { } + std::list GetLocalIPList() const { return localIPlist; } +#ifndef WIN32 + int GetRTPSocket() const { return rtpsocket; } + int GetRTCPSocket() const { return rtcpsocket; } +#else + SOCKET GetRTPSocket() const { return rtpsocket; } + SOCKET GetRTCPSocket() const { return rtcpsocket; } +#endif // WIN32 +private: + std::list localIPlist; +#ifndef WIN32 + int rtpsocket,rtcpsocket; +#else + SOCKET rtpsocket,rtcpsocket; +#endif // WIN32 +}; #ifdef RTP_SUPPORT_INLINETEMPLATEPARAM inline int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } @@ -87,6 +115,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter int Init(bool treadsafe); int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); void Destroy(); + RTPTransmissionInfo *GetTransmissionInfo(); int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 4165439..4d98634 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -385,6 +385,17 @@ void RTPUDPv6Transmitter::Destroy() MAINMUTEX_UNLOCK } +RTPTransmissionInfo *RTPUDPv6Transmitter::GetTransmissionInfo() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + RTPTransmissionInfo *tinf = new RTPUDPv6TransmissionInfo(localIPs,rtpsock,rtcpsock); + MAINMUTEX_UNLOCK + return tinf; +} + int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { if (!init) @@ -969,6 +980,7 @@ void RTPUDPv6Transmitter::LeaveAllMulticastGroups() mcastIP = multicastgroups.GetCurrentElement(); RTPUDPV6TRANS_MCASTMEMBERSHIP(rtpsock,IPV6_LEAVE_GROUP,mcastIP,status); RTPUDPV6TRANS_MCASTMEMBERSHIP(rtcpsock,IPV6_LEAVE_GROUP,mcastIP,status); + multicastgroups.GotoNextElement(); } multicastgroups.Clear(); } diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 79b9ec8..16fe1a1 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -76,7 +76,35 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams std::list localIPs; u_int8_t multicastTTL; }; - + +class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo +{ +public: +#ifndef WIN32 + RTPUDPv6TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto) +#else + RTPUDPv6TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto) +#endif // WIN32 + { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } + + ~RTPUDPv6TransmissionInfo() { } + std::list GetLocalIPList() const { return localIPlist; } +#ifndef WIN32 + int GetRTPSocket() const { return rtpsocket; } + int GetRTCPSocket() const { return rtcpsocket; } +#else + SOCKET GetRTPSocket() const { return rtpsocket; } + SOCKET GetRTCPSocket() const { return rtcpsocket; } +#endif // WIN32 +private: + std::list localIPlist; +#ifndef WIN32 + int rtpsocket,rtcpsocket; +#else + SOCKET rtpsocket,rtcpsocket; +#endif // WIN32 +}; + #ifdef RTP_SUPPORT_INLINETEMPLATEPARAM inline int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } inline int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } @@ -96,6 +124,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter int Init(bool treadsafe); int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); void Destroy(); + RTPTransmissionInfo *GetTransmissionInfo(); int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); From 99bbc764770f56e405033f3a56fb8ab219701073 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:16 +0100 Subject: [PATCH 004/136] Import of version 3.2.0 --- ChangeLog | 38 +- Makefile.am | 7 +- Makefile.in | 62 +- README.TXT | 39 +- aclocal.m4 | 1009 ++++++++++++------------ configure | 1199 +++++++++++++++++++---------- configure.in | 107 +-- doc/Makefile.am | 4 +- doc/Makefile.in | 14 +- doc/jrtplib.tex | 67 +- examples/Makefile.am | 2 +- examples/Makefile.in | 12 +- examples/example3.cpp | 224 ++++++ jrtplib.dsp | 8 +- jrtplib.sln | 20 + jrtplib.vcproj | 453 +++++++++++ jrtplib_wce.sln | 22 + jrtplib_wce.vcproj | 482 ++++++++++++ src/Makefile.am | 4 +- src/Makefile.in | 83 +- src/rtcpapppacket.cpp | 8 +- src/rtcpapppacket.h | 14 +- src/rtcpbyepacket.cpp | 8 +- src/rtcpbyepacket.h | 12 +- src/rtcpcompoundpacket.cpp | 12 +- src/rtcpcompoundpacket.h | 8 +- src/rtcpcompoundpacketbuilder.cpp | 12 +- src/rtcpcompoundpacketbuilder.h | 13 +- src/rtcppacket.cpp | 8 +- src/rtcppacket.h | 8 +- src/rtcppacketbuilder.cpp | 60 +- src/rtcppacketbuilder.h | 10 +- src/rtcprrpacket.cpp | 8 +- src/rtcprrpacket.h | 12 +- src/rtcpscheduler.cpp | 11 +- src/rtcpscheduler.h | 8 +- src/rtcpsdesinfo.cpp | 8 +- src/rtcpsdesinfo.h | 8 +- src/rtcpsdespacket.cpp | 8 +- src/rtcpsdespacket.h | 12 +- src/rtcpsrpacket.cpp | 8 +- src/rtcpsrpacket.h | 12 +- src/rtcpunknownpacket.h | 8 +- src/rtpaddress.h | 8 +- src/rtpcollisionlist.cpp | 15 +- src/rtpcollisionlist.h | 10 +- src/rtpconfig.h | 10 +- src/rtpconfig_unix.h.in | 10 +- src/rtpconfig_win.h | 12 +- src/rtpdebug.cpp | 8 +- src/rtpdebug.h | 10 +- src/rtpdefines.h | 9 +- src/rtperrors.cpp | 9 +- src/rtperrors.h | 9 +- src/rtphashtable.h | 8 +- src/rtpinternalsourcedata.cpp | 75 +- src/rtpinternalsourcedata.h | 16 +- src/rtpipv4address.cpp | 8 +- src/rtpipv4address.h | 8 +- src/rtpipv4destination.h | 12 +- src/rtpipv6address.cpp | 8 +- src/rtpipv6address.h | 12 +- src/rtpipv6destination.h | 10 +- src/rtpkeyhashtable.h | 8 +- src/rtplibraryversion.cpp | 10 +- src/rtplibraryversion.h | 8 +- src/rtppacket.cpp | 12 +- src/rtppacket.h | 8 +- src/rtppacketbuilder.cpp | 11 +- src/rtppacketbuilder.h | 8 +- src/rtppollthread.cpp | 37 +- src/rtppollthread.h | 11 +- src/rtprandom.cpp | 27 +- src/rtprandom.h | 8 +- src/rtprawpacket.h | 8 +- src/rtpsession.cpp | 72 +- src/rtpsession.h | 12 +- src/rtpsessionparams.cpp | 12 +- src/rtpsessionparams.h | 19 +- src/rtpsessionsources.cpp | 10 +- src/rtpsessionsources.h | 8 +- src/rtpsourcedata.cpp | 138 ++-- src/rtpsourcedata.h | 17 +- src/rtpsources.cpp | 15 +- src/rtpsources.h | 28 +- src/rtpstructs.h | 8 +- src/rtptimeutilities.cpp | 51 ++ src/rtptimeutilities.h | 56 +- src/rtptransmitter.h | 12 +- src/rtptypes.h | 34 +- src/rtptypes_win.h | 47 +- src/rtpudpv4transmitter.cpp | 125 ++- src/rtpudpv4transmitter.h | 20 +- src/rtpudpv6transmitter.cpp | 217 +++--- src/rtpudpv6transmitter.h | 24 +- tools/Makefile.in | 10 +- 96 files changed, 3872 insertions(+), 1618 deletions(-) create mode 100644 examples/example3.cpp create mode 100644 jrtplib.sln create mode 100644 jrtplib.vcproj create mode 100644 jrtplib_wce.sln create mode 100644 jrtplib_wce.vcproj create mode 100644 src/rtptimeutilities.cpp diff --git a/ChangeLog b/ChangeLog index c502be1..d8ec623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,46 @@ - October 1, 2004 + September 19, 2005 JRTPLIB ChangeLog ----------- + + 3.2.0 (September 2005) + * Modified the routine in the RTPSession class which creates the + CNAME. Aparently on some systems, the 'getlogin' call returns + null. As an alternative, the library uses getenv("LOGNAME"). + Thanks to Mark Schiffmann (schima@neumann-elektronik.com) for + mentioning this to me. + * Added a OnBYEPacket method to the RTPSession class. Thanks to + Sigrid Thijs (sthijs@androme.be) for suggesting this. + * When probation support is enabled, a probation type can be selected + when the session is created. Supported types are "No probation", + "Use probation, but store packets" and "Use probation and discard + packets received in probation mode". Thanks to Chris Flerackers + (cflerackers@androme.be) for suggesting this feature. + * Added a parameter to WaitForIncomingData which indicates if + data is available when the function returns. Based on a suggestion + by Uwe Andersen (uandersen@mayah.com). + * Now using getifaddrs (if possible) to obtain our own IP addresses + (both in IPv4 version and IPv6 version). + * IPv6 code in Win32 version now works, but Visual Studio 2005 beta + has to be used. Thanks to Yi-Huan Chan (yhchan@csie.nctu.edu.tw) + for contributing some code. + * Added Win32 code for GetLocalIPList_Interfaces (both IPv4 and IPv6). + Thanks to Ivan Makushkin (camry@pisem.net) for pointing out how + this could be done. + * Added an option to use a SR packet when sending a BYE message. + Previously, a RR packet was always used, even if a session is + actually an active sender of data. Thanks to Uwe Andersen + (uandersen@mayah.com) for bringing this to my attention. + * Fixed bug in CNAME creation. + * Added WinCE support. Thanks to Maarten Daniels + (maarten.daniels@uhasselt.be) for supplying patches. + * Changed the CurrentTime implementation for the MS-Windows version. + Thanks to Maarten Daniels (maarten.daniels@uhasselt.be) and Chris + Flerackers (cflerackers@androme.be). + 3.1.0 (October 2004) * Added a callback OnPollThreadStep which is called at the end of each loop of the poll thread diff --git a/Makefile.am b/Makefile.am index 87ea1fc..b7c0d8b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = src tools doc examples -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp +EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln dist-hook: distclean rm -f $(distdir)/src/rtpconfig_unix.h @@ -10,4 +10,7 @@ dist-hook: distclean todos < $(distdir)/jrtplib.dsp.tmp > $(distdir)/jrtplib.dsp rm $(distdir)/jrtplib.dsw.tmp rm $(distdir)/jrtplib.dsp.tmp - + chmod a-x $(distdir)/jrtplib.vcproj + chmod a-x $(distdir)/jrtplib.sln + chmod a-x $(distdir)/jrtplib_wce.vcproj + chmod a-x $(distdir)/jrtplib_wce.sln diff --git a/Makefile.in b/Makefile.in index ae913c1..d59ca94 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -33,6 +33,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog TODO \ @@ -126,6 +127,7 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ @@ -151,6 +153,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -180,7 +184,7 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src tools doc examples -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp +EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln all: all-recursive .SUFFIXES: @@ -235,7 +239,13 @@ uninstall-info-am: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -247,7 +257,7 @@ $(RECURSIVE_TARGETS): local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -255,7 +265,13 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -276,7 +292,7 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -378,15 +394,17 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ @@ -400,15 +418,15 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir - $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir @@ -421,7 +439,7 @@ dist-zip: distdir $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -430,11 +448,11 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ @@ -515,7 +533,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -575,7 +593,7 @@ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ + dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ @@ -597,6 +615,10 @@ dist-hook: distclean todos < $(distdir)/jrtplib.dsp.tmp > $(distdir)/jrtplib.dsp rm $(distdir)/jrtplib.dsw.tmp rm $(distdir)/jrtplib.dsp.tmp + chmod a-x $(distdir)/jrtplib.vcproj + chmod a-x $(distdir)/jrtplib.sln + chmod a-x $(distdir)/jrtplib_wce.vcproj + chmod a-x $(distdir)/jrtplib_wce.sln # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/README.TXT b/README.TXT index a5bd6a6..18eef07 100644 --- a/README.TXT +++ b/README.TXT @@ -1,26 +1,31 @@ ------------------------------------------------------------------------------ - October 1, 2004 + September 19, 2005 - JRTPLIB (v3.1.0) + JRTPLIB (v3.2.0) Developed at the The Expertise Centre for - Digital Media (EDM), a research institute of - the Limburgs Universitair Centrum (LUC) + Digital Media (EDM), a research institute + of the Hasselt University - http://www.edm.luc.ac.be/ - http://www.luc.ac.be/ + http://www.edm.uhasselt.be/ + http://www.uhasselt.be/ LIBRARY LOCATION AND CONTACT ============================ Normally, you should be able to download the latest version of the library from this url: - http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html + http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html If you have questions about the library, you can mail me at: - jori@lumumba.luc.ac.be + jori@lumumba.uhasselt.be + +There is also a mailing list for the library. To subscribe to the list, +send an e-mail with the text 'subscribe jrtplib' as the message body (not +the subject) to majordomo@edm.uhasselt.be and you'll receive further +instructions. ACKNOWLEDGMENT ============== @@ -55,17 +60,19 @@ INSTALLATION NOTES script. This should generate a makefile which you can use to start building the library using 'make'. -* To compile the library on an MS-Windows platfrom: an Visual Studio - workspace file jrtplib.dsw is included. The project will search - for JThread files in ..\jthread-1.1.0 +* To compile the library on an MS-Windows platfrom: Visual Studio + workspace files are included. The project will search + for JThread files in ..\jthread-1.1.2 To compile the library without using JThread, comment the line with RTP_SUPPORT_THREAD in rtpconfig_win.h - Note that you must have service pack 6 for Visual Studio installed - to be able to compile the library. + Note that for Visual Studio 6, you must have service pack 6 for + installed to be able to compile the library. * For a manual about the library, please refer to doc/ subdirectory. Using 'make doc', a PDF version of the documentation will be built. - Alternatively, you can download the documentation from the homepage. + Note that you'll need to have the pdflatex LaTeX compiler installed. + Alternatively, you can download the documentation from the homepage: + http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.pdf * For systems with low memory or for applications which will involve only a few participants at a time: @@ -75,7 +82,9 @@ INSTALLATION NOTES * Used defines: - WIN32: - For compilation on an MS-Windows platform. + For compilation on an Win32 platform. + - _WIN32_WCE: + Define needed for compilation on a WinCE platform - RTP_HAVE_SYS_FILIO: Set if exists. - RTP_HAVE_SYS_SOCKIO: diff --git a/aclocal.m4 b/aclocal.m4 index e87c6e9..0044e21 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.8.5 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -191,6 +191,8 @@ if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) @@ -308,7 +310,7 @@ fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then @@ -667,11 +669,37 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - *) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + ;; + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && @@ -1005,8 +1033,8 @@ AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && @@ -1173,7 +1201,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -1231,7 +1259,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -1289,7 +1317,9 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in @@ -1308,7 +1338,7 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.[01]* | freebsdelf3.[01]*) + freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1434,7 +1464,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1497,7 +1527,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -1663,7 +1693,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" @@ -2068,6 +2100,15 @@ case $reload_flag in *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac ])# AC_PROG_LD_RELOAD_FLAG @@ -2101,7 +2142,7 @@ beos*) lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) +bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so @@ -2124,13 +2165,13 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -2174,15 +2215,6 @@ irix5* | irix6* | nonstopux*) # This must be Linux ELF. linux*) - case $host_cpu in - alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*) - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; @@ -2205,12 +2237,10 @@ nto-qnx*) ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; @@ -2400,10 +2430,21 @@ AC_DEFUN([AC_LIBTOOL_CXX], # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX +# _LT_AC_PROG_CXXCPP +# --------------- +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- @@ -2538,43 +2579,6 @@ aix3*) aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no - fi - ;; - darwin* | rhapsody*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac @@ -2601,7 +2605,7 @@ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= @@ -2773,7 +2777,7 @@ case $host_os in _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -2794,6 +2798,9 @@ case $host_os in fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -2853,6 +2860,7 @@ case $host_os in esac ;; + cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. @@ -2876,57 +2884,68 @@ case $host_os in _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - darwin* | rhapsody*) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; + ;; dgux*) case $cc_basename in @@ -2945,14 +2964,14 @@ case $host_os in ;; esac ;; - freebsd[12]*) + freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -2983,7 +3002,7 @@ case $host_os in # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -3132,13 +3151,36 @@ case $host_os in icpc) # Intel C++ with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; + pgCC) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + ;; cxx) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -3191,6 +3233,22 @@ case $host_os in # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in KCC) @@ -3361,7 +3419,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system @@ -3738,7 +3796,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -3949,7 +4007,7 @@ Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= @@ -3980,6 +4038,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -4330,9 +4394,6 @@ symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -4354,6 +4415,13 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; @@ -4385,8 +4453,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -4581,6 +4652,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; dgux*) case $cc_basename in ec++) @@ -4594,7 +4675,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4640,12 +4721,18 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + pgCC) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha @@ -4834,6 +4921,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -4869,12 +4966,19 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + pgcc | pgf77 | pgf90) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. @@ -4919,6 +5023,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) fi ;; + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -4979,7 +5088,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5092,7 +5201,7 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' @@ -5106,7 +5215,7 @@ EOF fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else - ld_shlibs=no + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -5150,11 +5259,21 @@ EOF linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" + tmp_addflag= + case $CC,$host_cpu in + pgf77* | pgf90* ) # Portland Group f77 and f90 compilers + tmp_addflag=' -fpic' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' supports_anon_versioning=no case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions @@ -5164,9 +5283,9 @@ EOF _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1) fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5256,7 +5375,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -5277,6 +5396,9 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -5335,7 +5457,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - bsdi4*) + bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; @@ -5356,57 +5478,57 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - _LT_AC_TAGVAR(ld_shlibs, $1)=no + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac fi ;; @@ -5440,7 +5562,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -5551,6 +5673,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else @@ -5628,7 +5751,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -5889,7 +6012,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -5914,60 +6037,37 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do fi done done -SED=$lt_cv_path_SED ]) +SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.8.5])]) - -# AM_AUX_DIR_EXPAND + [AM_AUTOMAKE_VERSION([1.9.5])]) -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -6014,26 +6114,16 @@ AC_PREREQ([2.50])dnl am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6053,30 +6143,19 @@ else fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -6085,7 +6164,6 @@ fi])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -6225,26 +6303,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Generate code to set up dependency tracking. -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -6263,27 +6331,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], else continue fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue @@ -6309,30 +6371,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# serial 12 -# serial 11 +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -6390,7 +6441,6 @@ AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl @@ -6399,7 +6449,9 @@ AC_REQUIRE([AM_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl - +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], @@ -6433,51 +6485,27 @@ for _am_header in $config_headers :; do done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -6492,26 +6520,15 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -6555,27 +6572,16 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# -*- Autoconf -*- +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -6601,27 +6607,16 @@ else fi ]) +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -6642,13 +6637,21 @@ fi # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as @@ -6667,26 +6670,15 @@ else fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Helper functions for option handling. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -6711,28 +6703,16 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -6775,25 +6755,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# AM_PROG_INSTALL_STRIP +# --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -6814,3 +6783,99 @@ fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/configure b/configure index a7ffeab..8efca8c 100755 --- a/configure +++ b/configure @@ -278,7 +278,7 @@ fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then @@ -463,7 +463,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1498,7 +1498,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.8" +am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1675,13 +1675,21 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as @@ -1797,7 +1805,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.1.0 + VERSION=3.2.0 cat >>confdefs.h <<_ACEOF @@ -1825,9 +1833,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -AMTAR=${AMTAR-"${am_missing_run}tar"} - install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user @@ -1920,6 +1925,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + @@ -1939,10 +1951,11 @@ RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" +RTP_SUPPORT_IFADDRS="// No ifaddrs support" if test "BLA$CXXFLAGS" = "BLA" ; then - CXXFLAGS="-O2 " -fi + CXXFLAGS="-g -Werror -Wall" + fi ac_ext=cc @@ -3207,7 +3220,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -3232,10 +3245,10 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do fi done done -SED=$lt_cv_path_SED fi +SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -3376,6 +3389,15 @@ case $reload_flag in *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 @@ -3462,7 +3484,7 @@ beos*) lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) +bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so @@ -3485,13 +3507,13 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -3535,15 +3557,6 @@ irix5* | irix6* | nonstopux*) # This must be Linux ELF. linux*) - case $host_cpu in - alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*) - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` lt_cv_deplibs_check_method=pass_all ;; @@ -3566,12 +3579,10 @@ nto-qnx*) ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; @@ -3664,7 +3675,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3667 "configure"' > conftest.$ac_ext + echo '#line 3678 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4913,7 +4924,12 @@ else fi -ac_ext=cc + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5143,6 +5159,8 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi + ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' @@ -5236,7 +5254,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5239:" \ +echo "$as_me:5257:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5426,11 +5444,37 @@ else lt_cv_sys_max_cmd_len=8192; ;; - *) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + ;; + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && @@ -5476,9 +5520,6 @@ symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -5500,6 +5541,13 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; @@ -5531,8 +5579,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -5999,6 +6050,8 @@ if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) @@ -6270,11 +6323,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6273: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6326: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6277: \$? = $ac_status" >&5 + echo "$as_me:6330: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6381,6 +6434,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -6416,12 +6479,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + pgcc | pgf77 | pgf90) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-static' + ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. @@ -6466,6 +6536,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' @@ -6503,11 +6578,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6506: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6581: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6510: \$? = $ac_status" >&5 + echo "$as_me:6585: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6563,11 +6638,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6566: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6641: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6570: \$? = $ac_status" >&5 + echo "$as_me:6645: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -6722,7 +6797,7 @@ EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' @@ -6780,11 +6855,21 @@ EOF linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds="$tmp_archive_cmds" + tmp_addflag= + case $CC,$host_cpu in + pgf77* | pgf90* ) # Portland Group f77 and f90 compilers + tmp_addflag=' -fpic' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' supports_anon_versioning=no case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions @@ -6794,9 +6879,9 @@ EOF archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else - archive_expsym_cmds="$tmp_archive_cmds" + archive_expsym_cmds=$archive_cmds fi else ld_shlibs=no @@ -6886,7 +6971,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -6907,6 +6992,9 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -7067,7 +7155,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; @@ -7093,52 +7181,52 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc=no case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag='-undefined dynamic_lookup' - ;; - esac - fi - ;; + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='-all_load $convenience' + whole_archive_flag_spec='' link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs=no + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac fi ;; @@ -7172,7 +7260,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -7283,6 +7371,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else @@ -7360,7 +7449,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs=yes ;; @@ -7634,7 +7723,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -7692,7 +7781,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -7750,7 +7839,9 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in @@ -7769,7 +7860,7 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -7895,7 +7986,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -7958,7 +8049,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -8080,8 +8171,8 @@ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var " || \ - test "X$hardcode_automatic"="Xyes" ; then + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && @@ -8747,7 +8838,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext </dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= @@ -9185,6 +9239,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -9556,7 +9616,9 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9849,7 +9911,7 @@ case $host_os in link_all_deplibs_CXX=yes if test "$GXX" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -9870,6 +9932,9 @@ case $host_os in fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -10031,6 +10096,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; + cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. @@ -10054,57 +10120,68 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no fi ;; + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes - darwin* | rhapsody*) - if test "$GXX" = yes; then - archive_cmds_need_lc_CXX=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_CXX='-undefined dynamic_lookup' - ;; - esac + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='-all_load $convenience' - link_all_deplibs_CXX=yes - else - ld_shlibs_CXX=no - fi - ;; + ;; dgux*) case $cc_basename in @@ -10123,14 +10200,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - freebsd12*) + freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -10161,7 +10238,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -10310,13 +10387,36 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi icpc) # Intel C++ with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac archive_cmds_need_lc_CXX=no - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; + pgCC) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + ;; cxx) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -10369,6 +10469,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in KCC) @@ -10539,7 +10655,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in - solaris2.0-5 | solaris2.0-5.*) ;; + solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system @@ -10824,6 +10940,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; dgux*) case $cc_basename in ec++) @@ -10837,7 +10963,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -10883,12 +11009,18 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; + pgCC) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-static' + ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha @@ -11024,11 +11156,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11027: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11159: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11031: \$? = $ac_status" >&5 + echo "$as_me:11163: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11084,11 +11216,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11087: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11219: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11091: \$? = $ac_status" >&5 + echo "$as_me:11223: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11152,7 +11284,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -11332,7 +11464,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11390,7 +11522,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -11448,7 +11580,9 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in @@ -11467,7 +11601,7 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -11593,7 +11727,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -11656,7 +11790,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -11778,8 +11912,8 @@ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var CXX" || \ - test "X$hardcode_automatic_CXX"="Xyes" ; then + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && @@ -12445,7 +12579,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -13283,12 +13433,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; + pgcc | pgf77 | pgf90) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-static' + ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. @@ -13333,6 +13490,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' @@ -13370,11 +13532,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13373: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13535: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13377: \$? = $ac_status" >&5 + echo "$as_me:13539: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13430,11 +13592,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13433: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13595: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13437: \$? = $ac_status" >&5 + echo "$as_me:13599: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13589,7 +13751,7 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' @@ -13603,7 +13765,7 @@ EOF fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else - ld_shlibs=no + ld_shlibs_F77=no fi ;; @@ -13647,11 +13809,21 @@ EOF linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_F77="$tmp_archive_cmds" + tmp_addflag= + case $CC,$host_cpu in + pgf77* | pgf90* ) # Portland Group f77 and f90 compilers + tmp_addflag=' -fpic' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' supports_anon_versioning=no case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions @@ -13661,9 +13833,9 @@ EOF archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else - archive_expsym_cmds_F77="$tmp_archive_cmds" + archive_expsym_cmds_F77=$archive_cmds_F77 fi else ld_shlibs_F77=no @@ -13753,7 +13925,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_F77=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -13774,6 +13946,9 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -13914,7 +14089,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_F77=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; @@ -13935,57 +14110,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc_F77=no case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_F77='-undefined dynamic_lookup' - ;; - esac - fi - ;; + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='-all_load $convenience' + whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs_F77=no + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac fi ;; @@ -14019,7 +14194,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes @@ -14130,6 +14305,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else @@ -14207,7 +14383,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_F77=yes ;; @@ -14481,7 +14657,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14539,7 +14715,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -14597,7 +14773,9 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in @@ -14616,7 +14794,7 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -14742,7 +14920,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -14805,7 +14983,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -14927,8 +15105,8 @@ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var F77" || \ - test "X$hardcode_automatic_F77"="Xyes" ; then + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && @@ -15105,6 +15283,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -15419,7 +15603,7 @@ objext_GCJ=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -15464,11 +15648,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15467: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15651: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15471: \$? = $ac_status" >&5 + echo "$as_me:15655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15575,6 +15759,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -15610,12 +15804,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; + pgcc | pgf77 | pgf90) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-static' + ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. @@ -15660,6 +15861,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' @@ -15697,11 +15903,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15700: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15906: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15704: \$? = $ac_status" >&5 + echo "$as_me:15910: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15757,11 +15963,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15760: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15966: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15764: \$? = $ac_status" >&5 + echo "$as_me:15970: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15916,7 +16122,7 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' @@ -15930,7 +16136,7 @@ EOF fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else - ld_shlibs=no + ld_shlibs_GCJ=no fi ;; @@ -15974,11 +16180,21 @@ EOF linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_GCJ="$tmp_archive_cmds" + tmp_addflag= + case $CC,$host_cpu in + pgf77* | pgf90* ) # Portland Group f77 and f90 compilers + tmp_addflag=' -fpic' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' supports_anon_versioning=no case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions @@ -15988,9 +16204,9 @@ EOF archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else - archive_expsym_cmds_GCJ="$tmp_archive_cmds" + archive_expsym_cmds_GCJ=$archive_cmds_GCJ fi else ld_shlibs_GCJ=no @@ -16080,7 +16296,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_GCJ=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -16101,6 +16317,9 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -16261,7 +16480,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_GCJ=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; @@ -16282,57 +16501,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc_GCJ=no case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='-undefined dynamic_lookup' - ;; - esac - fi - ;; + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='-all_load $convenience' + whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs_GCJ=no + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac fi ;; @@ -16366,7 +16585,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes @@ -16477,6 +16696,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else @@ -16554,7 +16774,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_GCJ=yes ;; @@ -16828,7 +17048,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -16886,7 +17106,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -16944,7 +17164,9 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in @@ -16963,7 +17185,7 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -17089,7 +17311,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17152,7 +17374,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -17274,8 +17496,8 @@ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var GCJ" || \ - test "X$hardcode_automatic_GCJ"="Xyes" ; then + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && @@ -17941,7 +18163,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6 class MyThread : public JThread { public: - void *Thread() { JThread::ThreadStarted(); } + void *Thread() { JThread::ThreadStarted(); return 0; } }; _ACEOF rm -f conftest.$ac_objext @@ -19203,7 +19437,7 @@ echo $ECHO_N "checking JThread version... $ECHO_C" >&6 class MyThread : public JThread { public: - void *Thread() { JThread::ThreadStarted(); } + void *Thread() { JThread::ThreadStarted(); return 0; } }; _ACEOF rm -f conftest.$ac_objext @@ -19539,7 +19773,7 @@ fi -if test "$cross_compiling" = yes ; then +if test "$cross_compiling" = yes ; then cat << EOF ASSUMING TARGET IS BIG ENDIAN: @@ -20413,9 +20647,21 @@ fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking IPv6 support" >&5 +if test "$cross_compiling" = yes ; then + cat << EOF + +ABOUT IPv6 SUPPORT: + + Can't check if IPv6 support is possible when cross-compiling. For now, lets + assume that you want IPv6 support enabled. To disable it, comment the two + appropriate lines in src/rtpconfig_unix.h before running make. + +EOF +else + + echo "$as_me:$LINENO: checking IPv6 support" >&5 echo $ECHO_N "checking IPv6 support... $ECHO_C" >&6 -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -20424,17 +20670,17 @@ See \`config.log' for more details." >&2;} else cat >conftest.$ac_ext <<_ACEOF - #include - #include - int main(void) - { - int s; + #include + #include + int main(void) + { + int s; - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } + s = socket(PF_INET6,SOCK_DGRAM,0); + if (s < 0) + return -1; + return 0; + } _ACEOF rm -f conftest$ac_exeext @@ -20450,27 +20696,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: enabled" >&5 echo "${ECHO_T}enabled" >&6 - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" + RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 + echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 echo $ECHO_N "checking if necessary options for IPv6 multicasting are available... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF - #include - #include - #include - - int main(void) - { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; - } + #include + #include + #include + + int main(void) + { + int testval; + struct ipv6_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IPV6_MULTICAST_HOPS; + testval = IPV6_JOIN_GROUP; + testval = IPV6_LEAVE_GROUP; + return 0; + } _ACEOF rm -f conftest.$ac_objext @@ -20496,9 +20742,9 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" + RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20514,12 +20760,158 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) - echo "$as_me:$LINENO: result: disabled" >&5 + echo "$as_me:$LINENO: result: disabled" >&5 echo "${ECHO_T}disabled" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +fi + + +if test "${ac_cv_header_ifaddrs_h+set}" = set; then + echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 +echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6 +if test "${ac_cv_header_ifaddrs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking ifaddrs.h usability" >&5 +echo $ECHO_N "checking ifaddrs.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking ifaddrs.h presence" >&5 +echo $ECHO_N "checking ifaddrs.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ifaddrs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ifaddrs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ifaddrs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ifaddrs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 +echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6 +if test "${ac_cv_header_ifaddrs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ifaddrs_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6 + +fi +if test $ac_cv_header_ifaddrs_h = yes; then + RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS" +fi + + + @@ -21223,7 +21615,6 @@ s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t -s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t @@ -21232,6 +21623,9 @@ s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t @@ -21291,6 +21685,7 @@ s,@RTP_SUPPORT_RANDR@,$RTP_SUPPORT_RANDR,;t t s,@RTP_SUPPORT_GETLOGINR@,$RTP_SUPPORT_GETLOGINR,;t t s,@RTP_SUPPORT_IPV6@,$RTP_SUPPORT_IPV6,;t t s,@RTP_SUPPORT_IPV6MULTICAST@,$RTP_SUPPORT_IPV6MULTICAST,;t t +s,@RTP_SUPPORT_IFADDRS@,$RTP_SUPPORT_IFADDRS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -21670,27 +22065,21 @@ echo X"$mf" | else continue fi - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue diff --git a/configure.in b/configure.in index 406ffb2..baf8fe2 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.1.0) +AM_INIT_AUTOMAKE(jrtplib,3.2.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -16,10 +16,11 @@ RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" +RTP_SUPPORT_IFADDRS="// No ifaddrs support" if test "BLA$CXXFLAGS" = "BLA" ; then - dnl CXXFLAGS="-g -Werror -Wall" - CXXFLAGS="-O2 " + CXXFLAGS="-g -Werror -Wall" + dnl CXXFLAGS="-O2 " fi dnl --------------------------------------------------------------------------- @@ -91,7 +92,7 @@ if test "$checkjthread" = "yes" ; then class MyThread : public JThread { public: - void *Thread() { JThread::ThreadStarted(); } + void *Thread() { JThread::ThreadStarted(); return 0; } };],[ RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" @@ -121,7 +122,7 @@ if test "$checkjthread" = "yes" ; then class MyThread : public JThread { public: - void *Thread() { JThread::ThreadStarted(); } + void *Thread() { JThread::ThreadStarted(); return 0; } };],[ RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" @@ -149,7 +150,7 @@ dnl Check if it's a big endian or little endian system dnl Note that we must be careful when a cross-compiler is being used... dnl --------------------------------------------------------------------------- -if test "$cross_compiling" = yes ; then +if test "$cross_compiling" = yes ; then cat << EOF ASSUMING TARGET IS BIG ENDIAN: @@ -355,50 +356,69 @@ dnl --------------------------------------------------------------------------- dnl Check IPv6 support dnl --------------------------------------------------------------------------- -AC_MSG_CHECKING(IPv6 support) -AC_RUN_IFELSE([ - #include - #include - int main(void) - { - int s; +if test "$cross_compiling" = yes ; then + cat << EOF - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } - ], - [AC_MSG_RESULT(enabled) - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - - dnl --------------------------------------------------------------------------- - dnl Check if multicast options are known - dnl --------------------------------------------------------------------------- +ABOUT IPv6 SUPPORT: + + Can't check if IPv6 support is possible when cross-compiling. For now, lets + assume that you want IPv6 support enabled. To disable it, comment the two + appropriate lines in src/rtpconfig_unix.h before running make. + +EOF +else - AC_MSG_CHECKING(if necessary options for IPv6 multicasting are available) - AC_COMPILE_IFELSE([ + AC_MSG_CHECKING(IPv6 support) + AC_RUN_IFELSE([ #include #include - #include - int main(void) { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; + int s; + + s = socket(PF_INET6,SOCK_DGRAM,0); + if (s < 0) + return -1; + return 0; } - ],[ - AC_MSG_RESULT(yes) - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST"], - AC_MSG_RESULT(no))], - [ - AC_MSG_RESULT(disabled) - ]) + ], + [AC_MSG_RESULT(enabled) + RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" + + dnl --------------------------------------------------------------------------- + dnl Check if multicast options are known + dnl --------------------------------------------------------------------------- + + AC_MSG_CHECKING(if necessary options for IPv6 multicasting are available) + AC_COMPILE_IFELSE([ + #include + #include + #include + + int main(void) + { + int testval; + struct ipv6_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IPV6_MULTICAST_HOPS; + testval = IPV6_JOIN_GROUP; + testval = IPV6_LEAVE_GROUP; + return 0; + } + ],[ + AC_MSG_RESULT(yes) + RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST"], + AC_MSG_RESULT(no))], + [ + AC_MSG_RESULT(disabled) + ]) +fi + +dnl --------------------------------------------------------------------------- +dnl Check if ifaddrs.h exists so we can use getifaddrs +dnl --------------------------------------------------------------------------- + +AC_CHECK_HEADER(ifaddrs.h,[RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS"]) dnl --------------------------------------------------------------------------- dnl Finish up... @@ -420,6 +440,7 @@ AC_SUBST(RTP_SUPPORT_RANDR) AC_SUBST(RTP_SUPPORT_GETLOGINR) AC_SUBST(RTP_SUPPORT_IPV6) AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) +AC_SUBST(RTP_SUPPORT_IFADDRS) AC_OUTPUT(Makefile \ src/Makefile \ src/rtpconfig_unix.h \ diff --git a/doc/Makefile.am b/doc/Makefile.am index c5499d1..9959e5c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,8 +3,8 @@ EXTRA_DIST = jrtplib.tex doc: jrtplib.pdf jrtplib.pdf: jrtplib.tex - pdfelatex jrtplib.tex - pdfelatex jrtplib.tex + pdflatex jrtplib.tex + pdflatex jrtplib.tex clean: rm -f jrtplib.{toc,aux,log,pdf} diff --git a/doc/Makefile.in b/doc/Makefile.in index 296ab64..19a096b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -33,6 +33,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -102,6 +103,7 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ @@ -127,6 +129,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -255,7 +259,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -318,8 +322,8 @@ uninstall-am: uninstall-info-am doc: jrtplib.pdf jrtplib.pdf: jrtplib.tex - pdfelatex jrtplib.tex - pdfelatex jrtplib.tex + pdflatex jrtplib.tex + pdflatex jrtplib.tex clean: rm -f jrtplib.{toc,aux,log,pdf} diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index 2ddf815..84160cf 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.1.0} +\newcommand{\jversion}{3.2.0} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -21,12 +21,12 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} - \author{Jori Liesenborgs\\{\tt jori@lumumba.luc.ac.be}} - \date{October 1, 2004\\\vspace{0.5cm}\ \\ + \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} + \date{September 19, 2005\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), - a research institute of\\ the Limburgs Universitair Centrum (LUC)}\\\ \\ - {\tt http://www.edm.luc.ac.be/}\\ - {\tt http://www.luc.ac.be/}}} + a research institute\\of the Hasselt University}\\\ \\ + {\tt http://www.edm.uhasselt.be/}\\ + {\tt http://www.uhasselt.be/}}} \maketitle \newpage @@ -1396,8 +1396,25 @@ functions which can be used to catch certain events (new SSRC, SSRC collision, \ldots). - The class interface is the following: + When probation support is enabled, you can select one of + three probation types: + \begin{verbatim} + enum ProbationType { NoProbation, ProbationDiscard, ProbationStore }; + \end{verbatim} + When {\tt NoProbation} is selected, the probation algorithm will + not be used to validate new sources. When {\tt ProbationDiscard} + is used, the probation algorithm is activated but received packets + will be discarded until the source is validated. To activate the + probation routine and store the packets which are received before + the source is validated, the mode {\tt ProbationStore} can be + selected. + + The RTPSources class interface is the following: \begin{itemize} + \item {\tt RTPSources(ProbationType probationtype = ProbationStore)}\\ + In the constructor you can select the probation type you'd like + to use. This only makes a difference when probation support was + enabled at compilation time. \item {\tt void Clear()}\\ Clears the source table. \item {\tt int CreateOwnSSRC(u\_int32\_t ssrc)}\\ @@ -1966,10 +1983,12 @@ \item {\tt int BuildNextPacket(RTCPCompoundPacket **pack)}\\ Builds the next RTCP compound packet which should be sent and stores it in {\tt pack}. - \item {\tt int BuildBYEPacket(RTCPCompoundPacket **pack, const void *reason, size\_t reasonlength)}\\ + \item {\tt int BuildBYEPacket(RTCPCompoundPacket **pack, const void *reason, size\_t reasonlength,bool useSRifpossible = true)}\\ Builds a BYE packet with reason for leaving specified by {\tt reason} and length - {\tt reasonlength}. + {\tt reasonlength}. If {\tt useSRifpossible} is set to {\tt true}, + the RTCP compound packet will start with a sender report if + allowed. Otherwise, a receiver report is used. \item {\tt void SetNameInterval(int count)}\\ After all possible sources in the source table have been processed, the class will check if other SDES items @@ -2191,6 +2210,11 @@ \item {\tt bool GetResolveLocalHostname() const}\\ Returns whether the local hostname should be determined from the transmitter's list of local IP addresses or not. + \item {\tt void SetProbationType(RTPSources::ProbationType probtype)}\\ + If probation support is enabled, this function sets the + probation type to be used. + \item {\tt RTPSources::ProbationType GetProbationType() const}\\ + Returns the probation type which will be used. \item {\tt void SetSessionBandwidth(double sessbw)}\\ Sets the session bandwidth in bytes per second. \item {\tt double GetSessionBandwidth() const}\\ @@ -2225,6 +2249,15 @@ \item {\tt bool GetRequestImmediateBYE() const}\\ Returns whether the session should send a BYE packet immediately (if allowed) or not. + \item {\tt void SetSenderReportForBYE(bool v)}\\ + When sending a BYE packet, this indicates whether it will be part + of an RTCP compound packet that begins with a sender report or a + receiver report. Of course, a sender report will only be used if + allowed. + \item {\tt bool GetSenderReportForBYE() const}\\ + Returns {\tt true} if a BYE packet will be sent in an RTCP compound + packet which starts with a sender report. If a receiver report will + be used, the function returns {\tt false}. \item {\tt void SetSenderTimeoutMultiplier(double m)}\\ Sets the multiplier to be used when timing out senders. \item {\tt double GetSenderTimeoutMultiplier() const}\\ @@ -2260,12 +2293,14 @@ \item Accept own packets: no \item Receive mode: accept all packets \item Resolve local hostname: no + \item Probation type: {\tt ProbationStore} \item Session bandwidth: 10000 bytes per second \item Control traffic fraction: 5\% \item Sender's fraction of control traffic: 25\% \item Minimum RTCP interval: 5 seconds \item Use half minimum interval at startup: yes \item Send BYE packet immediately if allowed: yes + \item Use sender report for BYE packet: yes \item Sender timeout multiplier: 2 \item Member timeout multiplier: 5 \item Timeout multiplier after BYE packet: 1 @@ -2369,6 +2404,11 @@ timestamp with the appropriate amount so that the next packets will still be played at the correct time at other hosts. + \item {\tt RTPTransmissionInfo *GetTransmissionInfo()}\\ + This function returns an instance of a subclass of {\tt RTPTransmissionInfo} + which will give some additional information about the transmitter + (a list of local IP addresses for example). The user + has to delete the returned instance when it is no longer needed. \item {\tt int Poll()}\\ If you're not using the poll thread, this function must be called regularly to process incoming data @@ -2590,13 +2630,18 @@ If you have any questions, remarks or requests about the library or if you think you've discovered a bug, you can contact me at: \begin{verbatim} - jori@lumumba.luc.ac.be + jori@lumumba.uhasselt.be \end{verbatim} The home page of the library is: \begin{verbatim} - http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html + http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html \end{verbatim} + There is also a mailing list for the library. To subscribe to the list, + send an e-mail with the text {\tt subscribe jrtplib} as the message body (not + the subject) to {\tt majordomo@edm.uhasselt.be} and you'll receive further + instructions. + \end{document} diff --git a/examples/Makefile.am b/examples/Makefile.am index a5147b4..57466c6 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,2 +1,2 @@ -EXTRA_DIST = example1.cpp example2.cpp +EXTRA_DIST = example1.cpp example2.cpp example3.cpp diff --git a/examples/Makefile.in b/examples/Makefile.in index 3b96461..439e894 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -33,6 +33,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -102,6 +103,7 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ @@ -127,6 +129,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -155,7 +159,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = example1.cpp example2.cpp +EXTRA_DIST = example1.cpp example2.cpp example3.cpp all: all-am .SUFFIXES: @@ -255,7 +259,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" diff --git a/examples/example3.cpp b/examples/example3.cpp new file mode 100644 index 0000000..fc462cf --- /dev/null +++ b/examples/example3.cpp @@ -0,0 +1,224 @@ +/* + This IPv4 example listens for incoming packets and automatically adds destinations + for new sources. +*/ + +#include "rtpsession.h" +#include "rtppacket.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtpsessionparams.h" +#include "rtperrors.h" +#ifndef WIN32 + #include + #include +#else + #include +#endif // WIN32 +#include "rtpsourcedata.h" +#include +#include +#include +#include + +// +// This function checks if there was a RTP error. If so, it displays an error +// message and exists. +// + +void checkerror(int rtperr) +{ + if (rtperr < 0) + { + std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl; + exit(-1); + } +} + +// +// The new class routine +// + +class MyRTPSession : public RTPSession +{ +protected: + void OnNewSource(RTPSourceData *dat) + { + if (dat->IsOwnSSRC()) + return; + + u_int32_t ip; + u_int16_t port; + + if (dat->GetRTPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort(); + } + else if (dat->GetRTCPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort()-1; + } + else + return; + + RTPIPv4Address dest(ip,port); + AddDestination(dest); + + struct in_addr inaddr; + inaddr.s_addr = htonl(ip); + std::cout << "Adding destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl; + } + + void OnBYEPacket(RTPSourceData *dat) + { + if (dat->IsOwnSSRC()) + return; + + u_int32_t ip; + u_int16_t port; + + if (dat->GetRTPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort(); + } + else if (dat->GetRTCPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort()-1; + } + else + return; + + RTPIPv4Address dest(ip,port); + DeleteDestination(dest); + + struct in_addr inaddr; + inaddr.s_addr = htonl(ip); + std::cout << "Deleting destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl; + } + + void OnRemoveSource(RTPSourceData *dat) + { + if (dat->IsOwnSSRC()) + return; + if (dat->ReceivedBYE()) + return; + + u_int32_t ip; + u_int16_t port; + + if (dat->GetRTPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort(); + } + else if (dat->GetRTCPDataAddress() != 0) + { + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + ip = addr->GetIP(); + port = addr->GetPort()-1; + } + else + return; + + RTPIPv4Address dest(ip,port); + DeleteDestination(dest); + + struct in_addr inaddr; + inaddr.s_addr = htonl(ip); + std::cout << "Deleting destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl; + } +}; + +// +// The main routine +// + +int main(void) +{ +#ifdef WIN32 + WSADATA dat; + WSAStartup(MAKEWORD(2,2),&dat); +#endif // WIN32 + + MyRTPSession sess; + u_int16_t portbase,destport; + u_int32_t destip; + std::string ipstr; + int status,i,num; + + // First, we'll ask for the necessary information + + std::cout << "Enter local portbase:" << std::endl; + std::cin >> portbase; + std::cout << std::endl; + + std::cout << std::endl; + std::cout << "Number of seconds you wish to wait:" << std::endl; + std::cin >> num; + + // Now, we'll create a RTP session, set the destination + // and poll for incoming data. + + RTPUDPv4TransmissionParams transparams; + RTPSessionParams sessparams; + + // IMPORTANT: The local timestamp unit MUST be set, otherwise + // RTCP Sender Report info will be calculated wrong + // In this case, we'll be just use 8000 samples per second. + sessparams.SetOwnTimestampUnit(1.0/8000.0); + + sessparams.SetAcceptOwnPackets(true); + transparams.SetPortbase(portbase); + status = sess.Create(sessparams,&transparams); + checkerror(status); + + for (i = 1 ; i <= num ; i++) + { + sess.BeginDataAccess(); + + // check incoming packets + if (sess.GotoFirstSourceWithData()) + { + do + { + RTPPacket *pack; + + while ((pack = sess.GetNextPacket()) != NULL) + { + // You can examine the data here + printf("Got packet !\n"); + + // we don't longer need the packet, so + // we'll delete it + delete pack; + } + } while (sess.GotoNextSourceWithData()); + } + + sess.EndDataAccess(); + +#ifndef RTP_SUPPORT_THREAD + status = sess.Poll(); + checkerror(status); +#endif // RTP_SUPPORT_THREAD + + RTPTime::Wait(RTPTime(1,0)); + } + + sess.BYEDestroy(RTPTime(10,0),0,0); + +#ifdef WIN32 + WSACleanup(); +#endif // WIN32 + return 0; +} + diff --git a/jrtplib.dsp b/jrtplib.dsp index f20597f..914f74b 100644 --- a/jrtplib.dsp +++ b/jrtplib.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.1.0\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\jthread-1.1.2\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD BASE RSC /l 0x813 /d "NDEBUG" # ADD RSC /l 0x813 /d "NDEBUG" BSC32=bscmake.exe @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\jthread-1.1.0\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.1.2\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD BASE RSC /l 0x813 /d "_DEBUG" # ADD RSC /l 0x813 /d "_DEBUG" BSC32=bscmake.exe @@ -193,6 +193,10 @@ SOURCE=.\src\rtpsources.cpp # End Source File # Begin Source File +SOURCE=.\src\rtptimeutilities.cpp +# End Source File +# Begin Source File + SOURCE=.\src\rtpudpv4transmitter.cpp # End Source File # Begin Source File diff --git a/jrtplib.sln b/jrtplib.sln new file mode 100644 index 0000000..b5090b9 --- /dev/null +++ b/jrtplib.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "jrtplib.vcproj", "{D2A2E3F7-BF5F-4D92-A167-1AF302E20950}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Debug|Win32.Build.0 = Debug|Win32 + {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Release|Win32.ActiveCfg = Release|Win32 + {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/jrtplib.vcproj b/jrtplib.vcproj new file mode 100644 index 0000000..4ec2342 --- /dev/null +++ b/jrtplib.vcproj @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jrtplib_wce.sln b/jrtplib_wce.sln new file mode 100644 index 0000000..7baaab2 --- /dev/null +++ b/jrtplib_wce.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib_wce", "jrtplib_wce.vcproj", "{93374307-119F-404E-9B09-3642C6FC96C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) + Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) + {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) + {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) + {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) + {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) + {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/jrtplib_wce.vcproj b/jrtplib_wce.vcproj new file mode 100644 index 0000000..a85e357 --- /dev/null +++ b/jrtplib_wce.vcproj @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Makefile.am b/src/Makefile.am index 6af454b..9d72fdc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,8 +13,8 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtprandom.cpp rtcpscheduler.cpp \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp -libjrtp_la_LDFLAGS = -release 3.1.0 + rtpudpv6transmitter.cpp rtptimeutilities.cpp +libjrtp_la_LDFLAGS = -release 3.2.0 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 5c41dd4..0972abe 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -37,6 +37,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(libjrtpinclude_HEADERS) $(srcdir)/Makefile.am \ @@ -47,7 +48,14 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = rtpconfig_unix.h -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libjrtpincludedir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(libjrtpincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libjrtp_la_LIBADD = @@ -60,54 +68,26 @@ am_libjrtp_la_OBJECTS = rtpdebug.lo rtpsession.lo rtperrors.lo \ rtcpsrpacket.lo rtplibraryversion.lo rtcppacket.lo \ rtcpcompoundpacketbuilder.lo rtprandom.lo rtcpscheduler.lo \ rtcppacketbuilder.lo rtpsessionsources.lo rtpcollisionlist.lo \ - rtpipv6address.lo rtpudpv6transmitter.lo + rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/rtcpapppacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpbyepacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpcompoundpacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpcompoundpacketbuilder.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcppacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcppacketbuilder.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcprrpacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpscheduler.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpsdesinfo.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpsdespacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtcpsrpacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpcollisionlist.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpdebug.Plo ./$(DEPDIR)/rtperrors.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpinternalsourcedata.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpipv4address.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpipv6address.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtplibraryversion.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtppacket.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtppacketbuilder.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtppollthread.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtprandom.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpsession.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpsessionparams.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpsessionsources.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpsourcedata.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpsources.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpudpv4transmitter.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/rtpudpv6transmitter.Plo CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libjrtp_la_SOURCES) DIST_SOURCES = $(libjrtp_la_SOURCES) @@ -173,6 +153,7 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ @@ -198,6 +179,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -241,9 +224,9 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtprandom.cpp rtcpscheduler.cpp \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp + rtpudpv6transmitter.cpp rtptimeutilities.cpp -libjrtp_la_LDFLAGS = -release 3.1.0 +libjrtp_la_LDFLAGS = -release 3.2.0 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -301,7 +284,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ + f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ @@ -309,8 +292,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p="`echo $$p | sed -e 's|^.*/||'`"; \ + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done @@ -359,6 +342,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsessionsources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsourcedata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsources.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtptimeutilities.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpudpv4transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpudpv6transmitter.Plo@am__quote@ @@ -366,24 +350,21 @@ distclean-compile: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: @@ -400,7 +381,7 @@ install-libjrtpincludeHEADERS: $(libjrtpinclude_HEADERS) test -z "$(libjrtpincludedir)" || $(mkdir_p) "$(DESTDIR)$(libjrtpincludedir)" @list='$(libjrtpinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ + f=$(am__strip_dir) \ echo " $(libjrtpincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libjrtpincludedir)/$$f'"; \ $(libjrtpincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libjrtpincludedir)/$$f"; \ done @@ -408,7 +389,7 @@ install-libjrtpincludeHEADERS: $(libjrtpinclude_HEADERS) uninstall-libjrtpincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libjrtpinclude_HEADERS)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ + f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libjrtpincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(libjrtpincludedir)/$$f"; \ done @@ -514,7 +495,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index 3dde254..5763b93 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 8f3bfe4..4f3caf9 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -37,11 +37,9 @@ #include "rtpconfig.h" #include "rtcppacket.h" #include "rtpstructs.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include -#endif // WIN32 +#endif // WIN32 class RTCPCompoundPacket; diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index daf0c5d..a3cc35a 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 0ac3e4f..3ca6b68 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -37,10 +37,8 @@ #include "rtpconfig.h" #include "rtcppacket.h" #include "rtpstructs.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined (_WIN32_WCE)) #include -#else - #include #endif // WIN32 class RTCPCompoundPacket; diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index 792b55c..7c63224 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -41,10 +41,8 @@ #include "rtcpbyepacket.h" #include "rtcpapppacket.h" #include "rtcpunknownpacket.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #include "rtpdebug.h" diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index ae4fe0f..0c74e46 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index ec83d3f..3ec314a 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -36,10 +36,8 @@ #include "rtcpsdespacket.h" #include "rtcpbyepacket.h" #include "rtcpapppacket.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #include "rtpdebug.h" diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index c6c422c..dabdfc1 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -83,7 +83,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket class Report { public: - Report() { isSR = false; headerlength = 0; } + Report() { headerdata = (u_int8_t *)headerdata32; isSR = false; headerlength = 0; } ~Report() { Clear(); } void Clear() @@ -138,7 +138,8 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket bool isSR; - u_int8_t headerdata[sizeof(u_int32_t)+sizeof(RTCPSenderReport)]; // either for ssrc and sender info or just ssrc + u_int8_t *headerdata; + u_int32_t headerdata32[(sizeof(u_int32_t)+sizeof(RTCPSenderReport))/sizeof(u_int32_t)]; // either for ssrc and sender info or just ssrc size_t headerlength; std::list reportblocks; }; diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 6df64be..18eacb0 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcppacket.h b/src/rtcppacket.h index f94e8ce..2af82ef 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index 2fce89b..2eef558 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -43,6 +43,9 @@ RTCPPacketBuilder::RTCPPacketBuilder(RTPSources &s,RTPPacketBuilder &pb) : sources(s),rtppacketbuilder(pb),prevbuildtime(0,0) { init = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTCPPacketBuilder::~RTCPPacketBuilder() @@ -616,7 +619,7 @@ void RTCPPacketBuilder::ClearAllSDESFlags() ownsdesinfo.ClearFlags(); } -int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength) +int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength,bool useSRifpossible) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; @@ -640,13 +643,50 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas } u_int32_t ssrc = rtppacketbuilder.GetSSRC(); + bool useSR = false; + + if (useSRifpossible) + { + RTPSourceData *srcdat; + + if ((srcdat = sources.GetOwnSourceInfo()) != 0) + { + if (srcdat->IsSender()) + useSR = true; + } + } + + if (useSR) + { + RTPTime curtime = RTPTime::CurrentTime(); + RTPTime rtppacktime = rtppacketbuilder.GetPacketTime(); + u_int32_t rtppacktimestamp = rtppacketbuilder.GetPacketTimestamp(); + u_int32_t packcount = rtppacketbuilder.GetPacketCount(); + u_int32_t octetcount = rtppacketbuilder.GetPayloadOctetCount(); + RTPTime diff = curtime; + diff -= rtppacktime; + + u_int32_t tsdiff = (u_int32_t)((diff.GetDouble()/timestampunit)+0.5); + u_int32_t rtptimestamp = rtppacktimestamp+tsdiff; + RTPNTPTime ntptimestamp = curtime.GetNTPTime(); - if ((status = rtcpcomppack->StartReceiverReport(ssrc)) < 0) + if ((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) + { + delete rtcpcomppack; + if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) + return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; + return status; + } + } + else { - delete rtcpcomppack; - if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) - return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; - return status; + if ((status = rtcpcomppack->StartReceiverReport(ssrc)) < 0) + { + delete rtcpcomppack; + if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) + return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; + return status; + } } u_int8_t *owncname; diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index 7b4a31d..bc0fbf7 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -59,7 +59,7 @@ class RTCPPacketBuilder int SetMaximumPacketSize(size_t maxpacksize) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; if (maxpacksize < RTP_MINPACKETSIZE) return ERR_RTP_RTCPPACKETBUILDER_ILLEGALMAXPACKSIZE; maxpacketsize = maxpacksize; return 0; } int BuildNextPacket(RTCPCompoundPacket **pack); - int BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength); + int BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength,bool useSRifpossible = true); void SetNameInterval(int count) { if (!init) return; interval_name = count; } void SetEMailInterval(int count) { if (!init) return; interval_email = count; } diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index d00ee53..85c0d7e 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 7111d0e..999bee7 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -37,10 +37,8 @@ #include "rtpconfig.h" #include "rtcppacket.h" #include "rtpstructs.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 class RTCPCompoundPacket; diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index 42d0637..4a7e88e 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -48,6 +48,9 @@ RTCPSchedulerParams::RTCPSchedulerParams() : mininterval(RTCP_DEFAULTMININTERVAL senderfraction = RTCP_DEFAULTSENDERFRACTION; usehalfatstartup = RTCP_DEFAULTHALFATSTARTUP; immediatebye = RTCP_DEFAULTIMMEDIATEBYE; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTCPSchedulerParams::~RTCPSchedulerParams() diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index 6418d90..0b9cf57 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index 7e6b612..cf601d8 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index 2bdff2b..b29e95b 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index c50160f..e005961 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 787113a..2a2b330 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,10 +38,8 @@ #include "rtcppacket.h" #include "rtpstructs.h" #include "rtpdefines.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 class RTCPCompoundPacket; diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index fa9752f..b6474ed 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index d87e5a0..6d9fb65 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,10 +38,8 @@ #include "rtcppacket.h" #include "rtptimeutilities.h" #include "rtpstructs.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 class RTCPCompoundPacket; diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 35baa26..e24cda0 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 7626e44..a9dbd99 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index 6ba470b..74ea538 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,6 +38,13 @@ #include "rtpdebug.h" +RTPCollisionList::RTPCollisionList() +{ +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE +} + void RTPCollisionList::Clear() { std::list::iterator it; diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index 6d2c5bc..cd038ae 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -44,7 +44,7 @@ class RTPAddress; class RTPCollisionList { public: - RTPCollisionList() { } + RTPCollisionList(); ~RTPCollisionList() { Clear(); } void Clear(); int UpdateAddress(const RTPAddress *addr,const RTPTime &receivetime,bool *created); diff --git a/src/rtpconfig.h b/src/rtpconfig.h index d4aab12..5a52ec4 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -34,7 +34,7 @@ #define RTPCONFIG_H -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) #include "rtpconfig_win.h" #else #include "rtpconfig_unix.h" diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index 7a24f88..557f7b5 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -64,5 +64,7 @@ @RTP_SUPPORT_IPV6MULTICAST@ +@RTP_SUPPORT_IFADDRS@ + #endif // RTPCONFIG_UNIX_H diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index 60758a1..2088304 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -42,9 +42,9 @@ #define RTP_SUPPORT_SDESPRIV -// #define RTP_SUPPORT_IPV6 +//#define RTP_SUPPORT_IPV6 -// #define RTP_SUPPORT_IPV6MULTICAST +//#define RTP_SUPPORT_IPV6MULTICAST #endif // RTPCONFIG_WIN_H diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index c2a1acc..5d4d3ef 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpdebug.h b/src/rtpdebug.h index 887abed..761d174 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -40,7 +40,7 @@ #include "rtptypes.h" void *operator new(size_t s,char filename[],int line); -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) void *operator new[](size_t s,char filename[],int line); #define new new (__FILE__,__LINE__) #else diff --git a/src/rtpdefines.h b/src/rtpdefines.h index b44335e..e1a389b 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -70,5 +70,6 @@ #define RTCP_DEFAULTSENDERFRACTION 0.25 #define RTCP_DEFAULTHALFATSTARTUP true #define RTCP_DEFAULTIMMEDIATEBYE true +#define RTCP_DEFAULTSRBYE true #endif // RTPDEFINES_H diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 8cee35c..b79924f 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -167,6 +167,7 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG, "The maximum packet size is too big for this transmitter"}, { ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL,"The hostname is larger than the specified buffer size"}, { ERR_RTP_SDES_MAXPRIVITEMS,"The maximum number of SDES private item prefixes was reached"}, + { ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE,"An invalid probation type was specified"}, { 0,0 } }; diff --git a/src/rtperrors.h b/src/rtperrors.h index 602123b..3912290 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -163,6 +163,7 @@ std::string RTPGetErrorString(int errcode); #define ERR_RTP_UDPV6TRANS_NOTWAITING -123 #define ERR_RTP_UDPV6TRANS_PORTBASENOTEVEN -124 #define ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG -125 +#define ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE -126 #endif // RTPERRORS_H diff --git a/src/rtphashtable.h b/src/rtphashtable.h index dcbb438..8e0bddd 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index d32ee9a..2b56320 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -36,8 +36,13 @@ #include "rtpdebug.h" -RTPInternalSourceData::RTPInternalSourceData(u_int32_t ssrc):RTPSourceData(ssrc) +#define RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS 32 + +RTPInternalSourceData::RTPInternalSourceData(u_int32_t ssrc,RTPSources::ProbationType probtype):RTPSourceData(ssrc) { +#ifdef RTP_SUPPORT_PROBATION + probationtype = probtype; +#endif // RTP_SUPPORT_PROBATION } RTPInternalSourceData::~RTPInternalSourceData() @@ -47,7 +52,7 @@ RTPInternalSourceData::~RTPInternalSourceData() // The following function should delete rtppack if necessary int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,bool *stored) { - bool accept; + bool accept,onprobation,applyprobation; double tsunit; *stored = false; @@ -56,15 +61,48 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re tsunit = INF_GetEstimatedTimestampUnit(); else tsunit = timestampunit; - stats.ProcessPacket(rtppack,receivetime,tsunit,ownssrc,&accept); - if (!accept) - return 0; - // Ok, packet accepted +#ifdef RTP_SUPPORT_PROBATION + if (validated) // If the source is our own process, we can already be validated. No + applyprobation = false; // probation should be applied in that case. + else + { + if (probationtype == RTPSources::NoProbation) + applyprobation = false; + else + applyprobation = true; + } +#else + applyprobation = false; +#endif // RTP_SUPPORT_PROBATION + + stats.ProcessPacket(rtppack,receivetime,tsunit,ownssrc,&accept,applyprobation,&onprobation); +#ifdef RTP_SUPPORT_PROBATION + switch (probationtype) + { + case RTPSources::ProbationStore: + if (!(onprobation || accept)) + return 0; + if (accept) + validated = true; + break; + case RTPSources::ProbationDiscard: + case RTPSources::NoProbation: + if (!accept) + return 0; + validated = true; + break; + default: + return ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE; + } +#else + if (!accept) + return 0; validated = true; +#endif // RTP_SUPPORT_PROBATION; - if (!ownssrc) // for own ssrc these variables depend on the outgoing packets, not on the incoming + if (validated && !ownssrc) // for own ssrc these variables depend on the outgoing packets, not on the incoming issender = true; // Now, we can place the packet in the queue @@ -75,6 +113,19 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re packetlist.push_back(rtppack); return 0; } + + if (!validated) // still on probation + { + // Make sure that we don't buffer too much packets to avoid wasting memory + // on a bad source. Delete the packet in the queue with the lowest sequence + // number. + if (packetlist.size() == RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS) + { + RTPPacket *p = *(packetlist.begin()); + packetlist.pop_front(); + delete p; + } + } // find the right position to insert the packet @@ -116,7 +167,7 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re done = true; } } - + return 0; } diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index 46b7ba7..a527b9c 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,11 +38,12 @@ #include "rtpsourcedata.h" #include "rtpaddress.h" #include "rtptimeutilities.h" +#include "rtpsources.h" class RTPInternalSourceData : public RTPSourceData { public: - RTPInternalSourceData(u_int32_t ssrc); + RTPInternalSourceData(u_int32_t ssrc, RTPSources::ProbationType probtype); ~RTPInternalSourceData(); int ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,bool *stored); @@ -66,6 +67,11 @@ class RTPInternalSourceData : public RTPSourceData void SetOwnSSRC() { ownssrc = true; validated = true; } void SetCSRC() { validated = true; iscsrc = true; } void ClearNote() { SDESinf.SetNote(0,0); } + +#ifdef RTP_SUPPORT_PROBATION +private: + RTPSources::ProbationType probationtype; +#endif // RTP_SUPPORT_PROBATION }; inline int RTPInternalSourceData::SetRTPDataAddress(const RTPAddress *a) diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index de3ec47..5c73aba 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index a55970e..b8e35d8 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 8b4186d..fd5ecbb 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -35,10 +35,8 @@ #define RTPIPV4DESTINATION #include "rtpconfig.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #ifdef RTPDEBUG #include diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 7ff8e25..709f3c2 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index 1e92b8a..9f6aca8 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -40,10 +40,8 @@ #include "rtpaddress.h" #include "rtptypes.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 class RTPIPv6Address : public RTPAddress diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 0f96e3a..1b06105 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -42,8 +42,6 @@ #include #ifndef WIN32 #include -#else - #include #endif // WIN32 #ifdef RTPDEBUG #include diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 008aee3..88f4447 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 278b98e..00acd25 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -34,6 +34,6 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,1,0); + return RTPLibraryVersion(3,2,0); } diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 94da616..32e0fc4 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index bc15ca9..188f494 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -35,10 +35,8 @@ #include "rtpdefines.h" #include "rtperrors.h" #include "rtprawpacket.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #ifdef RTPDEBUG diff --git a/src/rtppacket.h b/src/rtppacket.h index b40b370..c2c822c 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index 75aed2a..5d2a259 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -45,6 +45,9 @@ RTPPacketBuilder::RTPPacketBuilder() : lastwallclocktime(0,0) { init = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTPPacketBuilder::~RTPPacketBuilder() diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index 1dc95cb..5f60d3c 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index 27ed810..a216e5e 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -39,7 +39,10 @@ #include "rtperrors.h" #include "rtprawpacket.h" #include -#include + +#ifndef _WIN32_WCE + #include +#endif // _WIN32_WCE #include "rtpdebug.h" @@ -47,6 +50,9 @@ RTPPollThread::RTPPollThread(RTPSession &session,RTCPScheduler &sched):rtpsessio { stop = false; transmitter = 0; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTPPollThread::~RTPPollThread() @@ -72,9 +78,7 @@ int RTPPollThread::Start(RTPTransmitter *trans) } void RTPPollThread::Stop() -{ - time_t thetime; - +{ if (!IsRunning()) return; @@ -85,12 +89,23 @@ void RTPPollThread::Stop() if (transmitter) transmitter->AbortWait(); - thetime = time(0); - while (JThread::IsRunning() && (time(0) - thetime) < 5) // wait max 5 sec. - ; + RTPTime thetime = RTPTime::CurrentTime(); + bool done = false; + + while (JThread::IsRunning() && !done) + { + // wait max 5 sec + RTPTime curtime = RTPTime::CurrentTime(); + if ((curtime.GetDouble()-thetime.GetDouble()) > 5.0) + done = true; + RTPTime::Wait(RTPTime(0,10000)); + } + if (JThread::IsRunning()) { +#ifndef _WIN32_WCE std::cerr << "RTPPollThread: Warning! Having to kill thread!" << std::endl; +#endif // _WIN32_WCE JThread::Kill(); } stop = false; diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 2fe2c98..b82e3fa 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -39,9 +39,6 @@ #ifdef RTP_SUPPORT_THREAD #include "rtptransmitter.h" -#ifdef WIN32 - #include -#endif // WIN32 #include #include diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index c8aae5b..112ebfe 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -35,7 +35,12 @@ #ifndef WIN32 #include #else - #include + #ifndef _WIN32_WCE + #include + #else + #include + #include + #endif // _WIN32_WINCE #include #endif // WIN32 @@ -67,9 +72,21 @@ RTPRandom::RTPRandom() u_int32_t x; +#ifndef _WIN32_WCE x = (u_int32_t)getpid(); x += (u_int32_t)time(0); x -= (u_int32_t)clock(); +#else + x = (u_int32_t)GetCurrentProcessId(); + + FILETIME ft; + SYSTEMTIME st; + + GetSystemTime(&st); + SystemTimeToFileTime(&st,&ft); + + x += ft.dwLowDateTime; +#endif // _WIN32_WCE x ^= (u_int32_t)(this); srand((unsigned int)x); diff --git a/src/rtprandom.h b/src/rtprandom.h index ce36a9c..5a5e2c3 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 41f8719..04c8833 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 07fdb4e..adc78a8 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -43,6 +43,7 @@ #include "rtcpcompoundpacket.h" #ifndef WIN32 #include + #include #else #include #endif // WIN32 @@ -73,6 +74,9 @@ RTPSession::RTPSession(RTPTransmitter::TransmissionProtocol proto /* = RTPTransm : protocol(proto),sources(*this),rtcpsched(sources),rtcpbuilder(sources,packetbuilder) { created = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTPSession::~RTPSession() @@ -88,6 +92,7 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP return ERR_RTP_SESSION_ALREADYCREATED; usingpollthread = sessparams.IsUsingPollThread(); + useSR_BYEifpossible = sessparams.GetSenderReportForBYE(); // Check max packet size @@ -132,6 +137,13 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP return status; } +#ifdef RTP_SUPPORT_PROBATION + + // Set probation type + sources.SetProbationType(sessparams.GetProbationType()); + +#endif // RTP_SUPPORT_PROBATION + // Add our own ssrc to the source table if ((status = sources.CreateOwnSSRC(packetbuilder.GetSSRC())) < 0) @@ -336,7 +348,7 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t int status; reasonlength = (reasonlength>RTCP_BYE_MAXREASONLENGTH)?RTCP_BYE_MAXREASONLENGTH:reasonlength; - status = rtcpbuilder.BuildBYEPacket(&pack,reason,reasonlength); + status = rtcpbuilder.BuildBYEPacket(&pack,reason,reasonlength,useSR_BYEifpossible); if (status >= 0) { byepackets.push_back(pack); @@ -651,13 +663,13 @@ int RTPSession::Poll() return ProcessPolledData(); } -int RTPSession::WaitForIncomingData(const RTPTime &delay) +int RTPSession::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) { if (!created) return ERR_RTP_SESSION_NOTCREATED; if (usingpollthread) return ERR_RTP_SESSION_USINGPOLLTHREAD; - return rtptrans->WaitForIncomingData(delay); + return rtptrans->WaitForIncomingData(delay,dataavailable); } int RTPSession::AbortWait() @@ -1046,7 +1058,7 @@ int RTPSession::ProcessPolledData() RTCPCompoundPacket *rtcpcomppack; BUILDER_LOCK - if ((status = rtcpbuilder.BuildBYEPacket(&rtcpcomppack,0,0)) < 0) + if ((status = rtcpbuilder.BuildBYEPacket(&rtcpcomppack,0,0,useSR_BYEifpossible)) < 0) { BUILDER_UNLOCK SOURCES_UNLOCK @@ -1169,21 +1181,49 @@ int RTPSession::ProcessPolledData() int RTPSession::CreateCNAME(u_int8_t *buffer,size_t *bufferlength,bool resolve) { #ifndef WIN32 - + bool gotlogin = true; #ifdef RTP_SUPPORT_GETLOGINR - if (getlogin_r((char *)buffer,*bufferlength) < 0) - return ERR_RTP_SESSION_CANTGETLOGINNAME; + buffer[0] = 0; + if (getlogin_r((char *)buffer,*bufferlength) != 0) + gotlogin = false; + else + { + if (buffer[0] == 0) + gotlogin = false; + } + + if (!gotlogin) // try regular getlogin + { + char *loginname = getlogin(); + if (loginname == 0) + gotlogin = false; + else + strncpy((char *)buffer,loginname,*bufferlength); + } #else char *loginname = getlogin(); if (loginname == 0) - return ERR_RTP_SESSION_CANTGETLOGINNAME; - strncpy((char *)buffer,loginname,*bufferlength); + gotlogin = false; + else + strncpy((char *)buffer,loginname,*bufferlength); #endif // RTP_SUPPORT_GETLOGINR - -#else + if (!gotlogin) + { + char *logname = getenv("LOGNAME"); + if (logname == 0) + return ERR_RTP_SESSION_CANTGETLOGINNAME; + strncpy((char *)buffer,logname,*bufferlength); + } +#else // Win32 version + +#ifndef _WIN32_WCE DWORD len = *bufferlength; if (!GetUserName((LPTSTR)buffer,&len)) - return ERR_RTP_SESSION_CANTGETLOGINNAME; + strcpy((char *)buffer,"unknown"); +#else + strcpy((char *)buffer,"unknown"); +#endif // _WIN32_WCE + #endif // WIN32 buffer[*bufferlength-1] = 0; diff --git a/src/rtpsession.h b/src/rtpsession.h index 54ca88d..6bdcb74 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -99,7 +99,7 @@ class RTPSession RTPTransmissionInfo *GetTransmissionInfo(); int Poll(); - int WaitForIncomingData(const RTPTime &delay); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); int AbortWait(); RTPTime GetRTCPDelay(); @@ -167,6 +167,7 @@ class RTPSession virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } virtual void OnNoteTimeout(RTPSourceData *srcdat) { } + virtual void OnBYEPacket(RTPSourceData *srcdat) { } #ifdef RTP_SUPPORT_THREAD virtual void OnPollThreadError(int errcode) { } virtual void OnPollThreadStep() { } @@ -181,6 +182,7 @@ class RTPSession bool created; bool usingpollthread; bool acceptownpackets; + bool useSR_BYEifpossible; size_t maxpacksize; double sessionbandwidth; double controlfragment; diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index 5855313..af4a8d2 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -49,6 +49,9 @@ RTPSessionParams::RTPSessionParams() : mininterval(0,0) acceptown = false; owntsunit = -1; // The user will have to set it to the correct value himself resolvehostname = false; +#ifdef RTP_SUPPORT_PROBATION + probationtype = RTPSources::ProbationStore; +#endif // RTP_SUPPORT_PROBATION mininterval = RTPTime(RTCP_DEFAULTMININTERVAL); sessionbandwidth = RTP_DEFAULTSESSIONBANDWIDTH; @@ -56,6 +59,7 @@ RTPSessionParams::RTPSessionParams() : mininterval(0,0) senderfrac = RTCP_DEFAULTSENDERFRACTION; usehalfatstartup = RTCP_DEFAULTHALFATSTARTUP; immediatebye = RTCP_DEFAULTIMMEDIATEBYE; + SR_BYE = RTCP_DEFAULTSRBYE; sendermultiplier = RTP_SENDERTIMEOUTMULTIPLIER; generaltimeoutmultiplier = RTP_MEMBERTIMEOUTMULTIPLIER; diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 3fb6600..2ae92e2 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,6 +38,7 @@ #include "rtptypes.h" #include "rtptransmitter.h" #include "rtptimeutilities.h" +#include "rtpsources.h" class RTPSessionParams { @@ -56,6 +57,10 @@ class RTPSessionParams double GetOwnTimestampUnit() const { return owntsunit; } void SetResolveLocalHostname(bool v) { resolvehostname = v; } bool GetResolveLocalHostname() const { return resolvehostname; } +#ifdef RTP_SUPPORT_PROBATION + void SetProbationType(RTPSources::ProbationType probtype) { probationtype = probtype; } + RTPSources::ProbationType GetProbationType() const { return probationtype; } +#endif // RTP_SUPPORT_PROBATION void SetSessionBandwidth(double sessbw) { sessionbandwidth = sessbw; } double GetSessionBandwidth() const { return sessionbandwidth; } @@ -69,6 +74,8 @@ class RTPSessionParams bool GetUseHalfRTCPIntervalAtStartup() const { return usehalfatstartup; } void SetRequestImmediateBYE(bool v) { immediatebye = v; } bool GetRequestImmediateBYE() const { return immediatebye; } + void SetSenderReportForBYE(bool v) { SR_BYE = v; } + bool GetSenderReportForBYE() const { return SR_BYE; } void SetSenderTimeoutMultiplier(double m) { sendermultiplier = m; } double GetSenderTimeoutMultiplier() const { return sendermultiplier; } @@ -87,6 +94,9 @@ class RTPSessionParams double owntsunit; RTPTransmitter::ReceiveMode receivemode; bool resolvehostname; +#ifdef RTP_SUPPORT_PROBATION + RTPSources::ProbationType probationtype; +#endif // RTP_SUPPORT_PROBATION double sessionbandwidth; double controlfrac; @@ -94,6 +104,7 @@ class RTPSessionParams RTPTime mininterval; bool usehalfatstartup; bool immediatebye; + bool SR_BYE; double sendermultiplier; double generaltimeoutmultiplier; diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index cc4b906..af2aca4 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -32,6 +32,7 @@ #include "rtpsessionsources.h" #include "rtpsession.h" +#include "rtpsourcedata.h" #include "rtpdebug.h" @@ -83,6 +84,7 @@ void RTPSessionSources::OnBYETimeout(RTPSourceData *srcdat) void RTPSessionSources::OnBYEPacket(RTPSourceData *srcdat) { rtpsession.rtcpsched.ActiveMemberDecrease(); + rtpsession.OnBYEPacket(srcdat); } void RTPSessionSources::OnAPPPacket(RTCPAPPPacket *apppacket,const RTPTime &receivetime,const RTPAddress *senderaddress) diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index d04fbb8..fe89caf 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index aacf63a..08281a0 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -33,10 +33,8 @@ #include "rtpsourcedata.h" #include "rtpdefines.h" #include "rtpaddress.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #ifdef RTPDEBUG @@ -46,79 +44,97 @@ #include "rtpdebug.h" +#define ACCEPTPACKETCODE \ + *accept = true; \ + \ + sentdata = true; \ + packetsreceived++; \ + numnewpackets++; \ + \ + if (pack->GetExtendedSequenceNumber() == 0) \ + { \ + baseseqnr = 0x0000FFFF; \ + numcycles = 0x00010000; \ + } \ + else \ + baseseqnr = pack->GetExtendedSequenceNumber() - 1; \ + \ + exthighseqnr = baseseqnr + 1; \ + prevpacktime = receivetime; \ + prevexthighseqnr = baseseqnr; \ + savedextseqnr = baseseqnr; \ + \ + pack->SetExtendedSequenceNumber(exthighseqnr); \ + \ + prevtimestamp = pack->GetTimestamp(); \ + lastmsgtime = prevpacktime; \ + if (!ownpacket) /* for own packet, this value is set on an outgoing packet */ \ + lastrtptime = prevpacktime; + void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,double tsunit, - bool ownpacket,bool *accept) + bool ownpacket,bool *accept,bool applyprobation,bool *onprobation) { // Note that the sequence number in the RTP packet is still just the // 16 bit number contained in the RTP header + *onprobation = false; + if (!sentdata) // no valid packets received yet { #ifdef RTP_SUPPORT_PROBATION - bool acceptpack = false; - - if (probation) - { - u_int16_t pseq; - u_int32_t pseq2; + if (applyprobation) + { + bool acceptpack = false; - pseq = prevseqnr; - pseq++; - pseq2 = (u_int32_t)pseq; - if (pseq2 == pack->GetExtendedSequenceNumber()) // ok, its the next expected packet - { - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); - probation--; - if (probation == 0) // probation over - acceptpack = true; + if (probation) + { + u_int16_t pseq; + u_int32_t pseq2; + + pseq = prevseqnr; + pseq++; + pseq2 = (u_int32_t)pseq; + if (pseq2 == pack->GetExtendedSequenceNumber()) // ok, its the next expected packet + { + prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + probation--; + if (probation == 0) // probation over + acceptpack = true; + else + *onprobation = true; + } + else // not next packet + { + probation = RTP_PROBATIONCOUNT; + prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + *onprobation = true; + } } - else // not next packet + else // first packet received with this SSRC ID, start probation { probation = RTP_PROBATIONCOUNT; - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + *onprobation = true; } - } - else // first packet received with this SSRC ID, start probation - { - probation = RTP_PROBATIONCOUNT; - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); - } - - if (acceptpack) - { -#endif // RTP_SUPPORT_PROBATION - *accept = true; - - sentdata = true; - packetsreceived++; - numnewpackets++; - - if (pack->GetExtendedSequenceNumber() == 0) + + if (acceptpack) { - baseseqnr = 0x0000FFFF; - numcycles = 0x00010000; + ACCEPTPACKETCODE } else - baseseqnr = pack->GetExtendedSequenceNumber() - 1; - - exthighseqnr = baseseqnr + 1; - prevpacktime = receivetime; - prevexthighseqnr = baseseqnr; - savedextseqnr = baseseqnr; - - pack->SetExtendedSequenceNumber(exthighseqnr); - - prevtimestamp = pack->GetTimestamp(); - lastmsgtime = prevpacktime; - if (!ownpacket) // for own packet, this value is set on an outgoing packet - lastrtptime = prevpacktime; -#ifdef RTP_SUPPORT_PROBATION + { + *accept = false; + lastmsgtime = receivetime; + } } - else + else // No probation { - *accept = false; - lastmsgtime = receivetime; + ACCEPTPACKETCODE } +#else // No compiled-in probation support + + ACCEPTPACKETCODE + #endif // RTP_SUPPORT_PROBATION } else // already got packets diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index 5630c53..058379d 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -39,6 +39,7 @@ #include "rtppacket.h" #include "rtcpsdesinfo.h" #include "rtptypes.h" +#include "rtpsources.h" #include class RTPAddress; @@ -95,7 +96,7 @@ class RTPSourceStats { public: RTPSourceStats(); - void ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,double tsunit,bool ownpacket,bool *accept); + void ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,double tsunit,bool ownpacket,bool *accept,bool applyprobation,bool *onprobation); bool HasSentData() const { return sentdata; } u_int32_t GetNumPacketsReceived() const { return packetsreceived; } @@ -131,6 +132,7 @@ class RTPSourceStats #ifdef RTP_SUPPORT_PROBATION u_int16_t prevseqnr; int probation; + RTPSources::ProbationType probationtype; #endif // RTP_SUPPORT_PROBATION }; @@ -161,7 +163,7 @@ class RTPSourceData public: RTPPacket *GetNextPacket(); void FlushPackets(); - bool HasData() const { return packetlist.empty()?false:true; } + bool HasData() const { if (!validated) return false; return packetlist.empty()?false:true; } u_int32_t GetSSRC() const { return ssrc; } bool IsOwnSSRC() const { return ownssrc; } bool IsCSRC() const { return iscsrc; } @@ -279,6 +281,9 @@ class RTPSourceData inline RTPPacket *RTPSourceData::GetNextPacket() { + if (!validated) + return 0; + RTPPacket *p; if (packetlist.empty()) diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 4d1b7f6..d1267af 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -55,12 +55,15 @@ int RTPSources_GetHashIndex(const u_int32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } #endif // !RTP_SUPPORT_INLINETEMPLATEPARAM -RTPSources::RTPSources() +RTPSources::RTPSources(ProbationType probtype) { totalcount = 0; sendercount = 0; activecount = 0; owndata = 0; +#ifdef RTP_SUPPORT_PROBATION + probationtype = probtype; +#endif // RTP_SUPPORT_PROBATION } RTPSources::~RTPSources() @@ -798,7 +801,7 @@ int RTPSources::ObtainSourceDataInstance(u_int32_t ssrc,RTPInternalSourceData ** if (sourcelist.GotoElement(ssrc) < 0) // No entry for this source { - srcdat2 = new RTPInternalSourceData(ssrc); + srcdat2 = new RTPInternalSourceData(ssrc,probationtype); if (srcdat2 == 0) return ERR_RTP_OUTOFMEM; if ((status = sourcelist.AddElement(ssrc,srcdat2)) < 0) diff --git a/src/rtpsources.h b/src/rtpsources.h index b9b7430..aa56763 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -35,7 +35,6 @@ #define RTPSOURCES_H #include "rtpconfig.h" -#include "rtpinternalsourcedata.h" #include "rtpkeyhashtable.h" #include "rtcpsdespacket.h" #include "rtptypes.h" @@ -51,13 +50,24 @@ class RTPNTPTime; class RTPTransmitter; class RTCPAPPPacket; +class RTPInternalSourceData; +class RTPRawPacket; +class RTPPacket; +class RTPTime; +class RTPAddress; +class RTPSourceData; class RTPSources { public: - RTPSources(); + enum ProbationType { NoProbation, ProbationDiscard, ProbationStore }; + + RTPSources(ProbationType = ProbationStore); virtual ~RTPSources(); void Clear(); +#ifdef RTP_SUPPORT_PROBATION + void SetProbationType(ProbationType probtype) { probationtype = probtype; } +#endif // RTP_SUPPORT_PROBATION int CreateOwnSSRC(u_int32_t ssrc); int DeleteOwnSSRC(); @@ -102,7 +112,7 @@ class RTPSources RTPSourceData *GetSourceInfo(u_int32_t ssrc); RTPPacket *GetNextPacket(); bool GotEntry(u_int32_t ssrc); - RTPSourceData *GetOwnSourceInfo() { return owndata; } + RTPSourceData *GetOwnSourceInfo() { return (RTPSourceData *)owndata; } void Timeout(const RTPTime &curtime,const RTPTime &timeoutdelay); void SenderTimeout(const RTPTime &curtime,const RTPTime &timeoutdelay); @@ -153,6 +163,10 @@ class RTPSources int totalcount; int activecount; +#ifdef RTP_SUPPORT_PROBATION + ProbationType probationtype; +#endif // RTP_SUPPORT_PROBATION + RTPInternalSourceData *owndata; }; diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 3739a86..05cc1fd 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp new file mode 100644 index 0000000..8d1d176 --- /dev/null +++ b/src/rtptimeutilities.cpp @@ -0,0 +1,51 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2005 Jori Liesenborgs + + Contact: jori@lumumba.uhasselt.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#if (defined(WIN32) || defined(_WIN32_WCE)) + +#include "rtptimeutilities.h" +#ifdef RTPDEBUG + #include +#endif // RTPDEBUG + +RTPTimeInitializer::RTPTimeInitializer() +{ +#ifdef RTPDEBUG + std::cout << "RTPTimeInitializer: Initializing RTPTime::CurrentTime()" << std::endl; +#endif // RTPDEBUG + RTPTime curtime = RTPTime::CurrentTime(); +} + +RTPTimeInitializer timeinit; + +#endif // WIN32 || _WIN32_WCE + diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index c833d01..4763ae6 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -40,9 +40,9 @@ #include #include #else - #include - #include - #include + #ifndef _WIN32_WCE + #include + #endif // _WIN32_WINCE #endif // WIN32 #define RTP_NTPTIMEOFFSET 2208988800UL @@ -107,13 +107,37 @@ inline RTPTime::RTPTime(RTPNTPTime ntptime) } } -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) + inline RTPTime RTPTime::CurrentTime() { - struct _timeb tv; + static int inited = 0; + static unsigned __int64 microseconds, initmicroseconds; + static LARGE_INTEGER performancefrequency; + + unsigned __int64 emulate_microseconds, microdiff; + SYSTEMTIME systemtime; + FILETIME filetime; + + LARGE_INTEGER performancecount; + + QueryPerformanceCounter(&performancecount); + + if(!inited){ + inited = 1; + QueryPerformanceFrequency(&performancefrequency); + GetSystemTime(&systemtime); + SystemTimeToFileTime(&systemtime,&filetime); + microseconds = ( ((unsigned __int64)(filetime.dwHighDateTime) << 32) + (unsigned __int64)(filetime.dwLowDateTime) ) / 10ui64; + microseconds-= 11644473600000000ui64; // EPOCH + initmicroseconds = ( ( performancecount.QuadPart * 1000000ui64 ) / performancefrequency.QuadPart ); + } + + emulate_microseconds = ( ( performancecount.QuadPart * 1000000ui64 ) / performancefrequency.QuadPart ); + + microdiff = emulate_microseconds - initmicroseconds; - _ftime(&tv); - return RTPTime((u_int32_t)tv.time,((u_int32_t)tv.millitm)*1000); + return RTPTime((u_int32_t)((microseconds + microdiff) / 1000000ui64),((u_int32_t)((microseconds + microdiff) % 1000000ui64))); } inline void RTPTime::Wait(const RTPTime &delay) @@ -124,7 +148,17 @@ inline void RTPTime::Wait(const RTPTime &delay) Sleep(t); } +class RTPTimeInitializer +{ +public: + RTPTimeInitializer(); + void Dummy() { } +}; + +extern RTPTimeInitializer timeinit; + #else // unix style + inline RTPTime RTPTime::CurrentTime() { struct timeval tv; diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index d9d4bd3..379dfb4 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -75,7 +75,9 @@ class RTPTransmitter virtual size_t GetHeaderOverhead() = 0; virtual int Poll() = 0; - virtual int WaitForIncomingData(const RTPTime &delay) = 0; + // If dataavailable is not NULL, it should be set to true if true if data was read + // and to false otherwise + virtual int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0) = 0; virtual int AbortWait() = 0; virtual int SendRTPData(const void *data,size_t len) = 0; diff --git a/src/rtptypes.h b/src/rtptypes.h index f03affe..0d8668a 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -1,4 +1,36 @@ -#ifndef WIN32 +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2005 Jori Liesenborgs + + Contact: jori@lumumba.uhasselt.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include "rtptypes_unix.h" #else #include "rtptypes_win.h" diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 7f90c11..ea3bbdb 100755 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,12 +1,55 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2005 Jori Liesenborgs + + Contact: jori@lumumba.uhasselt.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + #ifndef RTPTYPES_H #define RTPTYPES_H -#include +#ifndef _WIN32_WCE + #include + #include + #include +#else + #include + #include + + typedef short int16_t; + typedef char int8_t; +#endif // _WIN32_WCE typedef unsigned long u_int32_t; typedef unsigned short u_int16_t; typedef unsigned char u_int8_t; typedef long int32_t; -#endif // RTPTYPES_H \ No newline at end of file +#endif // RTPTYPES_H + diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 60a46fd..a720f1e 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -35,10 +35,7 @@ #include "rtpipv4address.h" #include "rtptimeutilities.h" #include -#ifdef WIN32 - #include - #include - +#if (defined(WIN32) || defined(_WIN32_WCE)) #define RTPSOCKERR INVALID_SOCKET #define RTPCLOSE(x) closesocket(x) #define RTPSOCKLENTYPE int @@ -59,6 +56,9 @@ #ifdef RTP_HAVE_SYS_SOCKIO #include #endif // RTP_HAVE_SYS_SOCKIO + #ifdef RTP_SUPPORT_IFADDRS + #include + #endif // RTP_SUPPORT_IFADDRS #define RTPSOCKERR -1 #define RTPCLOSE(x) close(x) @@ -77,12 +77,21 @@ #include "rtpdebug.h" -#define RTPUDPV4TRANS_RTPRECEIVEBUFFER 32768 -#define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 32768 -#define RTPUDPV4TRANS_RTPTRANSMITBUFFER 32768 -#define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 32768 -#define RTPUDPV4TRANS_MAXPACKSIZE 65535 -#define RTPUDPV4TRANS_IFREQBUFSIZE 8192 +#ifndef _WIN32_WCE + #define RTPUDPV4TRANS_RTPRECEIVEBUFFER 32768 + #define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 32768 + #define RTPUDPV4TRANS_RTPTRANSMITBUFFER 32768 + #define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 32768 + #define RTPUDPV4TRANS_MAXPACKSIZE 65535 + #define RTPUDPV4TRANS_IFREQBUFSIZE 8192 +#else + #define RTPUDPV4TRANS_RTPRECEIVEBUFFER 2048 + #define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 2048 + #define RTPUDPV4TRANS_RTPTRANSMITBUFFER 2048 + #define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 2048 + #define RTPUDPV4TRANS_MAXPACKSIZE 2048 + #define RTPUDPV4TRANS_IFREQBUFSIZE 2048 +#endif // _WIN32_WCE #define RTPUDPV4TRANS_IS_MCASTADDR(x) (((x)&0xF0000000) == 0xE0000000) @@ -114,6 +123,9 @@ RTPUDPv4Transmitter::RTPUDPv4Transmitter() { created = false; init = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTPUDPv4Transmitter::~RTPUDPv4Transmitter() @@ -173,7 +185,10 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa else { if (transparams->GetTransmissionProtocol() != RTPTransmitter::IPv4UDPProto) + { + MAINMUTEX_UNLOCK return ERR_RTP_UDPV4TRANS_ILLEGALPARAMETERS; + } params = (const RTPUDPv4TransmissionParams *)transparams; } @@ -557,7 +572,7 @@ int RTPUDPv4Transmitter::Poll() return status; } -int RTPUDPv4Transmitter::WaitForIncomingData(const RTPTime &delay) +int RTPUDPv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) { if (!init) return ERR_RTP_UDPV4TRANS_NOTINIT; @@ -611,7 +626,7 @@ int RTPUDPv4Transmitter::WaitForIncomingData(const RTPTime &delay) // if aborted, read from abort buffer if (FD_ISSET(abortdesc[0],&fdset)) { -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) char buf[1]; recv(abortdesc[0],buf,1,0); @@ -621,6 +636,14 @@ int RTPUDPv4Transmitter::WaitForIncomingData(const RTPTime &delay) read(abortdesc[0],buf,1); #endif // WIN32 } + + if (dataavailable != 0) + { + if (FD_ISSET(rtpsock,&fdset) || FD_ISSET(rtcpsock,&fdset)) + *dataavailable = true; + else + *dataavailable = false; + } MAINMUTEX_UNLOCK WAITMUTEX_UNLOCK @@ -1265,7 +1288,7 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) RTPSOCKLENTYPE fromlen; int recvlen; char packetbuffer[RTPUDPV4TRANS_MAXPACKSIZE]; -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET sock; unsigned long len; #else @@ -1284,10 +1307,9 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) if (len <= 0) return 0; - RTPTime curtime = RTPTime::CurrentTime(); - while (len > 0) { + RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in); recvlen = recvfrom(sock,packetbuffer,(int)len,0,(struct sockaddr *)&srcaddr,&fromlen); if (recvlen > 0) @@ -1523,7 +1545,7 @@ bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) return true; } -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) int RTPUDPv4Transmitter::CreateAbortDescriptors() { @@ -1640,15 +1662,66 @@ int RTPUDPv4Transmitter::CreateLocalIPList() return 0; } -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) + +bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() +{ + unsigned char buffer[RTPUDPV4TRANS_IFREQBUFSIZE]; + DWORD outputsize; + DWORD numaddresses,i; + SOCKET_ADDRESS_LIST *addrlist; + + if (WSAIoctl(rtpsock,SIO_ADDRESS_LIST_QUERY,NULL,0,&buffer,RTPUDPV4TRANS_IFREQBUFSIZE,&outputsize,NULL,NULL)) + return false; + + addrlist = (SOCKET_ADDRESS_LIST *)buffer; + numaddresses = addrlist->iAddressCount; + for (i = 0 ; i < numaddresses ; i++) + { + SOCKET_ADDRESS *sockaddr = &(addrlist->Address[i]); + if (sockaddr->iSockaddrLength == sizeof(struct sockaddr_in)) // IPv4 address + { + struct sockaddr_in *addr = (struct sockaddr_in *)sockaddr->lpSockaddr; + + localIPs.push_back(ntohl(addr->sin_addr.s_addr)); + } + } + + if (localIPs.empty()) + return false; + + return true; +} + +#else // use either getifaddrs or ioctl + +#ifdef RTP_SUPPORT_IFADDRS bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() { - // REMINDER: got to find out how to do this - return false; + struct ifaddrs *addrs,*tmp; + + getifaddrs(&addrs); + tmp = addrs; + + while (tmp != 0) + { + if (tmp->ifa_addr->sa_family == AF_INET) + { + struct sockaddr_in *inaddr = (struct sockaddr_in *)tmp->ifa_addr; + localIPs.push_back(ntohl(inaddr->sin_addr.s_addr)); + } + tmp = tmp->ifa_next; + } + + freeifaddrs(addrs); + + if (localIPs.empty()) + return false; + return true; } -#else // use ioctl +#else // user ioctl bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() { @@ -1714,6 +1787,8 @@ bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() return true; } +#endif // RTP_SUPPORT_IFADDRS + #endif // WIN32 void RTPUDPv4Transmitter::GetLocalIPList_DNS() @@ -1750,7 +1825,7 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() void RTPUDPv4Transmitter::AbortWaitInternal() { -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) send(abortdesc[1],"*",1,0); #else write(abortdesc[1],"*",1); diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index a72e079..2d8eee8 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -71,7 +71,7 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo { public: -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) RTPUDPv4TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) #else RTPUDPv4TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) @@ -80,7 +80,7 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo ~RTPUDPv4TransmissionInfo() { } std::list GetLocalIPList() const { return localIPlist; } -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) int GetRTPSocket() const { return rtpsocket; } int GetRTCPSocket() const { return rtcpsocket; } #else @@ -89,7 +89,7 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 private: std::list localIPlist; -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) int rtpsocket,rtcpsocket; #else SOCKET rtpsocket,rtcpsocket; @@ -122,7 +122,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter size_t GetHeaderOverhead() { return RTPUDPV4TRANS_HEADERSIZE; } int Poll(); - int WaitForIncomingData(const RTPTime &delay); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); int AbortWait(); int SendRTPData(const void *data,size_t len); @@ -173,7 +173,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter bool init; bool created; bool waitingfordata; -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET rtpsock,rtcpsock; #else // not using winsock int rtpsock,rtcpsock; @@ -208,7 +208,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter RTPKeyHashTable acceptignoreinfo; // notification descriptors for AbortWait (0 is for reading, 1 for writing) -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET abortdesc[2]; #else int abortdesc[2]; diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 4d98634..7f511d7 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -38,10 +38,7 @@ #include "rtpipv6address.h" #include "rtptimeutilities.h" #include -#ifdef WIN32 - #include - #include - +#if (defined(WIN32) || defined(_WIN32_WCE)) #define RTPSOCKERR INVALID_SOCKET #define RTPCLOSE(x) closesocket(x) #define RTPSOCKLENTYPE int @@ -62,6 +59,10 @@ #ifdef RTP_HAVE_SYS_SOCKIO #include #endif // RTP_HAVE_SYS_SOCKIO + #ifdef RTP_SUPPORT_IFADDRS + #include + #endif // RTP_SUPPORT_IFADDRS + #define RTPSOCKERR -1 #define RTPCLOSE(x) close(x) @@ -77,12 +78,21 @@ #include "rtpdebug.h" -#define RTPUDPV6TRANS_RTPRECEIVEBUFFER 32768 -#define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 32768 -#define RTPUDPV6TRANS_RTPTRANSMITBUFFER 32768 -#define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 32768 -#define RTPUDPV6TRANS_MAXPACKSIZE 65535 -#define RTPUDPV6TRANS_IFREQBUFSIZE 8192 +#ifndef _WIN32_WCE + #define RTPUDPV6TRANS_RTPRECEIVEBUFFER 32768 + #define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 32768 + #define RTPUDPV6TRANS_RTPTRANSMITBUFFER 32768 + #define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 32768 + #define RTPUDPV6TRANS_MAXPACKSIZE 65535 + #define RTPUDPV6TRANS_IFREQBUFSIZE 8192 +#else + #define RTPUDPV6TRANS_RTPRECEIVEBUFFER 2048 + #define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 2048 + #define RTPUDPV6TRANS_RTPTRANSMITBUFFER 2048 + #define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 2048 + #define RTPUDPV6TRANS_MAXPACKSIZE 2048 + #define RTPUDPV6TRANS_IFREQBUFSIZE 2048 +#endif // _WIN32_WCE #define RTPUDPV6TRANS_IS_MCASTADDR(x) (x.s6_addr[0] == 0xFF) @@ -121,6 +131,9 @@ RTPUDPv6Transmitter::RTPUDPv6Transmitter() { created = false; init = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE } RTPUDPv6Transmitter::~RTPUDPv6Transmitter() @@ -180,7 +193,10 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa else { if (transparams->GetTransmissionProtocol() != RTPTransmitter::IPv6UDPProto) + { + MAINMUTEX_UNLOCK return ERR_RTP_UDPV6TRANS_ILLEGALPARAMETERS; + } params = (const RTPUDPv6TransmissionParams *)transparams; } @@ -570,7 +586,7 @@ int RTPUDPv6Transmitter::Poll() return status; } -int RTPUDPv6Transmitter::WaitForIncomingData(const RTPTime &delay) +int RTPUDPv6Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) { if (!init) return ERR_RTP_UDPV6TRANS_NOTINIT; @@ -624,7 +640,7 @@ int RTPUDPv6Transmitter::WaitForIncomingData(const RTPTime &delay) // if aborted, read from abort buffer if (FD_ISSET(abortdesc[0],&fdset)) { -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) char buf[1]; recv(abortdesc[0],buf,1,0); @@ -635,6 +651,14 @@ int RTPUDPv6Transmitter::WaitForIncomingData(const RTPTime &delay) #endif // WIN32 } + if (dataavailable != 0) + { + if (FD_ISSET(rtpsock,&fdset) || FD_ISSET(rtcpsock,&fdset)) + *dataavailable = true; + else + *dataavailable = false; + } + MAINMUTEX_UNLOCK WAITMUTEX_UNLOCK return 0; @@ -1280,7 +1304,7 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) RTPSOCKLENTYPE fromlen; int recvlen; char packetbuffer[RTPUDPV6TRANS_MAXPACKSIZE]; -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET sock; unsigned long len; #else @@ -1299,10 +1323,9 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) if (len <= 0) return 0; - RTPTime curtime = RTPTime::CurrentTime(); - while (len > 0) { + RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in6); recvlen = recvfrom(sock,packetbuffer,(int)len,0,(struct sockaddr *)&srcaddr,&fromlen); if (recvlen > 0) @@ -1536,47 +1559,46 @@ bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) return true; } -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) -// TODO: port these to IPv6 stuff int RTPUDPv6Transmitter::CreateAbortDescriptors() { SOCKET listensock; int size; - struct sockaddr_in addr; + struct sockaddr_in6 addr; - listensock = socket(PF_INET,SOCK_STREAM,0); + listensock = socket(PF_INET6,SOCK_STREAM,0); if (listensock == RTPSOCKERR) return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; - memset(&addr,0,sizeof(struct sockaddr_in)); - addr.sin_family = AF_INET; - if (bind(listensock,(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + memset(&addr,0,sizeof(struct sockaddr_in6)); + addr.sin6_family = AF_INET6; + if (bind(listensock,(struct sockaddr *)&addr,sizeof(struct sockaddr_in6)) != 0) { RTPCLOSE(listensock); return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; } - memset(&addr,0,sizeof(struct sockaddr_in)); - size = sizeof(struct sockaddr_in); + memset(&addr,0,sizeof(struct sockaddr_in6)); + size = sizeof(struct sockaddr_in6); if (getsockname(listensock,(struct sockaddr*)&addr,&size) != 0) { RTPCLOSE(listensock); return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; } - unsigned short connectport = ntohs(addr.sin_port); + unsigned short connectport = ntohs(addr.sin6_port); - abortdesc[0] = socket(PF_INET,SOCK_STREAM,0); + abortdesc[0] = socket(PF_INET6,SOCK_STREAM,0); if (abortdesc[0] == RTPSOCKERR) { RTPCLOSE(listensock); return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; } - memset(&addr,0,sizeof(struct sockaddr_in)); - addr.sin_family = AF_INET; - if (bind(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + memset(&addr,0,sizeof(struct sockaddr_in6)); + addr.sin6_family = AF_INET6; + if (bind(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in6)) != 0) { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); @@ -1590,20 +1612,20 @@ int RTPUDPv6Transmitter::CreateAbortDescriptors() return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; } - memset(&addr,0,sizeof(struct sockaddr_in)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = inet_addr("127.0.0.1"); - addr.sin_port = htons(connectport); + memset(&addr,0,sizeof(struct sockaddr_in6)); + addr.sin6_family = AF_INET6; + addr.sin6_addr = in6addr_loopback; + addr.sin6_port = htons(connectport); - if (connect(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + if (connect(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in6)) != 0) { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); return ERR_RTP_UDPV6TRANS_CANTCREATEABORTDESCRIPTORS; } - memset(&addr,0,sizeof(struct sockaddr_in)); - size = sizeof(struct sockaddr_in); + memset(&addr,0,sizeof(struct sockaddr_in6)); + size = sizeof(struct sockaddr_in6); abortdesc[1] = accept(listensock,(struct sockaddr *)&addr,&size); if (abortdesc[1] == RTPSOCKERR) { @@ -1654,86 +1676,73 @@ int RTPUDPv6Transmitter::CreateLocalIPList() return 0; } -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) bool RTPUDPv6Transmitter::GetLocalIPList_Interfaces() { - // REMINDER: got to find out how to do this - return false; + unsigned char buffer[RTPUDPV6TRANS_IFREQBUFSIZE]; + DWORD outputsize; + DWORD numaddresses,i; + SOCKET_ADDRESS_LIST *addrlist; + + if (WSAIoctl(rtpsock,SIO_ADDRESS_LIST_QUERY,NULL,0,&buffer,RTPUDPV6TRANS_IFREQBUFSIZE,&outputsize,NULL,NULL)) + return false; + + addrlist = (SOCKET_ADDRESS_LIST *)buffer; + numaddresses = addrlist->iAddressCount; + for (i = 0 ; i < numaddresses ; i++) + { + SOCKET_ADDRESS *sockaddr = &(addrlist->Address[i]); + if (sockaddr->iSockaddrLength == sizeof(struct sockaddr_in6)) // IPv6 address + { + struct sockaddr_in6 *addr = (struct sockaddr_in6 *)sockaddr->lpSockaddr; + + localIPs.push_back(addr->sin6_addr); + } + } + + if (localIPs.empty()) + return false; + return true; } #else +#ifdef RTP_SUPPORT_IFADDRS + bool RTPUDPv6Transmitter::GetLocalIPList_Interfaces() { - // TODO: - // This is linux specific, is there a more general way? - FILE *f = fopen("/proc/net/if_inet6","r"); - if (f == 0) - return false; - - bool done = false; - while (!done) + struct ifaddrs *addrs,*tmp; + + getifaddrs(&addrs); + tmp = addrs; + + while (tmp != 0) { - char str[1024]; - - if (fgets(str,1024,f) == 0) - done = true; - else + if (tmp->ifa_addr->sa_family == AF_INET6) { - str[1023] = 0; - bool valid = false; - in6_addr ip; - - int len = strlen(str); - if (len > 32) - { - int i; - - valid = true; - for (i = 0 ; valid && i < 32 ; i++) - { - u_int8_t val; - switch(str[i]) - { - case '0': val = 0; break; - case '1': val = 1; break; - case '2': val = 2; break; - case '3': val = 3; break; - case '4': val = 4; break; - case '5': val = 5; break; - case '6': val = 6; break; - case '7': val = 7; break; - case '8': val = 8; break; - case '9': val = 9; break; - case 'a': val = 10; break; - case 'b': val = 11; break; - case 'c': val = 12; break; - case 'd': val = 13; break; - case 'e': val = 14; break; - case 'f': val = 15; break; - default: - valid = false; - } - - if ((i%2) == 0) - ip.s6_addr[i/2] = (val<<4); - else - ip.s6_addr[i/2] |= val; - } - } - - if (valid) - localIPs.push_back(ip); + struct sockaddr_in6 *inaddr = (struct sockaddr_in6 *)tmp->ifa_addr; + localIPs.push_back(inaddr->sin6_addr); } + tmp = tmp->ifa_next; } - - fclose(f); + + freeifaddrs(addrs); + if (localIPs.empty()) return false; return true; } +#else + +bool RTPUDPv6Transmitter::GetLocalIPList_Interfaces() +{ + return false; +} + +#endif // RTP_SUPPORT_IFADDRS + #endif // WIN32 void RTPUDPv6Transmitter::GetLocalIPList_DNS() @@ -1769,15 +1778,17 @@ void RTPUDPv6Transmitter::GetLocalIPList_DNS() freeaddrinfo(res); } + void RTPUDPv6Transmitter::AbortWaitInternal() { -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) send(abortdesc[1],"*",1,0); #else write(abortdesc[1],"*",1); #endif // WIN32 } + void RTPUDPv6Transmitter::AddLoopbackAddress() { std::list::const_iterator it; diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 16fe1a1..00a117a 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,13 +1,13 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs + Copyright (c) 1999-2005 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori@lumumba.uhasselt.be This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). Permission is hereby granted, free of charge, to any person obtaining a @@ -42,10 +42,8 @@ #include "rtpipv6destination.h" #include "rtphashtable.h" #include "rtpkeyhashtable.h" -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) #include -#else - #include #endif // WIN32 #include #include @@ -80,7 +78,7 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo { public: -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) RTPUDPv6TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto) #else RTPUDPv6TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto) @@ -89,7 +87,7 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo ~RTPUDPv6TransmissionInfo() { } std::list GetLocalIPList() const { return localIPlist; } -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) int GetRTPSocket() const { return rtpsocket; } int GetRTCPSocket() const { return rtcpsocket; } #else @@ -98,7 +96,7 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 private: std::list localIPlist; -#ifndef WIN32 +#if ! (defined(WIN32) || defined(_WIN32_WCE)) int rtpsocket,rtcpsocket; #else SOCKET rtpsocket,rtcpsocket; @@ -131,7 +129,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter size_t GetHeaderOverhead() { return RTPUDPV6TRANS_HEADERSIZE; } int Poll(); - int WaitForIncomingData(const RTPTime &delay); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); int AbortWait(); int SendRTPData(const void *data,size_t len); @@ -182,7 +180,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter bool init; bool created; bool waitingfordata; -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET rtpsock,rtcpsock; #else // not using winsock int rtpsock,rtcpsock; @@ -217,7 +215,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter RTPKeyHashTable acceptignoreinfo; // notification descriptors for AbortWait (0 is for reading, 1 for writing) -#ifdef WIN32 +#if (defined(WIN32) || defined(_WIN32_WCE)) SOCKET abortdesc[2]; #else int abortdesc[2]; diff --git a/tools/Makefile.in b/tools/Makefile.in index 10cd488..e173241 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -33,6 +33,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -102,6 +103,7 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ @@ -127,6 +129,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -255,7 +259,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" From 75c07119bdf4c1fccd863f718520a71ed5bef7f1 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:16 +0100 Subject: [PATCH 005/136] Import of version 3.2.1 --- ChangeLog | 9 ++++++++- README.TXT | 4 ++-- configure | 2 +- configure.in | 2 +- doc/jrtplib.tex | 21 +++++++++++++++------ src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtplibraryversion.cpp | 2 +- src/rtppacket.cpp | 6 +++--- src/rtppacket.h | 7 +++++++ src/rtpsources.cpp | 5 ++++- 11 files changed, 44 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8ec623..6c290e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ - September 19, 2005 + September 26, 2005 JRTPLIB ChangeLog @@ -6,6 +6,13 @@ ----------- + 3.2.1 (September 2005) + * The library wouldn't compile when probation support was disabled. + Thanks to Herman Bastiaens (herman.bastiaens@student.luc.ac.be) for + bringing this to my attention. + * When parsed from an RTPRawPacket, the receive time is also stored + in the RTPPacket instance. + 3.2.0 (September 2005) * Modified the routine in the RTPSession class which creates the CNAME. Aparently on some systems, the 'getlogin' call returns diff --git a/README.TXT b/README.TXT index 18eef07..8573716 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - September 19, 2005 + September 26, 2005 - JRTPLIB (v3.2.0) + JRTPLIB (v3.2.1) Developed at the The Expertise Centre for diff --git a/configure b/configure index 8efca8c..37a9350 100755 --- a/configure +++ b/configure @@ -1805,7 +1805,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.2.0 + VERSION=3.2.1 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index baf8fe2..21a7747 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.2.0) +AM_INIT_AUTOMAKE(jrtplib,3.2.1) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index 84160cf..ff12ba0 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.2.0} +\newcommand{\jversion}{3.2.1} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{September 19, 2005\\\vspace{0.5cm}\ \\ + \date{September 26, 2005\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ @@ -586,9 +586,11 @@ \item {\tt RTPRawPacket *GetNextPacket()}\\ Returns the raw data of a received RTP packet (received during the {\tt Poll} function) in an {\tt RTPRawPacket} instance. - \item {\tt int WaitForIncomingData(const RTPTime \&delay)}\\ + \item {\tt int WaitForIncomingData(const RTPTime \&delay,bool *dataavailable = 0)}\\ Waits at most a time {\tt delay} until incoming data has - been detected. + been detected. If {\tt dataavailable} is not {\tt NULL}, it should + be set to {\tt true} if data was actually read and to {\tt false} + otherwise. \item {\tt int AbortWait()}\\ If the previous function has been called, this one aborts the waiting. @@ -1010,6 +1012,11 @@ Returns a pointer to the header extension data. \item {\tt size\_t GetExtensionLength() const}\\ Returns the length of the header extension data. + \item {\tt RTPTime GetReceiveTime() const}\\ + When an {\tt RTPPacket} instance is created from + an {\tt RTPRawPacket} instance, the raw packet's + reception time is stored in the {\tt RTPPacket} + instance. This function then retrieves that time. \end{itemize} \subsubsection{\tt RTCPCompoundPacket}\headerfile{rtpcompoundpacket.h} @@ -2413,10 +2420,12 @@ If you're not using the poll thread, this function must be called regularly to process incoming data and to send RTCP data when necessary. - \item {\tt int WaitForIncomingData(const RTPTime \&delay)}\\ + \item {\tt int WaitForIncomingData(const RTPTime \&delay,bool *dataavailable = 0)}\\ Waits at most a time {\tt delay} until incoming data has been detected. Only works when you're not using the poll - thread. + thread. If {\tt dataavailable} is not {\tt NULL}, it should + be set to {\tt true} if data was actually read and to {\tt false} + otherwise. \item {\tt int AbortWait()}\\ If the previous function has been called, this one aborts the waiting. Only works when you're not using the poll diff --git a/src/Makefile.am b/src/Makefile.am index 9d72fdc..e91a580 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp -libjrtp_la_LDFLAGS = -release 3.2.0 +libjrtp_la_LDFLAGS = -release 3.2.1 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 0972abe..bcd62eb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -226,7 +226,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp -libjrtp_la_LDFLAGS = -release 3.2.0 +libjrtp_la_LDFLAGS = -release 3.2.1 libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 00acd25..d08ca95 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -34,6 +34,6 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,2,0); + return RTPLibraryVersion(3,2,1); } diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 188f494..1c1a117 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -65,7 +65,7 @@ void RTPPacket::Clear() externalbuffer = false; } -RTPPacket::RTPPacket(RTPRawPacket &rawpack) +RTPPacket::RTPPacket(RTPRawPacket &rawpack) : receivetime(rawpack.GetReceiveTime()) { Clear(); error = ParseRawPacket(rawpack); @@ -74,7 +74,7 @@ RTPPacket::RTPPacket(RTPRawPacket &rawpack) RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, - size_t maxpacksize /* = 0 */ ) + size_t maxpacksize /* = 0 */ ) : receivetime(0,0) { Clear(); error = BuildPacket(payloadtype,payloaddata,payloadlen,seqnr,timestamp,ssrc,gotmarker,numcsrcs, @@ -84,7 +84,7 @@ RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payload RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, - void *buffer,size_t buffersize) + void *buffer,size_t buffersize) : receivetime(0,0) { Clear(); if (buffer == 0) diff --git a/src/rtppacket.h b/src/rtppacket.h index c2c822c..d30536a 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -36,6 +36,7 @@ #include "rtpconfig.h" #include "rtptypes.h" +#include "rtptimeutilities.h" class RTPRawPacket; @@ -88,6 +89,10 @@ class RTPPacket #ifdef RTPDEBUG void Dump(); #endif // RTPDEBUG + + // If parsed from a raw packet, the receive time is also copied. + // This function can be used to retrieve it. + RTPTime GetReceiveTime() const { return receivetime; } private: void Clear(); int ParseRawPacket(RTPRawPacket &rawpack); @@ -111,6 +116,8 @@ class RTPPacket size_t extensionlength; bool externalbuffer; + + RTPTime receivetime; }; #endif // RTPPACKET_H diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index d1267af..23ca210 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -206,7 +206,6 @@ int RTPSources::ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *rtptrans[ ownpacket = true; } - // Check if the packet is our own. if (ownpacket) { @@ -801,7 +800,11 @@ int RTPSources::ObtainSourceDataInstance(u_int32_t ssrc,RTPInternalSourceData ** if (sourcelist.GotoElement(ssrc) < 0) // No entry for this source { +#ifdef RTP_SUPPORT_PROBATION srcdat2 = new RTPInternalSourceData(ssrc,probationtype); +#else + srcdat2 = new RTPInternalSourceData(ssrc,RTPSources::NoProbation); +#endif // RTP_SUPPORT_PROBATION if (srcdat2 == 0) return ERR_RTP_OUTOFMEM; if ((status = sourcelist.AddElement(ssrc,srcdat2)) < 0) From a4fbef849d2cc6b270d267bff15d1c99bff35298 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 006/136] Import of version 3.3.0 --- ChangeLog | 7 +- INSTALL | 236 ++++ Makefile.am | 5 +- Makefile.in | 22 +- README.TXT | 6 +- aclocal.m4 | 58 + config.guess | 80 +- config.sub | 55 +- configure | 395 +++++- configure.in | 148 ++- doc/Makefile.in | 8 + doc/jrtplib.tex | 39 +- examples/Makefile.am | 10 +- examples/Makefile.in | 187 ++- examples/example4.cpp | 145 +++ ltmain.sh | 500 ++++---- pkgconfig/Makefile.am | 17 + pkgconfig/Makefile.in | 386 ++++++ pkgconfig/jrtplib-uninstalled.pc.in | 12 + pkgconfig/jrtplib.pc.in | 11 + src/Makefile.am | 10 +- src/Makefile.in | 22 +- src/rtpaddress.h | 2 +- src/rtpconfig_unix.h.in | 2 + src/rtperrors.cpp | 34 + src/rtperrors.h | 33 + src/rtpgsttransmitter.cpp | 1806 +++++++++++++++++++++++++++ src/rtpgsttransmitter.h | 234 ++++ src/rtplibraryversion.cpp | 2 +- src/rtpsession.cpp | 11 + src/rtpsession.h | 2 + src/rtptransmitter.h | 2 +- tools/Makefile.in | 8 + 33 files changed, 4040 insertions(+), 455 deletions(-) create mode 100644 INSTALL create mode 100644 examples/example4.cpp mode change 100755 => 100644 ltmain.sh create mode 100644 pkgconfig/Makefile.am create mode 100644 pkgconfig/Makefile.in create mode 100644 pkgconfig/jrtplib-uninstalled.pc.in create mode 100644 pkgconfig/jrtplib.pc.in create mode 100644 src/rtpgsttransmitter.cpp create mode 100644 src/rtpgsttransmitter.h diff --git a/ChangeLog b/ChangeLog index 6c290e1..f221b3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ - September 26, 2005 + October 2, 2005 JRTPLIB ChangeLog @@ -6,6 +6,11 @@ ----------- + 3.3.0 (October 2005) + * Now it is possible to use a user-defined transmission component. + * Added GStreamer transmission component written by Philippe Khalaf + (burger@speedy.org). + 3.2.1 (September 2005) * The library wouldn't compile when probation support was disabled. Thanks to Herman Bastiaens (herman.bastiaens@student.luc.ac.be) for diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..56b077d --- /dev/null +++ b/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am index b7c0d8b..6e07e26 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ -SUBDIRS = src tools doc examples -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln +SUBDIRS = src tools doc examples pkgconfig +EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ + jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln dist-hook: distclean rm -f $(distdir)/src/rtpconfig_unix.h diff --git a/Makefile.in b/Makefile.in index d59ca94..4d7f0d7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,9 +36,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog TODO \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - mkinstalldirs + $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog \ + INSTALL TODO config.guess config.sub depcomp install-sh \ + ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in @@ -99,6 +99,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -118,15 +122,19 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -183,8 +191,10 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -SUBDIRS = src tools doc examples -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln +SUBDIRS = src tools doc examples pkgconfig +EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ + jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln + all: all-recursive .SUFFIXES: @@ -367,7 +377,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/src + $(mkdir_p) $(distdir)/pkgconfig $(distdir)/src @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/README.TXT b/README.TXT index 8573716..e51c5d1 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - September 26, 2005 + October 2, 2005 - JRTPLIB (v3.2.1) + JRTPLIB (v3.3.0) Developed at the The Expertise Centre for @@ -119,6 +119,8 @@ INSTALLATION NOTES If set, IPv6 support is enabled. - RTP_SUPPORT_IPV6MULTICAST: If set, IPv6 multicasting support is enabled. + - RTP_SUPPORT_GST: + If set, GStreamer support is enabled. - RTPDEBUG: Enables some memory tracking functions and some debug routines. diff --git a/aclocal.m4 b/aclocal.m4 index 0044e21..b6f3dc0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -6042,6 +6042,64 @@ SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/config.guess b/config.guess index 51fab47..892833f 100755 --- a/config.guess +++ b/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-03-12' +timestamp='2005-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -203,15 +203,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + luna88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -227,21 +227,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - pegasos:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} + echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -307,9 +298,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -331,6 +319,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; @@ -354,7 +345,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; @@ -764,7 +755,7 @@ EOF echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` @@ -787,21 +778,7 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/KFreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -827,6 +804,9 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; + amd64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; @@ -850,6 +830,12 @@ EOF cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit 0 ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -1096,9 +1082,9 @@ EOF M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; - M68*:*:R3V[567]*:*) + M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1196,9 +1182,10 @@ EOF echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - case `uname -p` in + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; @@ -1213,6 +1200,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; @@ -1260,6 +1250,16 @@ EOF *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms && exit 0 ;; + I*) echo ia64-dec-vms && exit 0 ;; + V*) echo vax-dec-vms && exit 0 ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/config.sub b/config.sub index ba33103..d8fd2f8 100755 --- a/config.sub +++ b/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-03-12' +timestamp='2005-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -70,7 +70,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -145,7 +145,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -237,7 +237,7 @@ case $basic_machine in | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -267,7 +267,7 @@ case $basic_machine in | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -300,7 +300,7 @@ case $basic_machine in | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ @@ -310,7 +310,7 @@ case $basic_machine in | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -326,8 +326,9 @@ case $basic_machine in | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ @@ -342,8 +343,8 @@ case $basic_machine in | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -445,6 +446,10 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; cr16c) basic_machine=cr16c-unknown os=-elf @@ -452,6 +457,9 @@ case $basic_machine in crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; @@ -481,6 +489,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -659,10 +671,6 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -743,10 +751,6 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -1029,6 +1033,10 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1059,6 +1067,9 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1294,6 +1305,9 @@ case $os in -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; -none) ;; *) @@ -1374,6 +1388,9 @@ case $basic_machine in *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; diff --git a/configure b/configure index 37a9350..7472aad 100755 --- a/configure +++ b/configure @@ -463,7 +463,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG GST_CFLAGS GST_LIBS GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_SUPPORT_GST RTP_GSTINCLUDES RTP_LINKLIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1035,6 +1035,8 @@ Optional Features: --disable-sdespriv Disable support for SDES PRIV items --disable-probation Disable support for probation of a new source --disable-jthread Disable support for JThread + --disable-IPv6 Disable support for IPv6 + --disable-gst Disable support GStreamer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1805,7 +1807,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.2.1 + VERSION=3.3.0 cat >>confdefs.h <<_ACEOF @@ -1952,10 +1954,12 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" +RTP_SUPPORT_GST="// No GStreamer support" +RTP_LINKLIBS="" if test "BLA$CXXFLAGS" = "BLA" ; then - CXXFLAGS="-g -Werror -Wall" - fi + CXXFLAGS="-O2 " +fi ac_ext=cc @@ -3675,7 +3679,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3678 "configure"' > conftest.$ac_ext + echo '#line 3682 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5254,7 +5258,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5257:" \ +echo "$as_me:5261:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6323,11 +6327,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6326: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6330: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6330: \$? = $ac_status" >&5 + echo "$as_me:6334: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6578,11 +6582,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6581: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6585: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6585: \$? = $ac_status" >&5 + echo "$as_me:6589: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6638,11 +6642,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6641: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6645: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6645: \$? = $ac_status" >&5 + echo "$as_me:6649: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8838,7 +8842,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11163: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11163: \$? = $ac_status" >&5 + echo "$as_me:11167: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11216,11 +11220,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11219: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11223: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11223: \$? = $ac_status" >&5 + echo "$as_me:11227: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12579,7 +12583,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13539: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13539: \$? = $ac_status" >&5 + echo "$as_me:13543: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13592,11 +13596,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13595: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13599: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13599: \$? = $ac_status" >&5 + echo "$as_me:13603: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15648,11 +15652,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15655: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15655: \$? = $ac_status" >&5 + echo "$as_me:15659: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15903,11 +15907,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15906: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15910: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15910: \$? = $ac_status" >&5 + echo "$as_me:15914: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15963,11 +15967,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15966: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15970: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15970: \$? = $ac_status" >&5 + echo "$as_me:15974: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18163,7 +18167,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" echo "$as_me:$LINENO: result: >= 1.1.0" >&5 echo "${ECHO_T}>= 1.1.0" >&6 else @@ -19465,6 +19470,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" echo "$as_me:$LINENO: result: >= 1.1.0" >&5 echo "${ECHO_T}>= 1.1.0" >&6 else @@ -20647,8 +20653,25 @@ fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test "$cross_compiling" = yes ; then - cat << EOF +# Check whether --enable-IPv6 or --disable-IPv6 was given. +if test "${enable_IPv6+set}" = set; then + enableval="$enable_IPv6" + + if test "$enableval" = yes ; then + ipv6support="yes" + else + ipv6support="no" + fi +else + + ipv6support="yes" + +fi; + +if test "$ipv6support" = "yes" ; then + + if test "$cross_compiling" = yes ; then + cat << EOF ABOUT IPv6 SUPPORT: @@ -20657,11 +20680,11 @@ ABOUT IPv6 SUPPORT: appropriate lines in src/rtpconfig_unix.h before running make. EOF -else + else - echo "$as_me:$LINENO: checking IPv6 support" >&5 + echo "$as_me:$LINENO: checking IPv6 support" >&5 echo $ECHO_N "checking IPv6 support... $ECHO_C" >&6 - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -20670,17 +20693,17 @@ See \`config.log' for more details." >&2;} else cat >conftest.$ac_ext <<_ACEOF - #include - #include - int main(void) - { - int s; + #include + #include + int main(void) + { + int s; - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } + s = socket(PF_INET6,SOCK_DGRAM,0); + if (s < 0) + return -1; + return 0; + } _ACEOF rm -f conftest$ac_exeext @@ -20696,27 +20719,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: enabled" >&5 echo "${ECHO_T}enabled" >&6 - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" + RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 + echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 echo $ECHO_N "checking if necessary options for IPv6 multicasting are available... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF - #include - #include - #include + #include + #include + #include - int main(void) - { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; - } + int main(void) + { + int testval; + struct ipv6_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IPV6_MULTICAST_HOPS; + testval = IPV6_JOIN_GROUP; + testval = IPV6_LEAVE_GROUP; + return 0; + } _ACEOF rm -f conftest.$ac_objext @@ -20742,9 +20765,9 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" + RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20760,12 +20783,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) - echo "$as_me:$LINENO: result: disabled" >&5 + echo "$as_me:$LINENO: result: disabled" >&5 echo "${ECHO_T}disabled" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi @@ -20909,6 +20933,232 @@ fi if test $ac_cv_header_ifaddrs_h = yes; then RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS" fi + + + + +# Check whether --enable-gst or --disable-gst was given. +if test "${enable_gst+set}" = set; then + enableval="$enable_gst" + + if test "$enableval" = yes ; then + gstsupport="yes" + else + gstsupport="no" + fi +else + + gstsupport="yes" + +fi; + +if test "$gstsupport" = "yes" ; then + + GST_REQ=0.9 + GST_MAJORMINOR=0.9 + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for gstreamer-$GST_MAJORMINOR >= $GST_REQ" >&5 +echo $ECHO_N "checking for gstreamer-$GST_MAJORMINOR >= $GST_REQ... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "gstreamer-$GST_MAJORMINOR >= $GST_REQ" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking GST_CFLAGS" >&5 +echo $ECHO_N "checking GST_CFLAGS... $ECHO_C" >&6 + GST_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` + echo "$as_me:$LINENO: result: $GST_CFLAGS" >&5 +echo "${ECHO_T}$GST_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking GST_LIBS" >&5 +echo $ECHO_N "checking GST_LIBS... $ECHO_C" >&6 + GST_LIBS=`$PKG_CONFIG --libs "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` + echo "$as_me:$LINENO: result: $GST_LIBS" >&5 +echo "${ECHO_T}$GST_LIBS" >&6 + else + GST_CFLAGS="" + GST_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GST="yes" + else + HAVE_GST="no" + fi + + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ" >&5 +echo $ECHO_N "checking for gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking GST_PLUGINS_BASE_CFLAGS" >&5 +echo $ECHO_N "checking GST_PLUGINS_BASE_CFLAGS... $ECHO_C" >&6 + GST_PLUGINS_BASE_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` + echo "$as_me:$LINENO: result: $GST_PLUGINS_BASE_CFLAGS" >&5 +echo "${ECHO_T}$GST_PLUGINS_BASE_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking GST_PLUGINS_BASE_LIBS" >&5 +echo $ECHO_N "checking GST_PLUGINS_BASE_LIBS... $ECHO_C" >&6 + GST_PLUGINS_BASE_LIBS=`$PKG_CONFIG --libs "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` + echo "$as_me:$LINENO: result: $GST_PLUGINS_BASE_LIBS" >&5 +echo "${ECHO_T}$GST_PLUGINS_BASE_LIBS" >&6 + else + GST_PLUGINS_BASE_CFLAGS="" + GST_PLUGINS_BASE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GST_PLUGINS="yes" + else + HAVE_GST_PLUGINS="no" + fi + + + if test "x$HAVE_GST_PLUGINS" = "xyes" && test "x$HAVE_GST" = "xyes"; then + RTP_SUPPORT_GST="#define RTP_SUPPORT_GST" + GST_LIBS="$GST_LIBS -lgstnet-$GST_MAJORMINOR" + fi + + RTP_GSTINCLUDES="$GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS" + RTP_LINKLIBS="$RTP_LINKLIBS $GST_LIBS $GST_PLUGIN_BASE_LIBS" +fi + @@ -20930,7 +21180,7 @@ fi - ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile" + ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -21519,6 +21769,9 @@ do "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "pkgconfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;; + "pkgconfig/jrtplib.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib.pc" ;; + "pkgconfig/jrtplib-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib-uninstalled.pc" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -21669,6 +21922,11 @@ s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@GST_CFLAGS@,$GST_CFLAGS,;t t +s,@GST_LIBS@,$GST_LIBS,;t t +s,@GST_PLUGINS_BASE_CFLAGS@,$GST_PLUGINS_BASE_CFLAGS,;t t +s,@GST_PLUGINS_BASE_LIBS@,$GST_PLUGINS_BASE_LIBS,;t t s,@RTP_FILIO@,$RTP_FILIO,;t t s,@RTP_SOCKIO@,$RTP_SOCKIO,;t t s,@RTP_ENDIAN@,$RTP_ENDIAN,;t t @@ -21686,6 +21944,9 @@ s,@RTP_SUPPORT_GETLOGINR@,$RTP_SUPPORT_GETLOGINR,;t t s,@RTP_SUPPORT_IPV6@,$RTP_SUPPORT_IPV6,;t t s,@RTP_SUPPORT_IPV6MULTICAST@,$RTP_SUPPORT_IPV6MULTICAST,;t t s,@RTP_SUPPORT_IFADDRS@,$RTP_SUPPORT_IFADDRS,;t t +s,@RTP_SUPPORT_GST@,$RTP_SUPPORT_GST,;t t +s,@RTP_GSTINCLUDES@,$RTP_GSTINCLUDES,;t t +s,@RTP_LINKLIBS@,$RTP_LINKLIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.in b/configure.in index 21a7747..31ccb95 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.2.1) +AM_INIT_AUTOMAKE(jrtplib,3.3.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -17,10 +17,12 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" +RTP_SUPPORT_GST="// No GStreamer support" +RTP_LINKLIBS="" if test "BLA$CXXFLAGS" = "BLA" ; then - CXXFLAGS="-g -Werror -Wall" - dnl CXXFLAGS="-O2 " + dnl CXXFLAGS="-g -Werror -Wall" + CXXFLAGS="-O2 " fi dnl --------------------------------------------------------------------------- @@ -96,6 +98,7 @@ if test "$checkjthread" = "yes" ; then };],[ RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" AC_MSG_RESULT(>= 1.1.0) ],[ AC_MSG_RESULT(< 1.1.0) AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) @@ -126,6 +129,7 @@ if test "$checkjthread" = "yes" ; then };],[ RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" + RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" AC_MSG_RESULT(>= 1.1.0) ],[ AC_MSG_RESULT(< 1.1.0) AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) @@ -356,8 +360,19 @@ dnl --------------------------------------------------------------------------- dnl Check IPv6 support dnl --------------------------------------------------------------------------- -if test "$cross_compiling" = yes ; then - cat << EOF +AC_ARG_ENABLE(IPv6,[ --disable-IPv6 Disable support for IPv6],[ + if test "$enableval" = yes ; then + ipv6support="yes" + else + ipv6support="no" + fi],[ + ipv6support="yes" + ]) + +if test "$ipv6support" = "yes" ; then + + if test "$cross_compiling" = yes ; then + cat << EOF ABOUT IPv6 SUPPORT: @@ -366,52 +381,53 @@ ABOUT IPv6 SUPPORT: appropriate lines in src/rtpconfig_unix.h before running make. EOF -else - - AC_MSG_CHECKING(IPv6 support) - AC_RUN_IFELSE([ - #include - #include - int main(void) - { - int s; + else - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } - ], - [AC_MSG_RESULT(enabled) - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - - dnl --------------------------------------------------------------------------- - dnl Check if multicast options are known - dnl --------------------------------------------------------------------------- - - AC_MSG_CHECKING(if necessary options for IPv6 multicasting are available) - AC_COMPILE_IFELSE([ + AC_MSG_CHECKING(IPv6 support) + AC_RUN_IFELSE([ #include #include - #include - int main(void) { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; + int s; + + s = socket(PF_INET6,SOCK_DGRAM,0); + if (s < 0) + return -1; + return 0; } - ],[ - AC_MSG_RESULT(yes) - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST"], - AC_MSG_RESULT(no))], - [ - AC_MSG_RESULT(disabled) - ]) + ], + [AC_MSG_RESULT(enabled) + RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" + + dnl --------------------------------------------------------------------------- + dnl Check if multicast options are known + dnl --------------------------------------------------------------------------- + + AC_MSG_CHECKING(if necessary options for IPv6 multicasting are available) + AC_COMPILE_IFELSE([ + #include + #include + #include + + int main(void) + { + int testval; + struct ipv6_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IPV6_MULTICAST_HOPS; + testval = IPV6_JOIN_GROUP; + testval = IPV6_LEAVE_GROUP; + return 0; + } + ],[ + AC_MSG_RESULT(yes) + RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST"], + AC_MSG_RESULT(no))], + [ + AC_MSG_RESULT(disabled) + ]) + fi fi dnl --------------------------------------------------------------------------- @@ -420,6 +436,40 @@ dnl --------------------------------------------------------------------------- AC_CHECK_HEADER(ifaddrs.h,[RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS"]) +dnl --------------------------------------------------------------------------- +dnl Check gstreamer support +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(gst,[ --disable-gst Disable support GStreamer],[ + if test "$enableval" = yes ; then + gstsupport="yes" + else + gstsupport="no" + fi],[ + gstsupport="yes" + ]) + +if test "$gstsupport" = "yes" ; then + + dnl uninstalled is selected preferentially -- see pkg-config(1) + GST_REQ=0.9 + GST_MAJORMINOR=0.9 + PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ, + HAVE_GST="yes", HAVE_GST="no") + + dnl check for gstreamer-plugins-base; uinstalled is selected preferentially + PKG_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ, + HAVE_GST_PLUGINS="yes", HAVE_GST_PLUGINS="no") + + if test "x$HAVE_GST_PLUGINS" = "xyes" && test "x$HAVE_GST" = "xyes"; then + RTP_SUPPORT_GST="#define RTP_SUPPORT_GST" + GST_LIBS="$GST_LIBS -lgstnet-$GST_MAJORMINOR" + fi + + RTP_GSTINCLUDES="$GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS" + RTP_LINKLIBS="$RTP_LINKLIBS $GST_LIBS $GST_PLUGIN_BASE_LIBS" +fi + dnl --------------------------------------------------------------------------- dnl Finish up... dnl --------------------------------------------------------------------------- @@ -441,11 +491,17 @@ AC_SUBST(RTP_SUPPORT_GETLOGINR) AC_SUBST(RTP_SUPPORT_IPV6) AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) AC_SUBST(RTP_SUPPORT_IFADDRS) +AC_SUBST(RTP_SUPPORT_GST) +AC_SUBST(RTP_GSTINCLUDES) +AC_SUBST(RTP_LINKLIBS) AC_OUTPUT(Makefile \ src/Makefile \ src/rtpconfig_unix.h \ doc/Makefile \ tools/Makefile \ examples/Makefile \ - ) + pkgconfig/Makefile \ + pkgconfig/jrtplib.pc \ + pkgconfig/jrtplib-uninstalled.pc \ + ) diff --git a/doc/Makefile.in b/doc/Makefile.in index 19a096b..a2c3a6d 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -75,6 +75,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -94,15 +98,19 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index ff12ba0..eeb940a 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.2.1} +\newcommand{\jversion}{3.3.0} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{September 26, 2005\\\vspace{0.5cm}\ \\ + \date{October 2, 2005\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ @@ -509,13 +509,19 @@ \subsubsection{\tt RTPTransmitter}\headerfile{rtptransmitter.h} The abstract class {\tt RTPTransmitter} specifies the interface for - actual transmission components. Currently, two implementations exist: - an UDP over IPv4 transmitter and an UDP over IPv6 transmitter. The - {\tt TransmissionProtocol} type is used to specify a specific kind - of transmitter: + actual transmission components. Currently, three implementations exist: + an UDP over IPv4 transmitter, an UDP over IPv6 transmitter and a + GStreamer transmission component. The {\tt TransmissionProtocol} type + is used to specify a specific kind of transmitter: \begin{verbatim} - enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto }; + enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, + IPv4GSTProto, UserDefinedProto }; \end{verbatim} + The {\tt UserDefinedProto} can be used to select your own transmission + component when using the {\tt RTPSession} class. In this case, you'll + have to implement the {\tt RTPSession} member function + {\tt NewUserDefinedTransmitter()} which should return a pointer to your + own {\tt RTPTransmitter} implementation. Three kind of receive modes can be specified using the {\tt ReceiveMode} type: @@ -811,11 +817,12 @@ specify destinations, multicast groups etc. To check which actual implementation is used, the class defines the following type: \begin{verbatim} - enum AddressType { IPv4Address, IPv6Address }; + enum AddressType { IPv4Address, IPv6Address, UserDefinedAddress }; \end{verbatim} The type {\tt RTPAddress::IPv4Address} is used by the UDP over IPv4 transmitter; {\tt RTPAddress::IPv6Address} is used by the UDP over - IPv6 transmitter. + IPv6 transmitter. The {\tt RTPAddress::UserDefinedAddress} type can + be useful when using a user-defined transmission component. The class defines the following interface: \begin{itemize} @@ -2331,7 +2338,9 @@ \begin{itemize} \item {\tt RTPSession(RTPTransmitter::Transmission\-Protocol proto = RTP\-Trans\-mitter::IPv4\-UDPProto)}\\ Creates an instance which will use the transmission component given - by {\tt proto}. + by {\tt proto}. When {\tt proto} indicates the a user-defined + transmitter, the {\tt NewUserDefinedTransmitter()} member + function should be implemented. \item {\tt int Create(const RTPSessionParams \&sessparams, const RTPTransmissionParams *transparams = 0)}\\ Creates the session with parameters {\tt sessparams} and transmission parameters {\tt transparams}. If {\tt transparams} is NULL, the defaults for the requested transmitter will @@ -2578,6 +2587,16 @@ with length {\tt len}. \end{itemize} + In case you specified in the constructor that you want to use your own + transmission component, you should override the following function: + \begin{itemize} + \item {\tt RTPTransmitter *NewUserDefinedTransmitter()} + \end{itemize} + The {\tt RTPTransmitter} instance returned by this function will then + be used to send and receive RTP and RTCP packets. Note that when the + session is destroyed, this {\tt RTPTransmitter} instance will be destroyed + with a {\tt delete} call. + By inheriting your own class from {\tt RTPSession} and overriding one or more of the functions below, certain events can be detected: \begin{itemize} diff --git a/examples/Makefile.am b/examples/Makefile.am index 57466c6..f758a3a 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,2 +1,10 @@ -EXTRA_DIST = example1.cpp example2.cpp example3.cpp +noinst_PROGRAMS = example1 example2 example3 example4 + +example1_SOURCES = example1.cpp +example2_SOURCES = example2.cpp +example3_SOURCES = example3.cpp +example4_SOURCES = example4.cpp + +INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/ +LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ diff --git a/examples/Makefile.in b/examples/Makefile.in index 439e894..ad58164 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -13,6 +13,9 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) $(example4_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -35,6 +38,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \ + example3$(EXEEXT) example4$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -43,8 +48,40 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = +PROGRAMS = $(noinst_PROGRAMS) +am_example1_OBJECTS = example1.$(OBJEXT) +example1_OBJECTS = $(am_example1_OBJECTS) +example1_LDADD = $(LDADD) +example1_DEPENDENCIES = ../src/.libs/libjrtp.a +am_example2_OBJECTS = example2.$(OBJEXT) +example2_OBJECTS = $(am_example2_OBJECTS) +example2_LDADD = $(LDADD) +example2_DEPENDENCIES = ../src/.libs/libjrtp.a +am_example3_OBJECTS = example3.$(OBJEXT) +example3_OBJECTS = $(am_example3_OBJECTS) +example3_LDADD = $(LDADD) +example3_DEPENDENCIES = ../src/.libs/libjrtp.a +am_example4_OBJECTS = example4.$(OBJEXT) +example4_OBJECTS = $(am_example4_OBJECTS) +example4_LDADD = $(LDADD) +example4_DEPENDENCIES = ../src/.libs/libjrtp.a +DEFAULT_INCLUDES = -I. -I$(srcdir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \ + $(example4_SOURCES) +DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \ + $(example3_SOURCES) $(example4_SOURCES) +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -75,6 +112,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -94,15 +135,19 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -159,10 +204,16 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = example1.cpp example2.cpp example3.cpp +example1_SOURCES = example1.cpp +example2_SOURCES = example2.cpp +example3_SOURCES = example3.cpp +example4_SOURCES = example4.cpp +INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/ +LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ all: all-am .SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -193,6 +244,57 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES) + @rm -f example1$(EXEEXT) + $(CXXLINK) $(example1_LDFLAGS) $(example1_OBJECTS) $(example1_LDADD) $(LIBS) +example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES) + @rm -f example2$(EXEEXT) + $(CXXLINK) $(example2_LDFLAGS) $(example2_OBJECTS) $(example2_LDADD) $(LIBS) +example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES) + @rm -f example3$(EXEEXT) + $(CXXLINK) $(example3_LDFLAGS) $(example3_OBJECTS) $(example3_LDADD) $(LIBS) +example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES) + @rm -f example4$(EXEEXT) + $(CXXLINK) $(example4_LDFLAGS) $(example4_OBJECTS) $(example4_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example4.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + mostlyclean-libtool: -rm -f *.lo @@ -202,12 +304,54 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: - +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -238,7 +382,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am @@ -266,11 +410,14 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am distclean: distclean-am + -rm -rf ./$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi: dvi-am @@ -293,12 +440,14 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -310,14 +459,16 @@ ps-am: uninstall-am: uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/examples/example4.cpp b/examples/example4.cpp new file mode 100644 index 0000000..41ae786 --- /dev/null +++ b/examples/example4.cpp @@ -0,0 +1,145 @@ +/* + This IPv4 example uses the background thread itself to process all packets. + You can use example one to send data to the session that's created in this + example. +*/ + +#include "rtpsession.h" +#include "rtppacket.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtpsessionparams.h" +#include "rtperrors.h" +#ifndef WIN32 + #include + #include +#else + #include +#endif // WIN32 +#include "rtpsourcedata.h" +#include +#include +#include +#include + +#ifdef RTP_SUPPORT_THREAD + +// +// This function checks if there was a RTP error. If so, it displays an error +// message and exists. +// + +void checkerror(int rtperr) +{ + if (rtperr < 0) + { + std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl; + exit(-1); + } +} + +// +// The new class routine +// + +class MyRTPSession : public RTPSession +{ +protected: + void OnPollThreadStep(); + void ProcessRTPPacket(const RTPSourceData &srcdat,const RTPPacket &rtppack); +}; + +void MyRTPSession::OnPollThreadStep() +{ + BeginDataAccess(); + + // check incoming packets + if (GotoFirstSourceWithData()) + { + do + { + RTPPacket *pack; + RTPSourceData *srcdat; + + srcdat = GetCurrentSourceInfo(); + + while ((pack = GetNextPacket()) != NULL) + { + ProcessRTPPacket(*srcdat,*pack); + delete pack; + } + } while (GotoNextSourceWithData()); + } + + EndDataAccess(); +} + +void MyRTPSession::ProcessRTPPacket(const RTPSourceData &srcdat,const RTPPacket &rtppack) +{ + // You can inspect the packet and the source's info here + std::cout << "Got packet " << rtppack.GetExtendedSequenceNumber() << " from SSRC " << srcdat.GetSSRC() << std::endl; +} + +// +// The main routine +// + +int main(void) +{ +#ifdef WIN32 + WSADATA dat; + WSAStartup(MAKEWORD(2,2),&dat); +#endif // WIN32 + + MyRTPSession sess; + u_int16_t portbase,destport; + u_int32_t destip; + std::string ipstr; + int status,i,num; + + // First, we'll ask for the necessary information + + std::cout << "Enter local portbase:" << std::endl; + std::cin >> portbase; + std::cout << std::endl; + + std::cout << std::endl; + std::cout << "Number of seconds you wish to wait:" << std::endl; + std::cin >> num; + + // Now, we'll create a RTP session, set the destination + // and poll for incoming data. + + RTPUDPv4TransmissionParams transparams; + RTPSessionParams sessparams; + + // IMPORTANT: The local timestamp unit MUST be set, otherwise + // RTCP Sender Report info will be calculated wrong + // In this case, we'll be just use 8000 samples per second. + sessparams.SetOwnTimestampUnit(1.0/8000.0); + + transparams.SetPortbase(portbase); + status = sess.Create(sessparams,&transparams); + checkerror(status); + + // Wait a number of seconds + RTPTime::Wait(RTPTime(num,0)); + + sess.BYEDestroy(RTPTime(10,0),0,0); + +#ifdef WIN32 + WSACleanup(); +#endif // WIN32 + return 0; +} + +#else + +int main(void) +{ + std::cerr << "Thread support is required for this example" << std::endl; + return 0; +} + +#endif // RTP_SUPPORT_THREAD + diff --git a/ltmain.sh b/ltmain.sh old mode 100755 new mode 100644 index 70f0b2d..0b54f84 --- a/ltmain.sh +++ b/ltmain.sh @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # @@ -43,9 +43,14 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.6 -TIMESTAMP=" (1.1220.2.94 2004/04/10 16:27:27)" +VERSION=1.5.14 +TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)" +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -127,6 +132,7 @@ show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +quote_scanset='[[~#^*{};<>?'"'"' ]' ##################################### # Shell function definitions: @@ -138,7 +144,8 @@ o2lo="s/\\.${objext}\$/.lo/" # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. -func_win32_libid () { +func_win32_libid () +{ win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in @@ -178,12 +185,13 @@ func_win32_libid () { # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' -func_infer_tag () { +func_infer_tag () +{ if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -204,7 +212,7 @@ func_infer_tag () { for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -235,6 +243,131 @@ func_infer_tag () { esac fi } + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'` + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 + $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 + $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib" + $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib" + $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \ + | $EGREP -v '^[ ]*1[ ]' | while read count name + do + i=1 + while test "$i" -le "$count" + do + # Put our $i before any first dot (extension) + # Never overwrite any file + name_to="$name" + while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to" + do + name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` + done + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $? + i=`expr $i + 1` + done + done + $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib" + $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib" + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$my_xdir"; then + exit $status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} # End of Shell function definitions ##################################### @@ -305,10 +438,10 @@ do --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo - $echo "Copyright (C) 2003 Free Software Foundation, Inc." + $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $EXIT_SUCCESS + exit $? ;; --config) @@ -317,7 +450,7 @@ do for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done - exit $EXIT_SUCCESS + exit $? ;; --debug) @@ -342,7 +475,7 @@ do else $echo "disable static libraries" fi - exit $EXIT_SUCCESS + exit $? ;; --finish) mode="finish" ;; @@ -399,7 +532,7 @@ if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link @@ -516,7 +649,7 @@ if test -z "$show_help"; then # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -547,8 +680,11 @@ if test -z "$show_help"; then case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") lastarg="\"$lastarg\"" ;; esac @@ -983,7 +1119,7 @@ EOF arg="$1" shift case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; @@ -1227,6 +1363,11 @@ EOF prev= continue ;; + darwin_framework) + compiler_flags="$compiler_flags $arg" + prev= + continue + ;; *) eval "$prev=\"\$arg\"" prev= @@ -1285,6 +1426,12 @@ EOF continue ;; + -framework) + prev=darwin_framework + compiler_flags="$compiler_flags $arg" + continue + ;; + -inst-prefix-dir) prev=inst_prefix continue @@ -1345,7 +1492,7 @@ EOF # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; @@ -1356,7 +1503,7 @@ EOF esac elif test "X$arg" = "X-lc_r"; then case $host in - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -1366,8 +1513,20 @@ EOF continue ;; + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - deplibs="$deplibs $arg" + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" continue ;; @@ -1376,18 +1535,19 @@ EOF continue ;; - # gcc -m* arguments should be passed to the linker via $compiler_flags - # in order to pass architecture information to the linker - # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo - # but this is not reliable with gcc because gcc may use -mfoo to - # select a different linker, different libraries, etc, while - # -Wl,-mfoo simply passes -mfoo to the linker. - -m*) + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) + # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -1503,7 +1663,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") flag="\"$flag\"" ;; esac @@ -1521,7 +1681,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") flag="\"$flag\"" ;; esac @@ -1554,7 +1714,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -1688,7 +1848,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -1855,7 +2015,7 @@ EOF compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - deplibs="$deplib $deplibs" + compiler_flags="$compiler_flags $deplib" fi continue ;; @@ -1864,10 +2024,6 @@ EOF $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do @@ -1978,7 +2134,22 @@ EOF fi case $linkmode in lib) - if test "$deplibs_check_method" != pass_all; then + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" @@ -2052,6 +2223,8 @@ EOF # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no + avoidtemprpath= + # Read the .la file case $lib in @@ -2150,11 +2323,19 @@ EOF dir="$libdir" absdir="$libdir" fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` @@ -2227,7 +2408,7 @@ EOF if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var"; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; @@ -2941,7 +3122,7 @@ EOF # Check that each of the things are valid numbers. case $current in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -2950,7 +3131,7 @@ EOF esac case $revision in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -2959,7 +3140,7 @@ EOF esac case $age in - 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -2987,7 +3168,7 @@ EOF versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) @@ -3193,7 +3374,7 @@ EOF *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; @@ -3675,67 +3856,13 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" fi fi - + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" @@ -3784,6 +3911,7 @@ EOF save_libobjs=$libobjs fi save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. @@ -3793,7 +3921,7 @@ EOF delfiles= last_robj= k=1 - output=$output_objdir/$save_output-${k}.$objext + output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do @@ -3813,9 +3941,9 @@ EOF # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi - last_robj=$output_objdir/$save_output-${k}.$objext + last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` - output=$output_objdir/$save_output-${k}.$objext + output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi @@ -3835,13 +3963,13 @@ EOF eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi - # Set up a command to remove the reloadale object files + # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" @@ -3973,64 +4101,10 @@ EOF eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi @@ -4292,12 +4366,12 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" + export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else - $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi @@ -4349,7 +4423,26 @@ extern \"C\" { #endif /* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } @@ -4578,7 +4671,7 @@ static const void *lt_preloaded_setup() { esac case $host in *cygwin* | *mingw* ) - cwrappersource=`$echo ${objdir}/lt-${output}.c` + cwrappersource=`$echo ${objdir}/lt-${outputname}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -4811,7 +4904,7 @@ sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" @@ -4988,65 +5081,10 @@ fi\ if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. @@ -5291,7 +5329,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -5307,7 +5345,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -5355,7 +5393,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") arg="\"$arg\"" ;; esac @@ -6394,7 +6432,7 @@ esac $echo $echo "Try \`$modename --help' for more information about other modes." -exit $EXIT_SUCCESS +exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am new file mode 100644 index 0000000..469b06d --- /dev/null +++ b/pkgconfig/Makefile.am @@ -0,0 +1,17 @@ +### all of the standard pc files we need to generate +pcfiles = \ + jrtplib.pc + +pcfiles_uninstalled = \ + jrtplib-uninstalled.pc + +all-local: $(pcfiles) $(pcfiles_uninstalled) + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(pcfiles) + +EXTRA_DIST = \ + jrtplib.pc.in \ + jrtplib-uninstalled.pc.in + +CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in new file mode 100644 index 0000000..518b0d2 --- /dev/null +++ b/pkgconfig/Makefile.in @@ -0,0 +1,386 @@ +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = pkgconfig +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/jrtplib-uninstalled.pc.in $(srcdir)/jrtplib.pc.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = jrtplib.pc jrtplib-uninstalled.pc +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +RTP_ENDIAN = @RTP_ENDIAN@ +RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ +RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ +RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ +RTP_SOCKIO = @RTP_SOCKIO@ +RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ +RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ +RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ +RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ +RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ +RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ +RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ +RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ +RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +### all of the standard pc files we need to generate +pcfiles = \ + jrtplib.pc + +pcfiles_uninstalled = \ + jrtplib-uninstalled.pc + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(pcfiles) +EXTRA_DIST = \ + jrtplib.pc.in \ + jrtplib-uninstalled.pc.in + +CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pkgconfig/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign pkgconfig/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +jrtplib.pc: $(top_builddir)/config.status $(srcdir)/jrtplib.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +jrtplib-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/jrtplib-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgconfigDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgconfigDATA + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-pkgconfigDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-pkgconfigDATA + + +all-local: $(pcfiles) $(pcfiles_uninstalled) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pkgconfig/jrtplib-uninstalled.pc.in b/pkgconfig/jrtplib-uninstalled.pc.in new file mode 100644 index 0000000..aead1c9 --- /dev/null +++ b/pkgconfig/jrtplib-uninstalled.pc.in @@ -0,0 +1,12 @@ +# the standard variables don't make sense for an uninstalled copy +prefix= +exec_prefix= +libdir=${pcfiledir}/.. +includedir=${pcfiledir}/.. + +Name: Jrtplib Uninstalled +Description: Full featured RTP library, Not Installed +Version: @VERSION@ +Requires: +Libs: ${libdir}/src/libjrtp.la +Cflags: -I${includedir} -I${includedir}/src diff --git a/pkgconfig/jrtplib.pc.in b/pkgconfig/jrtplib.pc.in new file mode 100644 index 0000000..cdb5744 --- /dev/null +++ b/pkgconfig/jrtplib.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/jrtplib3 + +Name: Jrtplib +Description: An full featured RTP library +Requires: +Version: @VERSION@ +Libs: -L${libdir} -ljrtp +Cflags: -I${includedir} diff --git a/src/Makefile.am b/src/Makefile.am index e91a580..ef4e3b8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,8 +13,9 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtprandom.cpp rtcpscheduler.cpp \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp rtptimeutilities.cpp -libjrtp_la_LDFLAGS = -release 3.2.1 + rtpudpv6transmitter.cpp rtptimeutilities.cpp \ + rtpgsttransmitter.cpp +libjrtp_la_LDFLAGS = -release 3.3.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -27,8 +28,9 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtpstructs.h rtptimeutilities.h rtptransmitter.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ - rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h + rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ + rtpgsttransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ +INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ diff --git a/src/Makefile.in b/src/Makefile.in index bcd62eb..749736e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -68,7 +68,8 @@ am_libjrtp_la_OBJECTS = rtpdebug.lo rtpsession.lo rtperrors.lo \ rtcpsrpacket.lo rtplibraryversion.lo rtcppacket.lo \ rtcpcompoundpacketbuilder.lo rtprandom.lo rtcpscheduler.lo \ rtcppacketbuilder.lo rtpsessionsources.lo rtpcollisionlist.lo \ - rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo + rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo \ + rtpgsttransmitter.lo libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -125,6 +126,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -144,15 +149,19 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -224,9 +233,10 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtprandom.cpp rtcpscheduler.cpp \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp rtptimeutilities.cpp + rtpudpv6transmitter.cpp rtptimeutilities.cpp \ + rtpgsttransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.2.1 +libjrtp_la_LDFLAGS = -release 3.3.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -239,11 +249,12 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtpstructs.h rtptimeutilities.h rtptransmitter.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ - rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h + rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ + rtpgsttransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ +INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ all: all-am .SUFFIXES: @@ -329,6 +340,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpcollisionlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpdebug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtperrors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpgsttransmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpinternalsourcedata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv4address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv6address.Plo@am__quote@ diff --git a/src/rtpaddress.h b/src/rtpaddress.h index a9dbd99..1e60c6b 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -40,7 +40,7 @@ class RTPAddress { public: - enum AddressType { IPv4Address, IPv6Address }; + enum AddressType { IPv4Address, IPv6Address, UserDefinedAddress }; AddressType GetAddressType() const { return addresstype; } virtual RTPAddress *CreateCopy() const = 0; diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index 557f7b5..ef4fa63 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -66,5 +66,7 @@ @RTP_SUPPORT_IFADDRS@ +@RTP_SUPPORT_GST@ + #endif // RTPCONFIG_UNIX_H diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index b79924f..ec41428 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -105,6 +105,7 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_SESSION_NOTCREATED, "The RTP session was not created"}, { ERR_RTP_SESSION_UNSUPPORTEDTRANSMISSIONPROTOCOL, "The requested transmission protocol for the RTP session is not supported"}, { ERR_RTP_SESSION_USINGPOLLTHREAD, "This function is not available when using the RTP poll thread feature"}, + { ERR_RTP_SESSION_USERDEFINEDTRANSMITTERNULL, "A user-defined transmitter was requested but the supplied transmitter component is NULL"}, { ERR_RTP_SOURCES_ALREADYHAVEOWNSSRC, "Only one source can be marked as own SSRC in the source table"}, { ERR_RTP_SOURCES_DONTHAVEOWNSSRC, "No source was marked as own SSRC in the source table"}, { ERR_RTP_SOURCES_ILLEGALSDESTYPE, "Illegal SDES type specified for processing into the source table"}, @@ -168,6 +169,38 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL,"The hostname is larger than the specified buffer size"}, { ERR_RTP_SDES_MAXPRIVITEMS,"The maximum number of SDES private item prefixes was reached"}, { ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE,"An invalid probation type was specified"}, + { ERR_RTP_GSTV4TRANS_ALREADYCREATED, "The transmitter was already created"}, + { ERR_RTP_GSTV4TRANS_ALREADYINIT, "The transmitter was already initialize"}, + { ERR_RTP_GSTV4TRANS_ALREADYWAITING, "The transmitter is already waiting for incoming data"}, + { ERR_RTP_GSTV4TRANS_CANTBINDRTCPSOCKET, "The 'bind' call for the RTCP socket failed"}, + { ERR_RTP_GSTV4TRANS_CANTBINDRTPSOCKET, "The 'bind' call for the RTP socket failed"}, + { ERR_RTP_GSTV4TRANS_CANTCALCULATELOCALIP, "The local IP addresses could not be determined"}, + { ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS, "Couldn't create the sockets used to abort waiting for incoming data"}, + { ERR_RTP_GSTV4TRANS_CANTCREATEPIPE, "Couldn't create the pipe used to abort waiting for incoming data"}, + { ERR_RTP_GSTV4TRANS_CANTCREATESOCKET, "Couldn't create the RTP or RTCP socket"}, + { ERR_RTP_GSTV4TRANS_CANTINITMUTEX, "Failed to initialize a mutex used by the transmitter"}, + { ERR_RTP_GSTV4TRANS_CANTSETRTCPRECEIVEBUF, "Couldn't set the receive buffer size for the RTCP socket"}, + { ERR_RTP_GSTV4TRANS_CANTSETRTCPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTCP socket"}, + { ERR_RTP_GSTV4TRANS_CANTSETRTPRECEIVEBUF, "Couldn't set the receive buffer size for the RTP socket"}, + { ERR_RTP_GSTV4TRANS_CANTSETRTPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTP socket"}, + { ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP, "Unable to join the specified multicast group"}, + { ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE, "The function called doens't match the current receive mode"}, + { ERR_RTP_GSTV4TRANS_ERRORINSELECT, "Error in the transmitter's 'select' call"}, + { ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS, "Illegal parameters type passed to the transmitter"}, + { ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE, "Specified address type isn't compatible with this transmitter"}, + { ERR_RTP_GSTV4TRANS_NOLOCALIPS, "Couldn't determine the local host name since the local IP list is empty"}, + { ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT, "Multicast support is not available"}, + { ERR_RTP_GSTV4TRANS_NOSUCHENTRY, "Specified entry could not be found"}, + { ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS, "The specified address is not a multicast address"}, + { ERR_RTP_GSTV4TRANS_NOTCREATED, "The 'Create' call for this transmitter has not been called"}, + { ERR_RTP_GSTV4TRANS_NOTINIT, "The 'Init' call for this transmitter has not been called"}, + { ERR_RTP_GSTV4TRANS_NOTWAITING, "The transmitter is not waiting for incoming data"}, + { ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN, "The specified port base is not an even number"}, + { ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG, "The maximum packet size is too big for this transmitter"}, + { ERR_RTP_GSTV4TRANS_INVALIDEVENT, "Expecting UNKNOWN_EVENT to set source address but got another type of event"}, + { ERR_RTP_GSTV4TRANS_SRCADDRNOTSET, "Got packet but src address information was not set, returning"}, + { ERR_RTP_GSTV4TRANS_NOTNETBUFFER, "Received buffer is not a GstNetBuffer"}, + { ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED, "The WaitForIncomingData is not implemented in the Gst transmitter"}, { 0,0 } }; @@ -187,3 +220,4 @@ std::string RTPGetErrorString(int errcode) } return std::string("Unknown error code"); } + diff --git a/src/rtperrors.h b/src/rtperrors.h index 3912290..9242e07 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -164,6 +164,39 @@ std::string RTPGetErrorString(int errcode); #define ERR_RTP_UDPV6TRANS_PORTBASENOTEVEN -124 #define ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG -125 #define ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE -126 +#define ERR_RTP_SESSION_USERDEFINEDTRANSMITTERNULL -127 +#define ERR_RTP_GSTV4TRANS_ALREADYCREATED -128 +#define ERR_RTP_GSTV4TRANS_ALREADYINIT -129 +#define ERR_RTP_GSTV4TRANS_ALREADYWAITING -130 +#define ERR_RTP_GSTV4TRANS_CANTBINDRTCPSOCKET -131 +#define ERR_RTP_GSTV4TRANS_CANTBINDRTPSOCKET -132 +#define ERR_RTP_GSTV4TRANS_CANTCALCULATELOCALIP -133 +#define ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS -134 +#define ERR_RTP_GSTV4TRANS_CANTCREATEPIPE -135 +#define ERR_RTP_GSTV4TRANS_CANTCREATESOCKET -136 +#define ERR_RTP_GSTV4TRANS_CANTINITMUTEX -137 +#define ERR_RTP_GSTV4TRANS_CANTSETRTCPRECEIVEBUF -138 +#define ERR_RTP_GSTV4TRANS_CANTSETRTCPTRANSMITBUF -139 +#define ERR_RTP_GSTV4TRANS_CANTSETRTPRECEIVEBUF -140 +#define ERR_RTP_GSTV4TRANS_CANTSETRTPTRANSMITBUF -141 +#define ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP -142 +#define ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE -143 +#define ERR_RTP_GSTV4TRANS_ERRORINSELECT -144 +#define ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS -145 +#define ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE -146 +#define ERR_RTP_GSTV4TRANS_NOLOCALIPS -147 +#define ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT -148 +#define ERR_RTP_GSTV4TRANS_NOSUCHENTRY -149 +#define ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS -150 +#define ERR_RTP_GSTV4TRANS_NOTCREATED -151 +#define ERR_RTP_GSTV4TRANS_NOTINIT -152 +#define ERR_RTP_GSTV4TRANS_NOTWAITING -153 +#define ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN -154 +#define ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG -155 +#define ERR_RTP_GSTV4TRANS_INVALIDEVENT -156 +#define ERR_RTP_GSTV4TRANS_SRCADDRNOTSET -157 +#define ERR_RTP_GSTV4TRANS_NOTNETBUFFER -158 +#define ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED -159 #endif // RTPERRORS_H diff --git a/src/rtpgsttransmitter.cpp b/src/rtpgsttransmitter.cpp new file mode 100644 index 0000000..4680a43 --- /dev/null +++ b/src/rtpgsttransmitter.cpp @@ -0,0 +1,1806 @@ +/* + + This class allows for jrtp to send GstBuffers. Allows for integration of RTP + into gstreamer. + Copyright (c) 2005 Philippe Khalaf + + This file is a part of JRTPLIB + Copyright (c) 1999-2004 Jori Liesenborgs + + Contact: jori@lumumba.luc.ac.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair + Centrum" (http://www.luc.ac.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#include "rtpgsttransmitter.h" + +#ifdef RTP_SUPPORT_GST + +#include "rtprawpacket.h" +#include "rtpipv4address.h" +#include "rtptimeutilities.h" +#include + +#include +#include +#include +#include + +#ifdef RTP_HAVE_SYS_FILIO +#include +#endif // RTP_HAVE_SYS_FILIO + +#define RTPIOCTL ioctl + +#ifdef RTPDEBUG + #include +#endif // RTPDEBUG + +#include "rtpdebug.h" + +//GST_DEBUG_CATEGORY (gst_rtp_bin_debug); +//#define GST_CAT_DEFAULT (gst_rtp_bin_debug) + +#define RTPGSTv4TRANS_RTPRECEIVEBUFFER 32768 +#define RTPGSTv4TRANS_RTCPRECEIVEBUFFER 32768 +#define RTPGSTv4TRANS_RTPTRANSMITBUFFER 32768 +#define RTPGSTv4TRANS_RTCPTRANSMITBUFFER 32768 +#define RTPGSTv4TRANS_MAXPACKSIZE 65535 +#define RTPGSTv4TRANS_IFREQBUFSIZE 8192 + +//#define RTPGSTv4TRANS_IS_MCASTADDR(x) (((x)&0xF0000000) == 0xE0000000) + +/*#define RTPGSTv4TRANS_MCASTMEMBERSHIP(socket,type,mcastip,status) {\ + struct ip_mreq mreq;\ + \ + mreq.imr_multiaddr.s_addr = htonl(mcastip);\ + mreq.imr_interface.s_addr = htonl(bindIP);\ + status = setsockopt(socket,IPPROTO_IP,type,(const char *)&mreq,sizeof(struct ip_mreq));\ + }*/ +#ifndef RTP_SUPPORT_INLINETEMPLATEPARAM + int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPGSTv4TRANS_HASHSIZE; } + int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPGSTv4TRANS_HASHSIZE; } +#endif // !RTP_SUPPORT_INLINETEMPLATEPARAM + +#ifdef RTP_SUPPORT_THREAD + #define MAINMUTEX_LOCK { if (threadsafe) mainmutex.Lock(); } + #define MAINMUTEX_UNLOCK { if (threadsafe) mainmutex.Unlock(); } + #define WAITMUTEX_LOCK { if (threadsafe) waitmutex.Lock(); } + #define WAITMUTEX_UNLOCK { if (threadsafe) waitmutex.Unlock(); } +#else + #define MAINMUTEX_LOCK + #define MAINMUTEX_UNLOCK + #define WAITMUTEX_LOCK + #define WAITMUTEX_UNLOCK +#endif // RTP_SUPPORT_THREAD + +RTPGSTv4Transmitter::RTPGSTv4Transmitter() +{ + created = false; + init = false; +} + +RTPGSTv4Transmitter::~RTPGSTv4Transmitter() +{ + Destroy(); +} + +int RTPGSTv4Transmitter::Init(bool tsafe) +{ + if (init) + return ERR_RTP_GSTV4TRANS_ALREADYINIT; + +#ifdef RTP_SUPPORT_THREAD + threadsafe = tsafe; + if (threadsafe) + { + int status; + + status = mainmutex.Init(); + if (status < 0) + return ERR_RTP_GSTV4TRANS_CANTINITMUTEX; + status = waitmutex.Init(); + if (status < 0) + return ERR_RTP_GSTV4TRANS_CANTINITMUTEX; + } +#else + if (tsafe) + return ERR_RTP_NOTHREADSUPPORT; +#endif // RTP_SUPPORT_THREAD + + init = true; + return 0; +} + +int RTPGSTv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionParams *transparams) +{ + struct sockaddr_in addr; + int status; + + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_ALREADYCREATED; + } + + // Obtain transmission parameters + + if (transparams == 0) + params = new RTPGSTv4TransmissionParams; + else + { + if (transparams->GetTransmissionProtocol() != RTPTransmitter::IPv4GSTProto) + return ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS; + params = (RTPGSTv4TransmissionParams *)transparams; + } + + // Check if portbase is even + //if (params->GetPortbase()%2 != 0) + //{ + // MAINMUTEX_UNLOCK + // return ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN; + //} + + // Try to obtain local IP addresses + + localIPs = params->GetLocalIPList(); + if (localIPs.empty()) // User did not provide list of local IP addresses, calculate them + { + int status; + + if ((status = CreateLocalIPList()) < 0) + { + MAINMUTEX_UNLOCK + return status; + } +#ifdef RTPDEBUG + std::cout << "Found these local IP addresses:" << std::endl; + + std::list::const_iterator it; + + for (it = localIPs.begin() ; it != localIPs.end() ; it++) + { + RTPIPv4Address a(*it); + + std::cout << a.GetAddressString() << std::endl; + } +#endif // RTPDEBUG + } + +//#ifdef RTP_SUPPORT_IPV4MULTICAST +// if (SetMulticastTTL(params->GetMulticastTTL())) +// supportsmulticasting = true; +// else +// supportsmulticasting = false; +//#else // no multicast support enabled + supportsmulticasting = false; +//#endif // RTP_SUPPORT_IPV4MULTICAST + + if (maximumpacketsize > RTPGSTv4TRANS_MAXPACKSIZE) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + } + + maxpacksize = maximumpacketsize; + portbase = params->GetPortbase(); + multicastTTL = params->GetMulticastTTL(); + receivemode = RTPTransmitter::AcceptAll; + + localhostname = 0; + localhostnamelength = 0; + + rtppackcount = 0; + rtcppackcount = 0; + + waitingfordata = false; + created = true; + + MAINMUTEX_UNLOCK + return 0; +} + +void RTPGSTv4Transmitter::Destroy() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK; + return; + } + + if (localhostname) + { + delete [] localhostname; + localhostname = 0; + localhostnamelength = 0; + } + + destinations.Clear(); +#ifdef RTP_SUPPORT_IPV4MULTICAST +// multicastgroups.Clear(); +#endif // RTP_SUPPORT_IPV4MULTICAST + FlushPackets(); + ClearAcceptIgnoreInfo(); + localIPs.clear(); + created = false; + delete params; + + MAINMUTEX_UNLOCK +} + +RTPTransmissionInfo *RTPGSTv4Transmitter::GetTransmissionInfo() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + RTPTransmissionInfo *tinf = new RTPGSTv4TransmissionInfo(localIPs, + params->GetGstRTPSrc(), params->GetGstRTPSrc(), params); + MAINMUTEX_UNLOCK + return tinf; +} + +int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + + if (localhostname == 0) + { + if (localIPs.empty()) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOLOCALIPS; + } + + std::list::const_iterator it; + std::list hostnames; + + for (it = localIPs.begin() ; it != localIPs.end() ; it++) + { + struct hostent *he; + u_int8_t addr[4]; + u_int32_t ip = (*it); + + addr[0] = (u_int8_t)((ip>>24)&0xFF); + addr[1] = (u_int8_t)((ip>>16)&0xFF); + addr[2] = (u_int8_t)((ip>>8)&0xFF); + addr[3] = (u_int8_t)(ip&0xFF); + he = gethostbyaddr((char *)addr,4,AF_INET); + if (he != 0) + { + std::string hname = std::string(he->h_name); + hostnames.push_back(hname); + } + } + + bool found = false; + + if (!hostnames.empty()) // try to select the most appropriate hostname + { + std::list::const_iterator it; + + for (it = hostnames.begin() ; !found && it != hostnames.end() ; it++) + { + if ((*it).find('.') != std::string::npos) + { + found = true; + localhostnamelength = (*it).length(); + localhostname = new u_int8_t [localhostnamelength+1]; + if (localhostname == 0) + { + MAINMUTEX_UNLOCK + return ERR_RTP_OUTOFMEM; + } + memcpy(localhostname,(*it).c_str(),localhostnamelength); + localhostname[localhostnamelength] = 0; + } + } + } + + if (!found) // use an IP address + { + u_int32_t ip; + int len; + char str[256]; + + it = localIPs.begin(); + ip = (*it); + + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + len = strlen(str); + + localhostnamelength = len; + localhostname = new u_int8_t [localhostnamelength + 1]; + if (localhostname == 0) + { + MAINMUTEX_UNLOCK + return ERR_RTP_OUTOFMEM; + } + memcpy(localhostname,str,localhostnamelength); + localhostname[localhostnamelength] = 0; + } + } + + if ((*bufferlength) < localhostnamelength) + { + *bufferlength = localhostnamelength; // tell the application the required size of the buffer + MAINMUTEX_UNLOCK + return ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL; + } + + memcpy(buffer,localhostname,localhostnamelength); + *bufferlength = localhostnamelength; + + MAINMUTEX_UNLOCK + return 0; +} + +bool RTPGSTv4Transmitter::ComesFromThisTransmitter(const RTPAddress *addr) +{ + if (!init) + return false; + + if (addr == 0) + return false; + + MAINMUTEX_LOCK + + bool v; + + if (created && addr->GetAddressType() == RTPAddress::IPv4Address) + { + const RTPIPv4Address *addr2 = (const RTPIPv4Address *)addr; + bool found = false; + std::list::const_iterator it; + + it = localIPs.begin(); + while (!found && it != localIPs.end()) + { + if (addr2->GetIP() == *it) + found = true; + else + ++it; + } + + if (!found) + v = false; + else + { + if (addr2->GetPort() == params->GetPortbase()) // check for RTP port + v = true; + else if (addr2->GetPort() == (params->GetPortbase()+1)) // check for RTCP port + v = true; + else + v = false; + } + } + else + v = false; + + MAINMUTEX_UNLOCK + return v; +} + +int RTPGSTv4Transmitter::Poll() +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + int status; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + status = FakePoll(); // poll RTP socket + params->SetCurrentData(NULL); + MAINMUTEX_UNLOCK + return status; +} + +int RTPGSTv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) +{ +/* if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + fd_set fdset; + struct timeval tv; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (waitingfordata) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_ALREADYWAITING; + } + + FD_ZERO(&fdset); + FD_SET(rtpsock,&fdset); + FD_SET(rtcpsock,&fdset); + FD_SET(abortdesc[0],&fdset); + tv.tv_sec = delay.GetSeconds(); + tv.tv_usec = delay.GetMicroSeconds(); + + waitingfordata = true; + + WAITMUTEX_LOCK + MAINMUTEX_UNLOCK + + if (select(FD_SETSIZE,&fdset,0,0,&tv) < 0) + { + MAINMUTEX_LOCK + waitingfordata = false; + MAINMUTEX_UNLOCK + WAITMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_ERRORINSELECT; + } + + MAINMUTEX_LOCK + waitingfordata = false; + if (!created) // destroy called + { + MAINMUTEX_UNLOCK; + WAITMUTEX_UNLOCK + return 0; + } + + // if aborted, read from abort buffer + if (FD_ISSET(abortdesc[0],&fdset)) + { +#ifdef WIN32 + char buf[1]; + + recv(abortdesc[0],buf,1,0); +#else + unsigned char buf[1]; + + read(abortdesc[0],buf,1); +#endif // WIN32 + } + + MAINMUTEX_UNLOCK + WAITMUTEX_UNLOCK + return 0;*/ + return ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED; +} + +int RTPGSTv4Transmitter::AbortWait() +{ +/* if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (!waitingfordata) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTWAITING; + } + + AbortWaitInternal(); + + MAINMUTEX_UNLOCK + return 0;*/ + return 0; +} + +int RTPGSTv4Transmitter::SendRTPData(const void *data,size_t len) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + GstNetBuffer *out_buf; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (len > maxpacksize) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + } + + + destinations.GotoFirstElement(); + // send to each destination + while (destinations.HasCurrentElement()) + { + // create GstNetBuffer from data + out_buf = gst_netbuffer_new (); + GST_BUFFER_DATA (out_buf) = (guint8*)data; + GST_BUFFER_SIZE (out_buf) = len; + gst_netaddress_set_ip4_address (&out_buf->to, destinations.GetCurrentElement().GetIP_NBO(), + destinations.GetCurrentElement().GetRTPPort_NBO()); + GST_DEBUG("Sending RTP packet to ip %d port %d", destinations.GetCurrentElement().GetIP_NBO(), + destinations.GetCurrentElement().GetRTPPort_NBO()); + + // push data + gst_pad_push( params->GetGstRTPSrc(), GST_BUFFER(out_buf) ); + destinations.GotoNextElement(); + } + + rtppackcount++; + MAINMUTEX_UNLOCK + return 0; +} + +int RTPGSTv4Transmitter::SendRTCPData(const void *data,size_t len) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + // if it's NULL we dont want to transmit RTCPs + if (params->GetGstRTCPSrc() == NULL) + { + return 0; + } + + MAINMUTEX_LOCK + + GstNetBuffer *out_buf; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (len > maxpacksize) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + } + + destinations.GotoFirstElement(); + // send to each destination + while (destinations.HasCurrentElement()) + { + // create GstNetBuffer from data + out_buf = gst_netbuffer_new (); + GST_BUFFER_DATA (out_buf) = (guint8 *)data; + GST_BUFFER_SIZE (out_buf) = len; + gst_netaddress_set_ip4_address (&out_buf->to, destinations.GetCurrentElement().GetIP_NBO(), + destinations.GetCurrentElement().GetRTCPPort_NBO()); + GST_DEBUG("Sending RTCP packet"); + + // push data + gst_pad_push( params->GetGstRTCPSrc(), GST_BUFFER(out_buf) ); + destinations.GotoNextElement(); + } + + rtcppackcount++; + MAINMUTEX_UNLOCK + return 0; +} + +void RTPGSTv4Transmitter::ResetPacketCount() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (created) + { + rtppackcount = 0; + rtcppackcount = 0; + } + MAINMUTEX_UNLOCK +} + +u_int32_t RTPGSTv4Transmitter::GetNumRTPPacketsSent() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + + u_int32_t num; + + if (!created) + num = 0; + else + num = rtppackcount; + + MAINMUTEX_UNLOCK + + return num; +} + +u_int32_t RTPGSTv4Transmitter::GetNumRTCPPacketsSent() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + + u_int32_t num; + + if (!created) + num = 0; + else + num = rtcppackcount; + + MAINMUTEX_UNLOCK + + return num; +} + +int RTPGSTv4Transmitter::AddDestination(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + + RTPIPv4Address &address = (RTPIPv4Address &)addr; + RTPIPv4Destination dest(address.GetIP(),address.GetPort()); + int status = destinations.AddElement(dest); + + MAINMUTEX_UNLOCK + return status; +} + +int RTPGSTv4Transmitter::DeleteDestination(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + + RTPIPv4Address &address = (RTPIPv4Address &)addr; + RTPIPv4Destination dest(address.GetIP(),address.GetPort()); + int status = destinations.DeleteElement(dest); + + MAINMUTEX_UNLOCK + return status; +} + +void RTPGSTv4Transmitter::ClearDestinations() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (created) + destinations.Clear(); + MAINMUTEX_UNLOCK +} + +bool RTPGSTv4Transmitter::SupportsMulticasting() +{ + if (!init) + return false; + + MAINMUTEX_LOCK + + bool v; + + if (!created) + v = false; + else + v = supportsmulticasting; + + MAINMUTEX_UNLOCK + return v; +} + +#ifdef RTP_SUPPORT_IPV4MULTICAST + +int RTPGSTv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) +{ +// hrrm wonder how will manage to get multicast info thru to the UDPSINK +/* if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + u_int32_t mcastIP = address.GetIP(); + + if (!RTPGSTv4TRANS_IS_MCASTADDR(mcastIP)) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS; + } + + status = multicastgroups.AddElement(mcastIP); + if (status >= 0) + { + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_ADD_MEMBERSHIP,mcastIP,status); + if (status != 0) + { + multicastgroups.DeleteElement(mcastIP); + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP; + } + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_ADD_MEMBERSHIP,mcastIP,status); + if (status != 0) + { + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + multicastgroups.DeleteElement(mcastIP); + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP; + } + } + MAINMUTEX_UNLOCK + return status;*/ + return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; +} + +int RTPGSTv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) +{ + /* + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + u_int32_t mcastIP = address.GetIP(); + + if (!RTPGSTv4TRANS_IS_MCASTADDR(mcastIP)) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS; + } + + status = multicastgroups.DeleteElement(mcastIP); + if (status >= 0) + { + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + status = 0; + } + + MAINMUTEX_UNLOCK + return status; + */ + return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; +} + +void RTPGSTv4Transmitter::LeaveAllMulticastGroups() +{ +/* if (!init) + return; + + MAINMUTEX_LOCK + if (created) + { + multicastgroups.GotoFirstElement(); + while (multicastgroups.HasCurrentElement()) + { + u_int32_t mcastIP; + int status = 0; + + mcastIP = multicastgroups.GetCurrentElement(); + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + multicastgroups.GotoNextElement(); + } + multicastgroups.Clear(); + } + MAINMUTEX_UNLOCK*/ +} + +#else // no multicast support + +int RTPGSTv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) +{ + return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; +} + +int RTPGSTv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) +{ + return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; +} + +void RTPGSTv4Transmitter::LeaveAllMulticastGroups() +{ +} + +#endif // RTP_SUPPORT_IPV4MULTICAST + +int RTPGSTv4Transmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (m != receivemode) + { + receivemode = m; + acceptignoreinfo.Clear(); + } + MAINMUTEX_UNLOCK + return 0; +} + +int RTPGSTv4Transmitter::AddToIgnoreList(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + if (receivemode != RTPTransmitter::IgnoreSome) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + status = ProcessAddAcceptIgnoreEntry(address.GetIP(),address.GetPort()); + + MAINMUTEX_UNLOCK + return status; +} + +int RTPGSTv4Transmitter::DeleteFromIgnoreList(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + if (receivemode != RTPTransmitter::IgnoreSome) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + status = ProcessDeleteAcceptIgnoreEntry(address.GetIP(),address.GetPort()); + + MAINMUTEX_UNLOCK + return status; +} + +void RTPGSTv4Transmitter::ClearIgnoreList() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (created && receivemode == RTPTransmitter::IgnoreSome) + ClearAcceptIgnoreInfo(); + MAINMUTEX_UNLOCK +} + +int RTPGSTv4Transmitter::AddToAcceptList(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + if (receivemode != RTPTransmitter::AcceptSome) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + status = ProcessAddAcceptIgnoreEntry(address.GetIP(),address.GetPort()); + + MAINMUTEX_UNLOCK + return status; +} + +int RTPGSTv4Transmitter::DeleteFromAcceptList(const RTPAddress &addr) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + + int status; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (addr.GetAddressType() != RTPAddress::IPv4Address) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + } + if (receivemode != RTPTransmitter::AcceptSome) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + } + + const RTPIPv4Address &address = (const RTPIPv4Address &)addr; + status = ProcessDeleteAcceptIgnoreEntry(address.GetIP(),address.GetPort()); + + MAINMUTEX_UNLOCK + return status; +} + +void RTPGSTv4Transmitter::ClearAcceptList() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (created && receivemode == RTPTransmitter::AcceptSome) + ClearAcceptIgnoreInfo(); + MAINMUTEX_UNLOCK +} + +int RTPGSTv4Transmitter::SetMaximumPacketSize(size_t s) +{ + if (!init) + return ERR_RTP_GSTV4TRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_NOTCREATED; + } + if (s > RTPGSTv4TRANS_MAXPACKSIZE) + { + MAINMUTEX_UNLOCK + return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + } + maxpacksize = s; + MAINMUTEX_UNLOCK + return 0; +} + +bool RTPGSTv4Transmitter::NewDataAvailable() +{ + if (!init) + return false; + + MAINMUTEX_LOCK + + bool v; + + if (!created) + v = false; + else + { + if (rawpacketlist.empty()) + v = false; + else + v = true; + } + + MAINMUTEX_UNLOCK + return v; +} + +RTPRawPacket *RTPGSTv4Transmitter::GetNextPacket() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + + RTPRawPacket *p; + + if (!created) + { + MAINMUTEX_UNLOCK + return 0; + } + if (rawpacketlist.empty()) + { + MAINMUTEX_UNLOCK + return 0; + } + + p = *(rawpacketlist.begin()); + rawpacketlist.pop_front(); + + MAINMUTEX_UNLOCK + return p; +} + +// Here the private functions start... + +#ifdef RTP_SUPPORT_IPV4MULTICAST +bool RTPGSTv4Transmitter::SetMulticastTTL(u_int8_t ttl) +{ +/* int ttl2,status; + + ttl2 = (int)ttl; + status = setsockopt(rtpsock,IPPROTO_IP,IP_MULTICAST_TTL,(const char *)&ttl2,sizeof(int)); + if (status != 0) + return false; + status = setsockopt(rtcpsock,IPPROTO_IP,IP_MULTICAST_TTL,(const char *)&ttl2,sizeof(int)); + if (status != 0) + return false; + return true;*/ +} +#endif // RTP_SUPPORT_IPV4MULTICAST + +void RTPGSTv4Transmitter::FlushPackets() +{ + std::list::const_iterator it; + + for (it = rawpacketlist.begin() ; it != rawpacketlist.end() ; ++it) + delete (*it); + rawpacketlist.clear(); +} + +int RTPGSTv4Transmitter::FakePoll() +{ + int recvlen; + GstNetBuffer *packetbuffer; + + RTPTime curtime = RTPTime::CurrentTime(); + + packetbuffer = params->GetCurrentData(); + bool rtp = params->GetCurrentDataType(); + // lets make sure we got something + if (packetbuffer == NULL ) + { + //GST_DEBUG("No packetbuffer to poll"); + return 0; + } + // should be a netbuffer + if (GST_IS_NETBUFFER (packetbuffer)) + { + guint16 senderport; + guint32 senderaddr; + // let's get the address from the netbuffer + gst_netaddress_get_ip4_address (&packetbuffer->from, &senderaddr, &senderport); + RTPIPv4Address *addr = new RTPIPv4Address(ntohl(senderaddr), ntohs(senderport)); + if (addr == 0) + { + return ERR_RTP_OUTOFMEM; + } + GST_DEBUG("Got netbuffer, saving src info %d %d", addr->GetIP(), addr->GetPort()); + // ok we got the src addr, now this should be the actual packet + recvlen = GST_BUFFER_SIZE(packetbuffer); + if (GST_BUFFER_DATA(packetbuffer) && recvlen > 0) + { + GST_DEBUG("Got packet %d", recvlen); + bool acceptdata; + + // got data, process it + if (receivemode == RTPTransmitter::AcceptAll) + acceptdata = true; + else + acceptdata = ShouldAcceptData(addr->GetIP(),addr->GetPort()); + + if (acceptdata) + { + GST_DEBUG("Adding packet to queue"); + RTPRawPacket *pack; + u_int8_t *datacopy; + + datacopy = new u_int8_t[recvlen]; + if (datacopy == 0) + { + delete addr; + return ERR_RTP_OUTOFMEM; + } + memcpy(datacopy, GST_BUFFER_DATA(packetbuffer),recvlen); + pack = new RTPRawPacket(datacopy,recvlen,addr,curtime,rtp); + + GST_DEBUG("lenght %d is RTP? %d", pack->GetDataLength(), pack->IsRTP()); + if (pack == 0) + { + delete addr; + delete [] datacopy; + return ERR_RTP_OUTOFMEM; + } + rawpacketlist.push_back(pack); + } + } + } else { + return ERR_RTP_GSTV4TRANS_NOTNETBUFFER; + } + return 0; +} + +int RTPGSTv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +{ + acceptignoreinfo.GotoElement(ip); + if (acceptignoreinfo.HasCurrentElement()) // An entry for this IP address already exists + { + PortInfo *portinf = acceptignoreinfo.GetCurrentElement(); + + if (port == 0) // select all ports + { + portinf->all = true; + portinf->portlist.clear(); + } + else if (!portinf->all) + { + std::list::const_iterator it,begin,end; + + begin = portinf->portlist.begin(); + end = portinf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == port) // already in list + return 0; + } + portinf->portlist.push_front(port); + } + } + else // got to create an entry for this IP address + { + PortInfo *portinf; + int status; + + portinf = new PortInfo(); + if (port == 0) // select all ports + portinf->all = true; + else + portinf->portlist.push_front(port); + + status = acceptignoreinfo.AddElement(ip,portinf); + if (status < 0) + { + delete portinf; + return status; + } + } + + return 0; +} + +void RTPGSTv4Transmitter::ClearAcceptIgnoreInfo() +{ + acceptignoreinfo.GotoFirstElement(); + while (acceptignoreinfo.HasCurrentElement()) + { + PortInfo *inf; + + inf = acceptignoreinfo.GetCurrentElement(); + delete inf; + acceptignoreinfo.GotoNextElement(); + } + acceptignoreinfo.Clear(); +} + +int RTPGSTv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +{ + acceptignoreinfo.GotoElement(ip); + if (!acceptignoreinfo.HasCurrentElement()) + return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + + PortInfo *inf; + + inf = acceptignoreinfo.GetCurrentElement(); + if (port == 0) // delete all entries + { + inf->all = false; + inf->portlist.clear(); + } + else // a specific port was selected + { + if (inf->all) // currently, all ports are selected. Add the one to remove to the list + { + // we have to check if the list doesn't contain the port already + std::list::const_iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == port) // already in list: this means we already deleted the entry + return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + } + inf->portlist.push_front(port); + } + else // check if we can find the port in the list + { + std::list::iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; ++it) + { + if (*it == port) // found it! + { + inf->portlist.erase(it); + return 0; + } + } + // didn't find it + return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + } + } + return 0; +} + +bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) +{ + if (receivemode == RTPTransmitter::AcceptSome) + { + PortInfo *inf; + + acceptignoreinfo.GotoElement(srcip); + if (!acceptignoreinfo.HasCurrentElement()) + return false; + + inf = acceptignoreinfo.GetCurrentElement(); + if (!inf->all) // only accept the ones in the list + { + std::list::const_iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == srcport) + return true; + } + return false; + } + else // accept all, except the ones in the list + { + std::list::const_iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == srcport) + return false; + } + return true; + } + } + else // IgnoreSome + { + PortInfo *inf; + + acceptignoreinfo.GotoElement(srcip); + if (!acceptignoreinfo.HasCurrentElement()) + return true; + + inf = acceptignoreinfo.GetCurrentElement(); + if (!inf->all) // ignore the ports in the list + { + std::list::const_iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == srcport) + return false; + } + return true; + } + else // ignore all, except the ones in the list + { + std::list::const_iterator it,begin,end; + + begin = inf->portlist.begin(); + end = inf->portlist.end(); + for (it = begin ; it != end ; it++) + { + if (*it == srcport) + return true; + } + return false; + } + } + return true; +} + +#ifdef WIN32 + +int RTPGSTv4Transmitter::CreateAbortDescriptors() +{ + // no need for these no more +/* + SOCKET listensock; + int size; + struct sockaddr_in addr; + + listensock = socket(PF_INET,SOCK_STREAM,0); + if (listensock == RTPSOCKERR) + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + if (bind(listensock,(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + size = sizeof(struct sockaddr_in); + if (getsockname(listensock,(struct sockaddr*)&addr,&size) != 0) + { + RTPCLOSE(listensock); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + unsigned short connectport = ntohs(addr.sin_port); + + abortdesc[0] = socket(PF_INET,SOCK_STREAM,0); + if (abortdesc[0] == RTPSOCKERR) + { + RTPCLOSE(listensock); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + if (bind(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + if (listen(listensock,1) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + addr.sin_port = htons(connectport); + + if (connect(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + size = sizeof(struct sockaddr_in); + abortdesc[1] = accept(listensock,(struct sockaddr *)&addr,&size); + if (abortdesc[1] == RTPSOCKERR) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + } + + // okay, got the connection, close the listening socket + + RTPCLOSE(listensock); + return 0;*/ +} + +void RTPGSTv4Transmitter::DestroyAbortDescriptors() +{ +// RTPCLOSE(abortdesc[0]); +// RTPCLOSE(abortdesc[1]); +} + +#else // in a non winsock environment we can use pipes + +int RTPGSTv4Transmitter::CreateAbortDescriptors() +{ +// if (pipe(abortdesc) < 0) +// return ERR_RTP_GSTV4TRANS_CANTCREATEPIPE; +// return 0; +} + +void RTPGSTv4Transmitter::DestroyAbortDescriptors() +{ +// close(abortdesc[0]); +// close(abortdesc[1]); +} + +#endif // WIN32 + +int RTPGSTv4Transmitter::CreateLocalIPList() +{ + // first try to obtain the list from the network interface info + + if (!GetLocalIPList_Interfaces()) + { + // If this fails, we'll have to depend on DNS info + GetLocalIPList_DNS(); + } + AddLoopbackAddress(); + return 0; +} + +//#ifdef WIN32 + +bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() +{ + // REMINDER: got to find out how to do this + return false; +} +/* +#else // use ioctl + +bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() +{ + int status; + char buffer[RTPGSTv4TRANS_IFREQBUFSIZE]; + struct ifconf ifc; + struct ifreq *ifr; + struct sockaddr *sa; + char *startptr,*endptr; + int remlen; + + ifc.ifc_len = RTPGSTv4TRANS_IFREQBUFSIZE; + ifc.ifc_buf = buffer; + status = ioctl(rtpsock,SIOCGIFCONF,&ifc); + if (status < 0) + return false; + + startptr = (char *)ifc.ifc_req; + endptr = startptr + ifc.ifc_len; + remlen = ifc.ifc_len; + while((startptr < endptr) && remlen >= (int)sizeof(struct ifreq)) + { + ifr = (struct ifreq *)startptr; + sa = &(ifr->ifr_addr); +#ifdef RTP_HAVE_SOCKADDR_LEN + if (sa->sa_len <= sizeof(struct sockaddr)) + { + if (sa->sa_len == sizeof(struct sockaddr_in) && sa->sa_family == PF_INET) + { + u_int32_t ip; + struct sockaddr_in *addr = (struct sockaddr_in *)sa; + + ip = ntohl(addr->sin_addr.s_addr); + localIPs.push_back(ip); + } + remlen -= sizeof(struct ifreq); + startptr += sizeof(struct ifreq); + } + else + { + int l = sa->sa_len-sizeof(struct sockaddr)+sizeof(struct ifreq); + + remlen -= l; + startptr += l; + } +#else // don't have sa_len in struct sockaddr + if (sa->sa_family == PF_INET) + { + u_int32_t ip; + struct sockaddr_in *addr = (struct sockaddr_in *)sa; + + ip = ntohl(addr->sin_addr.s_addr); + localIPs.push_back(ip); + } + remlen -= sizeof(struct ifreq); + startptr += sizeof(struct ifreq); + +#endif // RTP_HAVE_SOCKADDR_LEN + } + + if (localIPs.empty()) + return false; + return true; +} + +#endif // WIN32 +*/ +void RTPGSTv4Transmitter::GetLocalIPList_DNS() +{ + struct hostent *he; + char name[1024]; + u_int32_t ip; + bool done; + int i,j; + + gethostname(name,1023); + name[1023] = 0; + he = gethostbyname(name); + if (he == 0) + return; + + ip = 0; + i = 0; + done = false; + while (!done) + { + if (he->h_addr_list[i] == NULL) + done = true; + else + { + ip = 0; + for (j = 0 ; j < 4 ; j++) + ip |= ((u_int32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); + localIPs.push_back(ip); + i++; + } + } +} + +void RTPGSTv4Transmitter::AbortWaitInternal() +{ +/*#ifdef WIN32 + send(abortdesc[1],"*",1,0); +#else + write(abortdesc[1],"*",1); +#endif // WIN32*/ +} + +void RTPGSTv4Transmitter::AddLoopbackAddress() +{ + u_int32_t loopbackaddr = (((u_int32_t)127)<<24)|((u_int32_t)1); + std::list::const_iterator it; + bool found = false; + + for (it = localIPs.begin() ; !found && it != localIPs.end() ; it++) + { + if (*it == loopbackaddr) + found = true; + } + + if (!found) + localIPs.push_back(loopbackaddr); +} + +#ifdef RTPDEBUG +void RTPGSTv4Transmitter::Dump() +{ + if (!init) + std::cout << "Not initialized" << std::endl; + else + { + MAINMUTEX_LOCK + + if (!created) + std::cout << "Not created" << std::endl; + else + { + char str[1024]; + u_int32_t ip; + std::list::const_iterator it; + + std::cout << "Portbase: " << params->GetPortbase() << std::endl; + std::cout << "Local IP addresses:" << std::endl; + for (it = localIPs.begin() ; it != localIPs.end() ; it++) + { + ip = (*it); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << " " << str << std::endl; + } +// std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; + std::cout << "Receive mode: "; + switch (receivemode) + { + case RTPTransmitter::AcceptAll: + std::cout << "Accept all"; + break; + case RTPTransmitter::AcceptSome: + std::cout << "Accept some"; + break; + case RTPTransmitter::IgnoreSome: + std::cout << "Ignore some"; + } + std::cout << std::endl; + if (receivemode != RTPTransmitter::AcceptAll) + { + acceptignoreinfo.GotoFirstElement(); + while(acceptignoreinfo.HasCurrentElement()) + { + ip = acceptignoreinfo.GetCurrentKey(); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); + std::cout << " " << str << ": "; + if (pinfo->all) + { + std::cout << "All ports"; + if (!pinfo->portlist.empty()) + std::cout << ", except "; + } + + std::list::const_iterator it; + + for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) + { + std::cout << (*it); + it++; + if (it != pinfo->portlist.end()) + std::cout << ", "; + } + std::cout << std::endl; + } + } + + std::cout << "Local host name: "; + if (localhostname == 0) + std::cout << "Not set"; + else + std::cout << localhostname; + std::cout << std::endl; + + std::cout << "List of destinations: "; + destinations.GotoFirstElement(); + if (destinations.HasCurrentElement()) + { + std::cout << std::endl; + do + { + std::cout << " " << destinations.GetCurrentElement().GetDestinationString() << std::endl; + destinations.GotoNextElement(); + } while (destinations.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl; + + std::cout << "Supports multicasting: " << ((supportsmulticasting)?"Yes":"No") << std::endl; +#ifdef RTP_SUPPORT_IPV4MULTICAST +/* std::cout << "List of multicast groups: "; + multicastgroups.GotoFirstElement(); + if (multicastgroups.HasCurrentElement()) + { + std::cout << std::endl; + do + { + ip = multicastgroups.GetCurrentElement(); + sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << " " << str << std::endl; + multicastgroups.GotoNextElement(); + } while (multicastgroups.HasCurrentElement()); + } + else + std::cout << "Empty" << std::endl;*/ +#endif // RTP_SUPPORT_IPV4MULTICAST + + std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; + std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; + std::cout << "RTP packet count: " << rtppackcount << std::endl; + std::cout << "RTCP packet count: " << rtcppackcount << std::endl; + } + + MAINMUTEX_UNLOCK + } +} +#endif // RTPDEBUG + +#endif // RTP_SUPPORT_GST + diff --git a/src/rtpgsttransmitter.h b/src/rtpgsttransmitter.h new file mode 100644 index 0000000..0501fd1 --- /dev/null +++ b/src/rtpgsttransmitter.h @@ -0,0 +1,234 @@ +/* + + This class allows for jrtp to send GstBuffers. Allows for integration of RTP + into gstreamer. + Copyright (c) 2005 Philippe Khalaf + + This file is a part of JRTPLIB + Copyright (c) 1999-2004 Jori Liesenborgs + + Contact: jori@lumumba.luc.ac.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair + Centrum" (http://www.luc.ac.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#ifndef RTPGSTV4TRANSMITTER_H + +#define RTPGSTV4TRANSMITTER_H + +#include "rtpconfig.h" + +#ifdef RTP_SUPPORT_GST + +#include "rtptransmitter.h" +#include "rtpipv4destination.h" +#include "rtphashtable.h" +#include "rtpkeyhashtable.h" +#include + +#include +#include + +#ifdef RTP_SUPPORT_THREAD + #include +#endif // RTP_SUPPORT_THREAD + +#define RTPGSTv4TRANS_HASHSIZE 8317 +#define RTPGSTv4TRANS_DEFAULTPORTBASE 5000 + +class RTPGSTv4TransmissionParams : public RTPTransmissionParams +{ +public: + RTPGSTv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4GSTProto) { portbase = RTPGSTv4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; rtpsrcpad = NULL, rtcpsrcpad = NULL; currentdata = NULL;} + void SetBindIP(u_int32_t ip) { bindIP = ip; } + void SetPortbase(u_int16_t pbase) { portbase = pbase; } + void SetMulticastTTL(u_int8_t mcastTTL) { multicastTTL = mcastTTL; } + void SetLocalIPList(std::list &iplist) { localIPs = iplist; } + void ClearLocalIPList() { localIPs.clear(); } + void SetGstRTPSrc(GstPad *src) { rtpsrcpad = src; } + void SetGstRTCPSrc(GstPad *src) { rtcpsrcpad = src; } + void SetCurrentData(GstNetBuffer *data) { currentdata = data; } + void SetCurrentDataType(bool type) { currentdatatype = type; } + u_int32_t GetBindIP() const { return bindIP; } + u_int16_t GetPortbase() const { return portbase; } + u_int8_t GetMulticastTTL() const { return multicastTTL; } + const std::list &GetLocalIPList() const { return localIPs; } + GstPad* GetGstRTPSrc() const { return rtpsrcpad; } + GstPad* GetGstRTCPSrc() const { return rtcpsrcpad; } + GstNetBuffer* GetCurrentData() const { return currentdata; } + bool GetCurrentDataType() const { return currentdatatype; } +private: + u_int16_t portbase; + u_int32_t bindIP; + std::list localIPs; + u_int8_t multicastTTL; + GstPad *rtpsrcpad; + GstPad *rtcpsrcpad; + bool currentdatatype; + GstNetBuffer* currentdata; +}; + +class RTPGSTv4TransmissionInfo : public RTPTransmissionInfo +{ +public: + RTPGSTv4TransmissionInfo(std::list iplist, + GstPad* rtpsrc, GstPad* rtcpsrc, RTPGSTv4TransmissionParams *transparams) : + RTPTransmissionInfo(RTPTransmitter::IPv4GSTProto) + { localIPlist = iplist; rtpsrcpad = rtpsrc; + rtcpsrcpad = rtcpsrc; params = transparams; } + + ~RTPGSTv4TransmissionInfo() { } + std::list GetLocalIPList() const { return localIPlist; } + GstPad* GetGstRTPSrc() { return rtpsrcpad; } + GstPad* GetGstRTCPSrc() { return rtcpsrcpad; } + RTPGSTv4TransmissionParams* GetTransParams() { return params; } +private: + std::list localIPlist; + GstPad *rtpsrcpad; + GstPad *rtcpsrcpad; + RTPGSTv4TransmissionParams *params; +}; + +#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM + inline int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPGSTv4TRANS_HASHSIZE; } + inline int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPGSTv4TRANS_HASHSIZE; } +#else // No support for inline function as template parameter + int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); + int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k); +#endif // RTP_SUPPORT_INLINETEMPLATEPARAM + +#define RTPGSTv4TRANS_HEADERSIZE (20+8) + +class RTPGSTv4Transmitter : public RTPTransmitter +{ +public: + RTPGSTv4Transmitter(); + ~RTPGSTv4Transmitter(); + + int Init(bool treadsafe); + int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); + void Destroy(); + RTPTransmissionInfo *GetTransmissionInfo(); + + int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); + bool ComesFromThisTransmitter(const RTPAddress *addr); + size_t GetHeaderOverhead() { return RTPGSTv4TRANS_HEADERSIZE; } + + int Poll(); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); + int AbortWait(); + + int SendRTPData(const void *data,size_t len); + int SendRTCPData(const void *data,size_t len); + + void ResetPacketCount(); + u_int32_t GetNumRTPPacketsSent(); + u_int32_t GetNumRTCPPacketsSent(); + + int AddDestination(const RTPAddress &addr); + int DeleteDestination(const RTPAddress &addr); + void ClearDestinations(); + + bool SupportsMulticasting(); + int JoinMulticastGroup(const RTPAddress &addr); + int LeaveMulticastGroup(const RTPAddress &addr); + void LeaveAllMulticastGroups(); + + int SetReceiveMode(RTPTransmitter::ReceiveMode m); + int AddToIgnoreList(const RTPAddress &addr); + int DeleteFromIgnoreList(const RTPAddress &addr); + void ClearIgnoreList(); + int AddToAcceptList(const RTPAddress &addr); + int DeleteFromAcceptList(const RTPAddress &addr); + void ClearAcceptList(); + int SetMaximumPacketSize(size_t s); + + bool NewDataAvailable(); + RTPRawPacket *GetNextPacket(); +#ifdef RTPDEBUG + void Dump(); +#endif // RTPDEBUG +private: + int CreateLocalIPList(); + bool GetLocalIPList_Interfaces(); + void GetLocalIPList_DNS(); + void AddLoopbackAddress(); + void FlushPackets(); + int FakePoll(); + int ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); + int ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); +#ifdef RTP_SUPPORT_IPV4MULTICAST + bool SetMulticastTTL(u_int8_t ttl); +#endif // RTP_SUPPORT_IPV4MULTICAST + bool ShouldAcceptData(u_int32_t srcip,u_int16_t srcport); + void ClearAcceptIgnoreInfo(); + + RTPGSTv4TransmissionParams *params; + bool init; + bool created; + bool waitingfordata; + std::list localIPs; + u_int16_t portbase; + u_int8_t multicastTTL; + RTPTransmitter::ReceiveMode receivemode; + + u_int8_t *localhostname; + size_t localhostnamelength; + + RTPHashTable destinations; +#ifdef RTP_SUPPORT_IPV4MULTICAST +// RTPHashTable multicastgroups; +#endif // RTP_SUPPORT_IPV4MULTICAST + std::list rawpacketlist; + + bool supportsmulticasting; + size_t maxpacksize; + + class PortInfo + { + public: + PortInfo() { all = false; } + + bool all; + std::list portlist; + }; + + RTPKeyHashTable acceptignoreinfo; + + int CreateAbortDescriptors(); + void DestroyAbortDescriptors(); + void AbortWaitInternal(); +#ifdef RTP_SUPPORT_THREAD + JMutex mainmutex,waitmutex; + int threadsafe; +#endif // RTP_SUPPORT_THREAD + + u_int32_t rtppackcount,rtcppackcount; +}; + +#endif // RTP_SUPPORT_GST + +#endif // RTPGSTv4TRANSMITTER_H + diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index d08ca95..7e64e54 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -34,6 +34,6 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,2,1); + return RTPLibraryVersion(3,3,0); } diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index adc78a8..6cdd63a 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -35,6 +35,7 @@ #include "rtppollthread.h" #include "rtpudpv4transmitter.h" #include "rtpudpv6transmitter.h" +#include "rtpgsttransmitter.h" #include "rtpsessionparams.h" #include "rtpdefines.h" #include "rtprawpacket.h" @@ -112,6 +113,16 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP rtptrans = new RTPUDPv6Transmitter(); break; #endif // RTP_SUPPORT_IPV6 +#ifdef RTP_SUPPORT_GST + case RTPTransmitter::IPv4GSTProto: + rtptrans = new RTPGSTv4Transmitter(); + break; +#endif // RTP_SUPPORT_GST + case RTPTransmitter::UserDefinedProto: + rtptrans = NewUserDefinedTransmitter(); + if (rtptrans == 0) + return ERR_RTP_SESSION_USERDEFINEDTRANSMITTERNULL; + break; default: return ERR_RTP_SESSION_UNSUPPORTEDTRANSMISSIONPROTOCOL; } diff --git a/src/rtpsession.h b/src/rtpsession.h index 6bdcb74..07e1f61 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -149,6 +149,8 @@ class RTPSession void DumpTransmitter(); #endif // RTPDEBUG protected: + virtual RTPTransmitter *NewUserDefinedTransmitter() { return 0; } + virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack,const RTPTime &receivetime, diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 379dfb4..9e6f70a 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -48,7 +48,7 @@ class RTPTransmissionInfo; class RTPTransmitter { public: - enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto }; + enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, IPv4GSTProto, UserDefinedProto }; enum ReceiveMode { AcceptAll,AcceptSome,IgnoreSome }; protected: RTPTransmitter() { } diff --git a/tools/Makefile.in b/tools/Makefile.in index e173241..d10f653 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -75,6 +75,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GST_CFLAGS = @GST_CFLAGS@ +GST_LIBS = @GST_LIBS@ +GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ +GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -94,15 +98,19 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ +RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ +RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ From 9fd0a248b88915049fd063d08a657409aef3c079 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 007/136] Import of version 3.4.0 --- ChangeLog | 16 +- INSTALL | 236 -------- Makefile.in | 13 +- README.TXT | 6 +- aclocal.m4 | 58 -- configure | 304 ++-------- configure.in | 47 +- doc/Makefile.in | 7 - doc/jrtplib.tex | 24 +- examples/Makefile.am | 2 +- examples/Makefile.in | 9 +- examples/example1.cpp | 4 +- examples/example2.cpp | 4 +- examples/example3.cpp | 22 +- examples/example4.cpp | 4 +- pkgconfig/Makefile.in | 7 - src/Makefile.am | 8 +- src/Makefile.in | 27 +- .../rtpfaketransmitter.cpp} | 565 +++++++++--------- src/extratransmitters/rtpfaketransmitter.h | 240 ++++++++ src/rtcpapppacket.cpp | 10 +- src/rtcpapppacket.h | 26 +- src/rtcpbyepacket.cpp | 10 +- src/rtcpbyepacket.h | 18 +- src/rtcpcompoundpacket.cpp | 6 +- src/rtcpcompoundpacket.h | 6 +- src/rtcpcompoundpacketbuilder.cpp | 122 ++-- src/rtcpcompoundpacketbuilder.h | 68 +-- src/rtcppacket.cpp | 2 +- src/rtcppacket.h | 8 +- src/rtcppacketbuilder.cpp | 70 +-- src/rtcppacketbuilder.h | 17 +- src/rtcprrpacket.cpp | 10 +- src/rtcprrpacket.h | 38 +- src/rtcpscheduler.cpp | 2 +- src/rtcpscheduler.h | 2 +- src/rtcpsdesinfo.cpp | 16 +- src/rtcpsdesinfo.h | 58 +- src/rtcpsdespacket.cpp | 14 +- src/rtcpsdespacket.h | 42 +- src/rtcpsrpacket.cpp | 10 +- src/rtcpsrpacket.h | 58 +- src/rtcpunknownpacket.h | 4 +- src/rtpaddress.h | 2 +- src/rtpcollisionlist.cpp | 2 +- src/rtpcollisionlist.h | 2 +- src/rtpconfig.h | 4 +- src/rtpconfig_unix.h.in | 4 +- src/rtpconfig_win.h | 2 +- src/rtpdebug.cpp | 3 +- src/rtpdebug.h | 2 +- src/rtpdefines.h | 2 +- src/rtperrors.cpp | 74 +-- src/rtperrors.h | 68 ++- src/rtpgsttransmitter.h | 234 -------- src/rtphashtable.h | 4 +- src/rtpinternalsourcedata.cpp | 24 +- src/rtpinternalsourcedata.h | 18 +- src/rtpipv4address.cpp | 6 +- src/rtpipv4address.h | 20 +- src/rtpipv4destination.h | 34 +- src/rtpipv6address.cpp | 16 +- src/rtpipv6address.h | 16 +- src/rtpipv6destination.h | 26 +- src/rtpkeyhashtable.h | 4 +- src/rtplibraryversion.cpp | 4 +- src/rtplibraryversion.h | 9 +- src/rtppacket.cpp | 70 +-- src/rtppacket.h | 52 +- src/rtppacketbuilder.cpp | 32 +- src/rtppacketbuilder.h | 70 +-- src/rtppollthread.cpp | 2 +- src/rtppollthread.h | 2 +- src/rtprandom.cpp | 84 +-- src/rtprandom.h | 8 +- src/rtprawpacket.h | 10 +- src/rtpsession.cpp | 49 +- src/rtpsession.h | 25 +- src/rtpsessionparams.cpp | 2 +- src/rtpsessionparams.h | 2 +- src/rtpsessionsources.cpp | 4 +- src/rtpsessionsources.h | 4 +- src/rtpsourcedata.cpp | 38 +- src/rtpsourcedata.h | 130 ++-- src/rtpsources.cpp | 63 +- src/rtpsources.h | 38 +- src/rtpstructs.h | 82 +-- src/rtptimeutilities.cpp | 2 +- src/rtptimeutilities.h | 34 +- src/rtptransmitter.h | 10 +- src/rtptypes.h | 2 +- src/rtptypes_win.h | 23 +- src/rtpudpv4transmitter.cpp | 162 +++-- src/rtpudpv4transmitter.h | 74 +-- src/rtpudpv6transmitter.cpp | 134 +++-- src/rtpudpv6transmitter.h | 48 +- tools/Makefile.in | 7 - tools/gettypes.cpp | 8 +- 98 files changed, 1794 insertions(+), 2277 deletions(-) delete mode 100644 INSTALL rename src/{rtpgsttransmitter.cpp => extratransmitters/rtpfaketransmitter.cpp} (66%) create mode 100644 src/extratransmitters/rtpfaketransmitter.h delete mode 100644 src/rtpgsttransmitter.h diff --git a/ChangeLog b/ChangeLog index f221b3e..239a35f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,24 @@ - October 2, 2005 + January 19, 2006 JRTPLIB ChangeLog ----------- + 3.4.0 (January 2006) + * Changed u_int32_t like types to uint32_t like types. Thanks to + Panagiotis Issaris (takis.issaris@uhasselt.be) for informing me + that these are C99 compliant. + * Changed sprintf functions to safer snprintf functions. Thanks to + Panagiotis Issaris (takis.issaris@uhasselt.be) for pointing this + out. + * Fixed bug in RTPSources (counters were not reset when the source + table was cleared). Thanks to Justin Matthews (jmatthewsr@yahoo.com) + for pointing this out. + * Fixed bug in RTPHashTable and RTPKeyHashTable. Thanks to + Tom Pijsel (tom.pijsel@twelvecubes.com) for bringing this to my + attention. + * Fixed bug in example3.cpp 3.3.0 (October 2005) * Now it is possible to use a user-defined transmission component. diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 56b077d..0000000 --- a/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/Makefile.in b/Makefile.in index 4d7f0d7..deeaadc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,9 +36,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog \ - INSTALL TODO config.guess config.sub depcomp install-sh \ - ltmain.sh missing mkinstalldirs + $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog TODO \ + config.guess config.sub depcomp install-sh ltmain.sh missing \ + mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in @@ -99,10 +99,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -122,11 +118,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -134,7 +128,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ diff --git a/README.TXT b/README.TXT index e51c5d1..d72a054 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - October 2, 2005 + January 19, 2006 - JRTPLIB (v3.3.0) + JRTPLIB (v3.4.0) Developed at the The Expertise Centre for @@ -119,8 +119,6 @@ INSTALLATION NOTES If set, IPv6 support is enabled. - RTP_SUPPORT_IPV6MULTICAST: If set, IPv6 multicasting support is enabled. - - RTP_SUPPORT_GST: - If set, GStreamer support is enabled. - RTPDEBUG: Enables some memory tracking functions and some debug routines. diff --git a/aclocal.m4 b/aclocal.m4 index b6f3dc0..0044e21 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -6042,64 +6042,6 @@ SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) - -dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN(PKG_CHECK_MODULES, [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - - # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/configure b/configure index 7472aad..204f495 100755 --- a/configure +++ b/configure @@ -463,7 +463,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG GST_CFLAGS GST_LIBS GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_SUPPORT_GST RTP_GSTINCLUDES RTP_LINKLIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_LINKLIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1036,7 +1036,6 @@ Optional Features: --disable-probation Disable support for probation of a new source --disable-jthread Disable support for JThread --disable-IPv6 Disable support for IPv6 - --disable-gst Disable support GStreamer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1807,7 +1806,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.3.0 + VERSION=3.4.0 cat >>confdefs.h <<_ACEOF @@ -1954,7 +1953,6 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" -RTP_SUPPORT_GST="// No GStreamer support" RTP_LINKLIBS="" if test "BLA$CXXFLAGS" = "BLA" ; then @@ -3679,7 +3677,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3682 "configure"' > conftest.$ac_ext + echo '#line 3680 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5258,7 +5256,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5261:" \ +echo "$as_me:5259:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6327,11 +6325,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6330: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6328: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6334: \$? = $ac_status" >&5 + echo "$as_me:6332: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6582,11 +6580,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6585: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6583: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6589: \$? = $ac_status" >&5 + echo "$as_me:6587: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6642,11 +6640,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6645: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6643: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6649: \$? = $ac_status" >&5 + echo "$as_me:6647: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8842,7 +8840,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11161: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11167: \$? = $ac_status" >&5 + echo "$as_me:11165: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11220,11 +11218,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11223: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11221: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11227: \$? = $ac_status" >&5 + echo "$as_me:11225: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12583,7 +12581,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13537: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13543: \$? = $ac_status" >&5 + echo "$as_me:13541: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13596,11 +13594,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13599: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13597: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13603: \$? = $ac_status" >&5 + echo "$as_me:13601: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15652,11 +15650,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15655: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15653: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15659: \$? = $ac_status" >&5 + echo "$as_me:15657: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15907,11 +15905,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15910: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15908: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15914: \$? = $ac_status" >&5 + echo "$as_me:15912: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15967,11 +15965,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15970: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15968: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15974: \$? = $ac_status" >&5 + echo "$as_me:15972: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18167,7 +18165,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking if types like u_int32_t exist... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking if types like uint32_t exist" >&5 +echo $ECHO_N "checking if types like uint32_t exist... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20444,12 +20442,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main () { - u_int32_t x; + uint32_t x; x = 0; ; return 0; @@ -20479,7 +20477,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "#include " >src/rtptypes_unix.h + echo -e "#include \n#include " >src/rtptypes_unix.h else echo "$as_me: failed program was:" >&5 @@ -20934,231 +20932,6 @@ if test $ac_cv_header_ifaddrs_h = yes; then RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS" fi - - - -# Check whether --enable-gst or --disable-gst was given. -if test "${enable_gst+set}" = set; then - enableval="$enable_gst" - - if test "$enableval" = yes ; then - gstsupport="yes" - else - gstsupport="no" - fi -else - - gstsupport="yes" - -fi; - -if test "$gstsupport" = "yes" ; then - - GST_REQ=0.9 - GST_MAJORMINOR=0.9 - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gstreamer-$GST_MAJORMINOR >= $GST_REQ" >&5 -echo $ECHO_N "checking for gstreamer-$GST_MAJORMINOR >= $GST_REQ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gstreamer-$GST_MAJORMINOR >= $GST_REQ" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GST_CFLAGS" >&5 -echo $ECHO_N "checking GST_CFLAGS... $ECHO_C" >&6 - GST_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` - echo "$as_me:$LINENO: result: $GST_CFLAGS" >&5 -echo "${ECHO_T}$GST_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GST_LIBS" >&5 -echo $ECHO_N "checking GST_LIBS... $ECHO_C" >&6 - GST_LIBS=`$PKG_CONFIG --libs "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` - echo "$as_me:$LINENO: result: $GST_LIBS" >&5 -echo "${ECHO_T}$GST_LIBS" >&6 - else - GST_CFLAGS="" - GST_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-$GST_MAJORMINOR >= $GST_REQ"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GST="yes" - else - HAVE_GST="no" - fi - - - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ" >&5 -echo $ECHO_N "checking for gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ... $ECHO_C" >&6 - - if $PKG_CONFIG --exists "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - succeeded=yes - - echo "$as_me:$LINENO: checking GST_PLUGINS_BASE_CFLAGS" >&5 -echo $ECHO_N "checking GST_PLUGINS_BASE_CFLAGS... $ECHO_C" >&6 - GST_PLUGINS_BASE_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` - echo "$as_me:$LINENO: result: $GST_PLUGINS_BASE_CFLAGS" >&5 -echo "${ECHO_T}$GST_PLUGINS_BASE_CFLAGS" >&6 - - echo "$as_me:$LINENO: checking GST_PLUGINS_BASE_LIBS" >&5 -echo $ECHO_N "checking GST_PLUGINS_BASE_LIBS... $ECHO_C" >&6 - GST_PLUGINS_BASE_LIBS=`$PKG_CONFIG --libs "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` - echo "$as_me:$LINENO: result: $GST_PLUGINS_BASE_LIBS" >&5 -echo "${ECHO_T}$GST_PLUGINS_BASE_LIBS" >&6 - else - GST_PLUGINS_BASE_CFLAGS="" - GST_PLUGINS_BASE_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GST_PLUGINS="yes" - else - HAVE_GST_PLUGINS="no" - fi - - - if test "x$HAVE_GST_PLUGINS" = "xyes" && test "x$HAVE_GST" = "xyes"; then - RTP_SUPPORT_GST="#define RTP_SUPPORT_GST" - GST_LIBS="$GST_LIBS -lgstnet-$GST_MAJORMINOR" - fi - - RTP_GSTINCLUDES="$GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS" - RTP_LINKLIBS="$RTP_LINKLIBS $GST_LIBS $GST_PLUGIN_BASE_LIBS" -fi - @@ -21922,11 +21695,6 @@ s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@GST_CFLAGS@,$GST_CFLAGS,;t t -s,@GST_LIBS@,$GST_LIBS,;t t -s,@GST_PLUGINS_BASE_CFLAGS@,$GST_PLUGINS_BASE_CFLAGS,;t t -s,@GST_PLUGINS_BASE_LIBS@,$GST_PLUGINS_BASE_LIBS,;t t s,@RTP_FILIO@,$RTP_FILIO,;t t s,@RTP_SOCKIO@,$RTP_SOCKIO,;t t s,@RTP_ENDIAN@,$RTP_ENDIAN,;t t @@ -21944,8 +21712,6 @@ s,@RTP_SUPPORT_GETLOGINR@,$RTP_SUPPORT_GETLOGINR,;t t s,@RTP_SUPPORT_IPV6@,$RTP_SUPPORT_IPV6,;t t s,@RTP_SUPPORT_IPV6MULTICAST@,$RTP_SUPPORT_IPV6MULTICAST,;t t s,@RTP_SUPPORT_IFADDRS@,$RTP_SUPPORT_IFADDRS,;t t -s,@RTP_SUPPORT_GST@,$RTP_SUPPORT_GST,;t t -s,@RTP_GSTINCLUDES@,$RTP_GSTINCLUDES,;t t s,@RTP_LINKLIBS@,$RTP_LINKLIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t diff --git a/configure.in b/configure.in index 31ccb95..7481ec4 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.3.0) +AM_INIT_AUTOMAKE(jrtplib,3.4.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -17,7 +17,6 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" -RTP_SUPPORT_GST="// No GStreamer support" RTP_LINKLIBS="" if test "BLA$CXXFLAGS" = "BLA" ; then @@ -282,13 +281,13 @@ dnl --------------------------------------------------------------------------- dnl Check for u_int32_t etc dnl --------------------------------------------------------------------------- -AC_MSG_CHECKING(if types like u_int32_t exist) +AC_MSG_CHECKING(if types like uint32_t exist) AC_TRY_COMPILE([ - #include ],[ - u_int32_t x; + #include ],[ + uint32_t x; x = 0;], [AC_MSG_RESULT(yes) - echo "#include " >src/rtptypes_unix.h + echo -e "#include \n#include " >src/rtptypes_unix.h ],[ AC_MSG_RESULT(no) echo "Generating src/rtptypes.h ..." @@ -436,40 +435,6 @@ dnl --------------------------------------------------------------------------- AC_CHECK_HEADER(ifaddrs.h,[RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS"]) -dnl --------------------------------------------------------------------------- -dnl Check gstreamer support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(gst,[ --disable-gst Disable support GStreamer],[ - if test "$enableval" = yes ; then - gstsupport="yes" - else - gstsupport="no" - fi],[ - gstsupport="yes" - ]) - -if test "$gstsupport" = "yes" ; then - - dnl uninstalled is selected preferentially -- see pkg-config(1) - GST_REQ=0.9 - GST_MAJORMINOR=0.9 - PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ, - HAVE_GST="yes", HAVE_GST="no") - - dnl check for gstreamer-plugins-base; uinstalled is selected preferentially - PKG_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ, - HAVE_GST_PLUGINS="yes", HAVE_GST_PLUGINS="no") - - if test "x$HAVE_GST_PLUGINS" = "xyes" && test "x$HAVE_GST" = "xyes"; then - RTP_SUPPORT_GST="#define RTP_SUPPORT_GST" - GST_LIBS="$GST_LIBS -lgstnet-$GST_MAJORMINOR" - fi - - RTP_GSTINCLUDES="$GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS" - RTP_LINKLIBS="$RTP_LINKLIBS $GST_LIBS $GST_PLUGIN_BASE_LIBS" -fi - dnl --------------------------------------------------------------------------- dnl Finish up... dnl --------------------------------------------------------------------------- @@ -491,8 +456,6 @@ AC_SUBST(RTP_SUPPORT_GETLOGINR) AC_SUBST(RTP_SUPPORT_IPV6) AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) AC_SUBST(RTP_SUPPORT_IFADDRS) -AC_SUBST(RTP_SUPPORT_GST) -AC_SUBST(RTP_GSTINCLUDES) AC_SUBST(RTP_LINKLIBS) AC_OUTPUT(Makefile \ src/Makefile \ diff --git a/doc/Makefile.in b/doc/Makefile.in index a2c3a6d..9a93485 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -75,10 +75,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -98,11 +94,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -110,7 +104,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index eeb940a..4031eff 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.3.0} +\newcommand{\jversion}{3.4.0} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{October 2, 2005\\\vspace{0.5cm}\ \\ + \date{January 19, 2006\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ @@ -111,7 +111,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.} - There are two reason for using this license. First, since this is the + There are two reasons for using this license. First, since this is the license of the 2.x series, it only seemed natural that this rewrite would contain the same license. Second, since the RTP protocol is deliberately incomplete RTP profiles can, for example, define additional @@ -510,12 +510,12 @@ The abstract class {\tt RTPTransmitter} specifies the interface for actual transmission components. Currently, three implementations exist: - an UDP over IPv4 transmitter, an UDP over IPv6 transmitter and a - GStreamer transmission component. The {\tt TransmissionProtocol} type + an UDP over IPv4 transmitter and an UDP over IPv6 transmitter. + The {\tt TransmissionProtocol} type is used to specify a specific kind of transmitter: \begin{verbatim} enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, - IPv4GSTProto, UserDefinedProto }; + UserDefinedProto }; \end{verbatim} The {\tt UserDefinedProto} can be used to select your own transmission component when using the {\tt RTPSession} class. In this case, you'll @@ -1994,6 +1994,12 @@ \item {\tt int SetMaximumPacketSize(size\_t maxpacksize)}\\ Sets the maximum size allowed size of an RTCP compound packet to {\tt maxpacksize}. + \item {\tt int SetPreTransmissionDelay(const RTPTime \&delay)}\\ + This function allows you to inform RTCP packet builder about the + delay between sampling the first sample of a packet and + sending the packet. This delay is taken into account when + calculating the relation between RTP timestamp and wallclock + time, used for inter-media synchronization. \item {\tt int BuildNextPacket(RTCPCompoundPacket **pack)}\\ Builds the next RTCP compound packet which should be sent and stores it in {\tt pack}. @@ -2420,6 +2426,12 @@ timestamp with the appropriate amount so that the next packets will still be played at the correct time at other hosts. + \item {\tt int SetPreTransmissionDelay(const RTPTime \&delay)}\\ + This function allows you to inform the library about the + delay between sampling the first sample of a packet and + sending the packet. This delay is taken into account when + calculating the relation between RTP timestamp and wallclock + time, used for inter-media synchronization. \item {\tt RTPTransmissionInfo *GetTransmissionInfo()}\\ This function returns an instance of a subclass of {\tt RTPTransmissionInfo} which will give some additional information about the transmitter diff --git a/examples/Makefile.am b/examples/Makefile.am index f758a3a..f3da73e 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -5,6 +5,6 @@ example2_SOURCES = example2.cpp example3_SOURCES = example3.cpp example4_SOURCES = example4.cpp -INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/ +INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ diff --git a/examples/Makefile.in b/examples/Makefile.in index ad58164..9b55a03 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -112,10 +112,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -135,11 +131,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -147,7 +141,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -208,7 +201,7 @@ example1_SOURCES = example1.cpp example2_SOURCES = example2.cpp example3_SOURCES = example3.cpp example4_SOURCES = example4.cpp -INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/ +INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ all: all-am diff --git a/examples/example1.cpp b/examples/example1.cpp index d3504aa..e0e2d15 100644 --- a/examples/example1.cpp +++ b/examples/example1.cpp @@ -46,8 +46,8 @@ int main(void) #endif // WIN32 RTPSession sess; - u_int16_t portbase,destport; - u_int32_t destip; + uint16_t portbase,destport; + uint32_t destip; std::string ipstr; int status,i,num; diff --git a/examples/example2.cpp b/examples/example2.cpp index 1a944db..a682c1f 100644 --- a/examples/example2.cpp +++ b/examples/example2.cpp @@ -29,7 +29,7 @@ int main(void) exit(-1); } - u_int8_t localip[]={127,0,0,1}; + uint8_t localip[]={127,0,0,1}; RTPIPv4Address addr(localip,9000); status = session.AddDestination(addr); @@ -43,7 +43,7 @@ int main(void) session.SetDefaultMark(false); session.SetDefaultTimestampIncrement(160); - u_int8_t silencebuffer[160]; + uint8_t silencebuffer[160]; for (int i = 0 ; i < 160 ; i++) silencebuffer[i] = 128; diff --git a/examples/example3.cpp b/examples/example3.cpp index fc462cf..53ee52e 100644 --- a/examples/example3.cpp +++ b/examples/example3.cpp @@ -47,8 +47,8 @@ class MyRTPSession : public RTPSession if (dat->IsOwnSSRC()) return; - u_int32_t ip; - u_int16_t port; + uint32_t ip; + uint16_t port; if (dat->GetRTPDataAddress() != 0) { @@ -58,7 +58,7 @@ class MyRTPSession : public RTPSession } else if (dat->GetRTCPDataAddress() != 0) { - const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTCPDataAddress()); ip = addr->GetIP(); port = addr->GetPort()-1; } @@ -78,8 +78,8 @@ class MyRTPSession : public RTPSession if (dat->IsOwnSSRC()) return; - u_int32_t ip; - u_int16_t port; + uint32_t ip; + uint16_t port; if (dat->GetRTPDataAddress() != 0) { @@ -89,7 +89,7 @@ class MyRTPSession : public RTPSession } else if (dat->GetRTCPDataAddress() != 0) { - const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTCPDataAddress()); ip = addr->GetIP(); port = addr->GetPort()-1; } @@ -111,8 +111,8 @@ class MyRTPSession : public RTPSession if (dat->ReceivedBYE()) return; - u_int32_t ip; - u_int16_t port; + uint32_t ip; + uint16_t port; if (dat->GetRTPDataAddress() != 0) { @@ -122,7 +122,7 @@ class MyRTPSession : public RTPSession } else if (dat->GetRTCPDataAddress() != 0) { - const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress()); + const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTCPDataAddress()); ip = addr->GetIP(); port = addr->GetPort()-1; } @@ -150,8 +150,8 @@ int main(void) #endif // WIN32 MyRTPSession sess; - u_int16_t portbase,destport; - u_int32_t destip; + uint16_t portbase,destport; + uint32_t destip; std::string ipstr; int status,i,num; diff --git a/examples/example4.cpp b/examples/example4.cpp index 41ae786..95a33ae 100644 --- a/examples/example4.cpp +++ b/examples/example4.cpp @@ -92,8 +92,8 @@ int main(void) #endif // WIN32 MyRTPSession sess; - u_int16_t portbase,destport; - u_int32_t destip; + uint16_t portbase,destport; + uint32_t destip; std::string ipstr; int status,i,num; diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index 518b0d2..f82f050 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -86,10 +86,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -109,11 +105,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -121,7 +115,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ diff --git a/src/Makefile.am b/src/Makefile.am index ef4e3b8..fe80219 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,8 +14,8 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - rtpgsttransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.3.0 @RTP_LINKLIBS@ + extratransmitters/rtpfaketransmitter.cpp +libjrtp_la_LDFLAGS = -release 3.4.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -29,8 +29,8 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ - rtpgsttransmitter.h + extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ +INCLUDES = @RTP_JTHREADINCLUDES@ diff --git a/src/Makefile.in b/src/Makefile.in index 749736e..3f8eef2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -69,7 +69,7 @@ am_libjrtp_la_OBJECTS = rtpdebug.lo rtpsession.lo rtperrors.lo \ rtcpcompoundpacketbuilder.lo rtprandom.lo rtcpscheduler.lo \ rtcppacketbuilder.lo rtpsessionsources.lo rtpcollisionlist.lo \ rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo \ - rtpgsttransmitter.lo + rtpfaketransmitter.lo libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -126,10 +126,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -149,11 +145,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -161,7 +155,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -234,9 +227,9 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - rtpgsttransmitter.cpp + extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.3.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.4.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -250,11 +243,11 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ - rtpgsttransmitter.h + extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ +INCLUDES = @RTP_JTHREADINCLUDES@ all: all-am .SUFFIXES: @@ -340,7 +333,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpcollisionlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpdebug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtperrors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpgsttransmitter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpfaketransmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpinternalsourcedata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv4address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv6address.Plo@am__quote@ @@ -379,6 +372,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +rtpfaketransmitter.lo: extratransmitters/rtpfaketransmitter.cpp +@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rtpfaketransmitter.lo -MD -MP -MF "$(DEPDIR)/rtpfaketransmitter.Tpo" -c -o rtpfaketransmitter.lo `test -f 'extratransmitters/rtpfaketransmitter.cpp' || echo '$(srcdir)/'`extratransmitters/rtpfaketransmitter.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/rtpfaketransmitter.Tpo" "$(DEPDIR)/rtpfaketransmitter.Plo"; else rm -f "$(DEPDIR)/rtpfaketransmitter.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='extratransmitters/rtpfaketransmitter.cpp' object='rtpfaketransmitter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rtpfaketransmitter.lo `test -f 'extratransmitters/rtpfaketransmitter.cpp' || echo '$(srcdir)/'`extratransmitters/rtpfaketransmitter.cpp + mostlyclean-libtool: -rm -f *.lo @@ -455,6 +455,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/extratransmitters @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/src/rtpgsttransmitter.cpp b/src/extratransmitters/rtpfaketransmitter.cpp similarity index 66% rename from src/rtpgsttransmitter.cpp rename to src/extratransmitters/rtpfaketransmitter.cpp index 4680a43..5c49574 100644 --- a/src/rtpgsttransmitter.cpp +++ b/src/extratransmitters/rtpfaketransmitter.cpp @@ -1,7 +1,17 @@ /* - This class allows for jrtp to send GstBuffers. Allows for integration of RTP - into gstreamer. + This class allows for jrtp to process packets without sending them out + anywhere. + The incoming messages are handed in to jrtp through the TransmissionParams + and can be retreived from jrtp through the normal polling mecanisms. + The outgoing RTP/RTCP packets are given to jrtp through the normal + session->SendPacket() and those packets are handed back out to the + client through a callback function (packet_ready_cb). + + example usage : Allows for integration of RTP into gstreamer. + + THIS HAS NOT BEEN TESTED WITH THREADS SO DON'T TRY + Copyright (c) 2005 Philippe Khalaf This file is a part of JRTPLIB @@ -34,9 +44,7 @@ */ -#include "rtpgsttransmitter.h" - -#ifdef RTP_SUPPORT_GST +#include "rtpfaketransmitter.h" #include "rtprawpacket.h" #include "rtpipv4address.h" @@ -60,19 +68,12 @@ #include "rtpdebug.h" -//GST_DEBUG_CATEGORY (gst_rtp_bin_debug); -//#define GST_CAT_DEFAULT (gst_rtp_bin_debug) +#define RTPFAKETRANS_MAXPACKSIZE 65535 +#define RTPFAKETRANS_IFREQBUFSIZE 8192 -#define RTPGSTv4TRANS_RTPRECEIVEBUFFER 32768 -#define RTPGSTv4TRANS_RTCPRECEIVEBUFFER 32768 -#define RTPGSTv4TRANS_RTPTRANSMITBUFFER 32768 -#define RTPGSTv4TRANS_RTCPTRANSMITBUFFER 32768 -#define RTPGSTv4TRANS_MAXPACKSIZE 65535 -#define RTPGSTv4TRANS_IFREQBUFSIZE 8192 +//#define RTPFAKETRANS_IS_MCASTADDR(x) (((x)&0xF0000000) == 0xE0000000) -//#define RTPGSTv4TRANS_IS_MCASTADDR(x) (((x)&0xF0000000) == 0xE0000000) - -/*#define RTPGSTv4TRANS_MCASTMEMBERSHIP(socket,type,mcastip,status) {\ +/*#define RTPFAKETRANS_MCASTMEMBERSHIP(socket,type,mcastip,status) {\ struct ip_mreq mreq;\ \ mreq.imr_multiaddr.s_addr = htonl(mcastip);\ @@ -80,8 +81,8 @@ status = setsockopt(socket,IPPROTO_IP,type,(const char *)&mreq,sizeof(struct ip_mreq));\ }*/ #ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPGSTv4TRANS_HASHSIZE; } - int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPGSTv4TRANS_HASHSIZE; } + int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } + int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPFAKETRANS_HASHSIZE; } #endif // !RTP_SUPPORT_INLINETEMPLATEPARAM #ifdef RTP_SUPPORT_THREAD @@ -96,21 +97,25 @@ #define WAITMUTEX_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPGSTv4Transmitter::RTPGSTv4Transmitter() +RTPFakeTransmitter::RTPFakeTransmitter() { created = false; init = false; } -RTPGSTv4Transmitter::~RTPGSTv4Transmitter() +RTPFakeTransmitter::~RTPFakeTransmitter() { Destroy(); } -int RTPGSTv4Transmitter::Init(bool tsafe) +int RTPFakeTransmitter::Init(bool tsafe) { if (init) - return ERR_RTP_GSTV4TRANS_ALREADYINIT; + return ERR_RTP_FAKETRANS_ALREADYINIT; + + // bomb out if trying to use threads + if (tsafe) + return ERR_RTP_NOTHREADSUPPORT; #ifdef RTP_SUPPORT_THREAD threadsafe = tsafe; @@ -120,10 +125,10 @@ int RTPGSTv4Transmitter::Init(bool tsafe) status = mainmutex.Init(); if (status < 0) - return ERR_RTP_GSTV4TRANS_CANTINITMUTEX; + return ERR_RTP_FAKETRANS_CANTINITMUTEX; status = waitmutex.Init(); if (status < 0) - return ERR_RTP_GSTV4TRANS_CANTINITMUTEX; + return ERR_RTP_FAKETRANS_CANTINITMUTEX; } #else if (tsafe) @@ -134,38 +139,38 @@ int RTPGSTv4Transmitter::Init(bool tsafe) return 0; } -int RTPGSTv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionParams *transparams) +int RTPFakeTransmitter::Create(size_t maximumpacketsize,const RTPTransmissionParams *transparams) { struct sockaddr_in addr; int status; if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_ALREADYCREATED; + return ERR_RTP_FAKETRANS_ALREADYCREATED; } // Obtain transmission parameters if (transparams == 0) - params = new RTPGSTv4TransmissionParams; + params = new RTPFakeTransmissionParams; else { - if (transparams->GetTransmissionProtocol() != RTPTransmitter::IPv4GSTProto) - return ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS; - params = (RTPGSTv4TransmissionParams *)transparams; + if (transparams->GetTransmissionProtocol() != RTPTransmitter::UserDefinedProto) + return ERR_RTP_FAKETRANS_ILLEGALPARAMETERS; + params = (RTPFakeTransmissionParams *)transparams; } // Check if portbase is even //if (params->GetPortbase()%2 != 0) //{ // MAINMUTEX_UNLOCK - // return ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN; + // return ERR_RTP_FAKETRANS_PORTBASENOTEVEN; //} // Try to obtain local IP addresses @@ -183,7 +188,7 @@ int RTPGSTv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa #ifdef RTPDEBUG std::cout << "Found these local IP addresses:" << std::endl; - std::list::const_iterator it; + std::list::const_iterator it; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { @@ -203,10 +208,10 @@ int RTPGSTv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa supportsmulticasting = false; //#endif // RTP_SUPPORT_IPV4MULTICAST - if (maximumpacketsize > RTPGSTv4TRANS_MAXPACKSIZE) + if (maximumpacketsize > RTPFAKETRANS_MAXPACKSIZE) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + return ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG; } maxpacksize = maximumpacketsize; @@ -227,7 +232,7 @@ int RTPGSTv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa return 0; } -void RTPGSTv4Transmitter::Destroy() +void RTPFakeTransmitter::Destroy() { if (!init) return; @@ -259,28 +264,28 @@ void RTPGSTv4Transmitter::Destroy() MAINMUTEX_UNLOCK } -RTPTransmissionInfo *RTPGSTv4Transmitter::GetTransmissionInfo() +RTPTransmissionInfo *RTPFakeTransmitter::GetTransmissionInfo() { if (!init) return 0; MAINMUTEX_LOCK - RTPTransmissionInfo *tinf = new RTPGSTv4TransmissionInfo(localIPs, - params->GetGstRTPSrc(), params->GetGstRTPSrc(), params); + RTPTransmissionInfo *tinf = new RTPFakeTransmissionInfo(localIPs, + params); MAINMUTEX_UNLOCK return tinf; } -int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) +int RTPFakeTransmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (localhostname == 0) @@ -288,22 +293,22 @@ int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) if (localIPs.empty()) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOLOCALIPS; + return ERR_RTP_FAKETRANS_NOLOCALIPS; } - std::list::const_iterator it; + std::list::const_iterator it; std::list hostnames; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { struct hostent *he; - u_int8_t addr[4]; - u_int32_t ip = (*it); + uint8_t addr[4]; + uint32_t ip = (*it); - addr[0] = (u_int8_t)((ip>>24)&0xFF); - addr[1] = (u_int8_t)((ip>>16)&0xFF); - addr[2] = (u_int8_t)((ip>>8)&0xFF); - addr[3] = (u_int8_t)(ip&0xFF); + addr[0] = (uint8_t)((ip>>24)&0xFF); + addr[1] = (uint8_t)((ip>>16)&0xFF); + addr[2] = (uint8_t)((ip>>8)&0xFF); + addr[3] = (uint8_t)(ip&0xFF); he = gethostbyaddr((char *)addr,4,AF_INET); if (he != 0) { @@ -324,7 +329,7 @@ int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new u_int8_t [localhostnamelength+1]; + localhostname = new uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -338,18 +343,18 @@ int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) if (!found) // use an IP address { - u_int32_t ip; + uint32_t ip; int len; - char str[256]; + char str[16]; it = localIPs.begin(); ip = (*it); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); len = strlen(str); localhostnamelength = len; - localhostname = new u_int8_t [localhostnamelength + 1]; + localhostname = new uint8_t [localhostnamelength + 1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -374,7 +379,7 @@ int RTPGSTv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) return 0; } -bool RTPGSTv4Transmitter::ComesFromThisTransmitter(const RTPAddress *addr) +bool RTPFakeTransmitter::ComesFromThisTransmitter(const RTPAddress *addr) { if (!init) return false; @@ -390,7 +395,7 @@ bool RTPGSTv4Transmitter::ComesFromThisTransmitter(const RTPAddress *addr) { const RTPIPv4Address *addr2 = (const RTPIPv4Address *)addr; bool found = false; - std::list::const_iterator it; + std::list::const_iterator it; it = localIPs.begin(); while (!found && it != localIPs.end()) @@ -420,10 +425,10 @@ bool RTPGSTv4Transmitter::ComesFromThisTransmitter(const RTPAddress *addr) return v; } -int RTPGSTv4Transmitter::Poll() +int RTPFakeTransmitter::Poll() { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; int status; @@ -431,7 +436,7 @@ int RTPGSTv4Transmitter::Poll() if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } status = FakePoll(); // poll RTP socket params->SetCurrentData(NULL); @@ -439,10 +444,10 @@ int RTPGSTv4Transmitter::Poll() return status; } -int RTPGSTv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) +int RTPFakeTransmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) { /* if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -452,12 +457,12 @@ int RTPGSTv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavai if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (waitingfordata) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_ALREADYWAITING; + return ERR_RTP_FAKETRANS_ALREADYWAITING; } FD_ZERO(&fdset); @@ -478,7 +483,7 @@ int RTPGSTv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavai waitingfordata = false; MAINMUTEX_UNLOCK WAITMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_ERRORINSELECT; + return ERR_RTP_FAKETRANS_ERRORINSELECT; } MAINMUTEX_LOCK @@ -507,24 +512,24 @@ int RTPGSTv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavai MAINMUTEX_UNLOCK WAITMUTEX_UNLOCK return 0;*/ - return ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED; + return ERR_RTP_FAKETRANS_WAITNOTIMPLEMENTED; } -int RTPGSTv4Transmitter::AbortWait() +int RTPFakeTransmitter::AbortWait() { /* if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (!waitingfordata) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTWAITING; + return ERR_RTP_FAKETRANS_NOTWAITING; } AbortWaitInternal(); @@ -534,24 +539,22 @@ int RTPGSTv4Transmitter::AbortWait() return 0; } -int RTPGSTv4Transmitter::SendRTPData(const void *data,size_t len) +int RTPFakeTransmitter::SendRTPData(const void *data,size_t len) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK - GstNetBuffer *out_buf; - if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (len > maxpacksize) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + return ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG; } @@ -559,17 +562,10 @@ int RTPGSTv4Transmitter::SendRTPData(const void *data,size_t len) // send to each destination while (destinations.HasCurrentElement()) { - // create GstNetBuffer from data - out_buf = gst_netbuffer_new (); - GST_BUFFER_DATA (out_buf) = (guint8*)data; - GST_BUFFER_SIZE (out_buf) = len; - gst_netaddress_set_ip4_address (&out_buf->to, destinations.GetCurrentElement().GetIP_NBO(), - destinations.GetCurrentElement().GetRTPPort_NBO()); - GST_DEBUG("Sending RTP packet to ip %d port %d", destinations.GetCurrentElement().GetIP_NBO(), - destinations.GetCurrentElement().GetRTPPort_NBO()); - - // push data - gst_pad_push( params->GetGstRTPSrc(), GST_BUFFER(out_buf) ); + (*params->GetPacketReadyCB())((uint8_t*)data, len, + destinations.GetCurrentElement().GetIP_NBO(), + destinations.GetCurrentElement().GetRTPPort_NBO(), + 1); destinations.GotoNextElement(); } @@ -578,46 +574,32 @@ int RTPGSTv4Transmitter::SendRTPData(const void *data,size_t len) return 0; } -int RTPGSTv4Transmitter::SendRTCPData(const void *data,size_t len) +int RTPFakeTransmitter::SendRTCPData(const void *data,size_t len) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; - // if it's NULL we dont want to transmit RTCPs - if (params->GetGstRTCPSrc() == NULL) - { - return 0; - } - MAINMUTEX_LOCK - GstNetBuffer *out_buf; - if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (len > maxpacksize) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + return ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG; } destinations.GotoFirstElement(); // send to each destination while (destinations.HasCurrentElement()) { - // create GstNetBuffer from data - out_buf = gst_netbuffer_new (); - GST_BUFFER_DATA (out_buf) = (guint8 *)data; - GST_BUFFER_SIZE (out_buf) = len; - gst_netaddress_set_ip4_address (&out_buf->to, destinations.GetCurrentElement().GetIP_NBO(), - destinations.GetCurrentElement().GetRTCPPort_NBO()); - GST_DEBUG("Sending RTCP packet"); - - // push data - gst_pad_push( params->GetGstRTCPSrc(), GST_BUFFER(out_buf) ); + (*params->GetPacketReadyCB())((uint8_t*)data, len, + destinations.GetCurrentElement().GetIP_NBO(), + destinations.GetCurrentElement().GetRTCPPort_NBO(), + 0); destinations.GotoNextElement(); } @@ -626,7 +608,7 @@ int RTPGSTv4Transmitter::SendRTCPData(const void *data,size_t len) return 0; } -void RTPGSTv4Transmitter::ResetPacketCount() +void RTPFakeTransmitter::ResetPacketCount() { if (!init) return; @@ -640,14 +622,14 @@ void RTPGSTv4Transmitter::ResetPacketCount() MAINMUTEX_UNLOCK } -u_int32_t RTPGSTv4Transmitter::GetNumRTPPacketsSent() +uint32_t RTPFakeTransmitter::GetNumRTPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -659,14 +641,14 @@ u_int32_t RTPGSTv4Transmitter::GetNumRTPPacketsSent() return num; } -u_int32_t RTPGSTv4Transmitter::GetNumRTCPPacketsSent() +uint32_t RTPFakeTransmitter::GetNumRTCPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -678,22 +660,22 @@ u_int32_t RTPGSTv4Transmitter::GetNumRTCPPacketsSent() return num; } -int RTPGSTv4Transmitter::AddDestination(const RTPAddress &addr) +int RTPFakeTransmitter::AddDestination(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } RTPIPv4Address &address = (RTPIPv4Address &)addr; @@ -704,22 +686,22 @@ int RTPGSTv4Transmitter::AddDestination(const RTPAddress &addr) return status; } -int RTPGSTv4Transmitter::DeleteDestination(const RTPAddress &addr) +int RTPFakeTransmitter::DeleteDestination(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } RTPIPv4Address &address = (RTPIPv4Address &)addr; @@ -730,7 +712,7 @@ int RTPGSTv4Transmitter::DeleteDestination(const RTPAddress &addr) return status; } -void RTPGSTv4Transmitter::ClearDestinations() +void RTPFakeTransmitter::ClearDestinations() { if (!init) return; @@ -741,7 +723,7 @@ void RTPGSTv4Transmitter::ClearDestinations() MAINMUTEX_UNLOCK } -bool RTPGSTv4Transmitter::SupportsMulticasting() +bool RTPFakeTransmitter::SupportsMulticasting() { if (!init) return false; @@ -761,11 +743,11 @@ bool RTPGSTv4Transmitter::SupportsMulticasting() #ifdef RTP_SUPPORT_IPV4MULTICAST -int RTPGSTv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) +int RTPFakeTransmitter::JoinMulticastGroup(const RTPAddress &addr) { // hrrm wonder how will manage to get multicast info thru to the UDPSINK /* if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -774,52 +756,52 @@ int RTPGSTv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; - u_int32_t mcastIP = address.GetIP(); + uint32_t mcastIP = address.GetIP(); - if (!RTPGSTv4TRANS_IS_MCASTADDR(mcastIP)) + if (!RTPFakeTRANS_IS_MCASTADDR(mcastIP)) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS; + return ERR_RTP_FAKETRANS_NOTAMULTICASTADDRESS; } status = multicastgroups.AddElement(mcastIP); if (status >= 0) { - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_ADD_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtpsock,IP_ADD_MEMBERSHIP,mcastIP,status); if (status != 0) { multicastgroups.DeleteElement(mcastIP); MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP; + return ERR_RTP_FAKETRANS_COULDNTJOINMULTICASTGROUP; } - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_ADD_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtcpsock,IP_ADD_MEMBERSHIP,mcastIP,status); if (status != 0) { - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); multicastgroups.DeleteElement(mcastIP); MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP; + return ERR_RTP_FAKETRANS_COULDNTJOINMULTICASTGROUP; } } MAINMUTEX_UNLOCK return status;*/ - return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; + return ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT; } -int RTPGSTv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) +int RTPFakeTransmitter::LeaveMulticastGroup(const RTPAddress &addr) { /* if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -828,38 +810,38 @@ int RTPGSTv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; - u_int32_t mcastIP = address.GetIP(); + uint32_t mcastIP = address.GetIP(); - if (!RTPGSTv4TRANS_IS_MCASTADDR(mcastIP)) + if (!RTPFakeTRANS_IS_MCASTADDR(mcastIP)) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS; + return ERR_RTP_FAKETRANS_NOTAMULTICASTADDRESS; } status = multicastgroups.DeleteElement(mcastIP); if (status >= 0) { - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); status = 0; } MAINMUTEX_UNLOCK return status; */ - return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; + return ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT; } -void RTPGSTv4Transmitter::LeaveAllMulticastGroups() +void RTPFakeTransmitter::LeaveAllMulticastGroups() { /* if (!init) return; @@ -870,12 +852,12 @@ void RTPGSTv4Transmitter::LeaveAllMulticastGroups() multicastgroups.GotoFirstElement(); while (multicastgroups.HasCurrentElement()) { - u_int32_t mcastIP; + uint32_t mcastIP; int status = 0; mcastIP = multicastgroups.GetCurrentElement(); - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); - RTPGSTv4TRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtpsock,IP_DROP_MEMBERSHIP,mcastIP,status); + RTPFakeTRANS_MCASTMEMBERSHIP(rtcpsock,IP_DROP_MEMBERSHIP,mcastIP,status); multicastgroups.GotoNextElement(); } multicastgroups.Clear(); @@ -885,32 +867,32 @@ void RTPGSTv4Transmitter::LeaveAllMulticastGroups() #else // no multicast support -int RTPGSTv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) +int RTPFakeTransmitter::JoinMulticastGroup(const RTPAddress &addr) { - return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; + return ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT; } -int RTPGSTv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) +int RTPFakeTransmitter::LeaveMulticastGroup(const RTPAddress &addr) { - return ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT; + return ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT; } -void RTPGSTv4Transmitter::LeaveAllMulticastGroups() +void RTPFakeTransmitter::LeaveAllMulticastGroups() { } #endif // RTP_SUPPORT_IPV4MULTICAST -int RTPGSTv4Transmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) +int RTPFakeTransmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (m != receivemode) { @@ -921,10 +903,10 @@ int RTPGSTv4Transmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) return 0; } -int RTPGSTv4Transmitter::AddToIgnoreList(const RTPAddress &addr) +int RTPFakeTransmitter::AddToIgnoreList(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -933,17 +915,17 @@ int RTPGSTv4Transmitter::AddToIgnoreList(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } if (receivemode != RTPTransmitter::IgnoreSome) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + return ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; @@ -953,10 +935,10 @@ int RTPGSTv4Transmitter::AddToIgnoreList(const RTPAddress &addr) return status; } -int RTPGSTv4Transmitter::DeleteFromIgnoreList(const RTPAddress &addr) +int RTPFakeTransmitter::DeleteFromIgnoreList(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -965,17 +947,17 @@ int RTPGSTv4Transmitter::DeleteFromIgnoreList(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } if (receivemode != RTPTransmitter::IgnoreSome) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + return ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; @@ -985,7 +967,7 @@ int RTPGSTv4Transmitter::DeleteFromIgnoreList(const RTPAddress &addr) return status; } -void RTPGSTv4Transmitter::ClearIgnoreList() +void RTPFakeTransmitter::ClearIgnoreList() { if (!init) return; @@ -996,10 +978,10 @@ void RTPGSTv4Transmitter::ClearIgnoreList() MAINMUTEX_UNLOCK } -int RTPGSTv4Transmitter::AddToAcceptList(const RTPAddress &addr) +int RTPFakeTransmitter::AddToAcceptList(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -1008,17 +990,17 @@ int RTPGSTv4Transmitter::AddToAcceptList(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } if (receivemode != RTPTransmitter::AcceptSome) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + return ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; @@ -1028,10 +1010,10 @@ int RTPGSTv4Transmitter::AddToAcceptList(const RTPAddress &addr) return status; } -int RTPGSTv4Transmitter::DeleteFromAcceptList(const RTPAddress &addr) +int RTPFakeTransmitter::DeleteFromAcceptList(const RTPAddress &addr) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK @@ -1040,17 +1022,17 @@ int RTPGSTv4Transmitter::DeleteFromAcceptList(const RTPAddress &addr) if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } if (addr.GetAddressType() != RTPAddress::IPv4Address) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE; + return ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE; } if (receivemode != RTPTransmitter::AcceptSome) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE; + return ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE; } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; @@ -1060,7 +1042,7 @@ int RTPGSTv4Transmitter::DeleteFromAcceptList(const RTPAddress &addr) return status; } -void RTPGSTv4Transmitter::ClearAcceptList() +void RTPFakeTransmitter::ClearAcceptList() { if (!init) return; @@ -1071,28 +1053,28 @@ void RTPGSTv4Transmitter::ClearAcceptList() MAINMUTEX_UNLOCK } -int RTPGSTv4Transmitter::SetMaximumPacketSize(size_t s) +int RTPFakeTransmitter::SetMaximumPacketSize(size_t s) { if (!init) - return ERR_RTP_GSTV4TRANS_NOTINIT; + return ERR_RTP_FAKETRANS_NOTINIT; MAINMUTEX_LOCK if (!created) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_NOTCREATED; + return ERR_RTP_FAKETRANS_NOTCREATED; } - if (s > RTPGSTv4TRANS_MAXPACKSIZE) + if (s > RTPFAKETRANS_MAXPACKSIZE) { MAINMUTEX_UNLOCK - return ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG; + return ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG; } maxpacksize = s; MAINMUTEX_UNLOCK return 0; } -bool RTPGSTv4Transmitter::NewDataAvailable() +bool RTPFakeTransmitter::NewDataAvailable() { if (!init) return false; @@ -1115,7 +1097,7 @@ bool RTPGSTv4Transmitter::NewDataAvailable() return v; } -RTPRawPacket *RTPGSTv4Transmitter::GetNextPacket() +RTPRawPacket *RTPFakeTransmitter::GetNextPacket() { if (!init) return 0; @@ -1145,7 +1127,7 @@ RTPRawPacket *RTPGSTv4Transmitter::GetNextPacket() // Here the private functions start... #ifdef RTP_SUPPORT_IPV4MULTICAST -bool RTPGSTv4Transmitter::SetMulticastTTL(u_int8_t ttl) +bool RTPFakeTransmitter::SetMulticastTTL(uint8_t ttl) { /* int ttl2,status; @@ -1160,7 +1142,7 @@ bool RTPGSTv4Transmitter::SetMulticastTTL(u_int8_t ttl) } #endif // RTP_SUPPORT_IPV4MULTICAST -void RTPGSTv4Transmitter::FlushPackets() +void RTPFakeTransmitter::FlushPackets() { std::list::const_iterator it; @@ -1169,79 +1151,69 @@ void RTPGSTv4Transmitter::FlushPackets() rawpacketlist.clear(); } -int RTPGSTv4Transmitter::FakePoll() +int RTPFakeTransmitter::FakePoll() { - int recvlen; - GstNetBuffer *packetbuffer; + uint8_t *data = NULL; + int data_len = 0; + uint32_t sourceaddr; + uint16_t sourceport; + bool rtp; + bool acceptdata; RTPTime curtime = RTPTime::CurrentTime(); - packetbuffer = params->GetCurrentData(); - bool rtp = params->GetCurrentDataType(); + data = params->GetCurrentData(); + data_len = params->GetCurrentDataLen(); + rtp = params->GetCurrentDataType(); + sourceaddr = params->GetCurrentDataAddr(); + sourceport = params->GetCurrentDataPort(); // lets make sure we got something - if (packetbuffer == NULL ) + if (data == NULL || data_len <= 0) { - //GST_DEBUG("No packetbuffer to poll"); return 0; } - // should be a netbuffer - if (GST_IS_NETBUFFER (packetbuffer)) + + // let's make a RTPIPv4Address + RTPIPv4Address *addr = new RTPIPv4Address(sourceaddr, sourceport); + if (addr == 0) + { + return ERR_RTP_OUTOFMEM; + } + + // ok we got the src addr, now this should be the actual packet + uint8_t *datacopy; + datacopy = new uint8_t[data_len]; + if (datacopy == 0) + { + delete addr; + return ERR_RTP_OUTOFMEM; + } + memcpy(datacopy, data, data_len); + + // got data, process it + if (receivemode == RTPTransmitter::AcceptAll) + acceptdata = true; + else + acceptdata = ShouldAcceptData(addr->GetIP(),addr->GetPort()); + + if (acceptdata) { - guint16 senderport; - guint32 senderaddr; - // let's get the address from the netbuffer - gst_netaddress_get_ip4_address (&packetbuffer->from, &senderaddr, &senderport); - RTPIPv4Address *addr = new RTPIPv4Address(ntohl(senderaddr), ntohs(senderport)); - if (addr == 0) + // adding packet to queue + RTPRawPacket *pack; + + pack = new RTPRawPacket(datacopy,data_len,addr,curtime,rtp); + + if (pack == 0) { + delete addr; return ERR_RTP_OUTOFMEM; } - GST_DEBUG("Got netbuffer, saving src info %d %d", addr->GetIP(), addr->GetPort()); - // ok we got the src addr, now this should be the actual packet - recvlen = GST_BUFFER_SIZE(packetbuffer); - if (GST_BUFFER_DATA(packetbuffer) && recvlen > 0) - { - GST_DEBUG("Got packet %d", recvlen); - bool acceptdata; - - // got data, process it - if (receivemode == RTPTransmitter::AcceptAll) - acceptdata = true; - else - acceptdata = ShouldAcceptData(addr->GetIP(),addr->GetPort()); - - if (acceptdata) - { - GST_DEBUG("Adding packet to queue"); - RTPRawPacket *pack; - u_int8_t *datacopy; - - datacopy = new u_int8_t[recvlen]; - if (datacopy == 0) - { - delete addr; - return ERR_RTP_OUTOFMEM; - } - memcpy(datacopy, GST_BUFFER_DATA(packetbuffer),recvlen); - pack = new RTPRawPacket(datacopy,recvlen,addr,curtime,rtp); - - GST_DEBUG("lenght %d is RTP? %d", pack->GetDataLength(), pack->IsRTP()); - if (pack == 0) - { - delete addr; - delete [] datacopy; - return ERR_RTP_OUTOFMEM; - } - rawpacketlist.push_back(pack); - } - } - } else { - return ERR_RTP_GSTV4TRANS_NOTNETBUFFER; + rawpacketlist.push_back(pack); } return 0; } -int RTPGSTv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +int RTPFakeTransmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (acceptignoreinfo.HasCurrentElement()) // An entry for this IP address already exists @@ -1255,7 +1227,7 @@ int RTPGSTv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port } else if (!portinf->all) { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = portinf->portlist.begin(); end = portinf->portlist.end(); @@ -1289,7 +1261,7 @@ int RTPGSTv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port return 0; } -void RTPGSTv4Transmitter::ClearAcceptIgnoreInfo() +void RTPFakeTransmitter::ClearAcceptIgnoreInfo() { acceptignoreinfo.GotoFirstElement(); while (acceptignoreinfo.HasCurrentElement()) @@ -1303,11 +1275,11 @@ void RTPGSTv4Transmitter::ClearAcceptIgnoreInfo() acceptignoreinfo.Clear(); } -int RTPGSTv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +int RTPFakeTransmitter::ProcessDeleteAcceptIgnoreEntry(uint32_t ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (!acceptignoreinfo.HasCurrentElement()) - return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + return ERR_RTP_FAKETRANS_NOSUCHENTRY; PortInfo *inf; @@ -1322,20 +1294,20 @@ int RTPGSTv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t p if (inf->all) // currently, all ports are selected. Add the one to remove to the list { // we have to check if the list doesn't contain the port already - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); for (it = begin ; it != end ; it++) { if (*it == port) // already in list: this means we already deleted the entry - return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + return ERR_RTP_FAKETRANS_NOSUCHENTRY; } inf->portlist.push_front(port); } else // check if we can find the port in the list { - std::list::iterator it,begin,end; + std::list::iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1348,13 +1320,13 @@ int RTPGSTv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t p } } // didn't find it - return ERR_RTP_GSTV4TRANS_NOSUCHENTRY; + return ERR_RTP_FAKETRANS_NOSUCHENTRY; } } return 0; } -bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) +bool RTPFakeTransmitter::ShouldAcceptData(uint32_t srcip,uint16_t srcport) { if (receivemode == RTPTransmitter::AcceptSome) { @@ -1367,7 +1339,7 @@ bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // only accept the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1380,7 +1352,7 @@ bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) } else // accept all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1403,7 +1375,7 @@ bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // ignore the ports in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1416,7 +1388,7 @@ bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) } else // ignore all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1433,7 +1405,7 @@ bool RTPGSTv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) #ifdef WIN32 -int RTPGSTv4Transmitter::CreateAbortDescriptors() +int RTPFakeTransmitter::CreateAbortDescriptors() { // no need for these no more /* @@ -1443,14 +1415,14 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() listensock = socket(PF_INET,SOCK_STREAM,0); if (listensock == RTPSOCKERR) - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; memset(&addr,0,sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; if (bind(listensock,(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) { RTPCLOSE(listensock); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } memset(&addr,0,sizeof(struct sockaddr_in)); @@ -1458,7 +1430,7 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() if (getsockname(listensock,(struct sockaddr*)&addr,&size) != 0) { RTPCLOSE(listensock); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } unsigned short connectport = ntohs(addr.sin_port); @@ -1467,7 +1439,7 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() if (abortdesc[0] == RTPSOCKERR) { RTPCLOSE(listensock); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } memset(&addr,0,sizeof(struct sockaddr_in)); @@ -1476,14 +1448,14 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } if (listen(listensock,1) != 0) { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } memset(&addr,0,sizeof(struct sockaddr_in)); @@ -1495,7 +1467,7 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } memset(&addr,0,sizeof(struct sockaddr_in)); @@ -1505,7 +1477,7 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() { RTPCLOSE(listensock); RTPCLOSE(abortdesc[0]); - return ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS; + return ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS; } // okay, got the connection, close the listening socket @@ -1514,7 +1486,7 @@ int RTPGSTv4Transmitter::CreateAbortDescriptors() return 0;*/ } -void RTPGSTv4Transmitter::DestroyAbortDescriptors() +void RTPFakeTransmitter::DestroyAbortDescriptors() { // RTPCLOSE(abortdesc[0]); // RTPCLOSE(abortdesc[1]); @@ -1522,14 +1494,14 @@ void RTPGSTv4Transmitter::DestroyAbortDescriptors() #else // in a non winsock environment we can use pipes -int RTPGSTv4Transmitter::CreateAbortDescriptors() +int RTPFakeTransmitter::CreateAbortDescriptors() { // if (pipe(abortdesc) < 0) -// return ERR_RTP_GSTV4TRANS_CANTCREATEPIPE; +// return ERR_RTP_FAKETRANS_CANTCREATEPIPE; // return 0; } -void RTPGSTv4Transmitter::DestroyAbortDescriptors() +void RTPFakeTransmitter::DestroyAbortDescriptors() { // close(abortdesc[0]); // close(abortdesc[1]); @@ -1537,7 +1509,7 @@ void RTPGSTv4Transmitter::DestroyAbortDescriptors() #endif // WIN32 -int RTPGSTv4Transmitter::CreateLocalIPList() +int RTPFakeTransmitter::CreateLocalIPList() { // first try to obtain the list from the network interface info @@ -1552,7 +1524,7 @@ int RTPGSTv4Transmitter::CreateLocalIPList() //#ifdef WIN32 -bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() +bool RTPFakeTransmitter::GetLocalIPList_Interfaces() { // REMINDER: got to find out how to do this return false; @@ -1560,17 +1532,17 @@ bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() /* #else // use ioctl -bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() +bool RTPFakeTransmitter::GetLocalIPList_Interfaces() { int status; - char buffer[RTPGSTv4TRANS_IFREQBUFSIZE]; + char buffer[RTPFakeTRANS_IFREQBUFSIZE]; struct ifconf ifc; struct ifreq *ifr; struct sockaddr *sa; char *startptr,*endptr; int remlen; - ifc.ifc_len = RTPGSTv4TRANS_IFREQBUFSIZE; + ifc.ifc_len = RTPFakeTRANS_IFREQBUFSIZE; ifc.ifc_buf = buffer; status = ioctl(rtpsock,SIOCGIFCONF,&ifc); if (status < 0) @@ -1588,7 +1560,7 @@ bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() { if (sa->sa_len == sizeof(struct sockaddr_in) && sa->sa_family == PF_INET) { - u_int32_t ip; + uint32_t ip; struct sockaddr_in *addr = (struct sockaddr_in *)sa; ip = ntohl(addr->sin_addr.s_addr); @@ -1607,7 +1579,7 @@ bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() #else // don't have sa_len in struct sockaddr if (sa->sa_family == PF_INET) { - u_int32_t ip; + uint32_t ip; struct sockaddr_in *addr = (struct sockaddr_in *)sa; ip = ntohl(addr->sin_addr.s_addr); @@ -1626,11 +1598,11 @@ bool RTPGSTv4Transmitter::GetLocalIPList_Interfaces() #endif // WIN32 */ -void RTPGSTv4Transmitter::GetLocalIPList_DNS() +void RTPFakeTransmitter::GetLocalIPList_DNS() { struct hostent *he; char name[1024]; - u_int32_t ip; + uint32_t ip; bool done; int i,j; @@ -1651,14 +1623,14 @@ void RTPGSTv4Transmitter::GetLocalIPList_DNS() { ip = 0; for (j = 0 ; j < 4 ; j++) - ip |= ((u_int32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); + ip |= ((uint32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); localIPs.push_back(ip); i++; } } } -void RTPGSTv4Transmitter::AbortWaitInternal() +void RTPFakeTransmitter::AbortWaitInternal() { /*#ifdef WIN32 send(abortdesc[1],"*",1,0); @@ -1667,10 +1639,10 @@ void RTPGSTv4Transmitter::AbortWaitInternal() #endif // WIN32*/ } -void RTPGSTv4Transmitter::AddLoopbackAddress() +void RTPFakeTransmitter::AddLoopbackAddress() { - u_int32_t loopbackaddr = (((u_int32_t)127)<<24)|((u_int32_t)1); - std::list::const_iterator it; + uint32_t loopbackaddr = (((uint32_t)127)<<24)|((uint32_t)1); + std::list::const_iterator it; bool found = false; for (it = localIPs.begin() ; !found && it != localIPs.end() ; it++) @@ -1684,7 +1656,7 @@ void RTPGSTv4Transmitter::AddLoopbackAddress() } #ifdef RTPDEBUG -void RTPGSTv4Transmitter::Dump() +void RTPFakeTransmitter::Dump() { if (!init) std::cout << "Not initialized" << std::endl; @@ -1696,16 +1668,16 @@ void RTPGSTv4Transmitter::Dump() std::cout << "Not created" << std::endl; else { - char str[1024]; - u_int32_t ip; - std::list::const_iterator it; + char str[16]; + uint32_t ip; + std::list::const_iterator it; std::cout << "Portbase: " << params->GetPortbase() << std::endl; std::cout << "Local IP addresses:" << std::endl; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { ip = (*it); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; } // std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; @@ -1728,7 +1700,7 @@ void RTPGSTv4Transmitter::Dump() while(acceptignoreinfo.HasCurrentElement()) { ip = acceptignoreinfo.GetCurrentKey(); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); std::cout << " " << str << ": "; if (pinfo->all) @@ -1738,7 +1710,7 @@ void RTPGSTv4Transmitter::Dump() std::cout << ", except "; } - std::list::const_iterator it; + std::list::const_iterator it; for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) { @@ -1782,7 +1754,7 @@ void RTPGSTv4Transmitter::Dump() do { ip = multicastgroups.GetCurrentElement(); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; multicastgroups.GotoNextElement(); } while (multicastgroups.HasCurrentElement()); @@ -1801,6 +1773,3 @@ void RTPGSTv4Transmitter::Dump() } } #endif // RTPDEBUG - -#endif // RTP_SUPPORT_GST - diff --git a/src/extratransmitters/rtpfaketransmitter.h b/src/extratransmitters/rtpfaketransmitter.h new file mode 100644 index 0000000..8ca85a0 --- /dev/null +++ b/src/extratransmitters/rtpfaketransmitter.h @@ -0,0 +1,240 @@ +/* + + This class allows for jrtp to process packets without sending them out + anywhere. + The incoming messages are handed in to jrtp through the TransmissionParams + and can be retreived from jrtp through the normal polling mecanisms. + The outgoing RTP/RTCP packets are given to jrtp through the normal + session->SendPacket() and those packets are handed back out to the + client through a callback function (packet_ready_cb). + + example usage : Allows for integration of RTP into gstreamer. + + Copyright (c) 2005 Philippe Khalaf + + This file is a part of JRTPLIB + Copyright (c) 1999-2004 Jori Liesenborgs + + Contact: jori@lumumba.luc.ac.be + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair + Centrum" (http://www.luc.ac.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#ifndef RTPFAKETRANSMITTER_H + +#define RTPFAKETRANSMITTER_H + +#include "rtpconfig.h" + +#include "rtptransmitter.h" +#include "rtpipv4destination.h" +#include "rtphashtable.h" +#include "rtpkeyhashtable.h" +#include + +#ifdef RTP_SUPPORT_THREAD + #include +#endif // RTP_SUPPORT_THREAD + +#define RTPFAKETRANS_HASHSIZE 8317 +#define RTPFAKETRANS_DEFAULTPORTBASE 5000 + +// Definition of a callback that is called when a packet is ready for sending +// params (*data, data_len, dest_addr, dest_port, rtp [1 if rtp, 0 if rtcp]) +typedef void(*packet_ready_cb)(uint8_t*, uint16_t, uint32_t, uint16_t, int rtp); + +class RTPFakeTransmissionParams : public RTPTransmissionParams +{ +public: + RTPFakeTransmissionParams():RTPTransmissionParams(RTPTransmitter::UserDefinedProto) { portbase = RTPFAKETRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; currentdata = NULL;} + void SetBindIP(uint32_t ip) { bindIP = ip; } + void SetPortbase(uint16_t pbase) { portbase = pbase; } + void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } + void SetLocalIPList(std::list &iplist) { localIPs = iplist; } + void ClearLocalIPList() { localIPs.clear(); } + void SetCurrentData(uint8_t *data) { currentdata = data; } + void SetCurrentDataLen(uint16_t len) { currentdatalen = len; } + void SetCurrentDataAddr(uint32_t addr) { currentdataaddr = addr; } + void SetCurrentDataPort(uint16_t port) { currentdataport = port; } + void SetCurrentDataType(bool type) { currentdatatype = type; } + void SetPacketReadyCB(packet_ready_cb cb) { packetreadycb = cb; }; + uint32_t GetBindIP() const { return bindIP; } + uint16_t GetPortbase() const { return portbase; } + uint8_t GetMulticastTTL() const { return multicastTTL; } + const std::list &GetLocalIPList() const { return localIPs; } + uint8_t* GetCurrentData() const { return currentdata; } + uint16_t GetCurrentDataLen() const { return currentdatalen; } + uint32_t GetCurrentDataAddr() const { return currentdataaddr; } + uint16_t GetCurrentDataPort() const { return currentdataport; } + bool GetCurrentDataType() const { return currentdatatype; } + packet_ready_cb GetPacketReadyCB() const { return packetreadycb; } +private: + uint16_t portbase; + uint32_t bindIP; + std::list localIPs; + uint8_t multicastTTL; + uint8_t* currentdata; + uint16_t currentdatalen; + uint32_t currentdataaddr; + uint16_t currentdataport; + bool currentdatatype; + packet_ready_cb packetreadycb; +}; + +class RTPFakeTransmissionInfo : public RTPTransmissionInfo +{ +public: + RTPFakeTransmissionInfo(std::list iplist, + RTPFakeTransmissionParams *transparams) : + RTPTransmissionInfo(RTPTransmitter::UserDefinedProto) + { localIPlist = iplist; params = transparams; } + + ~RTPFakeTransmissionInfo() { } + std::list GetLocalIPList() const { return localIPlist; } + RTPFakeTransmissionParams* GetTransParams() { return params; } +private: + std::list localIPlist; + RTPFakeTransmissionParams *params; +}; + +#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM + inline int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } + inline int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPFAKETRANS_HASHSIZE; } +#else // No support for inline function as template parameter + int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); + int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k); +#endif // RTP_SUPPORT_INLINETEMPLATEPARAM + +#define RTPFAKETRANS_HEADERSIZE (20+8) + +class RTPFakeTransmitter : public RTPTransmitter +{ +public: + RTPFakeTransmitter(); + ~RTPFakeTransmitter(); + + int Init(bool treadsafe); + int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); + void Destroy(); + RTPTransmissionInfo *GetTransmissionInfo(); + + int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); + bool ComesFromThisTransmitter(const RTPAddress *addr); + size_t GetHeaderOverhead() { return RTPFAKETRANS_HEADERSIZE; } + + int Poll(); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); + int AbortWait(); + + int SendRTPData(const void *data,size_t len); + int SendRTCPData(const void *data,size_t len); + + void ResetPacketCount(); + uint32_t GetNumRTPPacketsSent(); + uint32_t GetNumRTCPPacketsSent(); + + int AddDestination(const RTPAddress &addr); + int DeleteDestination(const RTPAddress &addr); + void ClearDestinations(); + + bool SupportsMulticasting(); + int JoinMulticastGroup(const RTPAddress &addr); + int LeaveMulticastGroup(const RTPAddress &addr); + void LeaveAllMulticastGroups(); + + int SetReceiveMode(RTPTransmitter::ReceiveMode m); + int AddToIgnoreList(const RTPAddress &addr); + int DeleteFromIgnoreList(const RTPAddress &addr); + void ClearIgnoreList(); + int AddToAcceptList(const RTPAddress &addr); + int DeleteFromAcceptList(const RTPAddress &addr); + void ClearAcceptList(); + int SetMaximumPacketSize(size_t s); + + bool NewDataAvailable(); + RTPRawPacket *GetNextPacket(); +#ifdef RTPDEBUG + void Dump(); +#endif // RTPDEBUG +private: + int CreateLocalIPList(); + bool GetLocalIPList_Interfaces(); + void GetLocalIPList_DNS(); + void AddLoopbackAddress(); + void FlushPackets(); + int FakePoll(); + int ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port); + int ProcessDeleteAcceptIgnoreEntry(uint32_t ip,uint16_t port); +#ifdef RTP_SUPPORT_IPV4MULTICAST + bool SetMulticastTTL(uint8_t ttl); +#endif // RTP_SUPPORT_IPV4MULTICAST + bool ShouldAcceptData(uint32_t srcip,uint16_t srcport); + void ClearAcceptIgnoreInfo(); + + RTPFakeTransmissionParams *params; + bool init; + bool created; + bool waitingfordata; + std::list localIPs; + uint16_t portbase; + uint8_t multicastTTL; + RTPTransmitter::ReceiveMode receivemode; + + uint8_t *localhostname; + size_t localhostnamelength; + + RTPHashTable destinations; +#ifdef RTP_SUPPORT_IPV4MULTICAST +// RTPHashTable multicastgroups; +#endif // RTP_SUPPORT_IPV4MULTICAST + std::list rawpacketlist; + + bool supportsmulticasting; + size_t maxpacksize; + + class PortInfo + { + public: + PortInfo() { all = false; } + + bool all; + std::list portlist; + }; + + RTPKeyHashTable acceptignoreinfo; + + int CreateAbortDescriptors(); + void DestroyAbortDescriptors(); + void AbortWaitInternal(); +#ifdef RTP_SUPPORT_THREAD + JMutex mainmutex,waitmutex; + int threadsafe; +#endif // RTP_SUPPORT_THREAD + + uint32_t rtppackcount,rtcppackcount; +}; + +#endif // RTPFakeTRANSMITTER_H + diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index 5763b93..d76024b 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -38,7 +38,7 @@ #include "rtpdebug.h" -RTCPAPPPacket::RTCPAPPPacket(u_int8_t *data,size_t datalength) +RTCPAPPPacket::RTCPAPPPacket(uint8_t *data,size_t datalength) : RTCPPacket(APP,data,datalength) { knownformat = false; @@ -49,7 +49,7 @@ RTCPAPPPacket::RTCPAPPPacket(u_int8_t *data,size_t datalength) hdr = (RTCPCommonHeader *)data; if (hdr->padding) { - u_int8_t padcount = data[datalength-1]; + uint8_t padcount = data[datalength-1]; if ((padcount & 0x03) != 0) // not a multiple of four! (see rfc 3550 p 37) return; if (((size_t)padcount) >= len) @@ -57,9 +57,9 @@ RTCPAPPPacket::RTCPAPPPacket(u_int8_t *data,size_t datalength) len -= (size_t)padcount; } - if (len < (sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*2)) + if (len < (sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2)) return; - len -= (sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*2); + len -= (sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2); appdatalen = len; knownformat = true; } diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 4f3caf9..1019e74 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -46,13 +46,13 @@ class RTCPCompoundPacket; class RTCPAPPPacket : public RTCPPacket { public: - RTCPAPPPacket(u_int8_t *data,size_t datalen); + RTCPAPPPacket(uint8_t *data,size_t datalen); ~RTCPAPPPacket() { } - u_int8_t GetSubType() const; - u_int32_t GetSSRC() const; - u_int8_t *GetName(); // Note that the name always consists of 4 octets and is not null-terminated - u_int8_t *GetAPPData(); + uint8_t GetSubType() const; + uint32_t GetSSRC() const; + uint8_t *GetName(); // Note that the name always consists of 4 octets and is not null-terminated + uint8_t *GetAPPData(); size_t GetAPPDataLength() const; #ifdef RTPDEBUG void Dump(); @@ -61,7 +61,7 @@ class RTCPAPPPacket : public RTCPPacket size_t appdatalen; }; -inline u_int8_t RTCPAPPPacket::GetSubType() const +inline uint8_t RTCPAPPPacket::GetSubType() const { if (!knownformat) return 0; @@ -69,30 +69,30 @@ inline u_int8_t RTCPAPPPacket::GetSubType() const return hdr->count; } -inline u_int32_t RTCPAPPPacket::GetSSRC() const +inline uint32_t RTCPAPPPacket::GetSSRC() const { if (!knownformat) return 0; - u_int32_t *ssrc = (u_int32_t *)(data+sizeof(RTCPCommonHeader)); + uint32_t *ssrc = (uint32_t *)(data+sizeof(RTCPCommonHeader)); return ntohl(*ssrc); } -inline u_int8_t *RTCPAPPPacket::GetName() +inline uint8_t *RTCPAPPPacket::GetName() { if (!knownformat) return 0; - return (data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); + return (data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)); } -inline u_int8_t *RTCPAPPPacket::GetAPPData() +inline uint8_t *RTCPAPPPacket::GetAPPData() { if (!knownformat) return 0; if (appdatalen == 0) return 0; - return (data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*2); + return (data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2); } inline size_t RTCPAPPPacket::GetAPPDataLength() const diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index a3cc35a..708feb7 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -37,7 +37,7 @@ #include "rtpdebug.h" -RTCPBYEPacket::RTCPBYEPacket(u_int8_t *data,size_t datalength) +RTCPBYEPacket::RTCPBYEPacket(uint8_t *data,size_t datalength) : RTCPPacket(BYE,data,datalength) { knownformat = false; @@ -49,7 +49,7 @@ RTCPBYEPacket::RTCPBYEPacket(u_int8_t *data,size_t datalength) hdr = (RTCPCommonHeader *)data; if (hdr->padding) { - u_int8_t padcount = data[datalength-1]; + uint8_t padcount = data[datalength-1]; if ((padcount & 0x03) != 0) // not a multiple of four! (see rfc 3550 p 37) return; if (((size_t)padcount) >= len) @@ -57,12 +57,12 @@ RTCPBYEPacket::RTCPBYEPacket(u_int8_t *data,size_t datalength) len -= (size_t)padcount; } - size_t ssrclen = ((size_t)(hdr->count))*sizeof(u_int32_t) + sizeof(RTCPCommonHeader); + size_t ssrclen = ((size_t)(hdr->count))*sizeof(uint32_t) + sizeof(RTCPCommonHeader); if (ssrclen > len) return; if (ssrclen < len) // there's probably a reason for leaving { - u_int8_t *reasonlength = (data+ssrclen); + uint8_t *reasonlength = (data+ssrclen); size_t reaslen = (size_t)(*reasonlength); if (reaslen > (len-ssrclen-1)) return; diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 3ca6b68..6308116 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -46,14 +46,14 @@ class RTCPCompoundPacket; class RTCPBYEPacket : public RTCPPacket { public: - RTCPBYEPacket(u_int8_t *data,size_t datalen); + RTCPBYEPacket(uint8_t *data,size_t datalen); ~RTCPBYEPacket() { } int GetSSRCCount() const; - u_int32_t GetSSRC(int index) const; // note: no check is performed to see if index is valid! + uint32_t GetSSRC(int index) const; // note: no check is performed to see if index is valid! bool HasReasonForLeaving() const; size_t GetReasonLength() const; - u_int8_t *GetReasonData(); + uint8_t *GetReasonData(); #ifdef RTPDEBUG void Dump(); @@ -71,11 +71,11 @@ inline int RTCPBYEPacket::GetSSRCCount() const return (int)(hdr->count); } -inline u_int32_t RTCPBYEPacket::GetSSRC(int index) const +inline uint32_t RTCPBYEPacket::GetSSRC(int index) const { if (!knownformat) return 0; - u_int32_t *ssrc = (u_int32_t *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*index); + uint32_t *ssrc = (uint32_t *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)*index); return ntohl(*ssrc); } @@ -94,17 +94,17 @@ inline size_t RTCPBYEPacket::GetReasonLength() const return 0; if (reasonoffset == 0) return 0; - u_int8_t *reasonlen = (data+reasonoffset); + uint8_t *reasonlen = (data+reasonoffset); return (size_t)(*reasonlen); } -inline u_int8_t *RTCPBYEPacket::GetReasonData() +inline uint8_t *RTCPBYEPacket::GetReasonData() { if (!knownformat) return 0; if (reasonoffset == 0) return 0; - u_int8_t *reasonlen = (data+reasonoffset); + uint8_t *reasonlen = (data+reasonoffset); if ((*reasonlen) == 0) return 0; return (data+reasonoffset+1); diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index 7c63224..353274e 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -59,7 +59,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) return; } - u_int8_t *data = rawpack.GetData(); + uint8_t *data = rawpack.GetData(); size_t datalen = rawpack.GetDataLength(); bool first; @@ -98,7 +98,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) length = (size_t)ntohs(rtcphdr->length); length++; - length *= sizeof(u_int32_t); + length *= sizeof(uint32_t); if (length > datalen) // invalid length field { diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index 0c74e46..8a37f7d 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -52,7 +52,7 @@ class RTCPCompoundPacket virtual ~RTCPCompoundPacket(); int GetCreationError() { return error; } - u_int8_t *GetCompoundPacketData() { return compoundpacket; } + uint8_t *GetCompoundPacketData() { return compoundpacket; } size_t GetCompoundPacketLength() { return compoundpacketlength; } void GotoFirstPacket() { rtcppackit = rtcppacklist.begin(); } @@ -68,7 +68,7 @@ class RTCPCompoundPacket int error; - u_int8_t *compoundpacket; + uint8_t *compoundpacket; size_t compoundpacketlength; std::list rtcppacklist; diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index 3ec314a..af20da5 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -110,7 +110,7 @@ int RTCPCompoundPacketBuilder::InitBuild(void *externalbuffer,size_t buffersize) return ERR_RTP_RTCPCOMPPACKBUILDER_BUFFERSIZETOOSMALL; maximumpacketsize = buffersize; - buffer = (u_int8_t *)externalbuffer; + buffer = (uint8_t *)externalbuffer; external = true; byesize = 0; appsize = 0; @@ -119,8 +119,8 @@ int RTCPCompoundPacketBuilder::InitBuild(void *externalbuffer,size_t buffersize) return 0; } -int RTCPCompoundPacketBuilder::StartSenderReport(u_int32_t senderssrc,const RTPNTPTime &ntptimestamp,u_int32_t rtptimestamp, - u_int32_t packetcount,u_int32_t octetcount) +int RTCPCompoundPacketBuilder::StartSenderReport(uint32_t senderssrc,const RTPNTPTime &ntptimestamp,uint32_t rtptimestamp, + uint32_t packetcount,uint32_t octetcount) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -130,20 +130,20 @@ int RTCPCompoundPacketBuilder::StartSenderReport(u_int32_t senderssrc,const RTPN size_t totalsize = byesize+appsize+sdes.NeededBytes(); size_t sizeleft = maximumpacketsize-totalsize; - size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+sizeof(RTCPSenderReport); + size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)+sizeof(RTCPSenderReport); if (neededsize > sizeleft) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; // fill in some things - report.headerlength = sizeof(u_int32_t)+sizeof(RTCPSenderReport); + report.headerlength = sizeof(uint32_t)+sizeof(RTCPSenderReport); report.isSR = true; - u_int32_t *ssrc = (u_int32_t *)report.headerdata; + uint32_t *ssrc = (uint32_t *)report.headerdata; *ssrc = htonl(senderssrc); - RTCPSenderReport *sr = (RTCPSenderReport *)(report.headerdata + sizeof(u_int32_t)); + RTCPSenderReport *sr = (RTCPSenderReport *)(report.headerdata + sizeof(uint32_t)); sr->ntptime_msw = htonl(ntptimestamp.GetMSW()); sr->ntptime_lsw = htonl(ntptimestamp.GetLSW()); sr->rtptimestamp = htonl(rtptimestamp); @@ -153,7 +153,7 @@ int RTCPCompoundPacketBuilder::StartSenderReport(u_int32_t senderssrc,const RTPN return 0; } -int RTCPCompoundPacketBuilder::StartReceiverReport(u_int32_t senderssrc) +int RTCPCompoundPacketBuilder::StartReceiverReport(uint32_t senderssrc) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -162,24 +162,24 @@ int RTCPCompoundPacketBuilder::StartReceiverReport(u_int32_t senderssrc) size_t totalsize = byesize+appsize+sdes.NeededBytes(); size_t sizeleft = maximumpacketsize-totalsize; - size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(u_int32_t); + size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t); if (neededsize > sizeleft) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; // fill in some things - report.headerlength = sizeof(u_int32_t); + report.headerlength = sizeof(uint32_t); report.isSR = false; - u_int32_t *ssrc = (u_int32_t *)report.headerdata; + uint32_t *ssrc = (uint32_t *)report.headerdata; *ssrc = htonl(senderssrc); return 0; } -int RTCPCompoundPacketBuilder::AddReportBlock(u_int32_t ssrc,u_int8_t fractionlost,int32_t packetslost,u_int32_t exthighestseq, - u_int32_t jitter,u_int32_t lsr,u_int32_t dlsr) +int RTCPCompoundPacketBuilder::AddReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t packetslost,uint32_t exthighestseq, + uint32_t jitter,uint32_t lsr,uint32_t dlsr) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -192,19 +192,19 @@ int RTCPCompoundPacketBuilder::AddReportBlock(u_int32_t ssrc,u_int8_t fractionlo if ((totalothersize+reportsizewithextrablock) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - u_int8_t *buf = new u_int8_t[sizeof(RTCPReceiverReport)]; + uint8_t *buf = new uint8_t[sizeof(RTCPReceiverReport)]; if (buf == 0) return ERR_RTP_OUTOFMEM; RTCPReceiverReport *rr = (RTCPReceiverReport *)buf; - u_int32_t *packlost = (u_int32_t *)&packetslost; - u_int32_t packlost2 = (*packlost); + uint32_t *packlost = (uint32_t *)&packetslost; + uint32_t packlost2 = (*packlost); rr->ssrc = htonl(ssrc); rr->fractionlost = fractionlost; - rr->packetslost[2] = (u_int8_t)(packlost2&0xFF); - rr->packetslost[1] = (u_int8_t)((packlost2>>8)&0xFF); - rr->packetslost[0] = (u_int8_t)((packlost2>>16)&0xFF); + rr->packetslost[2] = (uint8_t)(packlost2&0xFF); + rr->packetslost[1] = (uint8_t)((packlost2>>8)&0xFF); + rr->packetslost[0] = (uint8_t)((packlost2>>16)&0xFF); rr->exthighseqnr = htonl(exthighestseq); rr->jitter = htonl(jitter); rr->lsr = htonl(lsr); @@ -214,7 +214,7 @@ int RTCPCompoundPacketBuilder::AddReportBlock(u_int32_t ssrc,u_int8_t fractionlo return 0; } -int RTCPCompoundPacketBuilder::AddSDESSource(u_int32_t ssrc) +int RTCPCompoundPacketBuilder::AddSDESSource(uint32_t ssrc) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -232,14 +232,14 @@ int RTCPCompoundPacketBuilder::AddSDESSource(u_int32_t ssrc) return 0; } -int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,const void *itemdata,u_int8_t itemlength) +int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,const void *itemdata,uint8_t itemlength) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; if (sdes.sdessources.empty()) return ERR_RTP_RTCPCOMPPACKBUILDER_NOCURRENTSOURCE; - u_int8_t itemid; + uint8_t itemid; switch(t) { @@ -274,10 +274,10 @@ int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,cons if ((sdessizewithextraitem+totalotherbytes) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - u_int8_t *buf; + uint8_t *buf; size_t len; - buf = new u_int8_t[sizeof(RTCPSDESHeader)+(size_t)itemlength]; + buf = new uint8_t[sizeof(RTCPSDESHeader)+(size_t)itemlength]; if (buf == 0) return ERR_RTP_OUTOFMEM; len = sizeof(RTCPSDESHeader)+(size_t)itemlength; @@ -294,8 +294,8 @@ int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,cons } #ifdef RTP_SUPPORT_SDESPRIV -int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,u_int8_t prefixlength,const void *valuedata, - u_int8_t valuelength) +int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,uint8_t prefixlength,const void *valuedata, + uint8_t valuelength) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -312,10 +312,10 @@ int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,u_int8_ if ((sdessizewithextraitem+totalotherbytes) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - u_int8_t *buf; + uint8_t *buf; size_t len; - buf = new u_int8_t[sizeof(RTCPSDESHeader)+itemlength]; + buf = new uint8_t[sizeof(RTCPSDESHeader)+itemlength]; if (buf == 0) return ERR_RTP_OUTOFMEM; len = sizeof(RTCPSDESHeader)+(size_t)itemlength; @@ -336,7 +336,7 @@ int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,u_int8_ } #endif // RTP_SUPPORT_SDESPRIV -int RTCPCompoundPacketBuilder::AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,const void *reasondata,u_int8_t reasonlength) +int RTCPCompoundPacketBuilder::AddBYEPacket(uint32_t *ssrcs,uint8_t numssrcs,const void *reasondata,uint8_t reasonlength) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -344,7 +344,7 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,c if (numssrcs > 31) return ERR_RTP_RTCPCOMPPACKBUILDER_TOOMANYSSRCS; - size_t packsize = sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*((size_t)numssrcs); + size_t packsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)*((size_t)numssrcs); size_t zerobytes = 0; if (reasonlength > 0) @@ -365,10 +365,10 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,c if ((totalotherbytes + packsize) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - u_int8_t *buf; + uint8_t *buf; size_t numwords; - buf = new u_int8_t[packsize]; + buf = new uint8_t[packsize]; if (buf == 0) return ERR_RTP_OUTOFMEM; @@ -378,19 +378,19 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,c hdr->padding = 0; hdr->count = numssrcs; - numwords = packsize/sizeof(u_int32_t); - hdr->length = htons((u_int16_t)(numwords-1)); + numwords = packsize/sizeof(uint32_t); + hdr->length = htons((uint16_t)(numwords-1)); hdr->packettype = RTP_RTCPTYPE_BYE; - u_int32_t *sources = (u_int32_t *)(buf+sizeof(RTCPCommonHeader)); - u_int8_t srcindex; + uint32_t *sources = (uint32_t *)(buf+sizeof(RTCPCommonHeader)); + uint8_t srcindex; for (srcindex = 0 ; srcindex < numssrcs ; srcindex++) sources[srcindex] = htonl(ssrcs[srcindex]); if (reasonlength != 0) { - size_t offset = sizeof(RTCPCommonHeader)+((size_t)numssrcs)*sizeof(u_int32_t); + size_t offset = sizeof(RTCPCommonHeader)+((size_t)numssrcs)*sizeof(uint32_t); buf[offset] = reasonlength; memcpy((buf+offset+1),reasondata,(size_t)reasonlength); @@ -404,7 +404,7 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,c return 0; } -int RTCPCompoundPacketBuilder::AddAPPPacket(u_int8_t subtype,u_int32_t ssrc,const u_int8_t name[4],const void *appdata,size_t appdatalen) +int RTCPCompoundPacketBuilder::AddAPPPacket(uint8_t subtype,uint32_t ssrc,const uint8_t name[4],const void *appdata,size_t appdatalen) { if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; @@ -418,15 +418,15 @@ int RTCPCompoundPacketBuilder::AddAPPPacket(u_int8_t subtype,u_int32_t ssrc,cons if ((appdatawords+2) > 65535) return ERR_RTP_RTCPCOMPPACKBUILDER_APPDATALENTOOBIG; - size_t packsize = sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*2+appdatalen; + size_t packsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2+appdatalen; size_t totalotherbytes = appsize+byesize+sdes.NeededBytes()+report.NeededBytes(); if ((totalotherbytes + packsize) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - u_int8_t *buf; + uint8_t *buf; - buf = new u_int8_t[packsize]; + buf = new uint8_t[packsize]; if (buf == 0) return ERR_RTP_OUTOFMEM; @@ -436,19 +436,19 @@ int RTCPCompoundPacketBuilder::AddAPPPacket(u_int8_t subtype,u_int32_t ssrc,cons hdr->padding = 0; hdr->count = subtype; - hdr->length = htons((u_int16_t)(appdatawords+2)); + hdr->length = htons((uint16_t)(appdatawords+2)); hdr->packettype = RTP_RTCPTYPE_APP; - u_int32_t *source = (u_int32_t *)(buf+sizeof(RTCPCommonHeader)); + uint32_t *source = (uint32_t *)(buf+sizeof(RTCPCommonHeader)); *source = htonl(ssrc); - buf[sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+0] = name[0]; - buf[sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+1] = name[1]; - buf[sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+2] = name[2]; - buf[sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+3] = name[3]; + buf[sizeof(RTCPCommonHeader)+sizeof(uint32_t)+0] = name[0]; + buf[sizeof(RTCPCommonHeader)+sizeof(uint32_t)+1] = name[1]; + buf[sizeof(RTCPCommonHeader)+sizeof(uint32_t)+2] = name[2]; + buf[sizeof(RTCPCommonHeader)+sizeof(uint32_t)+3] = name[3]; if (appdatalen > 0) - memcpy((buf+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)*2),appdata,appdatalen); + memcpy((buf+sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2),appdata,appdatalen); apppackets.push_back(Buffer(buf,packsize)); appsize += packsize; @@ -463,21 +463,21 @@ int RTCPCompoundPacketBuilder::EndBuild() if (report.headerlength == 0) return ERR_RTP_RTCPCOMPPACKBUILDER_NOREPORTPRESENT; - u_int8_t *buf; + uint8_t *buf; size_t len; len = appsize+byesize+report.NeededBytes()+sdes.NeededBytes(); if (!external) { - buf = new u_int8_t[len]; + buf = new uint8_t[len]; if (buf == 0) return ERR_RTP_OUTOFMEM; } else buf = buffer; - u_int8_t *curbuf = buf; + uint8_t *curbuf = buf; RTCPPacket *p; // first, we'll add all report info @@ -503,12 +503,12 @@ int RTCPCompoundPacketBuilder::EndBuild() else { hdr->packettype = RTP_RTCPTYPE_RR; - memcpy((curbuf+sizeof(RTCPCommonHeader)),report.headerdata,sizeof(u_int32_t)); - offset = sizeof(RTCPCommonHeader)+sizeof(u_int32_t); + memcpy((curbuf+sizeof(RTCPCommonHeader)),report.headerdata,sizeof(uint32_t)); + offset = sizeof(RTCPCommonHeader)+sizeof(uint32_t); } firstpacket = false; - u_int8_t count = 0; + uint8_t count = 0; while (it != report.reportblocks.end() && count < 31) { @@ -518,9 +518,9 @@ int RTCPCompoundPacketBuilder::EndBuild() it++; } - size_t numwords = offset/sizeof(u_int32_t); + size_t numwords = offset/sizeof(uint32_t); - hdr->length = htons((u_int16_t)(numwords-1)); + hdr->length = htons((uint16_t)(numwords-1)); hdr->count = count; // add entry in parent's list @@ -559,13 +559,13 @@ int RTCPCompoundPacketBuilder::EndBuild() hdr->padding = 0; hdr->packettype = RTP_RTCPTYPE_SDES; - u_int8_t sourcecount = 0; + uint8_t sourcecount = 0; while (sourceit != sdes.sdessources.end() && sourcecount < 31) { - u_int32_t *ssrc = (u_int32_t *)(curbuf+offset); + uint32_t *ssrc = (uint32_t *)(curbuf+offset); *ssrc = htonl((*sourceit)->ssrc); - offset += sizeof(u_int32_t); + offset += sizeof(uint32_t); std::list::const_iterator itemit,itemend; @@ -599,7 +599,7 @@ int RTCPCompoundPacketBuilder::EndBuild() size_t numwords = offset/4; hdr->count = sourcecount; - hdr->length = htons((u_int16_t)(numwords-1)); + hdr->length = htons((uint16_t)(numwords-1)); p = new RTCPSDESPacket(curbuf,offset); if (p == 0) diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index dabdfc1..f611495 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -50,23 +50,23 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket int InitBuild(size_t maxpacketsize); int InitBuild(void *externalbuffer,size_t buffersize); - int StartSenderReport(u_int32_t senderssrc,const RTPNTPTime &ntptimestamp,u_int32_t rtptimestamp, - u_int32_t packetcount,u_int32_t octetcount); - int StartReceiverReport(u_int32_t senderssrc); - int AddReportBlock(u_int32_t ssrc,u_int8_t fractionlost,int32_t packetslost,u_int32_t exthighestseq, - u_int32_t jitter,u_int32_t lsr,u_int32_t dlsr); + int StartSenderReport(uint32_t senderssrc,const RTPNTPTime &ntptimestamp,uint32_t rtptimestamp, + uint32_t packetcount,uint32_t octetcount); + int StartReceiverReport(uint32_t senderssrc); + int AddReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t packetslost,uint32_t exthighestseq, + uint32_t jitter,uint32_t lsr,uint32_t dlsr); - int AddSDESSource(u_int32_t ssrc); - int AddSDESNormalItem(RTCPSDESPacket::ItemType t,const void *itemdata,u_int8_t itemlength); + int AddSDESSource(uint32_t ssrc); + int AddSDESNormalItem(RTCPSDESPacket::ItemType t,const void *itemdata,uint8_t itemlength); #ifdef RTP_SUPPORT_SDESPRIV - int AddSDESPrivateItem(const void *prefixdata,u_int8_t prefixlength,const void *valuedata, - u_int8_t valuelength); + int AddSDESPrivateItem(const void *prefixdata,uint8_t prefixlength,const void *valuedata, + uint8_t valuelength); #endif // RTP_SUPPORT_SDESPRIV - int AddBYEPacket(u_int32_t *ssrcs,u_int8_t numssrcs,const void *reasondata,u_int8_t reasonlength); + int AddBYEPacket(uint32_t *ssrcs,uint8_t numssrcs,const void *reasondata,uint8_t reasonlength); // note: appdatalen must be a multiple of 4 (32 bits) ! - int AddAPPPacket(u_int8_t subtype,u_int32_t ssrc,const u_int8_t name[4],const void *appdata,size_t appdatalen); + int AddAPPPacket(uint8_t subtype,uint32_t ssrc,const uint8_t name[4],const void *appdata,size_t appdatalen); int EndBuild(); private: @@ -74,16 +74,16 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket { public: Buffer():packetdata(0),packetlength(0) { } - Buffer(u_int8_t *data,size_t len):packetdata(data),packetlength(len) { } + Buffer(uint8_t *data,size_t len):packetdata(data),packetlength(len) { } - u_int8_t *packetdata; + uint8_t *packetdata; size_t packetlength; }; class Report { public: - Report() { headerdata = (u_int8_t *)headerdata32; isSR = false; headerlength = 0; } + Report() { headerdata = (uint8_t *)headerdata32; isSR = false; headerlength = 0; } ~Report() { Clear(); } void Clear() @@ -114,7 +114,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket r = n%31; if (r != 0) d++; - x += d*(sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); /* header and SSRC */ + x += d*(sizeof(RTCPCommonHeader)+sizeof(uint32_t)); /* header and SSRC */ if (isSR) x += sizeof(RTCPSenderReport); } @@ -130,7 +130,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket r = n%31; if (r != 0) d++; - x += d*(sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); /* header and SSRC */ + x += d*(sizeof(RTCPCommonHeader)+sizeof(uint32_t)); /* header and SSRC */ if (isSR) x += sizeof(RTCPSenderReport); return x; @@ -138,8 +138,8 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket bool isSR; - u_int8_t *headerdata; - u_int32_t headerdata32[(sizeof(u_int32_t)+sizeof(RTCPSenderReport))/sizeof(u_int32_t)]; // either for ssrc and sender info or just ssrc + uint8_t *headerdata; + uint32_t headerdata32[(sizeof(uint32_t)+sizeof(RTCPSenderReport))/sizeof(uint32_t)]; // either for ssrc and sender info or just ssrc size_t headerlength; std::list reportblocks; }; @@ -147,7 +147,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket class SDESSource { public: - SDESSource(u_int32_t s) : ssrc(s),totalitemsize(0) { } + SDESSource(uint32_t s) : ssrc(s),totalitemsize(0) { } ~SDESSource() { std::list::const_iterator it; @@ -161,32 +161,32 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket { size_t x,r; x = totalitemsize + 1; // +1 for the 0 byte which terminates the item list - r = x%sizeof(u_int32_t); + r = x%sizeof(uint32_t); if (r != 0) - x += (sizeof(u_int32_t)-r); // make sure it ends on a 32 bit boundary - x += sizeof(u_int32_t); // for ssrc + x += (sizeof(uint32_t)-r); // make sure it ends on a 32 bit boundary + x += sizeof(uint32_t); // for ssrc return x; } - size_t NeededBytesWithExtraItem(u_int8_t itemdatalength) + size_t NeededBytesWithExtraItem(uint8_t itemdatalength) { size_t x,r; x = totalitemsize + sizeof(RTCPSDESHeader) + (size_t)itemdatalength + 1; - r = x%sizeof(u_int32_t); + r = x%sizeof(uint32_t); if (r != 0) - x += (sizeof(u_int32_t)-r); // make sure it ends on a 32 bit boundary - x += sizeof(u_int32_t); // for ssrc + x += (sizeof(uint32_t)-r); // make sure it ends on a 32 bit boundary + x += sizeof(uint32_t); // for ssrc return x; } - void AddItem(u_int8_t *buf,size_t len) + void AddItem(uint8_t *buf,size_t len) { Buffer b(buf,len); totalitemsize += len; items.push_back(b); } - u_int32_t ssrc; + uint32_t ssrc; std::list items; private: size_t totalitemsize; @@ -207,7 +207,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket sdessources.clear(); } - int AddSSRC(u_int32_t ssrc) + int AddSSRC(uint32_t ssrc) { SDESSource *s = new SDESSource(ssrc); if (s == 0) @@ -218,7 +218,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket return 0; } - int AddItem(u_int8_t *buf,size_t len) + int AddItem(uint8_t *buf,size_t len) { if (sdessources.empty()) return ERR_RTP_RTCPCOMPPACKBUILDER_NOCURRENTSOURCE; @@ -246,7 +246,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket return x; } - size_t NeededBytesWithExtraItem(u_int8_t itemdatalength) + size_t NeededBytesWithExtraItem(uint8_t itemdatalength) { std::list::const_iterator it; size_t x = 0; @@ -280,7 +280,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket x += (*it)->NeededBytes(); // for the extra source we'll need at least 8 bytes (ssrc and four 0 bytes) - x += sizeof(u_int32_t)*2; + x += sizeof(uint32_t)*2; n = sdessources.size() + 1; // also, the number of sources will increase d = n/31; @@ -297,7 +297,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket }; size_t maximumpacketsize; - u_int8_t *buffer; + uint8_t *buffer; bool external; bool arebuilding; diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 18eacb0..97abb50 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 2af82ef..c36b2ae 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -44,21 +44,21 @@ class RTCPPacket public: enum PacketType { SR,RR,SDES,BYE,APP,Unknown }; protected: - RTCPPacket(PacketType t,u_int8_t *d,size_t dlen) : data(d),datalen(dlen),packettype(t) { knownformat = false; } + RTCPPacket(PacketType t,uint8_t *d,size_t dlen) : data(d),datalen(dlen),packettype(t) { knownformat = false; } public: virtual ~RTCPPacket() { } bool IsKnownFormat() const { return knownformat; } PacketType GetPacketType() const { return packettype; } - u_int8_t *GetPacketData() { return data; } + uint8_t *GetPacketData() { return data; } size_t GetPacketLength() const { return datalen; } #ifdef RTPDEBUG virtual void Dump(); #endif // RTPDEBUG protected: - u_int8_t *data; + uint8_t *data; size_t datalen; bool knownformat; private: diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index 2eef558..8c22bbe 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -40,7 +40,7 @@ #include "rtpdebug.h" RTCPPacketBuilder::RTCPPacketBuilder(RTPSources &s,RTPPacketBuilder &pb) - : sources(s),rtppacketbuilder(pb),prevbuildtime(0,0) + : sources(s),rtppacketbuilder(pb),prevbuildtime(0,0),transmissiondelay(0,0) { init = false; #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -70,7 +70,7 @@ int RTCPPacketBuilder::Init(size_t maxpacksize,double tsunit,const void *cname,s int status; - if ((status = ownsdesinfo.SetCNAME((const u_int8_t *)cname,cnamelen)) < 0) + if ((status = ownsdesinfo.SetCNAME((const uint8_t *)cname,cnamelen)) < 0) return status; ClearAllSourceFlags(); @@ -83,6 +83,7 @@ int RTCPPacketBuilder::Init(size_t maxpacksize,double tsunit,const void *cname,s interval_note = -1; sdesbuildcount = 0; + transmissiondelay = RTPTime(0,0); firstpacket = true; processingsdes = false; @@ -126,20 +127,21 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) sender = true; } - u_int32_t ssrc = rtppacketbuilder.GetSSRC(); + uint32_t ssrc = rtppacketbuilder.GetSSRC(); RTPTime curtime = RTPTime::CurrentTime(); if (sender) { RTPTime rtppacktime = rtppacketbuilder.GetPacketTime(); - u_int32_t rtppacktimestamp = rtppacketbuilder.GetPacketTimestamp(); - u_int32_t packcount = rtppacketbuilder.GetPacketCount(); - u_int32_t octetcount = rtppacketbuilder.GetPayloadOctetCount(); + uint32_t rtppacktimestamp = rtppacketbuilder.GetPacketTimestamp(); + uint32_t packcount = rtppacketbuilder.GetPacketCount(); + uint32_t octetcount = rtppacketbuilder.GetPayloadOctetCount(); RTPTime diff = curtime; diff -= rtppacktime; + diff += transmissiondelay; // the sample being sampled at this very instant will need a larger timestamp - u_int32_t tsdiff = (u_int32_t)((diff.GetDouble()/timestampunit)+0.5); - u_int32_t rtptimestamp = rtppacktimestamp+tsdiff; + uint32_t tsdiff = (uint32_t)((diff.GetDouble()/timestampunit)+0.5); + uint32_t rtptimestamp = rtppacktimestamp+tsdiff; RTPNTPTime ntptimestamp = curtime.GetNTPTime(); if ((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) @@ -161,7 +163,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) } } - u_int8_t *owncname; + uint8_t *owncname; size_t owncnamelen; owncname = ownsdesinfo.GetCNAME(&owncnamelen); @@ -360,12 +362,12 @@ int RTCPPacketBuilder::FillInReportBlocks(RTCPCompoundPacketBuilder *rtcpcomppac } else { - u_int32_t rr_ssrc = srcdat->GetSSRC(); - u_int32_t num = srcdat->INF_GetNumPacketsReceivedInInterval(); - u_int32_t prevseq = srcdat->INF_GetSavedExtendedSequenceNumber(); - u_int32_t curseq = srcdat->INF_GetExtendedHighestSequenceNumber(); - u_int32_t expected = curseq-prevseq; - u_int8_t fraclost; + uint32_t rr_ssrc = srcdat->GetSSRC(); + uint32_t num = srcdat->INF_GetNumPacketsReceivedInInterval(); + uint32_t prevseq = srcdat->INF_GetSavedExtendedSequenceNumber(); + uint32_t curseq = srcdat->INF_GetExtendedHighestSequenceNumber(); + uint32_t expected = curseq-prevseq; + uint8_t fraclost; if (expected < num) // got duplicates fraclost = 0; @@ -373,18 +375,18 @@ int RTCPPacketBuilder::FillInReportBlocks(RTCPCompoundPacketBuilder *rtcpcomppac { double lost = (double)(expected-num); double frac = lost/((double)expected); - fraclost = (u_int8_t)(frac*256.0); + fraclost = (uint8_t)(frac*256.0); } expected = curseq-srcdat->INF_GetBaseSequenceNumber(); num = srcdat->INF_GetNumPacketsReceived(); - u_int32_t diff = expected-num; + uint32_t diff = expected-num; int32_t *packlost = (int32_t *)&diff; - u_int32_t jitter = srcdat->INF_GetJitter(); - u_int32_t lsr; - u_int32_t dlsr; + uint32_t jitter = srcdat->INF_GetJitter(); + uint32_t lsr; + uint32_t dlsr; if (!srcdat->SR_HasInfo()) { @@ -394,15 +396,15 @@ int RTCPPacketBuilder::FillInReportBlocks(RTCPCompoundPacketBuilder *rtcpcomppac else { RTPNTPTime srtime = srcdat->SR_GetNTPTimestamp(); - u_int32_t m = (srtime.GetMSW()&0xFFFF); - u_int32_t l = ((srtime.GetLSW()>>16)&0xFFFF); + uint32_t m = (srtime.GetMSW()&0xFFFF); + uint32_t l = ((srtime.GetLSW()>>16)&0xFFFF); lsr = ((m<<16)|l); RTPTime diff = curtime; diff -= srcdat->SR_GetReceiveTime(); double diff2 = diff.GetDouble(); diff2 *= 65536.0; - dlsr = (u_int32_t)diff2; + dlsr = (uint32_t)diff2; } status = rtcpcomppack->AddReportBlock(rr_ssrc,fraclost,*packlost,curseq,jitter,lsr,dlsr); @@ -498,7 +500,7 @@ int RTCPPacketBuilder::FillInReportBlocks(RTCPCompoundPacketBuilder *rtcpcomppac int RTCPPacketBuilder::FillInSDES(RTCPCompoundPacketBuilder *rtcpcomppack,bool *full,bool *processedall,int *added) { int status; - u_int8_t *data; + uint8_t *data; size_t datalen; *full = false; @@ -642,7 +644,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas return status; } - u_int32_t ssrc = rtppacketbuilder.GetSSRC(); + uint32_t ssrc = rtppacketbuilder.GetSSRC(); bool useSR = false; if (useSRifpossible) @@ -660,14 +662,14 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas { RTPTime curtime = RTPTime::CurrentTime(); RTPTime rtppacktime = rtppacketbuilder.GetPacketTime(); - u_int32_t rtppacktimestamp = rtppacketbuilder.GetPacketTimestamp(); - u_int32_t packcount = rtppacketbuilder.GetPacketCount(); - u_int32_t octetcount = rtppacketbuilder.GetPayloadOctetCount(); + uint32_t rtppacktimestamp = rtppacketbuilder.GetPacketTimestamp(); + uint32_t packcount = rtppacketbuilder.GetPacketCount(); + uint32_t octetcount = rtppacketbuilder.GetPayloadOctetCount(); RTPTime diff = curtime; diff -= rtppacktime; - u_int32_t tsdiff = (u_int32_t)((diff.GetDouble()/timestampunit)+0.5); - u_int32_t rtptimestamp = rtppacktimestamp+tsdiff; + uint32_t tsdiff = (uint32_t)((diff.GetDouble()/timestampunit)+0.5); + uint32_t rtptimestamp = rtppacktimestamp+tsdiff; RTPNTPTime ntptimestamp = curtime.GetNTPTime(); if ((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) @@ -689,7 +691,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas } } - u_int8_t *owncname; + uint8_t *owncname; size_t owncnamelen; owncname = ownsdesinfo.GetCNAME(&owncnamelen); @@ -709,11 +711,11 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas return status; } - u_int32_t ssrcs[1]; + uint32_t ssrcs[1]; ssrcs[0] = ssrc; - if ((status = rtcpcomppack->AddBYEPacket(ssrcs,1,(const u_int8_t *)reason,reasonlength)) < 0) + if ((status = rtcpcomppack->AddBYEPacket(ssrcs,1,(const uint8_t *)reason,reasonlength)) < 0) { delete rtcpcomppack; if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index bc0fbf7..c9b0f87 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -57,6 +57,7 @@ class RTCPPacketBuilder int SetTimestampUnit(double tsunit) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; if (tsunit < 0) return ERR_RTP_RTCPPACKETBUILDER_ILLEGALTIMESTAMPUNIT; timestampunit = tsunit; return 0; } int SetMaximumPacketSize(size_t maxpacksize) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; if (maxpacksize < RTP_MINPACKETSIZE) return ERR_RTP_RTCPPACKETBUILDER_ILLEGALMAXPACKSIZE; maxpacketsize = maxpacksize; return 0; } + int SetPreTransmissionDelay(const RTPTime &delay) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; transmissiondelay = delay; return 0; } int BuildNextPacket(RTCPCompoundPacket **pack); int BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength,bool useSRifpossible = true); @@ -67,12 +68,12 @@ class RTCPPacketBuilder void SetPhoneInterval(int count) { if (!init) return; interval_phone = count; } void SetToolInterval(int count) { if (!init) return; interval_tool = count; } void SetNoteInterval(int count) { if (!init) return; interval_note = count; } - int SetLocalName(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetName((const u_int8_t *)s,len); } - int SetLocalEMail(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetEMail((const u_int8_t *)s,len); } - int SetLocalLocation(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetLocation((const u_int8_t *)s,len); } - int SetLocalPhone(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetPhone((const u_int8_t *)s,len); } - int SetLocalTool(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetTool((const u_int8_t *)s,len); } - int SetLocalNote(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetNote((const u_int8_t *)s,len); } + int SetLocalName(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetName((const uint8_t *)s,len); } + int SetLocalEMail(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetEMail((const uint8_t *)s,len); } + int SetLocalLocation(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetLocation((const uint8_t *)s,len); } + int SetLocalPhone(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetPhone((const uint8_t *)s,len); } + int SetLocalTool(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetTool((const uint8_t *)s,len); } + int SetLocalNote(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetNote((const uint8_t *)s,len); } private: void ClearAllSourceFlags(); int FillInReportBlocks(RTCPCompoundPacketBuilder *pack,const RTPTime &curtime,int maxcount,bool *full,int *added,int *skipped,bool *atendoflist); @@ -86,7 +87,7 @@ class RTCPPacketBuilder size_t maxpacketsize; double timestampunit; bool firstpacket; - RTPTime prevbuildtime; + RTPTime prevbuildtime,transmissiondelay; class RTCPSDESInfoInternal : public RTCPSDESInfo { diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index 85c0d7e..caaf991 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -37,7 +37,7 @@ #include "rtpdebug.h" -RTCPRRPacket::RTCPRRPacket(u_int8_t *data,size_t datalength) +RTCPRRPacket::RTCPRRPacket(uint8_t *data,size_t datalength) : RTCPPacket(RR,data,datalength) { knownformat = false; @@ -49,7 +49,7 @@ RTCPRRPacket::RTCPRRPacket(u_int8_t *data,size_t datalength) hdr = (RTCPCommonHeader *)data; if (hdr->padding) { - u_int8_t padcount = data[datalength-1]; + uint8_t padcount = data[datalength-1]; if ((padcount & 0x03) != 0) // not a multiple of four! (see rfc 3550 p 37) return; if (((size_t)padcount) >= len) @@ -57,7 +57,7 @@ RTCPRRPacket::RTCPRRPacket(u_int8_t *data,size_t datalength) len -= (size_t)padcount; } - expectedlength = sizeof(RTCPCommonHeader)+sizeof(u_int32_t); + expectedlength = sizeof(RTCPCommonHeader)+sizeof(uint32_t); expectedlength += sizeof(RTCPReceiverReport)*((int)hdr->count); if (expectedlength != len) @@ -82,7 +82,7 @@ void RTCPRRPacket::Dump() { std::cout << " Report block " << i << std::endl; std::cout << " SSRC: " << GetSSRC(i) << std::endl; - std::cout << " Fraction lost: " << (u_int32_t)GetFractionLost(i) << std::endl; + std::cout << " Fraction lost: " << (uint32_t)GetFractionLost(i) << std::endl; std::cout << " Packets lost: " << GetLostPacketCount(i) << std::endl; std::cout << " Seq. nr.: " << GetExtendedHighestSequenceNumber(i) << std::endl; std::cout << " Jitter: " << GetJitter(i) << std::endl; diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 999bee7..5b76e8e 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -46,24 +46,24 @@ class RTCPCompoundPacket; class RTCPRRPacket : public RTCPPacket { public: - RTCPRRPacket(u_int8_t *data,size_t datalen); + RTCPRRPacket(uint8_t *data,size_t datalen); ~RTCPRRPacket() { } // Sender info - u_int32_t GetSenderSSRC() const; + uint32_t GetSenderSSRC() const; // Reportblocks int GetReceptionReportCount() const; // Note: the validity of index is NOT checked! - u_int32_t GetSSRC(int index) const; - u_int8_t GetFractionLost(int index) const; + uint32_t GetSSRC(int index) const; + uint8_t GetFractionLost(int index) const; int32_t GetLostPacketCount(int index) const; - u_int32_t GetExtendedHighestSequenceNumber(int index) const; - u_int32_t GetJitter(int index) const; - u_int32_t GetLSR(int index) const; - u_int32_t GetDLSR(int index) const; + uint32_t GetExtendedHighestSequenceNumber(int index) const; + uint32_t GetJitter(int index) const; + uint32_t GetLSR(int index) const; + uint32_t GetDLSR(int index) const; #ifdef RTPDEBUG void Dump(); @@ -72,12 +72,12 @@ class RTCPRRPacket : public RTCPPacket RTCPReceiverReport *GotoReport(int index) const; }; -inline u_int32_t RTCPRRPacket::GetSenderSSRC() const +inline uint32_t RTCPRRPacket::GetSenderSSRC() const { if (!knownformat) return 0; - u_int32_t *ssrcptr = (u_int32_t *)(data+sizeof(RTCPCommonHeader)); + uint32_t *ssrcptr = (uint32_t *)(data+sizeof(RTCPCommonHeader)); return ntohl(*ssrcptr); } inline int RTCPRRPacket::GetReceptionReportCount() const @@ -90,11 +90,11 @@ inline int RTCPRRPacket::GetReceptionReportCount() const inline RTCPReceiverReport *RTCPRRPacket::GotoReport(int index) const { - RTCPReceiverReport *r = (RTCPReceiverReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+index*sizeof(RTCPReceiverReport)); + RTCPReceiverReport *r = (RTCPReceiverReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)+index*sizeof(RTCPReceiverReport)); return r; } -inline u_int32_t RTCPRRPacket::GetSSRC(int index) const +inline uint32_t RTCPRRPacket::GetSSRC(int index) const { if (!knownformat) return 0; @@ -102,7 +102,7 @@ inline u_int32_t RTCPRRPacket::GetSSRC(int index) const return ntohl(r->ssrc); } -inline u_int8_t RTCPRRPacket::GetFractionLost(int index) const +inline uint8_t RTCPRRPacket::GetFractionLost(int index) const { if (!knownformat) return 0; @@ -115,14 +115,14 @@ inline int32_t RTCPRRPacket::GetLostPacketCount(int index) const if (!knownformat) return 0; RTCPReceiverReport *r = GotoReport(index); - u_int32_t count = ((u_int32_t)r->packetslost[2])|(((u_int32_t)r->packetslost[1])<<8)|(((u_int32_t)r->packetslost[0])<<16); + uint32_t count = ((uint32_t)r->packetslost[2])|(((uint32_t)r->packetslost[1])<<8)|(((uint32_t)r->packetslost[0])<<16); if ((count&0x00800000) != 0) // test for negative number count |= 0xFF000000; int32_t *count2 = (int32_t *)(&count); return (*count2); } -inline u_int32_t RTCPRRPacket::GetExtendedHighestSequenceNumber(int index) const +inline uint32_t RTCPRRPacket::GetExtendedHighestSequenceNumber(int index) const { if (!knownformat) return 0; @@ -130,7 +130,7 @@ inline u_int32_t RTCPRRPacket::GetExtendedHighestSequenceNumber(int index) const return ntohl(r->exthighseqnr); } -inline u_int32_t RTCPRRPacket::GetJitter(int index) const +inline uint32_t RTCPRRPacket::GetJitter(int index) const { if (!knownformat) return 0; @@ -138,7 +138,7 @@ inline u_int32_t RTCPRRPacket::GetJitter(int index) const return ntohl(r->jitter); } -inline u_int32_t RTCPRRPacket::GetLSR(int index) const +inline uint32_t RTCPRRPacket::GetLSR(int index) const { if (!knownformat) return 0; @@ -146,7 +146,7 @@ inline u_int32_t RTCPRRPacket::GetLSR(int index) const return ntohl(r->lsr); } -inline u_int32_t RTCPRRPacket::GetDLSR(int index) const +inline uint32_t RTCPRRPacket::GetDLSR(int index) const { if (!knownformat) return 0; diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index 4a7e88e..9d71708 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index 0b9cf57..f02286a 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index cf601d8..ede99be 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -46,7 +46,7 @@ void RTCPSDESInfo::Clear() } #ifdef RTP_SUPPORT_SDESPRIV -int RTCPSDESInfo::SetPrivateValue(const u_int8_t *prefix,size_t prefixlen,const u_int8_t *value,size_t valuelen) +int RTCPSDESInfo::SetPrivateValue(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen) { std::list::const_iterator it; bool found; @@ -55,7 +55,7 @@ int RTCPSDESInfo::SetPrivateValue(const u_int8_t *prefix,size_t prefixlen,const it = privitems.begin(); while (!found && it != privitems.end()) { - u_int8_t *p; + uint8_t *p; size_t l; p = (*it)->GetPrefix(&l); @@ -96,7 +96,7 @@ int RTCPSDESInfo::SetPrivateValue(const u_int8_t *prefix,size_t prefixlen,const return item->SetInfo(value,valuelen); } -int RTCPSDESInfo::DeletePrivatePrefix(const u_int8_t *prefix,size_t prefixlen) +int RTCPSDESInfo::DeletePrivatePrefix(const uint8_t *prefix,size_t prefixlen) { std::list::iterator it; bool found; @@ -105,7 +105,7 @@ int RTCPSDESInfo::DeletePrivatePrefix(const u_int8_t *prefix,size_t prefixlen) it = privitems.begin(); while (!found && it != privitems.end()) { - u_int8_t *p; + uint8_t *p; size_t l; p = (*it)->GetPrefix(&l); @@ -134,7 +134,7 @@ void RTCPSDESInfo::GotoFirstPrivateValue() curitem = privitems.begin(); } -bool RTCPSDESInfo::GetNextPrivateValue(u_int8_t **prefix,size_t *prefixlen,u_int8_t **value,size_t *valuelen) +bool RTCPSDESInfo::GetNextPrivateValue(uint8_t **prefix,size_t *prefixlen,uint8_t **value,size_t *valuelen) { if (curitem == privitems.end()) return false; @@ -144,7 +144,7 @@ bool RTCPSDESInfo::GetNextPrivateValue(u_int8_t **prefix,size_t *prefixlen,u_int return true; } -bool RTCPSDESInfo::GetPrivateValue(const u_int8_t *prefix,size_t prefixlen,u_int8_t **value,size_t *valuelen) const +bool RTCPSDESInfo::GetPrivateValue(const uint8_t *prefix,size_t prefixlen,uint8_t **value,size_t *valuelen) const { std::list::const_iterator it; bool found; @@ -153,7 +153,7 @@ bool RTCPSDESInfo::GetPrivateValue(const u_int8_t *prefix,size_t prefixlen,u_int it = privitems.begin(); while (!found && it != privitems.end()) { - u_int8_t *p; + uint8_t *p; size_t l; p = (*it)->GetPrefix(&l); diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index b29e95b..648fc68 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -48,45 +48,45 @@ class RTCPSDESInfo virtual ~RTCPSDESInfo() { Clear(); } void Clear(); - int SetCNAME(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_CNAME-1,s,l); } - int SetName(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NAME-1,s,l); } - int SetEMail(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,s,l); } - int SetPhone(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_PHONE-1,s,l); } - int SetLocation(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,s,l); } - int SetTool(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_TOOL-1,s,l); } - int SetNote(const u_int8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NOTE-1,s,l); } + int SetCNAME(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_CNAME-1,s,l); } + int SetName(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NAME-1,s,l); } + int SetEMail(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,s,l); } + int SetPhone(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_PHONE-1,s,l); } + int SetLocation(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,s,l); } + int SetTool(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_TOOL-1,s,l); } + int SetNote(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NOTE-1,s,l); } #ifdef RTP_SUPPORT_SDESPRIV - int SetPrivateValue(const u_int8_t *prefix,size_t prefixlen,const u_int8_t *value,size_t valuelen); - int DeletePrivatePrefix(const u_int8_t *s,size_t len); + int SetPrivateValue(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen); + int DeletePrivatePrefix(const uint8_t *s,size_t len); #endif // RTP_SUPPORT_SDESPRIV - u_int8_t *GetCNAME(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_CNAME-1,len); } - u_int8_t *GetName(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NAME-1,len); } - u_int8_t *GetEMail(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,len); } - u_int8_t *GetPhone(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_PHONE-1,len); } - u_int8_t *GetLocation(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,len); } - u_int8_t *GetTool(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_TOOL-1,len); } - u_int8_t *GetNote(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NOTE-1,len); } + uint8_t *GetCNAME(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_CNAME-1,len); } + uint8_t *GetName(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NAME-1,len); } + uint8_t *GetEMail(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,len); } + uint8_t *GetPhone(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_PHONE-1,len); } + uint8_t *GetLocation(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,len); } + uint8_t *GetTool(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_TOOL-1,len); } + uint8_t *GetNote(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NOTE-1,len); } #ifdef RTP_SUPPORT_SDESPRIV void GotoFirstPrivateValue(); - bool GetNextPrivateValue(u_int8_t **prefix,size_t *prefixlen,u_int8_t **value,size_t *valuelen); - bool GetPrivateValue(const u_int8_t *prefix,size_t prefixlen,u_int8_t **value,size_t *valuelen) const; + bool GetNextPrivateValue(uint8_t **prefix,size_t *prefixlen,uint8_t **value,size_t *valuelen); + bool GetPrivateValue(const uint8_t *prefix,size_t prefixlen,uint8_t **value,size_t *valuelen) const; #endif // RTP_SUPPORT_SDESPRIV private: - int SetNonPrivateItem(int itemno,const u_int8_t *s,size_t l) { if (l > RTCP_SDES_MAXITEMLENGTH) return ERR_RTP_SDES_LENGTHTOOBIG; return nonprivateitems[itemno].SetInfo(s,l); } - u_int8_t *GetNonPrivateItem(int itemno,size_t *len) const { return nonprivateitems[itemno].GetInfo(len); } + int SetNonPrivateItem(int itemno,const uint8_t *s,size_t l) { if (l > RTCP_SDES_MAXITEMLENGTH) return ERR_RTP_SDES_LENGTHTOOBIG; return nonprivateitems[itemno].SetInfo(s,l); } + uint8_t *GetNonPrivateItem(int itemno,size_t *len) const { return nonprivateitems[itemno].GetInfo(len); } class SDESItem { public: SDESItem() { str = 0; length = 0; } ~SDESItem() { if (str) delete [] str; } - u_int8_t *GetInfo(size_t *len) const { *len = length; return str; } - int SetInfo(const u_int8_t *s,size_t len) { return SetString(&str,&length,s,len); } + uint8_t *GetInfo(size_t *len) const { *len = length; return str; } + int SetInfo(const uint8_t *s,size_t len) { return SetString(&str,&length,s,len); } protected: - static int SetString(u_int8_t **dest,size_t *destlen,const u_int8_t *s,size_t len) + static int SetString(uint8_t **dest,size_t *destlen,const uint8_t *s,size_t len) { if (len <= 0) { @@ -98,7 +98,7 @@ class RTCPSDESInfo else { len = (len>RTCP_SDES_MAXITEMLENGTH)?RTCP_SDES_MAXITEMLENGTH:len; - u_int8_t *str2 = new u_int8_t[len]; + uint8_t *str2 = new uint8_t[len]; if (str2 == 0) return ERR_RTP_OUTOFMEM; memcpy(str2,s,len); @@ -110,7 +110,7 @@ class RTCPSDESInfo return 0; } private: - u_int8_t *str; + uint8_t *str; size_t length; }; @@ -122,10 +122,10 @@ class RTCPSDESInfo public: SDESPrivateItem() { prefixlen = 0; prefix = 0; } ~SDESPrivateItem() { if (prefix) delete [] prefix; } - u_int8_t *GetPrefix(size_t *len) const { *len = prefixlen; return prefix; } - int SetPrefix(const u_int8_t *s,size_t len) { return SetString(&prefix,&prefixlen,s,len); } + uint8_t *GetPrefix(size_t *len) const { *len = prefixlen; return prefix; } + int SetPrefix(const uint8_t *s,size_t len) { return SetString(&prefix,&prefixlen,s,len); } private: - u_int8_t *prefix; + uint8_t *prefix; size_t prefixlen; }; diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index e005961..58a8187 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -37,7 +37,7 @@ #include "rtpdebug.h" -RTCPSDESPacket::RTCPSDESPacket(u_int8_t *data,size_t datalength) +RTCPSDESPacket::RTCPSDESPacket(uint8_t *data,size_t datalength) : RTCPPacket(SDES,data,datalength) { knownformat = false; @@ -50,7 +50,7 @@ RTCPSDESPacket::RTCPSDESPacket(u_int8_t *data,size_t datalength) if (hdr->padding) { - u_int8_t padcount = data[datalength-1]; + uint8_t padcount = data[datalength-1]; if ((padcount & 0x03) != 0) // not a multiple of four! (see rfc 3550 p 37) return; if (((size_t)padcount) >= len) @@ -66,7 +66,7 @@ RTCPSDESPacket::RTCPSDESPacket(u_int8_t *data,size_t datalength) else { int ssrccount = (int)(hdr->count); - u_int8_t *chunk; + uint8_t *chunk; int chunkoffset; if (len < sizeof(RTCPCommonHeader)) @@ -79,11 +79,11 @@ RTCPSDESPacket::RTCPSDESPacket(u_int8_t *data,size_t datalength) { chunkoffset = 0; - if (len < (sizeof(u_int32_t)*2)) // chunk must contain at least a SSRC identifier + if (len < (sizeof(uint32_t)*2)) // chunk must contain at least a SSRC identifier return; // and a (possibly empty) item - len -= sizeof(u_int32_t); - chunkoffset = sizeof(u_int32_t); + len -= sizeof(uint32_t); + chunkoffset = sizeof(uint32_t); bool done = false; while (!done) diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 2a2b330..bcc01da 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -49,7 +49,7 @@ class RTCPSDESPacket : public RTCPPacket public: enum ItemType { None,CNAME,NAME,EMAIL,PHONE,LOC,TOOL,NOTE,PRIV,Unknown }; - RTCPSDESPacket(u_int8_t *data,size_t datalen); + RTCPSDESPacket(uint8_t *data,size_t datalen); ~RTCPSDESPacket() { } int GetChunkCount() const; @@ -57,26 +57,26 @@ class RTCPSDESPacket : public RTCPPacket bool GotoFirstChunk(); bool GotoNextChunk(); - u_int32_t GetChunkSSRC() const; + uint32_t GetChunkSSRC() const; bool GotoFirstItem(); bool GotoNextItem(); ItemType GetItemType() const; size_t GetItemLength() const; - u_int8_t *GetItemData(); + uint8_t *GetItemData(); #ifdef RTP_SUPPORT_SDESPRIV size_t GetPRIVPrefixLength() const; - u_int8_t *GetPRIVPrefixData(); + uint8_t *GetPRIVPrefixData(); size_t GetPRIVValueLength() const; - u_int8_t *GetPRIVValueData(); + uint8_t *GetPRIVValueData(); #endif // RTP_SUPPORT_SDESPRIV #ifdef RTPDEBUG void Dump(); #endif // RTPDEBUG private: - u_int8_t *currentchunk; + uint8_t *currentchunk; int curchunknum; size_t itemoffset; }; @@ -98,7 +98,7 @@ inline bool RTCPSDESPacket::GotoFirstChunk() } currentchunk = data+sizeof(RTCPCommonHeader); curchunknum = 1; - itemoffset = sizeof(u_int32_t); + itemoffset = sizeof(uint32_t); return true; } @@ -111,8 +111,8 @@ inline bool RTCPSDESPacket::GotoNextChunk() if (curchunknum == GetChunkCount()) return false; - size_t offset = sizeof(u_int32_t); - RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+sizeof(u_int32_t)); + size_t offset = sizeof(uint32_t); + RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+sizeof(uint32_t)); while (sdeshdr->id != 0) { @@ -125,17 +125,17 @@ inline bool RTCPSDESPacket::GotoNextChunk() offset += (4-(offset&0x03)); currentchunk += offset; curchunknum++; - itemoffset = sizeof(u_int32_t); + itemoffset = sizeof(uint32_t); return true; } -inline u_int32_t RTCPSDESPacket::GetChunkSSRC() const +inline uint32_t RTCPSDESPacket::GetChunkSSRC() const { if (!knownformat) return 0; if (currentchunk == 0) return 0; - u_int32_t *ssrc = (u_int32_t *)currentchunk; + uint32_t *ssrc = (uint32_t *)currentchunk; return ntohl(*ssrc); } @@ -145,7 +145,7 @@ inline bool RTCPSDESPacket::GotoFirstItem() return false; if (currentchunk == 0) return false; - itemoffset = sizeof(u_int32_t); + itemoffset = sizeof(uint32_t); RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); if (sdeshdr->id == 0) return false; @@ -218,7 +218,7 @@ inline size_t RTCPSDESPacket::GetItemLength() const return (size_t)(sdeshdr->length); } -inline u_int8_t *RTCPSDESPacket::GetItemData() +inline uint8_t *RTCPSDESPacket::GetItemData() { if (!knownformat) return 0; @@ -242,14 +242,14 @@ inline size_t RTCPSDESPacket::GetPRIVPrefixLength() const return 0; if (sdeshdr->length == 0) return 0; - u_int8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); + uint8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); size_t prefixlength = (size_t)(*preflen); if (prefixlength > (size_t)((sdeshdr->length)-1)) return 0; return prefixlength; } -inline u_int8_t *RTCPSDESPacket::GetPRIVPrefixData() +inline uint8_t *RTCPSDESPacket::GetPRIVPrefixData() { if (!knownformat) return 0; @@ -260,7 +260,7 @@ inline u_int8_t *RTCPSDESPacket::GetPRIVPrefixData() return 0; if (sdeshdr->length == 0) return 0; - u_int8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); + uint8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); size_t prefixlength = (size_t)(*preflen); if (prefixlength > (size_t)((sdeshdr->length)-1)) return 0; @@ -280,14 +280,14 @@ inline size_t RTCPSDESPacket::GetPRIVValueLength() const return 0; if (sdeshdr->length == 0) return 0; - u_int8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); + uint8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); size_t prefixlength = (size_t)(*preflen); if (prefixlength > (size_t)((sdeshdr->length)-1)) return 0; return ((size_t)(sdeshdr->length))-prefixlength-1; } -inline u_int8_t *RTCPSDESPacket::GetPRIVValueData() +inline uint8_t *RTCPSDESPacket::GetPRIVValueData() { if (!knownformat) return 0; @@ -298,7 +298,7 @@ inline u_int8_t *RTCPSDESPacket::GetPRIVValueData() return 0; if (sdeshdr->length == 0) return 0; - u_int8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); + uint8_t *preflen = currentchunk+itemoffset+sizeof(RTCPSDESHeader); size_t prefixlength = (size_t)(*preflen); if (prefixlength > (size_t)((sdeshdr->length)-1)) return 0; diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index b6474ed..810b8ba 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -37,7 +37,7 @@ #include "rtpdebug.h" -RTCPSRPacket::RTCPSRPacket(u_int8_t *data,size_t datalength) +RTCPSRPacket::RTCPSRPacket(uint8_t *data,size_t datalength) : RTCPPacket(SR,data,datalength) { knownformat = false; @@ -49,7 +49,7 @@ RTCPSRPacket::RTCPSRPacket(u_int8_t *data,size_t datalength) hdr = (RTCPCommonHeader *)data; if (hdr->padding) { - u_int8_t padcount = data[datalength-1]; + uint8_t padcount = data[datalength-1]; if ((padcount & 0x03) != 0) // not a multiple of four! (see rfc 3550 p 37) return; if (((size_t)padcount) >= len) @@ -57,7 +57,7 @@ RTCPSRPacket::RTCPSRPacket(u_int8_t *data,size_t datalength) len -= (size_t)padcount; } - expectedlength = sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+sizeof(RTCPSenderReport); + expectedlength = sizeof(RTCPCommonHeader)+sizeof(uint32_t)+sizeof(RTCPSenderReport); expectedlength += sizeof(RTCPReceiverReport)*((int)hdr->count); if (expectedlength != len) @@ -88,7 +88,7 @@ void RTCPSRPacket::Dump() { std::cout << " Report block " << i << std::endl; std::cout << " SSRC: " << GetSSRC(i) << std::endl; - std::cout << " Fraction lost: " << (u_int32_t)GetFractionLost(i) << std::endl; + std::cout << " Fraction lost: " << (uint32_t)GetFractionLost(i) << std::endl; std::cout << " Packets lost: " << GetLostPacketCount(i) << std::endl; std::cout << " Seq. nr.: " << GetExtendedHighestSequenceNumber(i) << std::endl; std::cout << " Jitter: " << GetJitter(i) << std::endl; diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 6d9fb65..d4c4611 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -47,28 +47,28 @@ class RTCPCompoundPacket; class RTCPSRPacket : public RTCPPacket { public: - RTCPSRPacket(u_int8_t *data,size_t datalength); + RTCPSRPacket(uint8_t *data,size_t datalength); ~RTCPSRPacket() { } // Sender info - u_int32_t GetSenderSSRC() const; + uint32_t GetSenderSSRC() const; RTPNTPTime GetNTPTimestamp() const; - u_int32_t GetRTPTimestamp() const; - u_int32_t GetSenderPacketCount() const; - u_int32_t GetSenderOctetCount() const; + uint32_t GetRTPTimestamp() const; + uint32_t GetSenderPacketCount() const; + uint32_t GetSenderOctetCount() const; // Reportblocks int GetReceptionReportCount() const; // Note: the validity of index is NOT checked! - u_int32_t GetSSRC(int index) const; - u_int8_t GetFractionLost(int index) const; + uint32_t GetSSRC(int index) const; + uint8_t GetFractionLost(int index) const; int32_t GetLostPacketCount(int index) const; - u_int32_t GetExtendedHighestSequenceNumber(int index) const; - u_int32_t GetJitter(int index) const; - u_int32_t GetLSR(int index) const; - u_int32_t GetDLSR(int index) const; + uint32_t GetExtendedHighestSequenceNumber(int index) const; + uint32_t GetJitter(int index) const; + uint32_t GetLSR(int index) const; + uint32_t GetDLSR(int index) const; #ifdef RTPDEBUG void Dump(); @@ -77,12 +77,12 @@ class RTCPSRPacket : public RTCPPacket RTCPReceiverReport *GotoReport(int index) const; }; -inline u_int32_t RTCPSRPacket::GetSenderSSRC() const +inline uint32_t RTCPSRPacket::GetSenderSSRC() const { if (!knownformat) return 0; - u_int32_t *ssrcptr = (u_int32_t *)(data+sizeof(RTCPCommonHeader)); + uint32_t *ssrcptr = (uint32_t *)(data+sizeof(RTCPCommonHeader)); return ntohl(*ssrcptr); } @@ -91,31 +91,31 @@ inline RTPNTPTime RTCPSRPacket::GetNTPTimestamp() const if (!knownformat) return RTPNTPTime(0,0); - RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); + RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)); return RTPNTPTime(ntohl(sr->ntptime_msw),ntohl(sr->ntptime_lsw)); } -inline u_int32_t RTCPSRPacket::GetRTPTimestamp() const +inline uint32_t RTCPSRPacket::GetRTPTimestamp() const { if (!knownformat) return 0; - RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); + RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)); return ntohl(sr->rtptimestamp); } -inline u_int32_t RTCPSRPacket::GetSenderPacketCount() const +inline uint32_t RTCPSRPacket::GetSenderPacketCount() const { if (!knownformat) return 0; - RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); + RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)); return ntohl(sr->packetcount); } -inline u_int32_t RTCPSRPacket::GetSenderOctetCount() const +inline uint32_t RTCPSRPacket::GetSenderOctetCount() const { if (!knownformat) return 0; - RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)); + RTCPSenderReport *sr = (RTCPSenderReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)); return ntohl(sr->octetcount); } @@ -129,11 +129,11 @@ inline int RTCPSRPacket::GetReceptionReportCount() const inline RTCPReceiverReport *RTCPSRPacket::GotoReport(int index) const { - RTCPReceiverReport *r = (RTCPReceiverReport *)(data+sizeof(RTCPCommonHeader)+sizeof(u_int32_t)+sizeof(RTCPSenderReport)+index*sizeof(RTCPReceiverReport)); + RTCPReceiverReport *r = (RTCPReceiverReport *)(data+sizeof(RTCPCommonHeader)+sizeof(uint32_t)+sizeof(RTCPSenderReport)+index*sizeof(RTCPReceiverReport)); return r; } -inline u_int32_t RTCPSRPacket::GetSSRC(int index) const +inline uint32_t RTCPSRPacket::GetSSRC(int index) const { if (!knownformat) return 0; @@ -141,7 +141,7 @@ inline u_int32_t RTCPSRPacket::GetSSRC(int index) const return ntohl(r->ssrc); } -inline u_int8_t RTCPSRPacket::GetFractionLost(int index) const +inline uint8_t RTCPSRPacket::GetFractionLost(int index) const { if (!knownformat) return 0; @@ -154,14 +154,14 @@ inline int32_t RTCPSRPacket::GetLostPacketCount(int index) const if (!knownformat) return 0; RTCPReceiverReport *r = GotoReport(index); - u_int32_t count = ((u_int32_t)r->packetslost[2])|(((u_int32_t)r->packetslost[1])<<8)|(((u_int32_t)r->packetslost[0])<<16); + uint32_t count = ((uint32_t)r->packetslost[2])|(((uint32_t)r->packetslost[1])<<8)|(((uint32_t)r->packetslost[0])<<16); if ((count&0x00800000) != 0) // test for negative number count |= 0xFF000000; int32_t *count2 = (int32_t *)(&count); return (*count2); } -inline u_int32_t RTCPSRPacket::GetExtendedHighestSequenceNumber(int index) const +inline uint32_t RTCPSRPacket::GetExtendedHighestSequenceNumber(int index) const { if (!knownformat) return 0; @@ -169,7 +169,7 @@ inline u_int32_t RTCPSRPacket::GetExtendedHighestSequenceNumber(int index) const return ntohl(r->exthighseqnr); } -inline u_int32_t RTCPSRPacket::GetJitter(int index) const +inline uint32_t RTCPSRPacket::GetJitter(int index) const { if (!knownformat) return 0; @@ -177,7 +177,7 @@ inline u_int32_t RTCPSRPacket::GetJitter(int index) const return ntohl(r->jitter); } -inline u_int32_t RTCPSRPacket::GetLSR(int index) const +inline uint32_t RTCPSRPacket::GetLSR(int index) const { if (!knownformat) return 0; @@ -185,7 +185,7 @@ inline u_int32_t RTCPSRPacket::GetLSR(int index) const return ntohl(r->lsr); } -inline u_int32_t RTCPSRPacket::GetDLSR(int index) const +inline uint32_t RTCPSRPacket::GetDLSR(int index) const { if (!knownformat) return 0; diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index e24cda0..2deb637 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -42,7 +42,7 @@ class RTCPCompoundPacket; class RTCPUnknownPacket : public RTCPPacket { public: - RTCPUnknownPacket(u_int8_t *data,size_t datalen) : + RTCPUnknownPacket(uint8_t *data,size_t datalen) : RTCPPacket(Unknown,data,datalen) { // Since we don't expect a format, we'll trivially put knownformat = true diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 1e60c6b..4cf596b 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index 74ea538..77da3fa 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index cd038ae..48b1e32 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpconfig.h b/src/rtpconfig.h index 5a52ec4..6319104 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -40,6 +40,6 @@ #include "rtpconfig_unix.h" #endif // WIN32 -// #define RTPDEBUG +//#define RTPDEBUG #endif // RTPCONFIG_H diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index ef4fa63..905930d 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -66,7 +66,5 @@ @RTP_SUPPORT_IFADDRS@ -@RTP_SUPPORT_GST@ - #endif // RTPCONFIG_UNIX_H diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index 2088304..aecb5cc 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index 5d4d3ef..e4720da 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -175,3 +175,4 @@ void operator delete[](void *p) } #endif // RTPDEBUG + diff --git a/src/rtpdebug.h b/src/rtpdebug.h index 761d174..baa978e 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpdefines.h b/src/rtpdefines.h index e1a389b..e5fac7e 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index ec41428..2a4793e 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -169,38 +169,38 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL,"The hostname is larger than the specified buffer size"}, { ERR_RTP_SDES_MAXPRIVITEMS,"The maximum number of SDES private item prefixes was reached"}, { ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE,"An invalid probation type was specified"}, - { ERR_RTP_GSTV4TRANS_ALREADYCREATED, "The transmitter was already created"}, - { ERR_RTP_GSTV4TRANS_ALREADYINIT, "The transmitter was already initialize"}, - { ERR_RTP_GSTV4TRANS_ALREADYWAITING, "The transmitter is already waiting for incoming data"}, - { ERR_RTP_GSTV4TRANS_CANTBINDRTCPSOCKET, "The 'bind' call for the RTCP socket failed"}, - { ERR_RTP_GSTV4TRANS_CANTBINDRTPSOCKET, "The 'bind' call for the RTP socket failed"}, - { ERR_RTP_GSTV4TRANS_CANTCALCULATELOCALIP, "The local IP addresses could not be determined"}, - { ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS, "Couldn't create the sockets used to abort waiting for incoming data"}, - { ERR_RTP_GSTV4TRANS_CANTCREATEPIPE, "Couldn't create the pipe used to abort waiting for incoming data"}, - { ERR_RTP_GSTV4TRANS_CANTCREATESOCKET, "Couldn't create the RTP or RTCP socket"}, - { ERR_RTP_GSTV4TRANS_CANTINITMUTEX, "Failed to initialize a mutex used by the transmitter"}, - { ERR_RTP_GSTV4TRANS_CANTSETRTCPRECEIVEBUF, "Couldn't set the receive buffer size for the RTCP socket"}, - { ERR_RTP_GSTV4TRANS_CANTSETRTCPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTCP socket"}, - { ERR_RTP_GSTV4TRANS_CANTSETRTPRECEIVEBUF, "Couldn't set the receive buffer size for the RTP socket"}, - { ERR_RTP_GSTV4TRANS_CANTSETRTPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTP socket"}, - { ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP, "Unable to join the specified multicast group"}, - { ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE, "The function called doens't match the current receive mode"}, - { ERR_RTP_GSTV4TRANS_ERRORINSELECT, "Error in the transmitter's 'select' call"}, - { ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS, "Illegal parameters type passed to the transmitter"}, - { ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE, "Specified address type isn't compatible with this transmitter"}, - { ERR_RTP_GSTV4TRANS_NOLOCALIPS, "Couldn't determine the local host name since the local IP list is empty"}, - { ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT, "Multicast support is not available"}, - { ERR_RTP_GSTV4TRANS_NOSUCHENTRY, "Specified entry could not be found"}, - { ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS, "The specified address is not a multicast address"}, - { ERR_RTP_GSTV4TRANS_NOTCREATED, "The 'Create' call for this transmitter has not been called"}, - { ERR_RTP_GSTV4TRANS_NOTINIT, "The 'Init' call for this transmitter has not been called"}, - { ERR_RTP_GSTV4TRANS_NOTWAITING, "The transmitter is not waiting for incoming data"}, - { ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN, "The specified port base is not an even number"}, - { ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG, "The maximum packet size is too big for this transmitter"}, - { ERR_RTP_GSTV4TRANS_INVALIDEVENT, "Expecting UNKNOWN_EVENT to set source address but got another type of event"}, - { ERR_RTP_GSTV4TRANS_SRCADDRNOTSET, "Got packet but src address information was not set, returning"}, - { ERR_RTP_GSTV4TRANS_NOTNETBUFFER, "Received buffer is not a GstNetBuffer"}, - { ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED, "The WaitForIncomingData is not implemented in the Gst transmitter"}, + { ERR_RTP_FAKETRANS_ALREADYCREATED, "The transmitter was already created"}, + { ERR_RTP_FAKETRANS_ALREADYINIT, "The transmitter was already initialize"}, + { ERR_RTP_FAKETRANS_ALREADYWAITING, "The transmitter is already waiting for incoming data"}, + { ERR_RTP_FAKETRANS_CANTBINDRTCPSOCKET, "The 'bind' call for the RTCP socket failed"}, + { ERR_RTP_FAKETRANS_CANTBINDRTPSOCKET, "The 'bind' call for the RTP socket failed"}, + { ERR_RTP_FAKETRANS_CANTCALCULATELOCALIP, "The local IP addresses could not be determined"}, + { ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS, "Couldn't create the sockets used to abort waiting for incoming data"}, + { ERR_RTP_FAKETRANS_CANTCREATEPIPE, "Couldn't create the pipe used to abort waiting for incoming data"}, + { ERR_RTP_FAKETRANS_CANTCREATESOCKET, "Couldn't create the RTP or RTCP socket"}, + { ERR_RTP_FAKETRANS_CANTINITMUTEX, "Failed to initialize a mutex used by the transmitter"}, + { ERR_RTP_FAKETRANS_CANTSETRTCPRECEIVEBUF, "Couldn't set the receive buffer size for the RTCP socket"}, + { ERR_RTP_FAKETRANS_CANTSETRTCPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTCP socket"}, + { ERR_RTP_FAKETRANS_CANTSETRTPRECEIVEBUF, "Couldn't set the receive buffer size for the RTP socket"}, + { ERR_RTP_FAKETRANS_CANTSETRTPTRANSMITBUF, "Couldn't set the transmission buffer size for the RTP socket"}, + { ERR_RTP_FAKETRANS_COULDNTJOINMULTICASTGROUP, "Unable to join the specified multicast group"}, + { ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE, "The function called doens't match the current receive mode"}, + { ERR_RTP_FAKETRANS_ERRORINSELECT, "Error in the transmitter's 'select' call"}, + { ERR_RTP_FAKETRANS_ILLEGALPARAMETERS, "Illegal parameters type passed to the transmitter"}, + { ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE, "Specified address type isn't compatible with this transmitter"}, + { ERR_RTP_FAKETRANS_NOLOCALIPS, "Couldn't determine the local host name since the local IP list is empty"}, + { ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT, "Multicast support is not available"}, + { ERR_RTP_FAKETRANS_NOSUCHENTRY, "Specified entry could not be found"}, + { ERR_RTP_FAKETRANS_NOTAMULTICASTADDRESS, "The specified address is not a multicast address"}, + { ERR_RTP_FAKETRANS_NOTCREATED, "The 'Create' call for this transmitter has not been called"}, + { ERR_RTP_FAKETRANS_NOTINIT, "The 'Init' call for this transmitter has not been called"}, + { ERR_RTP_FAKETRANS_NOTWAITING, "The transmitter is not waiting for incoming data"}, + { ERR_RTP_FAKETRANS_PORTBASENOTEVEN, "The specified port base is not an even number"}, + { ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG, "The maximum packet size is too big for this transmitter"}, + { ERR_RTP_FAKETRANS_INVALIDEVENT, "Expecting UNKNOWN_EVENT to set source address but got another type of event"}, + { ERR_RTP_FAKETRANS_SRCADDRNOTSET, "Got packet but src address information was not set, returning"}, + { ERR_RTP_FAKETRANS_NOTNETBUFFER, "Received buffer is not a GstNetBuffer"}, + { ERR_RTP_FAKETRANS_WAITNOTIMPLEMENTED, "The WaitForIncomingData is not implemented in the Gst transmitter"}, { 0,0 } }; @@ -218,6 +218,12 @@ std::string RTPGetErrorString(int errcode) return std::string(ErrorDescriptions[i].description); i++; } - return std::string("Unknown error code"); + char str[16]; +#if defined(WIN32) || defined(_WIN32_WCE) + _snprintf(str,16,"(%d)",errcode); +#else + snprintf(str,16,"(%d)",errcode); +#endif // WIN32 || _WIN32_WCE + return std::string("Unknown error code") + std::string(str); } diff --git a/src/rtperrors.h b/src/rtperrors.h index 9242e07..ffa720c 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -165,38 +165,40 @@ std::string RTPGetErrorString(int errcode); #define ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG -125 #define ERR_RTP_INTERNALSOURCEDATA_INVALIDPROBATIONTYPE -126 #define ERR_RTP_SESSION_USERDEFINEDTRANSMITTERNULL -127 -#define ERR_RTP_GSTV4TRANS_ALREADYCREATED -128 -#define ERR_RTP_GSTV4TRANS_ALREADYINIT -129 -#define ERR_RTP_GSTV4TRANS_ALREADYWAITING -130 -#define ERR_RTP_GSTV4TRANS_CANTBINDRTCPSOCKET -131 -#define ERR_RTP_GSTV4TRANS_CANTBINDRTPSOCKET -132 -#define ERR_RTP_GSTV4TRANS_CANTCALCULATELOCALIP -133 -#define ERR_RTP_GSTV4TRANS_CANTCREATEABORTDESCRIPTORS -134 -#define ERR_RTP_GSTV4TRANS_CANTCREATEPIPE -135 -#define ERR_RTP_GSTV4TRANS_CANTCREATESOCKET -136 -#define ERR_RTP_GSTV4TRANS_CANTINITMUTEX -137 -#define ERR_RTP_GSTV4TRANS_CANTSETRTCPRECEIVEBUF -138 -#define ERR_RTP_GSTV4TRANS_CANTSETRTCPTRANSMITBUF -139 -#define ERR_RTP_GSTV4TRANS_CANTSETRTPRECEIVEBUF -140 -#define ERR_RTP_GSTV4TRANS_CANTSETRTPTRANSMITBUF -141 -#define ERR_RTP_GSTV4TRANS_COULDNTJOINMULTICASTGROUP -142 -#define ERR_RTP_GSTV4TRANS_DIFFERENTRECEIVEMODE -143 -#define ERR_RTP_GSTV4TRANS_ERRORINSELECT -144 -#define ERR_RTP_GSTV4TRANS_ILLEGALPARAMETERS -145 -#define ERR_RTP_GSTV4TRANS_INVALIDADDRESSTYPE -146 -#define ERR_RTP_GSTV4TRANS_NOLOCALIPS -147 -#define ERR_RTP_GSTV4TRANS_NOMULTICASTSUPPORT -148 -#define ERR_RTP_GSTV4TRANS_NOSUCHENTRY -149 -#define ERR_RTP_GSTV4TRANS_NOTAMULTICASTADDRESS -150 -#define ERR_RTP_GSTV4TRANS_NOTCREATED -151 -#define ERR_RTP_GSTV4TRANS_NOTINIT -152 -#define ERR_RTP_GSTV4TRANS_NOTWAITING -153 -#define ERR_RTP_GSTV4TRANS_PORTBASENOTEVEN -154 -#define ERR_RTP_GSTV4TRANS_SPECIFIEDSIZETOOBIG -155 -#define ERR_RTP_GSTV4TRANS_INVALIDEVENT -156 -#define ERR_RTP_GSTV4TRANS_SRCADDRNOTSET -157 -#define ERR_RTP_GSTV4TRANS_NOTNETBUFFER -158 -#define ERR_RTP_GSTV4TRANS_WAITNOTIMPLEMENTED -159 +#define ERR_RTP_FAKETRANS_ALREADYCREATED -128 +#define ERR_RTP_FAKETRANS_ALREADYINIT -129 +#define ERR_RTP_FAKETRANS_ALREADYWAITING -130 +#define ERR_RTP_FAKETRANS_CANTBINDRTCPSOCKET -131 +#define ERR_RTP_FAKETRANS_CANTBINDRTPSOCKET -132 +#define ERR_RTP_FAKETRANS_CANTCALCULATELOCALIP -133 +#define ERR_RTP_FAKETRANS_CANTCREATEABORTDESCRIPTORS -134 +#define ERR_RTP_FAKETRANS_CANTCREATEPIPE -135 +#define ERR_RTP_FAKETRANS_CANTCREATESOCKET -136 +#define ERR_RTP_FAKETRANS_CANTINITMUTEX -137 +#define ERR_RTP_FAKETRANS_CANTSETRTCPRECEIVEBUF -138 +#define ERR_RTP_FAKETRANS_CANTSETRTCPTRANSMITBUF -139 +#define ERR_RTP_FAKETRANS_CANTSETRTPRECEIVEBUF -140 +#define ERR_RTP_FAKETRANS_CANTSETRTPTRANSMITBUF -141 +#define ERR_RTP_FAKETRANS_COULDNTJOINMULTICASTGROUP -142 +#define ERR_RTP_FAKETRANS_DIFFERENTRECEIVEMODE -143 +#define ERR_RTP_FAKETRANS_ERRORINSELECT -144 +#define ERR_RTP_FAKETRANS_ILLEGALPARAMETERS -145 +#define ERR_RTP_FAKETRANS_INVALIDADDRESSTYPE -146 +#define ERR_RTP_FAKETRANS_NOLOCALIPS -147 +#define ERR_RTP_FAKETRANS_NOMULTICASTSUPPORT -148 +#define ERR_RTP_FAKETRANS_NOSUCHENTRY -149 +#define ERR_RTP_FAKETRANS_NOTAMULTICASTADDRESS -150 +#define ERR_RTP_FAKETRANS_NOTCREATED -151 +#define ERR_RTP_FAKETRANS_NOTINIT -152 +#define ERR_RTP_FAKETRANS_NOTWAITING -153 +#define ERR_RTP_FAKETRANS_PORTBASENOTEVEN -154 +#define ERR_RTP_FAKETRANS_SPECIFIEDSIZETOOBIG -155 +#define ERR_RTP_FAKETRANS_INVALIDEVENT -156 +#define ERR_RTP_FAKETRANS_SRCADDRNOTSET -157 +#define ERR_RTP_FAKETRANS_NOTNETBUFFER -158 +#define ERR_RTP_FAKETRANS_WAITNOTIMPLEMENTED -159 + + #endif // RTPERRORS_H diff --git a/src/rtpgsttransmitter.h b/src/rtpgsttransmitter.h deleted file mode 100644 index 0501fd1..0000000 --- a/src/rtpgsttransmitter.h +++ /dev/null @@ -1,234 +0,0 @@ -/* - - This class allows for jrtp to send GstBuffers. Allows for integration of RTP - into gstreamer. - Copyright (c) 2005 Philippe Khalaf - - This file is a part of JRTPLIB - Copyright (c) 1999-2004 Jori Liesenborgs - - Contact: jori@lumumba.luc.ac.be - - This library was developed at the "Expertisecentrum Digitale Media" - (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair - Centrum" (http://www.luc.ac.be). The library is based upon work done for - my thesis at the School for Knowledge Technology (Belgium/The Netherlands). - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - -*/ - -#ifndef RTPGSTV4TRANSMITTER_H - -#define RTPGSTV4TRANSMITTER_H - -#include "rtpconfig.h" - -#ifdef RTP_SUPPORT_GST - -#include "rtptransmitter.h" -#include "rtpipv4destination.h" -#include "rtphashtable.h" -#include "rtpkeyhashtable.h" -#include - -#include -#include - -#ifdef RTP_SUPPORT_THREAD - #include -#endif // RTP_SUPPORT_THREAD - -#define RTPGSTv4TRANS_HASHSIZE 8317 -#define RTPGSTv4TRANS_DEFAULTPORTBASE 5000 - -class RTPGSTv4TransmissionParams : public RTPTransmissionParams -{ -public: - RTPGSTv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4GSTProto) { portbase = RTPGSTv4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; rtpsrcpad = NULL, rtcpsrcpad = NULL; currentdata = NULL;} - void SetBindIP(u_int32_t ip) { bindIP = ip; } - void SetPortbase(u_int16_t pbase) { portbase = pbase; } - void SetMulticastTTL(u_int8_t mcastTTL) { multicastTTL = mcastTTL; } - void SetLocalIPList(std::list &iplist) { localIPs = iplist; } - void ClearLocalIPList() { localIPs.clear(); } - void SetGstRTPSrc(GstPad *src) { rtpsrcpad = src; } - void SetGstRTCPSrc(GstPad *src) { rtcpsrcpad = src; } - void SetCurrentData(GstNetBuffer *data) { currentdata = data; } - void SetCurrentDataType(bool type) { currentdatatype = type; } - u_int32_t GetBindIP() const { return bindIP; } - u_int16_t GetPortbase() const { return portbase; } - u_int8_t GetMulticastTTL() const { return multicastTTL; } - const std::list &GetLocalIPList() const { return localIPs; } - GstPad* GetGstRTPSrc() const { return rtpsrcpad; } - GstPad* GetGstRTCPSrc() const { return rtcpsrcpad; } - GstNetBuffer* GetCurrentData() const { return currentdata; } - bool GetCurrentDataType() const { return currentdatatype; } -private: - u_int16_t portbase; - u_int32_t bindIP; - std::list localIPs; - u_int8_t multicastTTL; - GstPad *rtpsrcpad; - GstPad *rtcpsrcpad; - bool currentdatatype; - GstNetBuffer* currentdata; -}; - -class RTPGSTv4TransmissionInfo : public RTPTransmissionInfo -{ -public: - RTPGSTv4TransmissionInfo(std::list iplist, - GstPad* rtpsrc, GstPad* rtcpsrc, RTPGSTv4TransmissionParams *transparams) : - RTPTransmissionInfo(RTPTransmitter::IPv4GSTProto) - { localIPlist = iplist; rtpsrcpad = rtpsrc; - rtcpsrcpad = rtcpsrc; params = transparams; } - - ~RTPGSTv4TransmissionInfo() { } - std::list GetLocalIPList() const { return localIPlist; } - GstPad* GetGstRTPSrc() { return rtpsrcpad; } - GstPad* GetGstRTCPSrc() { return rtcpsrcpad; } - RTPGSTv4TransmissionParams* GetTransParams() { return params; } -private: - std::list localIPlist; - GstPad *rtpsrcpad; - GstPad *rtcpsrcpad; - RTPGSTv4TransmissionParams *params; -}; - -#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPGSTv4TRANS_HASHSIZE; } - inline int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPGSTv4TRANS_HASHSIZE; } -#else // No support for inline function as template parameter - int RTPGSTv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); - int RTPGSTv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k); -#endif // RTP_SUPPORT_INLINETEMPLATEPARAM - -#define RTPGSTv4TRANS_HEADERSIZE (20+8) - -class RTPGSTv4Transmitter : public RTPTransmitter -{ -public: - RTPGSTv4Transmitter(); - ~RTPGSTv4Transmitter(); - - int Init(bool treadsafe); - int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); - void Destroy(); - RTPTransmissionInfo *GetTransmissionInfo(); - - int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); - bool ComesFromThisTransmitter(const RTPAddress *addr); - size_t GetHeaderOverhead() { return RTPGSTv4TRANS_HEADERSIZE; } - - int Poll(); - int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); - int AbortWait(); - - int SendRTPData(const void *data,size_t len); - int SendRTCPData(const void *data,size_t len); - - void ResetPacketCount(); - u_int32_t GetNumRTPPacketsSent(); - u_int32_t GetNumRTCPPacketsSent(); - - int AddDestination(const RTPAddress &addr); - int DeleteDestination(const RTPAddress &addr); - void ClearDestinations(); - - bool SupportsMulticasting(); - int JoinMulticastGroup(const RTPAddress &addr); - int LeaveMulticastGroup(const RTPAddress &addr); - void LeaveAllMulticastGroups(); - - int SetReceiveMode(RTPTransmitter::ReceiveMode m); - int AddToIgnoreList(const RTPAddress &addr); - int DeleteFromIgnoreList(const RTPAddress &addr); - void ClearIgnoreList(); - int AddToAcceptList(const RTPAddress &addr); - int DeleteFromAcceptList(const RTPAddress &addr); - void ClearAcceptList(); - int SetMaximumPacketSize(size_t s); - - bool NewDataAvailable(); - RTPRawPacket *GetNextPacket(); -#ifdef RTPDEBUG - void Dump(); -#endif // RTPDEBUG -private: - int CreateLocalIPList(); - bool GetLocalIPList_Interfaces(); - void GetLocalIPList_DNS(); - void AddLoopbackAddress(); - void FlushPackets(); - int FakePoll(); - int ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); - int ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); -#ifdef RTP_SUPPORT_IPV4MULTICAST - bool SetMulticastTTL(u_int8_t ttl); -#endif // RTP_SUPPORT_IPV4MULTICAST - bool ShouldAcceptData(u_int32_t srcip,u_int16_t srcport); - void ClearAcceptIgnoreInfo(); - - RTPGSTv4TransmissionParams *params; - bool init; - bool created; - bool waitingfordata; - std::list localIPs; - u_int16_t portbase; - u_int8_t multicastTTL; - RTPTransmitter::ReceiveMode receivemode; - - u_int8_t *localhostname; - size_t localhostnamelength; - - RTPHashTable destinations; -#ifdef RTP_SUPPORT_IPV4MULTICAST -// RTPHashTable multicastgroups; -#endif // RTP_SUPPORT_IPV4MULTICAST - std::list rawpacketlist; - - bool supportsmulticasting; - size_t maxpacksize; - - class PortInfo - { - public: - PortInfo() { all = false; } - - bool all; - std::list portlist; - }; - - RTPKeyHashTable acceptignoreinfo; - - int CreateAbortDescriptors(); - void DestroyAbortDescriptors(); - void AbortWaitInternal(); -#ifdef RTP_SUPPORT_THREAD - JMutex mainmutex,waitmutex; - int threadsafe; -#endif // RTP_SUPPORT_THREAD - - u_int32_t rtppackcount,rtcppackcount; -}; - -#endif // RTP_SUPPORT_GST - -#endif // RTPGSTv4TRANSMITTER_H - diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 8e0bddd..3ce898b 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -119,7 +119,7 @@ inline int RTPHashTable::DeleteCurrentElement() { tmp1->hashnext = tmp2; if (tmp2 != 0) - tmp2->hashprev = 0; + tmp2->hashprev = tmp1; } // Relink elements in list diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index 2b56320..b8c2ace 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -38,7 +38,7 @@ #define RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS 32 -RTPInternalSourceData::RTPInternalSourceData(u_int32_t ssrc,RTPSources::ProbationType probtype):RTPSourceData(ssrc) +RTPInternalSourceData::RTPInternalSourceData(uint32_t ssrc,RTPSources::ProbationType probtype):RTPSourceData(ssrc) { #ifdef RTP_SUPPORT_PROBATION probationtype = probtype; @@ -131,7 +131,7 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re std::list::iterator it,start; bool done = false; - u_int32_t newseqnr = rtppack->GetExtendedSequenceNumber(); + uint32_t newseqnr = rtppack->GetExtendedSequenceNumber(); it = packetlist.end(); --it; @@ -140,7 +140,7 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re while (!done) { RTPPacket *p; - u_int32_t seqnr; + uint32_t seqnr; p = *it; seqnr = p->GetExtendedSequenceNumber(); @@ -171,7 +171,7 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re return 0; } -int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis) +int RTPInternalSourceData::ProcessSDESItem(uint8_t id,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis) { *cnamecollis = false; @@ -182,7 +182,7 @@ int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size case RTCP_SDES_ID_CNAME: { size_t curlen; - u_int8_t *oldcname; + uint8_t *oldcname; // NOTE: we're going to make sure that the CNAME is only set once. oldcname = SDESinf.GetCNAME(&curlen); @@ -206,7 +206,7 @@ int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size break; case RTCP_SDES_ID_NAME: { - u_int8_t *oldname; + uint8_t *oldname; size_t oldlen; oldname = SDESinf.GetName(&oldlen); @@ -216,7 +216,7 @@ int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size break; case RTCP_SDES_ID_EMAIL: { - u_int8_t *oldemail; + uint8_t *oldemail; size_t oldlen; oldemail = SDESinf.GetEMail(&oldlen); @@ -230,7 +230,7 @@ int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size return SDESinf.SetLocation(data,itemlen); case RTCP_SDES_ID_TOOL: { - u_int8_t *oldtool; + uint8_t *oldtool; size_t oldlen; oldtool = SDESinf.GetTool(&oldlen); @@ -247,7 +247,7 @@ int RTPInternalSourceData::ProcessSDESItem(u_int8_t id,const u_int8_t *data,size #ifdef RTP_SUPPORT_SDESPRIV -int RTPInternalSourceData::ProcessPrivateSDESItem(const u_int8_t *prefix,size_t prefixlen,const u_int8_t *value,size_t valuelen,const RTPTime &receivetime) +int RTPInternalSourceData::ProcessPrivateSDESItem(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen,const RTPTime &receivetime) { int status; @@ -260,7 +260,7 @@ int RTPInternalSourceData::ProcessPrivateSDESItem(const u_int8_t *prefix,size_t #endif // RTP_SUPPORT_SDESPRIV -int RTPInternalSourceData::ProcessBYEPacket(const u_int8_t *reason,size_t reasonlen,const RTPTime &receivetime) +int RTPInternalSourceData::ProcessBYEPacket(const uint8_t *reason,size_t reasonlen,const RTPTime &receivetime) { if (byereason) { @@ -270,7 +270,7 @@ int RTPInternalSourceData::ProcessBYEPacket(const u_int8_t *reason,size_t reason } byetime = receivetime; - byereason = new u_int8_t[reasonlen]; + byereason = new uint8_t[reasonlen]; if (byereason == 0) return ERR_RTP_OUTOFMEM; memcpy(byereason,reason,reasonlen); diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index a527b9c..26d53cd 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -43,21 +43,21 @@ class RTPInternalSourceData : public RTPSourceData { public: - RTPInternalSourceData(u_int32_t ssrc, RTPSources::ProbationType probtype); + RTPInternalSourceData(uint32_t ssrc, RTPSources::ProbationType probtype); ~RTPInternalSourceData(); int ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,bool *stored); - void ProcessSenderInfo(const RTPNTPTime &ntptime,u_int32_t rtptime,u_int32_t packetcount, - u_int32_t octetcount,const RTPTime &receivetime) { SRprevinf = SRinf; SRinf.Set(ntptime,rtptime,packetcount,octetcount,receivetime); stats.SetLastMessageTime(receivetime); } - void ProcessReportBlock(u_int8_t fractionlost,int32_t lostpackets,u_int32_t exthighseqnr, - u_int32_t jitter,u_int32_t lsr,u_int32_t dlsr, + void ProcessSenderInfo(const RTPNTPTime &ntptime,uint32_t rtptime,uint32_t packetcount, + uint32_t octetcount,const RTPTime &receivetime) { SRprevinf = SRinf; SRinf.Set(ntptime,rtptime,packetcount,octetcount,receivetime); stats.SetLastMessageTime(receivetime); } + void ProcessReportBlock(uint8_t fractionlost,int32_t lostpackets,uint32_t exthighseqnr, + uint32_t jitter,uint32_t lsr,uint32_t dlsr, const RTPTime &receivetime) { RRprevinf = RRinf; RRinf.Set(fractionlost,lostpackets,exthighseqnr,jitter,lsr,dlsr,receivetime); stats.SetLastMessageTime(receivetime); } void UpdateMessageTime(const RTPTime &receivetime) { stats.SetLastMessageTime(receivetime); } - int ProcessSDESItem(u_int8_t id,const u_int8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis); + int ProcessSDESItem(uint8_t id,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis); #ifdef RTP_SUPPORT_SDESPRIV - int ProcessPrivateSDESItem(const u_int8_t *prefix,size_t prefixlen,const u_int8_t *value,size_t valuelen,const RTPTime &receivetime); + int ProcessPrivateSDESItem(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen,const RTPTime &receivetime); #endif // RTP_SUPPORT_SDESPRIV - int ProcessBYEPacket(const u_int8_t *reason,size_t reasonlen,const RTPTime &receivetime); + int ProcessBYEPacket(const uint8_t *reason,size_t reasonlen,const RTPTime &receivetime); int SetRTPDataAddress(const RTPAddress *a); int SetRTCPDataAddress(const RTPAddress *a); diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 5c73aba..6e0e2ba 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -72,9 +72,9 @@ RTPAddress *RTPIPv4Address::CreateCopy() const #ifdef RTPDEBUG std::string RTPIPv4Address::GetAddressString() const { - char str[1024]; + char str[24]; - sprintf(str,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF), + snprintf(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF), (int)(ip&0xFF),(int)port); return std::string(str); } diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index b8e35d8..f76cfb0 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -41,14 +41,14 @@ class RTPIPv4Address : public RTPAddress { public: - RTPIPv4Address(u_int32_t ip = 0, u_int16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = ip; RTPIPv4Address::port = port; } - RTPIPv4Address(const u_int8_t ip[4],u_int16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = (u_int32_t)ip[3]; RTPIPv4Address::ip |= (((u_int32_t)ip[2])<<8); RTPIPv4Address::ip |= (((u_int32_t)ip[1])<<16); RTPIPv4Address::ip |= (((u_int32_t)ip[0])<<24); RTPIPv4Address::port = port; } + RTPIPv4Address(uint32_t ip = 0, uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = ip; RTPIPv4Address::port = port; } + RTPIPv4Address(const uint8_t ip[4],uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); RTPIPv4Address::port = port; } ~RTPIPv4Address() { } - void SetIP(u_int32_t ip) { RTPIPv4Address::ip = ip; } - void SetIP(const u_int8_t ip[4]) { RTPIPv4Address::ip = (u_int32_t)ip[3]; RTPIPv4Address::ip |= (((u_int32_t)ip[2])<<8); RTPIPv4Address::ip |= (((u_int32_t)ip[1])<<16); RTPIPv4Address::ip |= (((u_int32_t)ip[0])<<24); } - void SetPort(u_int16_t port) { RTPIPv4Address::port = port; } - u_int32_t GetIP() const { return ip; } - u_int16_t GetPort() const { return port; } + void SetIP(uint32_t ip) { RTPIPv4Address::ip = ip; } + void SetIP(const uint8_t ip[4]) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); } + void SetPort(uint16_t port) { RTPIPv4Address::port = port; } + uint32_t GetIP() const { return ip; } + uint16_t GetPort() const { return port; } RTPAddress *CreateCopy() const; bool IsSameAddress(const RTPAddress *addr) const; bool IsFromSameHost(const RTPAddress *addr) const; @@ -56,8 +56,8 @@ class RTPIPv4Address : public RTPAddress std::string GetAddressString() const; #endif // RTPDEBUG private: - u_int32_t ip; - u_int16_t port; + uint32_t ip; + uint16_t port; }; #endif // RTPIPV4ADDRESS_H diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index fd5ecbb..33ffb42 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -30,9 +30,9 @@ */ -#ifndef RTPIPV4DESTINATION +#ifndef RTPIPV4DESTINATION_H -#define RTPIPV4DESTINATION +#define RTPIPV4DESTINATION_H #include "rtpconfig.h" #if ! (defined(WIN32) || defined(_WIN32_WCE)) @@ -48,32 +48,32 @@ class RTPIPv4Destination public: // (nbo = network byte order, hbo = host byte order) - RTPIPv4Destination(u_int32_t ip,u_int16_t rtpportbase) { ipaddr_hbo = ip; ipaddr_nbo = htonl(ip); rtpport_nbo = htons(rtpportbase); rtcpport_nbo = htons(rtpportbase+1); } - u_int32_t GetIP_HBO() const { return ipaddr_hbo; } - u_int32_t GetIP_NBO() const { return ipaddr_nbo; } - u_int16_t GetRTPPort_NBO() const { return rtpport_nbo; } - u_int16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } + RTPIPv4Destination(uint32_t ip,uint16_t rtpportbase) { ipaddr_hbo = ip; ipaddr_nbo = htonl(ip); rtpport_nbo = htons(rtpportbase); rtcpport_nbo = htons(rtpportbase+1); } + uint32_t GetIP_HBO() const { return ipaddr_hbo; } + uint32_t GetIP_NBO() const { return ipaddr_nbo; } + uint16_t GetRTPPort_NBO() const { return rtpport_nbo; } + uint16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } bool operator==(const RTPIPv4Destination &src) const { if (src.ipaddr_nbo == ipaddr_nbo && src.rtpport_nbo == rtpport_nbo) return true; return false; } // NOTE: I only check IP and portbase #ifdef RTPDEBUG std::string GetDestinationString() const; #endif // RTPDEBUG private: - u_int32_t ipaddr_hbo; - u_int32_t ipaddr_nbo; - u_int16_t rtpport_nbo; - u_int16_t rtcpport_nbo; + uint32_t ipaddr_hbo; + uint32_t ipaddr_nbo; + uint16_t rtpport_nbo; + uint16_t rtcpport_nbo; }; #ifdef RTPDEBUG inline std::string RTPIPv4Destination::GetDestinationString() const { - char str[1024]; - u_int32_t ip = ipaddr_hbo; - u_int16_t portbase = ntohs(rtpport_nbo); + char str[24]; + uint32_t ip = ipaddr_hbo; + uint16_t portbase = ntohs(rtpport_nbo); - sprintf(str,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); + snprintf(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); return std::string(str); } #endif // RTPDEBUG -#endif // RTPIPV4DESTINATION +#endif // RTPIPV4DESTINATION_H diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 709f3c2..62e160d 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -54,7 +54,7 @@ bool RTPIPv6Address::IsSameAddress(const RTPAddress *addr) const return false; const RTPIPv6Address *addr2 = (const RTPIPv6Address *)addr; - const u_int8_t *ip2 = addr2->ip.s6_addr; + const uint8_t *ip2 = addr2->ip.s6_addr; if (port != addr2->port) return false; @@ -75,7 +75,7 @@ bool RTPIPv6Address::IsFromSameHost(const RTPAddress *addr) const return false; const RTPIPv6Address *addr2 = (const RTPIPv6Address *)addr; - const u_int8_t *ip2 = addr2->ip.s6_addr; + const uint8_t *ip2 = addr2->ip.s6_addr; for (int i = 0 ; i < 16 ; i++) { if (ip.s6_addr[i] != ip2[i]) @@ -87,17 +87,17 @@ bool RTPIPv6Address::IsFromSameHost(const RTPAddress *addr) const #ifdef RTPDEBUG std::string RTPIPv6Address::GetAddressString() const { - char str[256]; - u_int16_t ip16[8]; + char str[48]; + uint16_t ip16[8]; int i,j; for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { - ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); - ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); + ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); + ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X - %d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)port); + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)port); return std::string(str); } #endif // RTPDEBUG diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index 9f6aca8..070082b 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -48,15 +48,15 @@ class RTPIPv6Address : public RTPAddress { public: RTPIPv6Address():RTPAddress(IPv6Address) { for (int i = 0 ; i < 16 ; i++) ip.s6_addr[i] = 0; port = 0; } - RTPIPv6Address(const u_int8_t ip[16],u_int16_t port = 0):RTPAddress(IPv6Address) { SetIP(ip); RTPIPv6Address::port = port; } - RTPIPv6Address(in6_addr ip,u_int16_t port = 0):RTPAddress(IPv6Address) { RTPIPv6Address::ip = ip; RTPIPv6Address::port = port; } + RTPIPv6Address(const uint8_t ip[16],uint16_t port = 0):RTPAddress(IPv6Address) { SetIP(ip); RTPIPv6Address::port = port; } + RTPIPv6Address(in6_addr ip,uint16_t port = 0):RTPAddress(IPv6Address) { RTPIPv6Address::ip = ip; RTPIPv6Address::port = port; } ~RTPIPv6Address() { } void SetIP(in6_addr ip) { RTPIPv6Address::ip = ip; } - void SetIP(const u_int8_t ip[16]) { for (int i = 0 ; i < 16 ; i++) RTPIPv6Address::ip.s6_addr[i] = ip[i]; } - void SetPort(u_int16_t port) { RTPIPv6Address::port = port; } - void GetIP(u_int8_t ip[16]) const { for (int i = 0 ; i < 16 ; i++) ip[i] = RTPIPv6Address::ip.s6_addr[i]; } + void SetIP(const uint8_t ip[16]) { for (int i = 0 ; i < 16 ; i++) RTPIPv6Address::ip.s6_addr[i] = ip[i]; } + void SetPort(uint16_t port) { RTPIPv6Address::port = port; } + void GetIP(uint8_t ip[16]) const { for (int i = 0 ; i < 16 ; i++) ip[i] = RTPIPv6Address::ip.s6_addr[i]; } in6_addr GetIP() const { return ip; } - u_int16_t GetPort() const { return port; } + uint16_t GetPort() const { return port; } RTPAddress *CreateCopy() const; bool IsSameAddress(const RTPAddress *addr) const; @@ -66,7 +66,7 @@ class RTPIPv6Address : public RTPAddress #endif // RTPDEBUG private: in6_addr ip; - u_int16_t port; + uint16_t port; }; #endif // RTP_SUPPORT_IPV6 diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 1b06105..42b0c5e 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -30,9 +30,9 @@ */ -#ifndef RTPIPV6DESTINATION +#ifndef RTPIPV6DESTINATION_H -#define RTPIPV6DESTINATION +#define RTPIPV6DESTINATION_H #include "rtpconfig.h" @@ -51,33 +51,33 @@ class RTPIPv6Destination { public: - RTPIPv6Destination(in6_addr ip,u_int16_t portbase) { RTPIPv6Destination::ip = ip; rtpport_nbo = htons(portbase); rtcpport_nbo = htons(portbase+1); } + RTPIPv6Destination(in6_addr ip,uint16_t portbase) { RTPIPv6Destination::ip = ip; rtpport_nbo = htons(portbase); rtcpport_nbo = htons(portbase+1); } in6_addr GetIP() const { return ip; } - u_int16_t GetRTPPort_NBO() const { return rtpport_nbo; } - u_int16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } + uint16_t GetRTPPort_NBO() const { return rtpport_nbo; } + uint16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } bool operator==(const RTPIPv6Destination &src) const { if (src.rtpport_nbo == rtpport_nbo && (memcmp(&(src.ip),&ip,sizeof(in6_addr)) == 0)) return true; return false; } // NOTE: I only check IP and portbase #ifdef RTPDEBUG std::string GetDestinationString() const; #endif // RTPDEBUG private: in6_addr ip; - u_int16_t rtpport_nbo,rtcpport_nbo; + uint16_t rtpport_nbo,rtcpport_nbo; }; #ifdef RTPDEBUG inline std::string RTPIPv6Destination::GetDestinationString() const { - u_int16_t ip16[8]; - char str[1024]; - u_int16_t portbase = ntohs(rtpport_nbo); + uint16_t ip16[8]; + char str[48]; + uint16_t portbase = ntohs(rtpport_nbo); int i,j; - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); return std::string(str); } #endif // RTPDEBUG #endif // RTP_SUPPORT_IPV6 -#endif // RTPIPV6DESTINATION +#endif // RTPIPV6DESTINATION_H diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 88f4447..142f5be 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -123,7 +123,7 @@ inline int RTPKeyHashTable::DeleteCurrentElement( { tmp1->hashnext = tmp2; if (tmp2 != 0) - tmp2->hashprev = 0; + tmp2->hashprev = tmp1; } // Relink elements in list diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 7e64e54..1ab1eab 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -34,6 +34,6 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,3,0); + return RTPLibraryVersion(3,4,0); } diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 32e0fc4..da73e66 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -55,9 +55,12 @@ class RTPLibraryVersion inline std::string RTPLibraryVersion::GetVersionString() const { char str[16]; - - sprintf(str,"%d.%d.%d",majornr,minornr,debugnr); +#if (defined(WIN32) || defined(_WIN32_WCE)) + _snprintf(str,16,"%d.%d.%d",majornr,minornr,debugnr); +#else + snprintf(str,16,"%d.%d.%d",majornr,minornr,debugnr); +#endif // WIN32 || _WIN32_WCE return std::string(str); } diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 1c1a117..20a1327 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -71,9 +71,9 @@ RTPPacket::RTPPacket(RTPRawPacket &rawpack) : receivetime(rawpack.GetReceiveTime error = ParseRawPacket(rawpack); } -RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, +RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, size_t maxpacksize /* = 0 */ ) : receivetime(0,0) { Clear(); @@ -81,9 +81,9 @@ RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payload csrcs,gotextension,extensionid,extensionlen_numwords,extensiondata,0,maxpacksize); } -RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, +RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, void *buffer,size_t buffersize) : receivetime(0,0) { Clear(); @@ -98,9 +98,9 @@ RTPPacket::RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payload int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) { - u_int8_t *packetbytes; + uint8_t *packetbytes; size_t packetlen; - u_int8_t payloadtype; + uint8_t payloadtype; RTPHeader *rtpheader; bool marker; int csrccount; @@ -108,7 +108,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) int payloadoffset,payloadlength; int numpadbytes; RTPExtensionHeader *rtpextheader; - u_int16_t exthdrlen; + uint16_t exthdrlen; if (!rawpack.IsRTP()) // If we didn't receive it on the RTP port, we'll ignore it return ERR_RTP_PACKET_INVALIDPACKET; @@ -118,7 +118,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) if (packetlen < sizeof(RTPHeader)) return ERR_RTP_PACKET_INVALIDPACKET; - packetbytes = (u_int8_t *)rawpack.GetData(); + packetbytes = (uint8_t *)rawpack.GetData(); rtpheader = (RTPHeader *)packetbytes; // The version number should be correct @@ -139,7 +139,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) } csrccount = rtpheader->csrccount; - payloadoffset = sizeof(RTPHeader)+(int)(csrccount*sizeof(u_int32_t)); + payloadoffset = sizeof(RTPHeader)+(int)(csrccount*sizeof(uint32_t)); if (rtpheader->padding) // adjust payload length to take padding into account { @@ -156,7 +156,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) rtpextheader = (RTPExtensionHeader *)(packetbytes+payloadoffset); payloadoffset += sizeof(RTPExtensionHeader); exthdrlen = ntohs(rtpextheader->length); - payloadoffset += ((int)exthdrlen)*sizeof(u_int32_t); + payloadoffset += ((int)exthdrlen)*sizeof(uint32_t); } else { @@ -175,8 +175,8 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) if (hasextension) { RTPPacket::extid = ntohs(rtpextheader->id); - RTPPacket::extensionlength = ((int)ntohs(rtpextheader->length))*sizeof(u_int32_t); - RTPPacket::extension = ((u_int8_t *)rtpextheader)+sizeof(RTPExtensionHeader); + RTPPacket::extensionlength = ((int)ntohs(rtpextheader->length))*sizeof(uint32_t); + RTPPacket::extension = ((uint8_t *)rtpextheader)+sizeof(RTPExtensionHeader); } RTPPacket::hasmarker = marker; @@ -186,7 +186,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) // Note: we don't fill in the EXTENDED sequence number here, since we // don't have information about the source here. We just fill in the low // 16 bits - RTPPacket::extseqnr = (u_int32_t)ntohs(rtpheader->sequencenumber); + RTPPacket::extseqnr = (uint32_t)ntohs(rtpheader->sequencenumber); RTPPacket::timestamp = ntohl(rtpheader->timestamp); RTPPacket::ssrc = ntohl(rtpheader->ssrc); @@ -201,24 +201,24 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) return 0; } -u_int32_t RTPPacket::GetCSRC(int num) const +uint32_t RTPPacket::GetCSRC(int num) const { if (num >= numcsrcs) return 0; - u_int8_t *csrcpos; - u_int32_t *csrcval_nbo; - u_int32_t csrcval_hbo; + uint8_t *csrcpos; + uint32_t *csrcval_nbo; + uint32_t csrcval_hbo; - csrcpos = packet+sizeof(RTPHeader)+num*sizeof(u_int32_t); - csrcval_nbo = (u_int32_t *)csrcpos; + csrcpos = packet+sizeof(RTPHeader)+num*sizeof(uint32_t); + csrcval_nbo = (uint32_t *)csrcpos; csrcval_hbo = ntohl(*csrcval_nbo); return csrcval_hbo; } -int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, +int RTPPacket::BuildPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, void *buffer,size_t maxsize) { if (numcsrcs > RTP_MAXCSRCS) @@ -230,11 +230,11 @@ int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t p return ERR_RTP_PACKET_BADPAYLOADTYPE; packetlength = sizeof(RTPHeader); - packetlength += sizeof(u_int32_t)*((size_t)numcsrcs); + packetlength += sizeof(uint32_t)*((size_t)numcsrcs); if (gotextension) { packetlength += sizeof(RTPExtensionHeader); - packetlength += sizeof(u_int32_t)*((size_t)extensionlen_numwords); + packetlength += sizeof(uint32_t)*((size_t)extensionlen_numwords); } packetlength += payloadlen; @@ -250,7 +250,7 @@ int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t p if (buffer == 0) { - packet = new u_int8_t [packetlength]; + packet = new uint8_t [packetlength]; if (packet == 0) { packetlength = 0; @@ -260,7 +260,7 @@ int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t p } else { - packet = (u_int8_t *)buffer; + packet = (uint8_t *)buffer; externalbuffer = true; } @@ -268,12 +268,12 @@ int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t p RTPPacket::hasextension = gotextension; RTPPacket::numcsrcs = numcsrcs; RTPPacket::payloadtype = payloadtype; - RTPPacket::extseqnr = (u_int32_t)seqnr; + RTPPacket::extseqnr = (uint32_t)seqnr; RTPPacket::timestamp = timestamp; RTPPacket::ssrc = ssrc; RTPPacket::payloadlength = payloadlen; RTPPacket::extid = extensionid; - RTPPacket::extensionlength = ((size_t)extensionlen_numwords)*sizeof(u_int32_t); + RTPPacket::extensionlength = ((size_t)extensionlen_numwords)*sizeof(uint32_t); rtphdr = (RTPHeader *)packet; rtphdr->version = RTP_VERSION; @@ -292,20 +292,20 @@ int RTPPacket::BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t p rtphdr->timestamp = htonl(timestamp); rtphdr->ssrc = htonl(ssrc); - u_int32_t *curcsrc; + uint32_t *curcsrc; int i; - curcsrc = (u_int32_t *)(packet+sizeof(RTPHeader)); + curcsrc = (uint32_t *)(packet+sizeof(RTPHeader)); for (i = 0 ; i < numcsrcs ; i++,curcsrc++) *curcsrc = htonl(csrcs[i]); - payload = packet+sizeof(RTPHeader)+((size_t)numcsrcs)*sizeof(u_int32_t); + payload = packet+sizeof(RTPHeader)+((size_t)numcsrcs)*sizeof(uint32_t); if (gotextension) { RTPExtensionHeader *rtpexthdr = (RTPExtensionHeader *)payload; rtpexthdr->id = htons(extensionid); - rtpexthdr->length = htons((u_int16_t)extensionlen_numwords); + rtpexthdr->length = htons((uint16_t)extensionlen_numwords); payload += sizeof(RTPExtensionHeader); memcpy(payload,extensiondata,RTPPacket::extensionlength); diff --git a/src/rtppacket.h b/src/rtppacket.h index d30536a..ae6764f 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -47,14 +47,14 @@ class RTPPacket RTPPacket(RTPRawPacket &rawpack); // if maxpacksize == 0, it is ignored - RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, + RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, size_t maxpacksize = 0); // pretty much the same function, except that here the data is placed in an external buffer - RTPPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, + RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, void *buffer,size_t buffersize); virtual ~RTPPacket() { if (packet && !externalbuffer) delete [] packet; } @@ -64,27 +64,27 @@ class RTPPacket bool HasMarker() const { return hasmarker; } int GetCSRCCount() const { return numcsrcs; } - u_int32_t GetCSRC(int num) const; + uint32_t GetCSRC(int num) const; - u_int8_t GetPayloadType() const { return payloadtype; } + uint8_t GetPayloadType() const { return payloadtype; } // On reception, this is actually a 16 bit value. The high 16 bits // are filled in when the packet is processed in the source // table - u_int32_t GetExtendedSequenceNumber() const { return extseqnr; } - u_int16_t GetSequenceNumber() const { return (u_int16_t)(extseqnr&0x0000FFFF); } - void SetExtendedSequenceNumber(u_int32_t seq) { extseqnr = seq; } + uint32_t GetExtendedSequenceNumber() const { return extseqnr; } + uint16_t GetSequenceNumber() const { return (uint16_t)(extseqnr&0x0000FFFF); } + void SetExtendedSequenceNumber(uint32_t seq) { extseqnr = seq; } - u_int32_t GetTimestamp() const { return timestamp; } - u_int32_t GetSSRC() const { return ssrc; } + uint32_t GetTimestamp() const { return timestamp; } + uint32_t GetSSRC() const { return ssrc; } - u_int8_t *GetPacketData() const { return packet; } - u_int8_t *GetPayloadData() const { return payload; } + uint8_t *GetPacketData() const { return packet; } + uint8_t *GetPayloadData() const { return payload; } size_t GetPacketLength() const { return packetlength; } size_t GetPayloadLength() const { return payloadlength; } - u_int16_t GetExtensionID() const { return extid; } - u_int8_t *GetExtensionData() const { return extension; } + uint16_t GetExtensionID() const { return extid; } + uint8_t *GetExtensionData() const { return extension; } size_t GetExtensionLength() const { return extensionlength; } #ifdef RTPDEBUG void Dump(); @@ -96,9 +96,9 @@ class RTPPacket private: void Clear(); int ParseRawPacket(RTPRawPacket &rawpack); - int BuildPacket(u_int8_t payloadtype,const void *payloaddata,size_t payloadlen,u_int16_t seqnr, - u_int32_t timestamp,u_int32_t ssrc,bool gotmarker,u_int8_t numcsrcs,const u_int32_t *csrcs, - bool gotextension,u_int16_t extensionid,u_int16_t extensionlen_numwords,const void *extensiondata, + int BuildPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, + uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, + bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, void *buffer,size_t maxsize); int error; @@ -106,13 +106,13 @@ class RTPPacket bool hasextension,hasmarker; int numcsrcs; - u_int8_t payloadtype; - u_int32_t extseqnr,timestamp,ssrc; - u_int8_t *packet,*payload; + uint8_t payloadtype; + uint32_t extseqnr,timestamp,ssrc; + uint8_t *packet,*payload; size_t packetlength,payloadlength; - u_int16_t extid; - u_int8_t *extension; + uint16_t extid; + uint8_t *extension; size_t extensionlength; bool externalbuffer; diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index 5d2a259..ed3b1f2 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -63,7 +63,7 @@ int RTPPacketBuilder::Init(size_t max) return ERR_RTP_PACKBUILD_INVALIDMAXPACKETSIZE; maxpacksize = max; - buffer = new u_int8_t [max]; + buffer = new uint8_t [max]; if (buffer == 0) return ERR_RTP_OUTOFMEM; packetlength = 0; @@ -90,11 +90,11 @@ void RTPPacketBuilder::Destroy() int RTPPacketBuilder::SetMaximumPacketSize(size_t max) { - u_int8_t *newbuf; + uint8_t *newbuf; if (max <= 0) return ERR_RTP_PACKBUILD_INVALIDMAXPACKETSIZE; - newbuf = new u_int8_t[max]; + newbuf = new uint8_t[max]; if (newbuf == 0) return ERR_RTP_OUTOFMEM; @@ -104,7 +104,7 @@ int RTPPacketBuilder::SetMaximumPacketSize(size_t max) return 0; } -int RTPPacketBuilder::AddCSRC(u_int32_t csrc) +int RTPPacketBuilder::AddCSRC(uint32_t csrc) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -123,7 +123,7 @@ int RTPPacketBuilder::AddCSRC(u_int32_t csrc) return 0; } -int RTPPacketBuilder::DeleteCSRC(u_int32_t csrc) +int RTPPacketBuilder::DeleteCSRC(uint32_t csrc) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -156,7 +156,7 @@ void RTPPacketBuilder::ClearCSRCList() numcsrcs = 0; } -u_int32_t RTPPacketBuilder::CreateNewSSRC() +uint32_t RTPPacketBuilder::CreateNewSSRC() { ssrc = rtprnd.GetRandom32(); timestamp = rtprnd.GetRandom32(); @@ -168,7 +168,7 @@ u_int32_t RTPPacketBuilder::CreateNewSSRC() return ssrc; } -u_int32_t RTPPacketBuilder::CreateNewSSRC(RTPSources &sources) +uint32_t RTPPacketBuilder::CreateNewSSRC(RTPSources &sources) { bool found; @@ -201,7 +201,7 @@ int RTPPacketBuilder::BuildPacket(const void *data,size_t len) } int RTPPacketBuilder::BuildPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc) + uint8_t pt,bool mark,uint32_t timestampinc) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -209,7 +209,7 @@ int RTPPacketBuilder::BuildPacket(const void *data,size_t len, } int RTPPacketBuilder::BuildPacketEx(const void *data,size_t len, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -223,8 +223,8 @@ int RTPPacketBuilder::BuildPacketEx(const void *data,size_t len, } int RTPPacketBuilder::BuildPacketEx(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) + uint8_t pt,bool mark,uint32_t timestampinc, + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -233,11 +233,11 @@ int RTPPacketBuilder::BuildPacketEx(const void *data,size_t len, } int RTPPacketBuilder::PrivateBuildPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc,bool gotextension, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) + uint8_t pt,bool mark,uint32_t timestampinc,bool gotextension, + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { RTPPacket p(pt,data,len,seqnr,timestamp,ssrc,mark,numcsrcs,csrcs,gotextension,hdrextID, - (u_int16_t)numhdrextwords,hdrextdata,buffer,maxpacksize); + (uint16_t)numhdrextwords,hdrextdata,buffer,maxpacksize); int status = p.GetCreationError(); if (status < 0) @@ -257,7 +257,7 @@ int RTPPacketBuilder::PrivateBuildPacket(const void *data,size_t len, prevrtptimestamp = timestamp; } - numpayloadbytes += (u_int32_t)p.GetPayloadLength(); + numpayloadbytes += (uint32_t)p.GetPayloadLength(); numpackets++; timestamp += timestampinc; seqnr++; diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index 5f60d3c..654fa21 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -50,73 +50,73 @@ class RTPPacketBuilder ~RTPPacketBuilder(); int Init(size_t maxpacksize); void Destroy(); - u_int32_t GetPacketCount() { if (!init) return 0; return numpackets; } - u_int32_t GetPayloadOctetCount() { if (!init) return 0; return numpayloadbytes; } + uint32_t GetPacketCount() { if (!init) return 0; return numpackets; } + uint32_t GetPayloadOctetCount() { if (!init) return 0; return numpayloadbytes; } int SetMaximumPacketSize(size_t maxpacksize); - int AddCSRC(u_int32_t csrc); - int DeleteCSRC(u_int32_t csrc); + int AddCSRC(uint32_t csrc); + int DeleteCSRC(uint32_t csrc); void ClearCSRCList(); int BuildPacket(const void *data,size_t len); int BuildPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc); + uint8_t pt,bool mark,uint32_t timestampinc); int BuildPacketEx(const void *data,size_t len, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); int BuildPacketEx(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); - u_int8_t *GetPacket() { if (!init) return 0; return buffer; } + uint8_t pt,bool mark,uint32_t timestampinc, + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + uint8_t *GetPacket() { if (!init) return 0; return buffer; } size_t GetPacketLength() { if (!init) return 0; return packetlength; } - int SetDefaultPayloadType(u_int8_t pt); + int SetDefaultPayloadType(uint8_t pt); int SetDefaultMark(bool m); - int SetDefaultTimestampIncrement(u_int32_t timestampinc); - int IncrementTimestamp(u_int32_t inc); + int SetDefaultTimestampIncrement(uint32_t timestampinc); + int IncrementTimestamp(uint32_t inc); int IncrementTimestampDefault(); - u_int32_t CreateNewSSRC(); - u_int32_t CreateNewSSRC(RTPSources &sources); - u_int32_t GetSSRC() const { if (!init) return 0; return ssrc; } - u_int32_t GetTimestamp() const { if (!init) return 0; return timestamp; } - u_int16_t GetSequenceNumber() const { if (!init) return 0; return seqnr; } + uint32_t CreateNewSSRC(); + uint32_t CreateNewSSRC(RTPSources &sources); + uint32_t GetSSRC() const { if (!init) return 0; return ssrc; } + uint32_t GetTimestamp() const { if (!init) return 0; return timestamp; } + uint16_t GetSequenceNumber() const { if (!init) return 0; return seqnr; } // note: these are not necessarily from the last packet! RTPTime GetPacketTime() const { if (!init) return RTPTime(0,0); return lastwallclocktime; } - u_int32_t GetPacketTimestamp() const { if (!init) return 0; return lastrtptimestamp; } + uint32_t GetPacketTimestamp() const { if (!init) return 0; return lastrtptimestamp; } private: int PrivateBuildPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc,bool gotextension, - u_int16_t hdrextID = 0,const void *hdrextdata = 0,size_t numhdrextwords = 0); + uint8_t pt,bool mark,uint32_t timestampinc,bool gotextension, + uint16_t hdrextID = 0,const void *hdrextdata = 0,size_t numhdrextwords = 0); RTPRandom rtprnd; size_t maxpacksize; - u_int8_t *buffer; + uint8_t *buffer; size_t packetlength; - u_int32_t numpayloadbytes; - u_int32_t numpackets; + uint32_t numpayloadbytes; + uint32_t numpackets; bool init; - u_int32_t ssrc; - u_int32_t timestamp; - u_int16_t seqnr; + uint32_t ssrc; + uint32_t timestamp; + uint16_t seqnr; - u_int32_t defaulttimestampinc; - u_int8_t defaultpayloadtype; + uint32_t defaulttimestampinc; + uint8_t defaultpayloadtype; bool defaultmark; bool deftsset,defptset,defmarkset; - u_int32_t csrcs[RTP_MAXCSRCS]; + uint32_t csrcs[RTP_MAXCSRCS]; int numcsrcs; RTPTime lastwallclocktime; - u_int32_t lastrtptimestamp; - u_int32_t prevrtptimestamp; + uint32_t lastrtptimestamp; + uint32_t prevrtptimestamp; }; -inline int RTPPacketBuilder::SetDefaultPayloadType(u_int8_t pt) +inline int RTPPacketBuilder::SetDefaultPayloadType(uint8_t pt) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -134,7 +134,7 @@ inline int RTPPacketBuilder::SetDefaultMark(bool m) return 0; } -inline int RTPPacketBuilder::SetDefaultTimestampIncrement(u_int32_t timestampinc) +inline int RTPPacketBuilder::SetDefaultTimestampIncrement(uint32_t timestampinc) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; @@ -143,7 +143,7 @@ inline int RTPPacketBuilder::SetDefaultTimestampIncrement(u_int32_t timestampinc return 0; } -inline int RTPPacketBuilder::IncrementTimestamp(u_int32_t inc) +inline int RTPPacketBuilder::IncrementTimestamp(uint32_t inc) { if (!init) return ERR_RTP_PACKBUILD_NOTINIT; diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index a216e5e..568abf5 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtppollthread.h b/src/rtppollthread.h index b82e3fa..4116f7d 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 112ebfe..b4d9399 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -53,12 +53,12 @@ bool RTPRandom::init = false; RTPRandom::RTPRandom() { #if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) - u_int32_t x; + uint32_t x; - x = (u_int32_t)getpid(); - x += (u_int32_t)time(0); - x -= (u_int32_t)clock(); - x ^= (u_int32_t)(this); + x = (uint32_t)getpid(); + x += (uint32_t)time(0); + x -= (uint32_t)clock(); + x ^= (uint32_t)(this); #ifdef RTP_SUPPORT_GNUDRAND srand48_r(x,&drandbuffer); @@ -70,14 +70,14 @@ RTPRandom::RTPRandom() if (init) return; - u_int32_t x; + uint32_t x; #ifndef _WIN32_WCE - x = (u_int32_t)getpid(); - x += (u_int32_t)time(0); - x -= (u_int32_t)clock(); + x = (uint32_t)getpid(); + x += (uint32_t)time(0); + x -= (uint32_t)clock(); #else - x = (u_int32_t)GetCurrentProcessId(); + x = (uint32_t)GetCurrentProcessId(); FILETIME ft; SYSTEMTIME st; @@ -87,7 +87,7 @@ RTPRandom::RTPRandom() x += ft.dwLowDateTime; #endif // _WIN32_WCE - x ^= (u_int32_t)(this); + x ^= (uint32_t)(this); srand((unsigned int)x); init = true; @@ -100,27 +100,27 @@ RTPRandom::~RTPRandom() #ifdef RTP_SUPPORT_GNUDRAND -u_int8_t RTPRandom::GetRandom8() +uint8_t RTPRandom::GetRandom8() { double x; drand48_r(&drandbuffer,&x); - u_int8_t y = (u_int8_t)(x*256.0); + uint8_t y = (uint8_t)(x*256.0); return y; } -u_int16_t RTPRandom::GetRandom16() +uint16_t RTPRandom::GetRandom16() { double x; drand48_r(&drandbuffer,&x); - u_int16_t y = (u_int16_t)(x*65536.0); + uint16_t y = (uint16_t)(x*65536.0); return y; } -u_int32_t RTPRandom::GetRandom32() +uint32_t RTPRandom::GetRandom32() { - u_int32_t a = GetRandom16(); - u_int32_t b = GetRandom16(); - u_int32_t y = (a << 16)|b; + uint32_t a = GetRandom16(); + uint32_t b = GetRandom16(); + uint32_t y = (a << 16)|b; return y; } @@ -134,31 +134,31 @@ double RTPRandom::GetRandomDouble() #else #ifdef RTP_SUPPORT_RANDR -u_int8_t RTPRandom::GetRandom8() +uint8_t RTPRandom::GetRandom8() { - u_int8_t x; + uint8_t x; - x = (u_int8_t)(256.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); + x = (uint8_t)(256.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); return x; } -u_int16_t RTPRandom::GetRandom16() +uint16_t RTPRandom::GetRandom16() { - u_int16_t x; + uint16_t x; - x = (u_int16_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); + x = (uint16_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); return x; } -u_int32_t RTPRandom::GetRandom32() +uint32_t RTPRandom::GetRandom32() { - u_int32_t x,y; + uint32_t x,y; - x = (u_int32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); y = x; - x = (u_int32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); y ^= (x<<8); - x = (u_int32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); y ^= (x<<16); return y; @@ -172,31 +172,31 @@ double RTPRandom::GetRandomDouble() #else -u_int8_t RTPRandom::GetRandom8() +uint8_t RTPRandom::GetRandom8() { - u_int8_t x; + uint8_t x; - x = (u_int8_t)(256.0*((double)rand())/((double)RAND_MAX+1.0)); + x = (uint8_t)(256.0*((double)rand())/((double)RAND_MAX+1.0)); return x; } -u_int16_t RTPRandom::GetRandom16() +uint16_t RTPRandom::GetRandom16() { - u_int16_t x; + uint16_t x; - x = (u_int16_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); + x = (uint16_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); return x; } -u_int32_t RTPRandom::GetRandom32() +uint32_t RTPRandom::GetRandom32() { - u_int32_t x,y; + uint32_t x,y; - x = (u_int32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); y = x; - x = (u_int32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); y ^= (x<<8); - x = (u_int32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); + x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); y ^= (x<<16); return y; diff --git a/src/rtprandom.h b/src/rtprandom.h index 5a5e2c3..df7273f 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -43,9 +43,9 @@ class RTPRandom public: RTPRandom(); ~RTPRandom(); - u_int8_t GetRandom8(); - u_int16_t GetRandom16(); - u_int32_t GetRandom32(); + uint8_t GetRandom8(); + uint16_t GetRandom16(); + uint32_t GetRandom32(); double GetRandomDouble(); // returns random value between 0.0 and 1.0 private: #ifdef RTP_SUPPORT_GNUDRAND diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 04c8833..11a88c6 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -42,24 +42,24 @@ class RTPRawPacket { public: - RTPRawPacket(u_int8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp); + RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp); ~RTPRawPacket(); - u_int8_t *GetData() { return packetdata; } + uint8_t *GetData() { return packetdata; } size_t GetDataLength() const { return packetdatalength; } RTPTime GetReceiveTime() const { return receivetime; } const RTPAddress *GetSenderAddress() const { return senderaddress; } bool IsRTP() const { return isrtp; } void ZeroData() { packetdata = 0; packetdatalength = 0; } private: - u_int8_t *packetdata; + uint8_t *packetdata; size_t packetdatalength; RTPTime receivetime; RTPAddress *senderaddress; bool isrtp; }; -inline RTPRawPacket::RTPRawPacket(u_int8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp):receivetime(recvtime) +inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp):receivetime(recvtime) { packetdata = data; packetdatalength = datalen; diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 6cdd63a..59b0c83 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -35,7 +35,6 @@ #include "rtppollthread.h" #include "rtpudpv4transmitter.h" #include "rtpudpv6transmitter.h" -#include "rtpgsttransmitter.h" #include "rtpsessionparams.h" #include "rtpdefines.h" #include "rtprawpacket.h" @@ -113,11 +112,6 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP rtptrans = new RTPUDPv6Transmitter(); break; #endif // RTP_SUPPORT_IPV6 -#ifdef RTP_SUPPORT_GST - case RTPTransmitter::IPv4GSTProto: - rtptrans = new RTPGSTv4Transmitter(); - break; -#endif // RTP_SUPPORT_GST case RTPTransmitter::UserDefinedProto: rtptrans = NewUserDefinedTransmitter(); if (rtptrans == 0) @@ -177,7 +171,7 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP // Init the RTCP packet builder double timestampunit = sessparams.GetOwnTimestampUnit(); - u_int8_t buf[1024]; + uint8_t buf[1024]; size_t buflen = 1024; if ((status = CreateCNAME(buf,&buflen,sessparams.GetResolveLocalHostname())) < 0) @@ -419,12 +413,12 @@ bool RTPSession::IsActive() return created; } -u_int32_t RTPSession::GetLocalSSRC() +uint32_t RTPSession::GetLocalSSRC() { if (!created) return 0; - u_int32_t ssrc; + uint32_t ssrc; BUILDER_LOCK ssrc = packetbuilder.GetSSRC(); @@ -508,7 +502,7 @@ int RTPSession::SendPacket(const void *data,size_t len) } int RTPSession::SendPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc) + uint8_t pt,bool mark,uint32_t timestampinc) { int status; @@ -535,7 +529,7 @@ int RTPSession::SendPacket(const void *data,size_t len, } int RTPSession::SendPacketEx(const void *data,size_t len, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { int status; @@ -562,8 +556,8 @@ int RTPSession::SendPacketEx(const void *data,size_t len, } int RTPSession::SendPacketEx(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) + uint8_t pt,bool mark,uint32_t timestampinc, + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { int status; @@ -589,7 +583,7 @@ int RTPSession::SendPacketEx(const void *data,size_t len, return 0; } -int RTPSession::SetDefaultPayloadType(u_int8_t pt) +int RTPSession::SetDefaultPayloadType(uint8_t pt) { if (!created) return ERR_RTP_SESSION_NOTCREATED; @@ -615,7 +609,7 @@ int RTPSession::SetDefaultMark(bool m) return status; } -int RTPSession::SetDefaultTimestampIncrement(u_int32_t timestampinc) +int RTPSession::SetDefaultTimestampIncrement(uint32_t timestampinc) { if (!created) return ERR_RTP_SESSION_NOTCREATED; @@ -628,7 +622,7 @@ int RTPSession::SetDefaultTimestampIncrement(u_int32_t timestampinc) return status; } -int RTPSession::IncrementTimestamp(u_int32_t inc) +int RTPSession::IncrementTimestamp(uint32_t inc) { if (!created) return ERR_RTP_SESSION_NOTCREATED; @@ -654,6 +648,19 @@ int RTPSession::IncrementTimestampDefault() return status; } +int RTPSession::SetPreTransmissionDelay(const RTPTime &delay) +{ + if (!created) + return ERR_RTP_SESSION_NOTCREATED; + + int status; + + BUILDER_LOCK + status = rtcpbuilder.SetPreTransmissionDelay(delay); + BUILDER_UNLOCK + return status; +} + RTPTransmissionInfo *RTPSession::GetTransmissionInfo() { if (!created) @@ -764,7 +771,7 @@ RTPSourceData *RTPSession::GetCurrentSourceInfo() return sources.GetCurrentSourceInfo(); } -RTPSourceData *RTPSession::GetSourceInfo(u_int32_t ssrc) +RTPSourceData *RTPSession::GetSourceInfo(uint32_t ssrc) { if (!created) return 0; @@ -1090,7 +1097,7 @@ int RTPSession::ProcessPolledData() // and reset the packet count in the transmitter BUILDER_LOCK - u_int32_t newssrc = packetbuilder.CreateNewSSRC(sources); + uint32_t newssrc = packetbuilder.CreateNewSSRC(sources); BUILDER_UNLOCK rtptrans->ResetPacketCount(); @@ -1189,7 +1196,7 @@ int RTPSession::ProcessPolledData() return 0; } -int RTPSession::CreateCNAME(u_int8_t *buffer,size_t *bufferlength,bool resolve) +int RTPSession::CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve) { #ifndef WIN32 bool gotlogin = true; @@ -1240,7 +1247,7 @@ int RTPSession::CreateCNAME(u_int8_t *buffer,size_t *bufferlength,bool resolve) size_t offset = strlen((const char *)buffer); if (offset < (*bufferlength-1)) - buffer[offset] = (u_int8_t)'@'; + buffer[offset] = (uint8_t)'@'; offset++; size_t buflen2 = *bufferlength-offset; diff --git a/src/rtpsession.h b/src/rtpsession.h index 07e1f61..b23fb3f 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -72,7 +72,7 @@ class RTPSession void BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t reasonlength); bool IsActive(); - u_int32_t GetLocalSSRC(); + uint32_t GetLocalSSRC(); int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); @@ -85,17 +85,18 @@ class RTPSession int SendPacket(const void *data,size_t len); int SendPacket(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc); + uint8_t pt,bool mark,uint32_t timestampinc); int SendPacketEx(const void *data,size_t len, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); int SendPacketEx(const void *data,size_t len, - u_int8_t pt,bool mark,u_int32_t timestampinc, - u_int16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); - int SetDefaultPayloadType(u_int8_t pt); + uint8_t pt,bool mark,uint32_t timestampinc, + uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + int SetDefaultPayloadType(uint8_t pt); int SetDefaultMark(bool m); - int SetDefaultTimestampIncrement(u_int32_t timestampinc); - int IncrementTimestamp(u_int32_t inc); + int SetDefaultTimestampIncrement(uint32_t timestampinc); + int IncrementTimestamp(uint32_t inc); int IncrementTimestampDefault(); + int SetPreTransmissionDelay(const RTPTime &delay); RTPTransmissionInfo *GetTransmissionInfo(); int Poll(); @@ -115,7 +116,7 @@ class RTPSession bool GotoNextSourceWithData(); bool GotoPreviousSourceWithData(); RTPSourceData *GetCurrentSourceInfo(); - RTPSourceData *GetSourceInfo(u_int32_t ssrc); + RTPSourceData *GetSourceInfo(uint32_t ssrc); RTPPacket *GetNextPacket(); int EndDataAccess(); @@ -157,7 +158,7 @@ class RTPSession const RTPAddress *senderaddress) { } virtual void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp) { } virtual void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, - const u_int8_t *cname,size_t cnamelength) { } + const uint8_t *cname,size_t cnamelength) { } virtual void OnNewSource(RTPSourceData *srcdat) { } virtual void OnRemoveSource(RTPSourceData *srcdat) { } virtual void OnTimeout(RTPSourceData *srcdat) { } @@ -175,7 +176,7 @@ class RTPSession virtual void OnPollThreadStep() { } #endif // RTP_SUPPORT_THREAD private: - int CreateCNAME(u_int8_t *buffer,size_t *bufferlength,bool resolve); + int CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve); int ProcessPolledData(); int ProcessRTCPCompoundPacket(RTCPCompoundPacket &rtcpcomppack,RTPRawPacket *pack); diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index af4a8d2..b18d9d2 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 2ae92e2..f057b68 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index af2aca4..f42fb4f 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -55,7 +55,7 @@ void RTPSessionSources::OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress * rtpsession.OnSSRCCollision(srcdat,senderaddress,isrtp); } -void RTPSessionSources::OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,const u_int8_t *cname,size_t cnamelength) +void RTPSessionSources::OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,const uint8_t *cname,size_t cnamelength) { rtpsession.OnCNAMECollision(srcdat,senderaddress,cname,cnamelength); } diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index fe89caf..9be4e56 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -53,7 +53,7 @@ class RTPSessionSources : public RTPSources const RTPAddress *senderaddress); void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp); void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, - const u_int8_t *cname,size_t cnamelength); + const uint8_t *cname,size_t cnamelength); void OnNewSource(RTPSourceData *srcdat); void OnRemoveSource(RTPSourceData *srcdat); void OnTimeout(RTPSourceData *srcdat); diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index 08281a0..24f8a97 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -88,15 +88,15 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do if (probation) { - u_int16_t pseq; - u_int32_t pseq2; + uint16_t pseq; + uint32_t pseq2; pseq = prevseqnr; pseq++; - pseq2 = (u_int32_t)pseq; + pseq2 = (uint32_t)pseq; if (pseq2 == pack->GetExtendedSequenceNumber()) // ok, its the next expected packet { - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + prevseqnr = (uint16_t)pack->GetExtendedSequenceNumber(); probation--; if (probation == 0) // probation over acceptpack = true; @@ -106,14 +106,14 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do else // not next packet { probation = RTP_PROBATIONCOUNT; - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + prevseqnr = (uint16_t)pack->GetExtendedSequenceNumber(); *onprobation = true; } } else // first packet received with this SSRC ID, start probation { probation = RTP_PROBATIONCOUNT; - prevseqnr = (u_int16_t)pack->GetExtendedSequenceNumber(); + prevseqnr = (uint16_t)pack->GetExtendedSequenceNumber(); *onprobation = true; } @@ -139,8 +139,8 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do } else // already got packets { - u_int16_t maxseq16; - u_int32_t extseqnr; + uint16_t maxseq16; + uint32_t extseqnr; // Adjust max extended sequence number and set extende seq nr of packet @@ -148,7 +148,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do packetsreceived++; numnewpackets++; - maxseq16 = (u_int16_t)(exthighseqnr&0x0000FFFF); + maxseq16 = (uint16_t)(exthighseqnr&0x0000FFFF); if (pack->GetExtendedSequenceNumber() >= maxseq16) { extseqnr = numcycles+pack->GetExtendedSequenceNumber(); @@ -156,12 +156,12 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do } else { - u_int16_t dif1,dif2; + uint16_t dif1,dif2; - dif1 = ((u_int16_t)pack->GetExtendedSequenceNumber()); + dif1 = ((uint16_t)pack->GetExtendedSequenceNumber()); dif1 -= maxseq16; dif2 = maxseq16; - dif2 -= ((u_int16_t)pack->GetExtendedSequenceNumber()); + dif2 -= ((uint16_t)pack->GetExtendedSequenceNumber()); if (dif1 < dif2) { numcycles += 0x00010000; @@ -190,7 +190,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do diff -= djitter; diff /= 16.0; djitter += diff; - jitter = (u_int32_t)djitter; + jitter = (uint32_t)djitter; } else { @@ -206,7 +206,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do } } -RTPSourceData::RTPSourceData(u_int32_t s) : byetime(0,0) +RTPSourceData::RTPSourceData(uint32_t s) : byetime(0,0) { ssrc = s; issender = false; @@ -251,7 +251,7 @@ double RTPSourceData::INF_GetEstimatedTimestampUnit() const t1 -= t2; // get the time difference - u_int32_t tsdiff = SRinf.GetRTPTimestamp()-SRprevinf.GetRTPTimestamp(); + uint32_t tsdiff = SRinf.GetRTPTimestamp()-SRprevinf.GetRTPTimestamp(); return (t1.GetDouble()/((double)tsdiff)); } @@ -264,7 +264,7 @@ RTPTime RTPSourceData::INF_GetRoundtripTime() const return RTPTime(0,0); RTPNTPTime recvtime = RRinf.GetReceiveTime().GetNTPTime(); - u_int32_t rtt = ((recvtime.GetMSW()&0xFFFF)<<16)|((recvtime.GetLSW()>>16)&0xFFFF); + uint32_t rtt = ((recvtime.GetMSW()&0xFFFF)<<16)|((recvtime.GetLSW()>>16)&0xFFFF); rtt -= RRinf.GetLastSRTimestamp(); rtt -= RRinf.GetDelaySinceLastSR(); @@ -375,7 +375,7 @@ void RTPSourceData::Dump() size_t len; char str[1024]; - u_int8_t *val; + uint8_t *val; if ((val = SDESinf.GetCNAME(&len)) != 0) { @@ -421,7 +421,7 @@ void RTPSourceData::Dump() } #ifdef RTP_SUPPORT_SDESPRIV SDESinf.GotoFirstPrivateValue(); - u_int8_t *pref; + uint8_t *pref; size_t preflen; while (SDESinf.GetNextPrivateValue(&pref,&preflen,&val,&len)) { diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index 058379d..addc991 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -48,21 +48,21 @@ class RTCPSenderReportInfo { public: RTCPSenderReportInfo():ntptimestamp(0,0),receivetime(0,0) { hasinfo = false; rtptimestamp = 0; packetcount = 0; bytecount = 0; } - void Set(const RTPNTPTime &ntptime,u_int32_t rtptime,u_int32_t pcount, - u_int32_t bcount,const RTPTime &rcvtime) { ntptimestamp = ntptime; rtptimestamp = rtptime; packetcount = pcount; bytecount = bcount; receivetime = rcvtime; hasinfo = true; } + void Set(const RTPNTPTime &ntptime,uint32_t rtptime,uint32_t pcount, + uint32_t bcount,const RTPTime &rcvtime) { ntptimestamp = ntptime; rtptimestamp = rtptime; packetcount = pcount; bytecount = bcount; receivetime = rcvtime; hasinfo = true; } bool HasInfo() const { return hasinfo; } RTPNTPTime GetNTPTimestamp() const { return ntptimestamp; } - u_int32_t GetRTPTimestamp() const { return rtptimestamp; } - u_int32_t GetPacketCount() const { return packetcount; } - u_int32_t GetByteCount() const { return bytecount; } + uint32_t GetRTPTimestamp() const { return rtptimestamp; } + uint32_t GetPacketCount() const { return packetcount; } + uint32_t GetByteCount() const { return bytecount; } RTPTime GetReceiveTime() const { return receivetime; } private: bool hasinfo; RTPNTPTime ntptimestamp; - u_int32_t rtptimestamp; - u_int32_t packetcount; - u_int32_t bytecount; + uint32_t rtptimestamp; + uint32_t packetcount; + uint32_t bytecount; RTPTime receivetime; }; @@ -70,25 +70,25 @@ class RTCPReceiverReportInfo { public: RTCPReceiverReportInfo():receivetime(0,0) { hasinfo = false; fractionlost = 0; packetslost = 0; exthighseqnr = 0; jitter = 0; lsr = 0; dlsr = 0; } - void Set(u_int8_t fraclost,int32_t plost,u_int32_t exthigh, - u_int32_t jit,u_int32_t l,u_int32_t dl,const RTPTime &rcvtime) { fractionlost = ((double)fraclost)/256.0; packetslost = plost; exthighseqnr = exthigh; jitter = jit; lsr = l; dlsr = dl; receivetime = rcvtime; hasinfo = true; } + void Set(uint8_t fraclost,int32_t plost,uint32_t exthigh, + uint32_t jit,uint32_t l,uint32_t dl,const RTPTime &rcvtime) { fractionlost = ((double)fraclost)/256.0; packetslost = plost; exthighseqnr = exthigh; jitter = jit; lsr = l; dlsr = dl; receivetime = rcvtime; hasinfo = true; } bool HasInfo() const { return hasinfo; } double GetFractionLost() const { return fractionlost; } int32_t GetPacketsLost() const { return packetslost; } - u_int32_t GetExtendedHighestSequenceNumber() const { return exthighseqnr; } - u_int32_t GetJitter() const { return jitter; } - u_int32_t GetLastSRTimestamp() const { return lsr; } - u_int32_t GetDelaySinceLastSR() const { return dlsr; } + uint32_t GetExtendedHighestSequenceNumber() const { return exthighseqnr; } + uint32_t GetJitter() const { return jitter; } + uint32_t GetLastSRTimestamp() const { return lsr; } + uint32_t GetDelaySinceLastSR() const { return dlsr; } RTPTime GetReceiveTime() const { return receivetime; } private: bool hasinfo; double fractionlost; int32_t packetslost; - u_int32_t exthighseqnr; - u_int32_t jitter; - u_int32_t lsr; - u_int32_t dlsr; + uint32_t exthighseqnr; + uint32_t jitter; + uint32_t lsr; + uint32_t dlsr; RTPTime receivetime; }; @@ -99,13 +99,13 @@ class RTPSourceStats void ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,double tsunit,bool ownpacket,bool *accept,bool applyprobation,bool *onprobation); bool HasSentData() const { return sentdata; } - u_int32_t GetNumPacketsReceived() const { return packetsreceived; } - u_int32_t GetBaseSequenceNumber() const { return baseseqnr; } - u_int32_t GetExtendedHighestSequenceNumber() const { return exthighseqnr; } - u_int32_t GetJitter() const { return jitter; } + uint32_t GetNumPacketsReceived() const { return packetsreceived; } + uint32_t GetBaseSequenceNumber() const { return baseseqnr; } + uint32_t GetExtendedHighestSequenceNumber() const { return exthighseqnr; } + uint32_t GetJitter() const { return jitter; } int32_t GetNumPacketsReceivedInInterval() const { return numnewpackets; } - u_int32_t GetSavedExtendedSequenceNumber() const { return savedextseqnr; } + uint32_t GetSavedExtendedSequenceNumber() const { return savedextseqnr; } void StartNewInterval() { numnewpackets = 0; savedextseqnr = exthighseqnr; } void SetLastMessageTime(const RTPTime &t) { lastmsgtime = t; } @@ -117,20 +117,20 @@ class RTPSourceStats RTPTime GetLastNoteTime() const { return lastnotetime; } private: bool sentdata; - u_int32_t packetsreceived; - u_int32_t numcycles; // shifted left 16 bits - u_int32_t baseseqnr; - u_int32_t exthighseqnr,prevexthighseqnr; - u_int32_t jitter,prevtimestamp; + uint32_t packetsreceived; + uint32_t numcycles; // shifted left 16 bits + uint32_t baseseqnr; + uint32_t exthighseqnr,prevexthighseqnr; + uint32_t jitter,prevtimestamp; double djitter; RTPTime prevpacktime; RTPTime lastmsgtime; RTPTime lastrtptime; RTPTime lastnotetime; - u_int32_t numnewpackets; - u_int32_t savedextseqnr; + uint32_t numnewpackets; + uint32_t savedextseqnr; #ifdef RTP_SUPPORT_PROBATION - u_int16_t prevseqnr; + uint16_t prevseqnr; int probation; RTPSources::ProbationType probationtype; #endif // RTP_SUPPORT_PROBATION @@ -158,13 +158,13 @@ inline RTPSourceStats::RTPSourceStats():prevpacktime(0,0),lastmsgtime(0,0),lastr class RTPSourceData { protected: - RTPSourceData(u_int32_t ssrc); + RTPSourceData(uint32_t ssrc); virtual ~RTPSourceData(); public: RTPPacket *GetNextPacket(); void FlushPackets(); bool HasData() const { if (!validated) return false; return packetlist.empty()?false:true; } - u_int32_t GetSSRC() const { return ssrc; } + uint32_t GetSSRC() const { return ssrc; } bool IsOwnSSRC() const { return ownssrc; } bool IsCSRC() const { return iscsrc; } bool IsSender() const { return issender; } @@ -180,7 +180,7 @@ class RTPSourceData const RTPAddress *GetRTCPDataAddress() const { return rtcpaddr; } bool ReceivedBYE() const { return receivedbye; } - u_int8_t *GetBYEReason(size_t *len) const { *len = byereasonlen; return byereason; } + uint8_t *GetBYEReason(size_t *len) const { *len = byereasonlen; return byereason; } RTPTime GetBYETime() const { return byetime; } void SetTimestampUnit(double tsu) { timestampunit = tsu; } @@ -189,66 +189,66 @@ class RTPSourceData // Here is the info received in the last RTCP SR packet from this source bool SR_HasInfo() const { return SRinf.HasInfo(); } RTPNTPTime SR_GetNTPTimestamp() const { return SRinf.GetNTPTimestamp(); } - u_int32_t SR_GetRTPTimestamp() const { return SRinf.GetRTPTimestamp(); } - u_int32_t SR_GetPacketCount() const { return SRinf.GetPacketCount(); } - u_int32_t SR_GetByteCount() const { return SRinf.GetByteCount(); } + uint32_t SR_GetRTPTimestamp() const { return SRinf.GetRTPTimestamp(); } + uint32_t SR_GetPacketCount() const { return SRinf.GetPacketCount(); } + uint32_t SR_GetByteCount() const { return SRinf.GetByteCount(); } RTPTime SR_GetReceiveTime() const { return SRinf.GetReceiveTime(); } // Here is the info received in the previous RTCP SR packet from this source bool SR_Prev_HasInfo() const { return SRprevinf.HasInfo(); } RTPNTPTime SR_Prev_GetNTPTimestamp() const { return SRprevinf.GetNTPTimestamp(); } - u_int32_t SR_Prev_GetRTPTimestamp() const { return SRprevinf.GetRTPTimestamp(); } - u_int32_t SR_Prev_GetPacketCount() const { return SRprevinf.GetPacketCount(); } - u_int32_t SR_Prev_GetByteCount() const { return SRprevinf.GetByteCount(); } + uint32_t SR_Prev_GetRTPTimestamp() const { return SRprevinf.GetRTPTimestamp(); } + uint32_t SR_Prev_GetPacketCount() const { return SRprevinf.GetPacketCount(); } + uint32_t SR_Prev_GetByteCount() const { return SRprevinf.GetByteCount(); } RTPTime SR_Prev_GetReceiveTime() const { return SRprevinf.GetReceiveTime(); } // Here is the info received in the last RTCP RR packet from this source bool RR_HasInfo() const { return RRinf.HasInfo(); } double RR_GetFractionLost() const { return RRinf.GetFractionLost(); } int32_t RR_GetPacketsLost() const { return RRinf.GetPacketsLost(); } - u_int32_t RR_GetExtendedHighestSequenceNumber() const { return RRinf.GetExtendedHighestSequenceNumber(); } - u_int32_t RR_GetJitter() const { return RRinf.GetJitter(); } - u_int32_t RR_GetLastSRTimestamp() const { return RRinf.GetLastSRTimestamp(); } - u_int32_t RR_GetDelaySinceLastSR() const { return RRinf.GetDelaySinceLastSR(); } + uint32_t RR_GetExtendedHighestSequenceNumber() const { return RRinf.GetExtendedHighestSequenceNumber(); } + uint32_t RR_GetJitter() const { return RRinf.GetJitter(); } + uint32_t RR_GetLastSRTimestamp() const { return RRinf.GetLastSRTimestamp(); } + uint32_t RR_GetDelaySinceLastSR() const { return RRinf.GetDelaySinceLastSR(); } RTPTime RR_GetReceiveTime() const { return RRinf.GetReceiveTime(); } // Here is the info received in the last RTCP RR packet from this source bool RR_Prev_HasInfo() const { return RRprevinf.HasInfo(); } double RR_Prev_GetFractionLost() const { return RRprevinf.GetFractionLost(); } int32_t RR_Prev_GetPacketsLost() const { return RRprevinf.GetPacketsLost(); } - u_int32_t RR_Prev_GetExtendedHighestSequenceNumber() const { return RRprevinf.GetExtendedHighestSequenceNumber(); } - u_int32_t RR_Prev_GetJitter() const { return RRprevinf.GetJitter(); } - u_int32_t RR_Prev_GetLastSRTimestamp() const { return RRprevinf.GetLastSRTimestamp(); } - u_int32_t RR_Prev_GetDelaySinceLastSR() const { return RRprevinf.GetDelaySinceLastSR(); } + uint32_t RR_Prev_GetExtendedHighestSequenceNumber() const { return RRprevinf.GetExtendedHighestSequenceNumber(); } + uint32_t RR_Prev_GetJitter() const { return RRprevinf.GetJitter(); } + uint32_t RR_Prev_GetLastSRTimestamp() const { return RRprevinf.GetLastSRTimestamp(); } + uint32_t RR_Prev_GetDelaySinceLastSR() const { return RRprevinf.GetDelaySinceLastSR(); } RTPTime RR_Prev_GetReceiveTime() const { return RRprevinf.GetReceiveTime(); } // Here is info which is used when sending RTCP packets to this source bool INF_HasSentData() const { return stats.HasSentData(); } int32_t INF_GetNumPacketsReceived() const { return stats.GetNumPacketsReceived(); } - u_int32_t INF_GetBaseSequenceNumber() const { return stats.GetBaseSequenceNumber(); } - u_int32_t INF_GetExtendedHighestSequenceNumber() const { return stats.GetExtendedHighestSequenceNumber(); } - u_int32_t INF_GetJitter() const { return stats.GetJitter(); } + uint32_t INF_GetBaseSequenceNumber() const { return stats.GetBaseSequenceNumber(); } + uint32_t INF_GetExtendedHighestSequenceNumber() const { return stats.GetExtendedHighestSequenceNumber(); } + uint32_t INF_GetJitter() const { return stats.GetJitter(); } RTPTime INF_GetLastMessageTime() const { return stats.GetLastMessageTime(); } RTPTime INF_GetLastRTPPacketTime() const { return stats.GetLastRTPPacketTime(); } double INF_GetEstimatedTimestampUnit() const; - u_int32_t INF_GetNumPacketsReceivedInInterval() const { return stats.GetNumPacketsReceivedInInterval(); } - u_int32_t INF_GetSavedExtendedSequenceNumber() const { return stats.GetSavedExtendedSequenceNumber(); } + uint32_t INF_GetNumPacketsReceivedInInterval() const { return stats.GetNumPacketsReceivedInInterval(); } + uint32_t INF_GetSavedExtendedSequenceNumber() const { return stats.GetSavedExtendedSequenceNumber(); } void INF_StartNewInterval() { stats.StartNewInterval(); } RTPTime INF_GetRoundtripTime() const; RTPTime INF_GetLastSDESNoteTime() const { return stats.GetLastNoteTime(); } - u_int8_t *SDES_GetCNAME(size_t *len) const { return SDESinf.GetCNAME(len); } - u_int8_t *SDES_GetName(size_t *len) const { return SDESinf.GetName(len); } - u_int8_t *SDES_GetEMail(size_t *len) const { return SDESinf.GetEMail(len); } - u_int8_t *SDES_GetPhone(size_t *len) const { return SDESinf.GetPhone(len); } - u_int8_t *SDES_GetLocation(size_t *len) const { return SDESinf.GetLocation(len); } - u_int8_t *SDES_GetTool(size_t *len) const { return SDESinf.GetTool(len); } - u_int8_t *SDES_GetNote(size_t *len) const { return SDESinf.GetNote(len); } + uint8_t *SDES_GetCNAME(size_t *len) const { return SDESinf.GetCNAME(len); } + uint8_t *SDES_GetName(size_t *len) const { return SDESinf.GetName(len); } + uint8_t *SDES_GetEMail(size_t *len) const { return SDESinf.GetEMail(len); } + uint8_t *SDES_GetPhone(size_t *len) const { return SDESinf.GetPhone(len); } + uint8_t *SDES_GetLocation(size_t *len) const { return SDESinf.GetLocation(len); } + uint8_t *SDES_GetTool(size_t *len) const { return SDESinf.GetTool(len); } + uint8_t *SDES_GetNote(size_t *len) const { return SDESinf.GetNote(len); } #ifdef RTP_SUPPORT_SDESPRIV void SDES_GotoFirstPrivateValue() { SDESinf.GotoFirstPrivateValue(); } - bool SDES_GetNextPrivateValue(u_int8_t **prefix,size_t *prefixlen,u_int8_t **value,size_t *valuelen) { return SDESinf.GetNextPrivateValue(prefix,prefixlen,value,valuelen); } - bool SDES_GetPrivateValue(u_int8_t *prefix,size_t prefixlen,u_int8_t **value,size_t *valuelen) const { return SDESinf.GetPrivateValue(prefix,prefixlen,value,valuelen); } + bool SDES_GetNextPrivateValue(uint8_t **prefix,size_t *prefixlen,uint8_t **value,size_t *valuelen) { return SDESinf.GetNextPrivateValue(prefix,prefixlen,value,valuelen); } + bool SDES_GetPrivateValue(uint8_t *prefix,size_t prefixlen,uint8_t **value,size_t *valuelen) const { return SDESinf.GetPrivateValue(prefix,prefixlen,value,valuelen); } #endif // RTP_SUPPORT_SDESPRIV #ifdef RTPDEBUG @@ -257,7 +257,7 @@ class RTPSourceData protected: std::list packetlist; - u_int32_t ssrc; + uint32_t ssrc; bool ownssrc; bool iscsrc; double timestampunit; @@ -275,7 +275,7 @@ class RTPSourceData RTPAddress *rtpaddr,*rtcpaddr; RTPTime byetime; - u_int8_t *byereason; + uint8_t *byereason; size_t byereasonlen; }; diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 23ca210..90df7c0 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -52,7 +52,7 @@ #include "rtpdebug.h" #ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPSources_GetHashIndex(const u_int32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } + int RTPSources_GetHashIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } #endif // !RTP_SUPPORT_INLINETEMPLATEPARAM RTPSources::RTPSources(ProbationType probtype) @@ -89,9 +89,12 @@ void RTPSources::ClearSourceList() } sourcelist.Clear(); owndata = 0; + totalcount = 0; + sendercount = 0; + activecount = 0; } -int RTPSources::CreateOwnSSRC(u_int32_t ssrc) +int RTPSources::CreateOwnSSRC(uint32_t ssrc) { if (owndata != 0) return ERR_RTP_SOURCES_ALREADYHAVEOWNSSRC; @@ -123,7 +126,7 @@ int RTPSources::DeleteOwnSSRC() if (owndata == 0) return ERR_RTP_SOURCES_DONTHAVEOWNSSRC; - u_int32_t ssrc = owndata->GetSSRC(); + uint32_t ssrc = owndata->GetSSRC(); sourcelist.GotoElement(ssrc); sourcelist.DeleteCurrentElement(); @@ -286,7 +289,7 @@ int RTPSources::ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *rtptrans[ int RTPSources::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,const RTPAddress *senderaddress,bool *stored) { - u_int32_t ssrc; + uint32_t ssrc; RTPInternalSourceData *srcdat; int status; bool created; @@ -362,7 +365,7 @@ int RTPSources::ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const RTCPPacket *rtcppack; int status; bool gotownssrc = ((owndata == 0)?false:true); - u_int32_t ownssrc = ((owndata != 0)?owndata->GetSSRC():0); + uint32_t ownssrc = ((owndata != 0)?owndata->GetSSRC():0); OnRTCPCompoundPacket(rtcpcomppack,receivetime,senderaddress); @@ -376,7 +379,7 @@ int RTPSources::ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const case RTCPPacket::SR: { RTCPSRPacket *p = (RTCPSRPacket *)rtcppack; - u_int32_t senderssrc = p->GetSenderSSRC(); + uint32_t senderssrc = p->GetSenderSSRC(); status = ProcessRTCPSenderInfo(senderssrc,p->GetNTPTimestamp(),p->GetRTPTimestamp(), p->GetSenderPacketCount(),p->GetSenderOctetCount(), @@ -413,7 +416,7 @@ int RTPSources::ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const case RTCPPacket::RR: { RTCPRRPacket *p = (RTCPRRPacket *)rtcppack; - u_int32_t senderssrc = p->GetSenderSSRC(); + uint32_t senderssrc = p->GetSenderSSRC(); bool gotinfo = false; @@ -450,7 +453,7 @@ int RTPSources::ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const { do { - u_int32_t sdesssrc = p->GetChunkSSRC(); + uint32_t sdesssrc = p->GetChunkSSRC(); bool updated = false; if (p->GotoFirstItem()) { @@ -495,7 +498,7 @@ int RTPSources::ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const for (i = 0 ; i < num ; i++) { - u_int32_t byessrc = p->GetSSRC(i); + uint32_t byessrc = p->GetSSRC(i); status = ProcessBYE(byessrc,p->GetReasonLength(),p->GetReasonData(),receivetime,senderaddress); if (status < 0) return status; @@ -614,7 +617,7 @@ RTPSourceData *RTPSources::GetCurrentSourceInfo() return sourcelist.GetCurrentElement(); } -RTPSourceData *RTPSources::GetSourceInfo(u_int32_t ssrc) +RTPSourceData *RTPSources::GetSourceInfo(uint32_t ssrc) { if (sourcelist.GotoElement(ssrc) < 0) return 0; @@ -623,7 +626,7 @@ RTPSourceData *RTPSources::GetSourceInfo(u_int32_t ssrc) return sourcelist.GetCurrentElement(); } -bool RTPSources::GotEntry(u_int32_t ssrc) +bool RTPSources::GotEntry(uint32_t ssrc) { return sourcelist.HasElement(ssrc); } @@ -638,8 +641,8 @@ RTPPacket *RTPSources::GetNextPacket() return pack; } -int RTPSources::ProcessRTCPSenderInfo(u_int32_t ssrc,const RTPNTPTime &ntptime,u_int32_t rtptime, - u_int32_t packetcount,u_int32_t octetcount,const RTPTime &receivetime, +int RTPSources::ProcessRTCPSenderInfo(uint32_t ssrc,const RTPNTPTime &ntptime,uint32_t rtptime, + uint32_t packetcount,uint32_t octetcount,const RTPTime &receivetime, const RTPAddress *senderaddress) { RTPInternalSourceData *srcdat; @@ -661,9 +664,9 @@ int RTPSources::ProcessRTCPSenderInfo(u_int32_t ssrc,const RTPNTPTime &ntptime,u return 0; } -int RTPSources::ProcessRTCPReportBlock(u_int32_t ssrc,u_int8_t fractionlost,int32_t lostpackets, - u_int32_t exthighseqnr,u_int32_t jitter,u_int32_t lsr, - u_int32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress) +int RTPSources::ProcessRTCPReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t lostpackets, + uint32_t exthighseqnr,uint32_t jitter,uint32_t lsr, + uint32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress) { RTPInternalSourceData *srcdat; bool created; @@ -684,13 +687,13 @@ int RTPSources::ProcessRTCPReportBlock(u_int32_t ssrc,u_int8_t fractionlost,int3 return 0; } -int RTPSources::ProcessSDESNormalItem(u_int32_t ssrc,RTCPSDESPacket::ItemType t,size_t itemlength, +int RTPSources::ProcessSDESNormalItem(uint32_t ssrc,RTCPSDESPacket::ItemType t,size_t itemlength, const void *itemdata,const RTPTime &receivetime,const RTPAddress *senderaddress) { RTPInternalSourceData *srcdat; bool created,cnamecollis; int status; - u_int8_t id; + uint8_t id; bool prevactive; switch(t) @@ -727,7 +730,7 @@ int RTPSources::ProcessSDESNormalItem(u_int32_t ssrc,RTCPSDESPacket::ItemType t, return 0; prevactive = srcdat->IsActive(); - status = srcdat->ProcessSDESItem(id,(const u_int8_t *)itemdata,itemlength,receivetime,&cnamecollis); + status = srcdat->ProcessSDESItem(id,(const uint8_t *)itemdata,itemlength,receivetime,&cnamecollis); if (!prevactive && srcdat->IsActive()) activecount++; @@ -735,13 +738,13 @@ int RTPSources::ProcessSDESNormalItem(u_int32_t ssrc,RTCPSDESPacket::ItemType t, if (created) OnNewSource(srcdat); if (cnamecollis) - OnCNAMECollision(srcdat,senderaddress,(const u_int8_t *)itemdata,itemlength); + OnCNAMECollision(srcdat,senderaddress,(const uint8_t *)itemdata,itemlength); return status; } #ifdef RTP_SUPPORT_SDESPRIV -int RTPSources::ProcessSDESPrivateItem(u_int32_t ssrc,size_t prefixlen,const void *prefixdata, +int RTPSources::ProcessSDESPrivateItem(uint32_t ssrc,size_t prefixlen,const void *prefixdata, size_t valuelen,const void *valuedata,const RTPTime &receivetime, const RTPAddress *senderaddress) { @@ -755,7 +758,7 @@ int RTPSources::ProcessSDESPrivateItem(u_int32_t ssrc,size_t prefixlen,const voi if (srcdat == 0) return 0; - status = srcdat->ProcessPrivateSDESItem((const u_int8_t *)prefixdata,prefixlen,(const u_int8_t *)valuedata,valuelen,receivetime); + status = srcdat->ProcessPrivateSDESItem((const uint8_t *)prefixdata,prefixlen,(const uint8_t *)valuedata,valuelen,receivetime); // Call the callback if (created) OnNewSource(srcdat); @@ -763,7 +766,7 @@ int RTPSources::ProcessSDESPrivateItem(u_int32_t ssrc,size_t prefixlen,const voi } #endif //RTP_SUPPORT_SDESPRIV -int RTPSources::ProcessBYE(u_int32_t ssrc,size_t reasonlength,const void *reasondata, +int RTPSources::ProcessBYE(uint32_t ssrc,size_t reasonlength,const void *reasondata, const RTPTime &receivetime,const RTPAddress *senderaddress) { RTPInternalSourceData *srcdat; @@ -782,7 +785,7 @@ int RTPSources::ProcessBYE(u_int32_t ssrc,size_t reasonlength,const void *reason return 0; prevactive = srcdat->IsActive(); - srcdat->ProcessBYEPacket((const u_int8_t *)reasondata,reasonlength,receivetime); + srcdat->ProcessBYEPacket((const uint8_t *)reasondata,reasonlength,receivetime); if (prevactive && !srcdat->IsActive()) activecount--; @@ -793,7 +796,7 @@ int RTPSources::ProcessBYE(u_int32_t ssrc,size_t reasonlength,const void *reason return 0; } -int RTPSources::ObtainSourceDataInstance(u_int32_t ssrc,RTPInternalSourceData **srcdat,bool *created) +int RTPSources::ObtainSourceDataInstance(uint32_t ssrc,RTPInternalSourceData **srcdat,bool *created) { RTPInternalSourceData *srcdat2; int status; @@ -825,7 +828,7 @@ int RTPSources::ObtainSourceDataInstance(u_int32_t ssrc,RTPInternalSourceData ** } -int RTPSources::GetRTCPSourceData(u_int32_t ssrc,const RTPAddress *senderaddress, +int RTPSources::GetRTCPSourceData(uint32_t ssrc,const RTPAddress *senderaddress, RTPInternalSourceData **srcdat2,bool *newsource) { int status; @@ -854,7 +857,7 @@ int RTPSources::GetRTCPSourceData(u_int32_t ssrc,const RTPAddress *senderaddress return 0; } -int RTPSources::UpdateReceiveTime(u_int32_t ssrc,const RTPTime &receivetime,const RTPAddress *senderaddress) +int RTPSources::UpdateReceiveTime(uint32_t ssrc,const RTPTime &receivetime,const RTPAddress *senderaddress) { RTPInternalSourceData *srcdat; bool created; @@ -1080,7 +1083,7 @@ void RTPSources::NoteTimeout(const RTPTime &curtime,const RTPTime &timeoutdelay) while (sourcelist.HasCurrentElement()) { RTPInternalSourceData *srcdat = sourcelist.GetCurrentElement(); - u_int8_t *note; + uint8_t *note; size_t notelen; note = srcdat->SDES_GetNote(¬elen); @@ -1147,7 +1150,7 @@ void RTPSources::MultipleTimeouts(const RTPTime &curtime,const RTPTime &senderti RTPInternalSourceData *srcdat = sourcelist.GetCurrentElement(); bool deleted,issender,isactive; bool byetimeout,normaltimeout,notetimeout; - u_int8_t *note; + uint8_t *note; size_t notelen; issender = srcdat->IsSender(); diff --git a/src/rtpsources.h b/src/rtpsources.h index aa56763..fe50dcf 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -42,9 +42,9 @@ #define RTPSOURCES_HASHSIZE 8317 #ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPSources_GetHashIndex(const u_int32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } + inline int RTPSources_GetHashIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } #else // can't use inline function as template parameter - int RTPSources_GetHashIndex(const u_int32_t &ssrc); + int RTPSources_GetHashIndex(const uint32_t &ssrc); #endif // RTP_SUPPORT_INLINETEMPLATEPARAM class RTPNTPTime; @@ -69,7 +69,7 @@ class RTPSources void SetProbationType(ProbationType probtype) { probationtype = probtype; } #endif // RTP_SUPPORT_PROBATION - int CreateOwnSSRC(u_int32_t ssrc); + int CreateOwnSSRC(uint32_t ssrc); int DeleteOwnSSRC(); void SentRTPPacket(); @@ -81,26 +81,26 @@ class RTPSources int ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const RTPTime &receivetime, const RTPAddress *senderaddress); - int ProcessRTCPSenderInfo(u_int32_t ssrc,const RTPNTPTime &ntptime,u_int32_t rtptime, - u_int32_t packetcount,u_int32_t octetcount,const RTPTime &receivetime, + int ProcessRTCPSenderInfo(uint32_t ssrc,const RTPNTPTime &ntptime,uint32_t rtptime, + uint32_t packetcount,uint32_t octetcount,const RTPTime &receivetime, const RTPAddress *senderaddress); - int ProcessRTCPReportBlock(u_int32_t ssrc,u_int8_t fractionlost,int32_t lostpackets, - u_int32_t exthighseqnr,u_int32_t jitter,u_int32_t lsr, - u_int32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress); - int ProcessSDESNormalItem(u_int32_t ssrc,RTCPSDESPacket::ItemType t,size_t itemlength, + int ProcessRTCPReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t lostpackets, + uint32_t exthighseqnr,uint32_t jitter,uint32_t lsr, + uint32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress); + int ProcessSDESNormalItem(uint32_t ssrc,RTCPSDESPacket::ItemType t,size_t itemlength, const void *itemdata,const RTPTime &receivetime,const RTPAddress *senderaddress); #ifdef RTP_SUPPORT_SDESPRIV - int ProcessSDESPrivateItem(u_int32_t ssrc,size_t prefixlen,const void *prefixdata, + int ProcessSDESPrivateItem(uint32_t ssrc,size_t prefixlen,const void *prefixdata, size_t valuelen,const void *valuedata,const RTPTime &receivetime, const RTPAddress *senderaddress); #endif //RTP_SUPPORT_SDESPRIV - int ProcessBYE(u_int32_t ssrc,size_t reasonlength,const void *reasondata,const RTPTime &receivetime, + int ProcessBYE(uint32_t ssrc,size_t reasonlength,const void *reasondata,const RTPTime &receivetime, const RTPAddress *senderaddress); // If no specific info was sent to us, but we did receive a packet from a SSRC, the following // function can be used to update the time at which we last heard something from the SSRC. // This way, premature timeouts can be avoided. - int UpdateReceiveTime(u_int32_t ssrc,const RTPTime &receivetime,const RTPAddress *senderaddress); + int UpdateReceiveTime(uint32_t ssrc,const RTPTime &receivetime,const RTPAddress *senderaddress); bool GotoFirstSource(); bool GotoNextSource(); @@ -109,9 +109,9 @@ class RTPSources bool GotoNextSourceWithData(); bool GotoPreviousSourceWithData(); RTPSourceData *GetCurrentSourceInfo(); - RTPSourceData *GetSourceInfo(u_int32_t ssrc); + RTPSourceData *GetSourceInfo(uint32_t ssrc); RTPPacket *GetNextPacket(); - bool GotEntry(u_int32_t ssrc); + bool GotEntry(uint32_t ssrc); RTPSourceData *GetOwnSourceInfo() { return (RTPSourceData *)owndata; } void Timeout(const RTPTime &curtime,const RTPTime &timeoutdelay); @@ -138,7 +138,7 @@ class RTPSources const RTPAddress *senderaddress) { } virtual void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp) { } virtual void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, - const u_int8_t *cname,size_t cnamelength) { } + const uint8_t *cname,size_t cnamelength) { } virtual void OnNewSource(RTPSourceData *srcdat) { } virtual void OnRemoveSource(RTPSourceData *srcdat) { } virtual void OnTimeout(RTPSourceData *srcdat) { } @@ -153,11 +153,11 @@ class RTPSources virtual void OnNoteTimeout(RTPSourceData *srcdat) { } private: void ClearSourceList(); - int ObtainSourceDataInstance(u_int32_t ssrc,RTPInternalSourceData **srcdat,bool *created); - int GetRTCPSourceData(u_int32_t ssrc,const RTPAddress *senderaddress,RTPInternalSourceData **srcdat,bool *newsource); + int ObtainSourceDataInstance(uint32_t ssrc,RTPInternalSourceData **srcdat,bool *created); + int GetRTCPSourceData(uint32_t ssrc,const RTPAddress *senderaddress,RTPInternalSourceData **srcdat,bool *newsource); bool CheckCollision(RTPInternalSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp); - RTPKeyHashTable sourcelist; + RTPKeyHashTable sourcelist; int sendercount; int totalcount; diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 05cc1fd..991c571 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -40,79 +40,79 @@ struct RTPHeader { #ifdef RTP_BIG_ENDIAN - u_int8_t version:2; - u_int8_t padding:1; - u_int8_t extension:1; - u_int8_t csrccount:4; + uint8_t version:2; + uint8_t padding:1; + uint8_t extension:1; + uint8_t csrccount:4; - u_int8_t marker:1; - u_int8_t payloadtype:7; + uint8_t marker:1; + uint8_t payloadtype:7; #else // little endian - u_int8_t csrccount:4; - u_int8_t extension:1; - u_int8_t padding:1; - u_int8_t version:2; + uint8_t csrccount:4; + uint8_t extension:1; + uint8_t padding:1; + uint8_t version:2; - u_int8_t payloadtype:7; - u_int8_t marker:1; + uint8_t payloadtype:7; + uint8_t marker:1; #endif // RTP_BIG_ENDIAN - u_int16_t sequencenumber; - u_int32_t timestamp; - u_int32_t ssrc; + uint16_t sequencenumber; + uint32_t timestamp; + uint32_t ssrc; }; struct RTPExtensionHeader { - u_int16_t id; - u_int16_t length; + uint16_t id; + uint16_t length; }; struct RTPSourceIdentifier { - u_int32_t ssrc; + uint32_t ssrc; }; struct RTCPCommonHeader { #ifdef RTP_BIG_ENDIAN - u_int8_t version:2; - u_int8_t padding:1; - u_int8_t count:5; + uint8_t version:2; + uint8_t padding:1; + uint8_t count:5; #else // little endian - u_int8_t count:5; - u_int8_t padding:1; - u_int8_t version:2; + uint8_t count:5; + uint8_t padding:1; + uint8_t version:2; #endif // RTP_BIG_ENDIAN - u_int8_t packettype; - u_int16_t length; + uint8_t packettype; + uint16_t length; }; struct RTCPSenderReport { - u_int32_t ntptime_msw; - u_int32_t ntptime_lsw; - u_int32_t rtptimestamp; - u_int32_t packetcount; - u_int32_t octetcount; + uint32_t ntptime_msw; + uint32_t ntptime_lsw; + uint32_t rtptimestamp; + uint32_t packetcount; + uint32_t octetcount; }; struct RTCPReceiverReport { - u_int32_t ssrc; // Identifies about which SSRC's data this report is... - u_int8_t fractionlost; - u_int8_t packetslost[3]; - u_int32_t exthighseqnr; - u_int32_t jitter; - u_int32_t lsr; - u_int32_t dlsr; + uint32_t ssrc; // Identifies about which SSRC's data this report is... + uint8_t fractionlost; + uint8_t packetslost[3]; + uint32_t exthighseqnr; + uint32_t jitter; + uint32_t lsr; + uint32_t dlsr; }; struct RTCPSDESHeader { - u_int8_t id; - u_int8_t length; + uint8_t id; + uint8_t length; }; #endif // RTPSTRUCTS diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index 8d1d176..e027e93 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 4763ae6..4dbbfc2 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -50,11 +50,11 @@ class RTPNTPTime { public: - RTPNTPTime(u_int32_t m,u_int32_t l) { msw = m ; lsw = l; } - u_int32_t GetMSW() const { return msw; } - u_int32_t GetLSW() const { return lsw; } + RTPNTPTime(uint32_t m,uint32_t l) { msw = m ; lsw = l; } + uint32_t GetMSW() const { return msw; } + uint32_t GetLSW() const { return lsw; } private: - u_int32_t msw,lsw; + uint32_t msw,lsw; }; class RTPTime @@ -65,9 +65,9 @@ class RTPTime RTPTime(double t); RTPTime(RTPNTPTime ntptime); - RTPTime(u_int32_t seconds,u_int32_t microseconds) { sec = seconds; microsec = microseconds; } - u_int32_t GetSeconds() const { return sec; } - u_int32_t GetMicroSeconds() const { return microsec; } + RTPTime(uint32_t seconds,uint32_t microseconds) { sec = seconds; microsec = microseconds; } + uint32_t GetSeconds() const { return sec; } + uint32_t GetMicroSeconds() const { return microsec; } double GetDouble() const { return (((double)sec)+(((double)microsec)/1000000.0)); } RTPTime &operator-=(const RTPTime &t); RTPTime &operator+=(const RTPTime &t); @@ -77,16 +77,16 @@ class RTPTime bool operator<=(const RTPTime &t) const; bool operator>=(const RTPTime &t) const; private: - u_int32_t sec,microsec; + uint32_t sec,microsec; }; inline RTPTime::RTPTime(double t) { - sec = (u_int32_t)t; + sec = (uint32_t)t; double t2 = t-((double)sec); t2 *= 1000000.0; - microsec = (u_int32_t)t2; + microsec = (uint32_t)t2; } inline RTPTime::RTPTime(RTPNTPTime ntptime) @@ -103,7 +103,7 @@ inline RTPTime::RTPTime(RTPNTPTime ntptime) double x = (double)ntptime.GetLSW(); x /= (65536.0*65536.0); x *= 1000000.0; - microsec = (u_int32_t)x; + microsec = (uint32_t)x; } } @@ -137,7 +137,7 @@ inline RTPTime RTPTime::CurrentTime() microdiff = emulate_microseconds - initmicroseconds; - return RTPTime((u_int32_t)((microseconds + microdiff) / 1000000ui64),((u_int32_t)((microseconds + microdiff) % 1000000ui64))); + return RTPTime((uint32_t)((microseconds + microdiff) / 1000000ui64),((uint32_t)((microseconds + microdiff) % 1000000ui64))); } inline void RTPTime::Wait(const RTPTime &delay) @@ -164,7 +164,7 @@ inline RTPTime RTPTime::CurrentTime() struct timeval tv; gettimeofday(&tv,0); - return RTPTime((u_int32_t)tv.tv_sec,(u_int32_t)tv.tv_usec); + return RTPTime((uint32_t)tv.tv_sec,(uint32_t)tv.tv_usec); } inline void RTPTime::Wait(const RTPTime &delay) @@ -204,13 +204,13 @@ inline RTPTime &RTPTime::operator+=(const RTPTime &t) inline RTPNTPTime RTPTime::GetNTPTime() const { - u_int32_t msw = sec+RTP_NTPTIMEOFFSET; - u_int32_t lsw; + uint32_t msw = sec+RTP_NTPTIMEOFFSET; + uint32_t lsw; double x; x = microsec/1000000.0; x *= (65536.0*65536.0); - lsw = (u_int32_t)x; + lsw = (uint32_t)x; return RTPNTPTime(msw,lsw); } diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 9e6f70a..daf996d 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -48,7 +48,7 @@ class RTPTransmissionInfo; class RTPTransmitter { public: - enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, IPv4GSTProto, UserDefinedProto }; + enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, UserDefinedProto }; enum ReceiveMode { AcceptAll,AcceptSome,IgnoreSome }; protected: RTPTransmitter() { } @@ -69,7 +69,7 @@ class RTPTransmitter // If the size is ok, bufferlength is adjusted so that it indicates the // amount of bytes in the buffer that are part of the hostname. // The buffer is NOT null terminated! - virtual int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) = 0; + virtual int GetLocalHostName(uint8_t *buffer,size_t *bufferlength) = 0; virtual bool ComesFromThisTransmitter(const RTPAddress *addr) = 0; virtual size_t GetHeaderOverhead() = 0; @@ -84,8 +84,8 @@ class RTPTransmitter virtual int SendRTCPData(const void *data,size_t len) = 0; virtual void ResetPacketCount() = 0; - virtual u_int32_t GetNumRTPPacketsSent() = 0; - virtual u_int32_t GetNumRTCPPacketsSent() = 0; + virtual uint32_t GetNumRTPPacketsSent() = 0; + virtual uint32_t GetNumRTCPPacketsSent() = 0; virtual int AddDestination(const RTPAddress &addr) = 0; virtual int DeleteDestination(const RTPAddress &addr) = 0; diff --git a/src/rtptypes.h b/src/rtptypes.h index 0d8668a..6467e94 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index ea3bbdb..4e8185b 100755 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -41,15 +41,22 @@ #else #include #include - - typedef short int16_t; - typedef char int8_t; #endif // _WIN32_WCE -typedef unsigned long u_int32_t; -typedef unsigned short u_int16_t; -typedef unsigned char u_int8_t; -typedef long int32_t; +#ifndef INTTYPES_DEFINED + +#define INTTYPES_DEFINED + +typedef char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned int uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#endif // INTTYPES_DEFINED #endif // RTPTYPES_H diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index a720f1e..d7da137 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -77,6 +77,8 @@ #include "rtpdebug.h" +#include + #ifndef _WIN32_WCE #define RTPUDPV4TRANS_RTPRECEIVEBUFFER 32768 #define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 32768 @@ -99,12 +101,12 @@ struct ip_mreq mreq;\ \ mreq.imr_multiaddr.s_addr = htonl(mcastip);\ - mreq.imr_interface.s_addr = htonl(bindIP);\ + mreq.imr_interface.s_addr = htonl(mcastifaceIP);\ status = setsockopt(socket,IPPROTO_IP,type,(const char *)&mreq,sizeof(struct ip_mreq));\ } #ifndef RTP_SUPPORT_INLINETEMPLATEPARAM int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } - int RTPUDPv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } + int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } #endif // !RTP_SUPPORT_INLINETEMPLATEPARAM #ifdef RTP_SUPPORT_THREAD @@ -253,6 +255,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa // bind sockets bindIP = params->GetBindIP(); + mcastifaceIP = params->GetMulticastInterfaceIP(); memset(&addr,0,sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; @@ -294,7 +297,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa #ifdef RTPDEBUG std::cout << "Found these local IP addresses:" << std::endl; - std::list::const_iterator it; + std::list::const_iterator it; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { @@ -403,7 +406,7 @@ RTPTransmissionInfo *RTPUDPv4Transmitter::GetTransmissionInfo() return tinf; } -int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) +int RTPUDPv4Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) return ERR_RTP_UDPV4TRANS_NOTINIT; @@ -423,24 +426,55 @@ int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) return ERR_RTP_UDPV4TRANS_NOLOCALIPS; } - std::list::const_iterator it; + std::list::const_iterator it; std::list hostnames; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { - struct hostent *he; - u_int8_t addr[4]; - u_int32_t ip = (*it); - - addr[0] = (u_int8_t)((ip>>24)&0xFF); - addr[1] = (u_int8_t)((ip>>16)&0xFF); - addr[2] = (u_int8_t)((ip>>8)&0xFF); - addr[3] = (u_int8_t)(ip&0xFF); - he = gethostbyaddr((char *)addr,4,AF_INET); - if (he != 0) + bool founddouble = false; + bool foundentry = true; + + while (!founddouble && foundentry) { - std::string hname = std::string(he->h_name); - hostnames.push_back(hname); + struct hostent *he; + uint8_t addr[4]; + uint32_t ip = (*it); + + addr[0] = (uint8_t)((ip>>24)&0xFF); + addr[1] = (uint8_t)((ip>>16)&0xFF); + addr[2] = (uint8_t)((ip>>8)&0xFF); + addr[3] = (uint8_t)(ip&0xFF); + he = gethostbyaddr((char *)addr,4,AF_INET); + if (he != 0) + { + std::string hname = std::string(he->h_name); + std::list::const_iterator it; + + for (it = hostnames.begin() ; !founddouble && it != hostnames.end() ; it++) + if ((*it) == hname) + founddouble = true; + + if (!founddouble) + hostnames.push_back(hname); + + int i = 0; + while (!founddouble && he->h_aliases[i] != 0) + { + std::string hname = std::string(he->h_aliases[i]); + + for (it = hostnames.begin() ; !founddouble && it != hostnames.end() ; it++) + if ((*it) == hname) + founddouble = true; + + if (!founddouble) + { + hostnames.push_back(hname); + i++; + } + } + } + else + foundentry = false; } } @@ -449,14 +483,15 @@ int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) if (!hostnames.empty()) // try to select the most appropriate hostname { std::list::const_iterator it; - + + hostnames.sort(); for (it = hostnames.begin() ; !found && it != hostnames.end() ; it++) { if ((*it).find('.') != std::string::npos) { found = true; localhostnamelength = (*it).length(); - localhostname = new u_int8_t [localhostnamelength+1]; + localhostname = new uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -470,18 +505,22 @@ int RTPUDPv4Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) if (!found) // use an IP address { - u_int32_t ip; + uint32_t ip; int len; - char str[256]; + char str[16]; it = localIPs.begin(); ip = (*it); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); +#if (defined(WIN32) || defined(_WIN32_WCE)) + _snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); +#else + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); +#endif // WIN32 || _WIN32_WCE len = strlen(str); localhostnamelength = len; - localhostname = new u_int8_t [localhostnamelength + 1]; + localhostname = new uint8_t [localhostnamelength + 1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -522,7 +561,7 @@ bool RTPUDPv4Transmitter::ComesFromThisTransmitter(const RTPAddress *addr) { const RTPIPv4Address *addr2 = (const RTPIPv4Address *)addr; bool found = false; - std::list::const_iterator it; + std::list::const_iterator it; it = localIPs.begin(); while (!found && it != localIPs.end()) @@ -759,14 +798,14 @@ void RTPUDPv4Transmitter::ResetPacketCount() MAINMUTEX_UNLOCK } -u_int32_t RTPUDPv4Transmitter::GetNumRTPPacketsSent() +uint32_t RTPUDPv4Transmitter::GetNumRTPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -778,14 +817,14 @@ u_int32_t RTPUDPv4Transmitter::GetNumRTPPacketsSent() return num; } -u_int32_t RTPUDPv4Transmitter::GetNumRTCPPacketsSent() +uint32_t RTPUDPv4Transmitter::GetNumRTCPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -901,7 +940,7 @@ int RTPUDPv4Transmitter::JoinMulticastGroup(const RTPAddress &addr) } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; - u_int32_t mcastIP = address.GetIP(); + uint32_t mcastIP = address.GetIP(); if (!RTPUDPV4TRANS_IS_MCASTADDR(mcastIP)) { @@ -953,7 +992,7 @@ int RTPUDPv4Transmitter::LeaveMulticastGroup(const RTPAddress &addr) } const RTPIPv4Address &address = (const RTPIPv4Address &)addr; - u_int32_t mcastIP = address.GetIP(); + uint32_t mcastIP = address.GetIP(); if (!RTPUDPV4TRANS_IS_MCASTADDR(mcastIP)) { @@ -984,7 +1023,7 @@ void RTPUDPv4Transmitter::LeaveAllMulticastGroups() multicastgroups.GotoFirstElement(); while (multicastgroups.HasCurrentElement()) { - u_int32_t mcastIP; + uint32_t mcastIP; int status = 0; mcastIP = multicastgroups.GetCurrentElement(); @@ -1259,7 +1298,7 @@ RTPRawPacket *RTPUDPv4Transmitter::GetNextPacket() // Here the private functions start... #ifdef RTP_SUPPORT_IPV4MULTICAST -bool RTPUDPv4Transmitter::SetMulticastTTL(u_int8_t ttl) +bool RTPUDPv4Transmitter::SetMulticastTTL(uint8_t ttl) { int ttl2,status; @@ -1326,12 +1365,12 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) { RTPRawPacket *pack; RTPIPv4Address *addr; - u_int8_t *datacopy; + uint8_t *datacopy; addr = new RTPIPv4Address(ntohl(srcaddr.sin_addr.s_addr),ntohs(srcaddr.sin_port)); if (addr == 0) return ERR_RTP_OUTOFMEM; - datacopy = new u_int8_t[recvlen]; + datacopy = new uint8_t[recvlen]; if (datacopy == 0) { delete addr; @@ -1355,7 +1394,7 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) return 0; } -int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (acceptignoreinfo.HasCurrentElement()) // An entry for this IP address already exists @@ -1369,7 +1408,7 @@ int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port } else if (!portinf->all) { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = portinf->portlist.begin(); end = portinf->portlist.end(); @@ -1417,7 +1456,7 @@ void RTPUDPv4Transmitter::ClearAcceptIgnoreInfo() acceptignoreinfo.Clear(); } -int RTPUDPv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port) +int RTPUDPv4Transmitter::ProcessDeleteAcceptIgnoreEntry(uint32_t ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (!acceptignoreinfo.HasCurrentElement()) @@ -1436,7 +1475,7 @@ int RTPUDPv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t p if (inf->all) // currently, all ports are selected. Add the one to remove to the list { // we have to check if the list doesn't contain the port already - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1449,7 +1488,7 @@ int RTPUDPv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t p } else // check if we can find the port in the list { - std::list::iterator it,begin,end; + std::list::iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1468,7 +1507,7 @@ int RTPUDPv4Transmitter::ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t p return 0; } -bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) +bool RTPUDPv4Transmitter::ShouldAcceptData(uint32_t srcip,uint16_t srcport) { if (receivemode == RTPTransmitter::AcceptSome) { @@ -1481,7 +1520,7 @@ bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // only accept the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1494,7 +1533,7 @@ bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) } else // accept all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1517,7 +1556,7 @@ bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // ignore the ports in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1530,7 +1569,7 @@ bool RTPUDPv4Transmitter::ShouldAcceptData(u_int32_t srcip,u_int16_t srcport) } else // ignore all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1706,7 +1745,7 @@ bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() while (tmp != 0) { - if (tmp->ifa_addr->sa_family == AF_INET) + if (tmp->ifa_addr != 0 && tmp->ifa_addr->sa_family == AF_INET) { struct sockaddr_in *inaddr = (struct sockaddr_in *)tmp->ifa_addr; localIPs.push_back(ntohl(inaddr->sin_addr.s_addr)); @@ -1751,7 +1790,7 @@ bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() { if (sa->sa_len == sizeof(struct sockaddr_in) && sa->sa_family == PF_INET) { - u_int32_t ip; + uint32_t ip; struct sockaddr_in *addr = (struct sockaddr_in *)sa; ip = ntohl(addr->sin_addr.s_addr); @@ -1770,7 +1809,7 @@ bool RTPUDPv4Transmitter::GetLocalIPList_Interfaces() #else // don't have sa_len in struct sockaddr if (sa->sa_family == PF_INET) { - u_int32_t ip; + uint32_t ip; struct sockaddr_in *addr = (struct sockaddr_in *)sa; ip = ntohl(addr->sin_addr.s_addr); @@ -1795,7 +1834,7 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() { struct hostent *he; char name[1024]; - u_int32_t ip; + uint32_t ip; bool done; int i,j; @@ -1816,7 +1855,7 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() { ip = 0; for (j = 0 ; j < 4 ; j++) - ip |= ((u_int32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); + ip |= ((uint32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); localIPs.push_back(ip); i++; } @@ -1834,8 +1873,8 @@ void RTPUDPv4Transmitter::AbortWaitInternal() void RTPUDPv4Transmitter::AddLoopbackAddress() { - u_int32_t loopbackaddr = (((u_int32_t)127)<<24)|((u_int32_t)1); - std::list::const_iterator it; + uint32_t loopbackaddr = (((uint32_t)127)<<24)|((uint32_t)1); + std::list::const_iterator it; bool found = false; for (it = localIPs.begin() ; !found && it != localIPs.end() ; it++) @@ -1861,21 +1900,24 @@ void RTPUDPv4Transmitter::Dump() std::cout << "Not created" << std::endl; else { - char str[1024]; - u_int32_t ip; - std::list::const_iterator it; + char str[16]; + uint32_t ip; + std::list::const_iterator it; std::cout << "Portbase: " << portbase << std::endl; std::cout << "RTP socket descriptor: " << rtpsock << std::endl; std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; ip = bindIP; - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << "Bind IP address: " << str << std::endl; + ip = mcastifaceIP; + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + std::cout << "Multicast interface IP address: " << str << std::endl; std::cout << "Local IP addresses:" << std::endl; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { ip = (*it); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; } std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; @@ -1898,7 +1940,7 @@ void RTPUDPv4Transmitter::Dump() while(acceptignoreinfo.HasCurrentElement()) { ip = acceptignoreinfo.GetCurrentKey(); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); std::cout << " " << str << ": "; if (pinfo->all) @@ -1908,7 +1950,7 @@ void RTPUDPv4Transmitter::Dump() std::cout << ", except "; } - std::list::const_iterator it; + std::list::const_iterator it; for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) { @@ -1952,7 +1994,7 @@ void RTPUDPv4Transmitter::Dump() do { ip = multicastgroups.GetCurrentElement(); - sprintf(str,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; multicastgroups.GotoNextElement(); } while (multicastgroups.HasCurrentElement()); diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 2d8eee8..e3509eb 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -51,35 +51,37 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams { public: - RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; } - void SetBindIP(u_int32_t ip) { bindIP = ip; } - void SetPortbase(u_int16_t pbase) { portbase = pbase; } - void SetMulticastTTL(u_int8_t mcastTTL) { multicastTTL = mcastTTL; } - void SetLocalIPList(std::list &iplist) { localIPs = iplist; } + RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; mcastifaceIP = 0; } + void SetBindIP(uint32_t ip) { bindIP = ip; } + void SetMulticastInterfaceIP(uint32_t ip) { mcastifaceIP = ip; } + void SetPortbase(uint16_t pbase) { portbase = pbase; } + void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } + void SetLocalIPList(std::list &iplist) { localIPs = iplist; } void ClearLocalIPList() { localIPs.clear(); } - u_int32_t GetBindIP() const { return bindIP; } - u_int16_t GetPortbase() const { return portbase; } - u_int8_t GetMulticastTTL() const { return multicastTTL; } - const std::list &GetLocalIPList() const { return localIPs; } + uint32_t GetBindIP() const { return bindIP; } + uint32_t GetMulticastInterfaceIP() const { return mcastifaceIP; } + uint16_t GetPortbase() const { return portbase; } + uint8_t GetMulticastTTL() const { return multicastTTL; } + const std::list &GetLocalIPList() const { return localIPs; } private: - u_int16_t portbase; - u_int32_t bindIP; - std::list localIPs; - u_int8_t multicastTTL; + uint16_t portbase; + uint32_t bindIP, mcastifaceIP; + std::list localIPs; + uint8_t multicastTTL; }; class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo { public: #if ! (defined(WIN32) || defined(_WIN32_WCE)) - RTPUDPv4TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) + RTPUDPv4TransmissionInfo(std::list iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) #else - RTPUDPv4TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) + RTPUDPv4TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) #endif // WIN32 { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } ~RTPUDPv4TransmissionInfo() { } - std::list GetLocalIPList() const { return localIPlist; } + std::list GetLocalIPList() const { return localIPlist; } #if ! (defined(WIN32) || defined(_WIN32_WCE)) int GetRTPSocket() const { return rtpsocket; } int GetRTCPSocket() const { return rtcpsocket; } @@ -88,7 +90,7 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo SOCKET GetRTCPSocket() const { return rtcpsocket; } #endif // WIN32 private: - std::list localIPlist; + std::list localIPlist; #if ! (defined(WIN32) || defined(_WIN32_WCE)) int rtpsocket,rtcpsocket; #else @@ -98,10 +100,10 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo #ifdef RTP_SUPPORT_INLINETEMPLATEPARAM inline int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } - inline int RTPUDPv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } + inline int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } #else // No support for inline function as template parameter int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); - int RTPUDPv4Trans_GetHashIndex_u_int32_t(const u_int32_t &k); + int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k); #endif // RTP_SUPPORT_INLINETEMPLATEPARAM #define RTPUDPV4TRANS_HEADERSIZE (20+8) @@ -117,7 +119,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter void Destroy(); RTPTransmissionInfo *GetTransmissionInfo(); - int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); + int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); size_t GetHeaderOverhead() { return RTPUDPV4TRANS_HEADERSIZE; } @@ -129,8 +131,8 @@ class RTPUDPv4Transmitter : public RTPTransmitter int SendRTCPData(const void *data,size_t len); void ResetPacketCount(); - u_int32_t GetNumRTPPacketsSent(); - u_int32_t GetNumRTCPPacketsSent(); + uint32_t GetNumRTPPacketsSent(); + uint32_t GetNumRTCPPacketsSent(); int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); @@ -162,12 +164,12 @@ class RTPUDPv4Transmitter : public RTPTransmitter void AddLoopbackAddress(); void FlushPackets(); int PollSocket(bool rtp); - int ProcessAddAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); - int ProcessDeleteAcceptIgnoreEntry(u_int32_t ip,u_int16_t port); + int ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port); + int ProcessDeleteAcceptIgnoreEntry(uint32_t ip,uint16_t port); #ifdef RTP_SUPPORT_IPV4MULTICAST - bool SetMulticastTTL(u_int8_t ttl); + bool SetMulticastTTL(uint8_t ttl); #endif // RTP_SUPPORT_IPV4MULTICAST - bool ShouldAcceptData(u_int32_t srcip,u_int16_t srcport); + bool ShouldAcceptData(uint32_t srcip,uint16_t srcport); void ClearAcceptIgnoreInfo(); bool init; @@ -178,18 +180,18 @@ class RTPUDPv4Transmitter : public RTPTransmitter #else // not using winsock int rtpsock,rtcpsock; #endif // WIN32 - u_int32_t bindIP; - std::list localIPs; - u_int16_t portbase; - u_int8_t multicastTTL; + uint32_t bindIP, mcastifaceIP; + std::list localIPs; + uint16_t portbase; + uint8_t multicastTTL; RTPTransmitter::ReceiveMode receivemode; - u_int8_t *localhostname; + uint8_t *localhostname; size_t localhostnamelength; RTPHashTable destinations; #ifdef RTP_SUPPORT_IPV4MULTICAST - RTPHashTable multicastgroups; + RTPHashTable multicastgroups; #endif // RTP_SUPPORT_IPV4MULTICAST std::list rawpacketlist; @@ -202,10 +204,10 @@ class RTPUDPv4Transmitter : public RTPTransmitter PortInfo() { all = false; } bool all; - std::list portlist; + std::list portlist; }; - RTPKeyHashTable acceptignoreinfo; + RTPKeyHashTable acceptignoreinfo; // notification descriptors for AbortWait (0 is for reading, 1 for writing) #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -221,7 +223,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter int threadsafe; #endif // RTP_SUPPORT_THREAD - u_int32_t rtppackcount,rtcppackcount; + uint32_t rtppackcount,rtcppackcount; }; #endif // RTPUDPV4TRANSMITTER_H diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 7f511d7..17bd3d5 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -100,12 +100,12 @@ struct ipv6_mreq mreq;\ \ mreq.ipv6mr_multiaddr = mcastip;\ - mreq.ipv6mr_interface = 0;\ + mreq.ipv6mr_interface = mcastifidx;\ status = setsockopt(socket,IPPROTO_IPV6,type,(const char *)&mreq,sizeof(struct ipv6_mreq));\ } #ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } - int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } + int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } + int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } #endif // !RTP_SUPPORT_INLINETEMPLATEPARAM #ifdef RTP_SUPPORT_THREAD @@ -261,6 +261,7 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa // bind sockets bindIP = params->GetBindIP(); + mcastifidx = params->GetMulticastInterfaceIndex(); memset(&addr,0,sizeof(struct sockaddr_in6)); addr.sin6_family = AF_INET6; @@ -412,7 +413,7 @@ RTPTransmissionInfo *RTPUDPv6Transmitter::GetTransmissionInfo() return tinf; } -int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) +int RTPUDPv6Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) return ERR_RTP_UDPV6TRANS_NOTINIT; @@ -437,14 +438,45 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) for (it = localIPs.begin() ; it != localIPs.end() ; it++) { - struct hostent *he; - in6_addr ip = (*it); - - he = gethostbyaddr((char *)&ip,sizeof(in6_addr),AF_INET6); - if (he != 0) + bool founddouble = false; + bool foundentry = true; + + while (!founddouble && foundentry) { - std::string hname = std::string(he->h_name); - hostnames.push_back(hname); + struct hostent *he; + in6_addr ip = (*it); + + he = gethostbyaddr((char *)&ip,sizeof(in6_addr),AF_INET6); + if (he != 0) + { + std::string hname = std::string(he->h_name); + std::list::const_iterator it; + + for (it = hostnames.begin() ; !founddouble && it != hostnames.end() ; it++) + if ((*it) == hname) + founddouble = true; + + if (!founddouble) + hostnames.push_back(hname); + + int i = 0; + while (!founddouble && he->h_aliases[i] != 0) + { + std::string hname = std::string(he->h_aliases[i]); + + for (it = hostnames.begin() ; !founddouble && it != hostnames.end() ; it++) + if ((*it) == hname) + founddouble = true; + + if (!founddouble) + { + hostnames.push_back(hname); + i++; + } + } + } + else + foundentry = false; } } @@ -454,13 +486,14 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { std::list::const_iterator it; + hostnames.sort(); for (it = hostnames.begin() ; !found && it != hostnames.end() ; it++) { if ((*it).find('.') != std::string::npos) { found = true; localhostnamelength = (*it).length(); - localhostname = new u_int8_t [localhostnamelength+1]; + localhostname = new uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -476,8 +509,8 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) { in6_addr ip; int len; - char str[256]; - u_int16_t ip16[8]; + char str[48]; + uint16_t ip16[8]; int i,j; it = localIPs.begin(); @@ -485,15 +518,19 @@ int RTPUDPv6Transmitter::GetLocalHostName(u_int8_t *buffer,size_t *bufferlength) for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { - ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); - ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); + ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); + ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); +#if (defined(WIN32) || defined(_WIN32_WCE)) + _snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); +#else + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); +#endif // WIN32 || _WIN32_WCE len = strlen(str); localhostnamelength = len; - localhostname = new u_int8_t [localhostnamelength+1]; + localhostname = new uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -773,14 +810,14 @@ void RTPUDPv6Transmitter::ResetPacketCount() MAINMUTEX_UNLOCK } -u_int32_t RTPUDPv6Transmitter::GetNumRTPPacketsSent() +uint32_t RTPUDPv6Transmitter::GetNumRTPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -792,14 +829,14 @@ u_int32_t RTPUDPv6Transmitter::GetNumRTPPacketsSent() return num; } -u_int32_t RTPUDPv6Transmitter::GetNumRTCPPacketsSent() +uint32_t RTPUDPv6Transmitter::GetNumRTCPPacketsSent() { if (!init) return 0; MAINMUTEX_LOCK - u_int32_t num; + uint32_t num; if (!created) num = 0; @@ -1274,7 +1311,7 @@ RTPRawPacket *RTPUDPv6Transmitter::GetNextPacket() #ifdef RTP_SUPPORT_IPV6MULTICAST -bool RTPUDPv6Transmitter::SetMulticastTTL(u_int8_t ttl) +bool RTPUDPv6Transmitter::SetMulticastTTL(uint8_t ttl) { int ttl2,status; @@ -1342,12 +1379,12 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) { RTPRawPacket *pack; RTPIPv6Address *addr; - u_int8_t *datacopy; + uint8_t *datacopy; addr = new RTPIPv6Address(srcaddr.sin6_addr,ntohs(srcaddr.sin6_port)); if (addr == 0) return ERR_RTP_OUTOFMEM; - datacopy = new u_int8_t[recvlen]; + datacopy = new uint8_t[recvlen]; if (datacopy == 0) { delete addr; @@ -1370,7 +1407,7 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) return 0; } -int RTPUDPv6Transmitter::ProcessAddAcceptIgnoreEntry(in6_addr ip,u_int16_t port) +int RTPUDPv6Transmitter::ProcessAddAcceptIgnoreEntry(in6_addr ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (acceptignoreinfo.HasCurrentElement()) // An entry for this IP address already exists @@ -1384,7 +1421,7 @@ int RTPUDPv6Transmitter::ProcessAddAcceptIgnoreEntry(in6_addr ip,u_int16_t port) } else if (!portinf->all) { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = portinf->portlist.begin(); end = portinf->portlist.end(); @@ -1431,7 +1468,7 @@ void RTPUDPv6Transmitter::ClearAcceptIgnoreInfo() acceptignoreinfo.Clear(); } -int RTPUDPv6Transmitter::ProcessDeleteAcceptIgnoreEntry(in6_addr ip,u_int16_t port) +int RTPUDPv6Transmitter::ProcessDeleteAcceptIgnoreEntry(in6_addr ip,uint16_t port) { acceptignoreinfo.GotoElement(ip); if (!acceptignoreinfo.HasCurrentElement()) @@ -1450,7 +1487,7 @@ int RTPUDPv6Transmitter::ProcessDeleteAcceptIgnoreEntry(in6_addr ip,u_int16_t po if (inf->all) // currently, all ports are selected. Add the one to remove to the list { // we have to check if the list doesn't contain the port already - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1463,7 +1500,7 @@ int RTPUDPv6Transmitter::ProcessDeleteAcceptIgnoreEntry(in6_addr ip,u_int16_t po } else // check if we can find the port in the list { - std::list::iterator it,begin,end; + std::list::iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1482,7 +1519,7 @@ int RTPUDPv6Transmitter::ProcessDeleteAcceptIgnoreEntry(in6_addr ip,u_int16_t po return 0; } -bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) +bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,uint16_t srcport) { if (receivemode == RTPTransmitter::AcceptSome) { @@ -1495,7 +1532,7 @@ bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // only accept the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1508,7 +1545,7 @@ bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) } else // accept all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1531,7 +1568,7 @@ bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) inf = acceptignoreinfo.GetCurrentElement(); if (!inf->all) // ignore the ports in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1544,7 +1581,7 @@ bool RTPUDPv6Transmitter::ShouldAcceptData(in6_addr srcip,u_int16_t srcport) } else // ignore all, except the ones in the list { - std::list::const_iterator it,begin,end; + std::list::const_iterator it,begin,end; begin = inf->portlist.begin(); end = inf->portlist.end(); @@ -1719,7 +1756,7 @@ bool RTPUDPv6Transmitter::GetLocalIPList_Interfaces() while (tmp != 0) { - if (tmp->ifa_addr->sa_family == AF_INET6) + if (tmp->ifa_addr != 0 && tmp->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6 *inaddr = (struct sockaddr_in6 *)tmp->ifa_addr; localIPs.push_back(inaddr->sin6_addr); @@ -1817,9 +1854,9 @@ void RTPUDPv6Transmitter::Dump() std::cout << "Not created" << std::endl; else { - char str[1024]; + char str[48]; in6_addr ip; - u_int16_t ip16[8]; + uint16_t ip16[8]; std::list::const_iterator it; int i,j; @@ -1827,15 +1864,16 @@ void RTPUDPv6Transmitter::Dump() std::cout << "RTP socket descriptor: " << rtpsock << std::endl; std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; ip = bindIP; - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << "Bind IP address: " << str << std::endl; + std::Cout << "Multicast interface index: " << mcastifidx << std::endl; std::cout << "Local IP addresses:" << std::endl; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { ip = (*it); - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << " " << str << std::endl; } std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; @@ -1858,8 +1896,8 @@ void RTPUDPv6Transmitter::Dump() while(acceptignoreinfo.HasCurrentElement()) { ip = acceptignoreinfo.GetCurrentKey(); - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); std::cout << " " << str << ": "; if (pinfo->all) @@ -1869,7 +1907,7 @@ void RTPUDPv6Transmitter::Dump() std::cout << ", except "; } - std::list::const_iterator it; + std::list::const_iterator it; for (it = pinfo->portlist.begin() ; it != pinfo->portlist.end() ; ) { @@ -1913,8 +1951,8 @@ void RTPUDPv6Transmitter::Dump() do { ip = multicastgroups.GetCurrentElement(); - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((u_int16_t)ip.s6_addr[i])<<8); ip16[j] |= ((u_int16_t)ip.s6_addr[i+1]); } - sprintf(str,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << " " << str << std::endl; multicastgroups.GotoNextElement(); } while (multicastgroups.HasCurrentElement()); diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 00a117a..2b40b67 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2005 Jori Liesenborgs + Copyright (c) 1999-2006 Jori Liesenborgs Contact: jori@lumumba.uhasselt.be @@ -58,21 +58,24 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams { public: - RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; } + RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; } void SetBindIP(in6_addr ip) { bindIP = ip; } - void SetPortbase(u_int16_t pbase) { portbase = pbase; } - void SetMulticastTTL(u_int8_t mcastTTL) { multicastTTL = mcastTTL; } + void SetMulticastInterfaceIndex(unsigned int idx) { mcastifidx = idx; } + void SetPortbase(uint16_t pbase) { portbase = pbase; } + void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } void SetLocalIPList(std::list &iplist) { localIPs = iplist; } void ClearLocalIPList() { localIPs.clear(); } in6_addr GetBindIP() const { return bindIP; } - u_int16_t GetPortbase() const { return portbase; } - u_int8_t GetMulticastTTL() const { return multicastTTL; } + unsigned int GetMulticastInterfaceIndex() const { return mcastifidx; } + uint16_t GetPortbase() const { return portbase; } + uint8_t GetMulticastTTL() const { return multicastTTL; } const std::list &GetLocalIPList() const { return localIPs; } private: - u_int16_t portbase; + uint16_t portbase; in6_addr bindIP; + unsigned int mcastifidx; std::list localIPs; - u_int8_t multicastTTL; + uint8_t multicastTTL; }; class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo @@ -104,8 +107,8 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo }; #ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } - inline int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((u_int32_t)ip.s6_addr[12])<<24)|(((u_int32_t)ip.s6_addr[13])<<16)|(((u_int32_t)ip.s6_addr[14])<<8)|((u_int32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } + inline int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } + inline int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } #else // No support for inline function as template parameter int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d); int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip); @@ -124,7 +127,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter void Destroy(); RTPTransmissionInfo *GetTransmissionInfo(); - int GetLocalHostName(u_int8_t *buffer,size_t *bufferlength); + int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); size_t GetHeaderOverhead() { return RTPUDPV6TRANS_HEADERSIZE; } @@ -136,8 +139,8 @@ class RTPUDPv6Transmitter : public RTPTransmitter int SendRTCPData(const void *data,size_t len); void ResetPacketCount(); - u_int32_t GetNumRTPPacketsSent(); - u_int32_t GetNumRTCPPacketsSent(); + uint32_t GetNumRTPPacketsSent(); + uint32_t GetNumRTCPPacketsSent(); int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); @@ -169,12 +172,12 @@ class RTPUDPv6Transmitter : public RTPTransmitter void AddLoopbackAddress(); void FlushPackets(); int PollSocket(bool rtp); - int ProcessAddAcceptIgnoreEntry(in6_addr ip,u_int16_t port); - int ProcessDeleteAcceptIgnoreEntry(in6_addr ip,u_int16_t port); + int ProcessAddAcceptIgnoreEntry(in6_addr ip,uint16_t port); + int ProcessDeleteAcceptIgnoreEntry(in6_addr ip,uint16_t port); #ifdef RTP_SUPPORT_IPV6MULTICAST - bool SetMulticastTTL(u_int8_t ttl); + bool SetMulticastTTL(uint8_t ttl); #endif // RTP_SUPPORT_IPV6MULTICAST - bool ShouldAcceptData(in6_addr srcip,u_int16_t srcport); + bool ShouldAcceptData(in6_addr srcip,uint16_t srcport); void ClearAcceptIgnoreInfo(); bool init; @@ -186,12 +189,13 @@ class RTPUDPv6Transmitter : public RTPTransmitter int rtpsock,rtcpsock; #endif // WIN32 in6_addr bindIP; + unsigned int mcastifidx; std::list localIPs; - u_int16_t portbase; - u_int8_t multicastTTL; + uint16_t portbase; + uint8_t multicastTTL; RTPTransmitter::ReceiveMode receivemode; - u_int8_t *localhostname; + uint8_t *localhostname; size_t localhostnamelength; RTPHashTable destinations; @@ -209,7 +213,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter PortInfo() { all = false; } bool all; - std::list portlist; + std::list portlist; }; RTPKeyHashTable acceptignoreinfo; @@ -228,7 +232,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter int threadsafe; #endif // RTP_SUPPORT_THREAD - u_int32_t rtppackcount,rtcppackcount; + uint32_t rtppackcount,rtcppackcount; }; #endif // RTP_SUPPORT_IPV6 diff --git a/tools/Makefile.in b/tools/Makefile.in index d10f653..93d37e1 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -75,10 +75,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_LIBS = @GST_LIBS@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -98,11 +94,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ RTP_ENDIAN = @RTP_ENDIAN@ RTP_FILIO = @RTP_FILIO@ -RTP_GSTINCLUDES = @RTP_GSTINCLUDES@ RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ RTP_LINKLIBS = @RTP_LINKLIBS@ @@ -110,7 +104,6 @@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ -RTP_SUPPORT_GST = @RTP_SUPPORT_GST@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ diff --git a/tools/gettypes.cpp b/tools/gettypes.cpp index 401d1ca..5786203 100644 --- a/tools/gettypes.cpp +++ b/tools/gettypes.cpp @@ -9,7 +9,7 @@ int main(void) if (sizeof(char) == 1) { printf("typedef char int8_t;\n"); - printf("typedef unsigned char u_int8_t;\n"); + printf("typedef unsigned char uint8_t;\n"); } else return -1; @@ -17,7 +17,7 @@ int main(void) if (sizeof(short) == 2) { printf("typedef short int16_t;\n"); - printf("typedef unsigned short u_int16_t;\n"); + printf("typedef unsigned short uint16_t;\n"); } else return -1; @@ -25,14 +25,14 @@ int main(void) if (sizeof(int) == 4) { printf("typedef int int32_t;\n"); - printf("typedef unsigned int u_int32_t;\n\n"); + printf("typedef unsigned int uint32_t;\n\n"); printf("#endif // RTPTYPES_H\n"); return 0; } if (sizeof(long) == 4) { printf("typedef long int32_t;\n"); - printf("typedef unsigned long u_int32_t;\n\n"); + printf("typedef unsigned long uint32_t;\n\n"); printf("#endif // RTPTYPES_H\n"); return 0; } From c2da69419de4b1a2c2c8103e331fd7475f67529e Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 008/136] Import of version 3.5.0 --- ChangeLog | 15 +- README.TXT | 9 +- configure | 115 +- configure.in | 19 +- doc/jrtplib.tex | 11 +- jrtplib.dsp | 4 +- jrtplib.sln | 39 +- jrtplib.vcproj | 1565 +++++++++++++----- jrtplib_wce.vcproj | 963 ++++++----- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/extratransmitters/rtpfaketransmitter.cpp | 9 +- src/extratransmitters/rtpfaketransmitter.h | 23 +- src/rtcpcompoundpacketbuilder.cpp | 4 +- src/rtcpsdespacket.cpp | 2 +- src/rtcpsdespacket.h | 22 +- src/rtpdefines.h | 11 + src/rtperrors.cpp | 10 +- src/rtphashtable.h | 29 +- src/rtpinternalsourcedata.cpp | 4 +- src/rtpinternalsourcedata.h | 2 +- src/rtpipv4address.cpp | 3 +- src/rtpipv4destination.h | 3 +- src/rtpipv6address.cpp | 3 +- src/rtpipv6destination.h | 3 +- src/rtpkeyhashtable.h | 28 +- src/rtplibraryversion.cpp | 13 +- src/rtplibraryversion.h | 12 - src/rtppacket.cpp | 4 +- src/rtprandom.cpp | 68 +- src/rtprandom.h | 9 +- src/rtpsession.cpp | 26 +- src/rtpsession.h | 2 + src/rtpsessionparams.h | 2 +- src/rtpsources.cpp | 23 +- src/rtpsources.h | 10 +- src/rtpstructs.h | 4 +- src/rtptypes_win.h | 0 src/rtpudpv4transmitter.cpp | 22 +- src/rtpudpv4transmitter.h | 18 +- src/rtpudpv6transmitter.cpp | 20 +- src/rtpudpv6transmitter.h | 18 +- 42 files changed, 1908 insertions(+), 1243 deletions(-) mode change 100755 => 100644 src/rtptypes_win.h diff --git a/ChangeLog b/ChangeLog index 239a35f..d5c98ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,23 @@ - January 19, 2006 + March 17, 2006 JRTPLIB ChangeLog ----------- + 3.5.0 (March 2006) + * Now, the define RTP_SNPRINTF is used instead of snprintf, + _snprintf or _snprintf_s. + * In the RTPSources member function MultipleTimeouts, I neglected + to call the OnRemoveSource virtual function. Thanks to Adam Love + (alove@exceptionalinnovation.com) for bringing this to my attention. + * Added a OnSendRTCPCompoundPacket member function to the RTPSession + class. Useful for inspecting outgoing data. + * Modified the templates somewhat. Should cause less compiler problems + this way. Thanks tot Chris Hamilton (chamilton@cs.dal.ca) for + providing this solution. + * On Win32, if possible the functions rand_s and srand_s are now used. + 3.4.0 (January 2006) * Changed u_int32_t like types to uint32_t like types. Thanks to Panagiotis Issaris (takis.issaris@uhasselt.be) for informing me diff --git a/README.TXT b/README.TXT index d72a054..d1eb113 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - January 19, 2006 + March 17, 2006 - JRTPLIB (v3.4.0) + JRTPLIB (v3.5.0) Developed at the The Expertise Centre for @@ -15,6 +15,7 @@ LIBRARY LOCATION AND CONTACT ============================ + Normally, you should be able to download the latest version of the library from this url: http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html @@ -29,6 +30,7 @@ instructions. ACKNOWLEDGMENT ============== + I would like thank the people at the Expertise Centre for Digital Media for giving me the opportunity to create this rewrite of the library. @@ -102,9 +104,6 @@ INSTALLATION NOTES Enables support for JThread. - RTP_SUPPORT_SDESPRIV: Enables support for RTCP SDES private items. - - RTP_SUPPORT_INLINETEMPLATEPARAM: - If set, the compiler should be able to handle an inline - function as a template parameter. - RTP_SUPPORT_PROBATION: If set, a few consecutive RTP packets are needed to validate a member. diff --git a/configure b/configure index 204f495..6ce9488 100755 --- a/configure +++ b/configure @@ -1806,7 +1806,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.4.0 + VERSION=3.5.0 cat >>confdefs.h <<_ACEOF @@ -1946,7 +1946,6 @@ RTP_SUPPORT_IPV4MULTICAST="// No IPv4 multicasting support" RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" RTP_SUPPORT_THREAD="// No support for jthread" RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" -RTP_SUPPORT_INLINETEMPLATEPARAM="// Compiler doesn't support inline functions as template parameter" RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" RTP_SUPPORT_RANDR="// Not using rand_r" @@ -3677,7 +3676,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3680 "configure"' > conftest.$ac_ext + echo '#line 3679 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5256,7 +5255,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5259:" \ +echo "$as_me:5258:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6325,11 +6324,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6328: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6327: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6332: \$? = $ac_status" >&5 + echo "$as_me:6331: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6580,11 +6579,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6583: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6582: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6587: \$? = $ac_status" >&5 + echo "$as_me:6586: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6640,11 +6639,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6643: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6642: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6647: \$? = $ac_status" >&5 + echo "$as_me:6646: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8840,7 +8839,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11160: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11165: \$? = $ac_status" >&5 + echo "$as_me:11164: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11218,11 +11217,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11221: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11220: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11225: \$? = $ac_status" >&5 + echo "$as_me:11224: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12581,7 +12580,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13536: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13541: \$? = $ac_status" >&5 + echo "$as_me:13540: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13594,11 +13593,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13597: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13596: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13601: \$? = $ac_status" >&5 + echo "$as_me:13600: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15650,11 +15649,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15653: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15652: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15657: \$? = $ac_status" >&5 + echo "$as_me:15656: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15905,11 +15904,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15908: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15907: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15912: \$? = $ac_status" >&5 + echo "$as_me:15911: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15965,11 +15964,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15968: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15967: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15972: \$? = $ac_status" >&5 + echo "$as_me:15971: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18165,7 +18164,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking if compiler supports an inline function as a template argument... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include "src/rtphashtable.h" - inline int GetIndex(const int &elem) { return elem%10; } -int -main () -{ - - RTPHashTable table; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - RTP_SUPPORT_INLINETEMPLATEPARAM="#define RTP_SUPPORT_INLINETEMPLATEPARAM" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - echo "$as_me:$LINENO: checking if types like uint32_t exist" >&5 echo $ECHO_N "checking if types like uint32_t exist... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF diff --git a/configure.in b/configure.in index 7481ec4..fc8afae 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.4.0) +AM_INIT_AUTOMAKE(jrtplib,3.5.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -10,7 +10,6 @@ RTP_SUPPORT_IPV4MULTICAST="// No IPv4 multicasting support" RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" RTP_SUPPORT_THREAD="// No support for jthread" RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" -RTP_SUPPORT_INLINETEMPLATEPARAM="// Compiler doesn't support inline functions as template parameter" RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" RTP_SUPPORT_RANDR="// Not using rand_r" @@ -264,21 +263,7 @@ AC_TRY_COMPILE([ ]) dnl --------------------------------------------------------------------------- -dnl Check if compiler can handle inline function in template argument -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(if compiler supports an inline function as a template argument) -AC_TRY_COMPILE([ - #include "src/rtphashtable.h" - inline int GetIndex(const int &elem) { return elem%10; }],[ - RTPHashTable table; ], - [AC_MSG_RESULT(yes) - RTP_SUPPORT_INLINETEMPLATEPARAM="#define RTP_SUPPORT_INLINETEMPLATEPARAM"], - AC_MSG_RESULT(no) - ) - -dnl --------------------------------------------------------------------------- -dnl Check for u_int32_t etc +dnl Check for uint32_t etc dnl --------------------------------------------------------------------------- AC_MSG_CHECKING(if types like uint32_t exist) diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index 4031eff..d7f3ef4 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.4.0} +\newcommand{\jversion}{3.5.0} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{January 19, 2006\\\vspace{0.5cm}\ \\ + \date{March 17, 2006\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ @@ -2614,10 +2614,10 @@ \begin{itemize} \item {\tt void OnRTPPacket(RTPPacket *pack, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ - Is called when an RTP packet is about to be processed. + Is called when an incoming RTP packet is about to be processed. \item {\tt void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ - Is called when an RTCP packet is about to be processed. + Is called when an incoming RTCP packet is about to be processed. \item {\tt void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)}\\ Is called when an SSRC collision was detected. The instance {\tt srcdat} is the one present in the table, the address @@ -2656,6 +2656,9 @@ \item {\tt void OnNoteTimeout(RTPSourceData *srcdat)}\\ Is called when the SDES NOTE item for source {\tt srcdat} has been timed out. + \item {\tt void OnSendRTCPCompoundPacket(RTCPCompoundPacket *pack)}\\ + Is called when an RTCP compound packet has just been sent. Useful + to inspect outgoing RTCP data. \item {\tt void OnPollThreadError(int errcode)}\\ Is called when error {\tt errcode} was detected in the poll thread. diff --git a/jrtplib.dsp b/jrtplib.dsp index 914f74b..6f30973 100644 --- a/jrtplib.dsp +++ b/jrtplib.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\jthread-1.1.2\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.2.0\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD BASE RSC /l 0x813 /d "NDEBUG" # ADD RSC /l 0x813 /d "NDEBUG" BSC32=bscmake.exe @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.1.2\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.2.0\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD BASE RSC /l 0x813 /d "_DEBUG" # ADD RSC /l 0x813 /d "_DEBUG" BSC32=bscmake.exe diff --git a/jrtplib.sln b/jrtplib.sln index b5090b9..7e4d9c9 100644 --- a/jrtplib.sln +++ b/jrtplib.sln @@ -1,20 +1,19 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "jrtplib.vcproj", "{D2A2E3F7-BF5F-4D92-A167-1AF302E20950}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Debug|Win32.ActiveCfg = Debug|Win32 - {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Debug|Win32.Build.0 = Debug|Win32 - {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Release|Win32.ActiveCfg = Release|Win32 - {D2A2E3F7-BF5F-4D92-A167-1AF302E20950}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "jrtplib.vcproj", "{B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Debug|Win32.Build.0 = Debug|Win32 + {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Release|Win32.ActiveCfg = Release|Win32 + {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/jrtplib.vcproj b/jrtplib.vcproj index 4ec2342..bd7e235 100644 --- a/jrtplib.vcproj +++ b/jrtplib.vcproj @@ -1,453 +1,1112 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jrtplib_wce.vcproj b/jrtplib_wce.vcproj index a85e357..c32f971 100644 --- a/jrtplib_wce.vcproj +++ b/jrtplib_wce.vcproj @@ -1,482 +1,481 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Makefile.am b/src/Makefile.am index fe80219..9f9e727 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.4.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 3f8eef2..caf9870 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -229,7 +229,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.4.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/extratransmitters/rtpfaketransmitter.cpp b/src/extratransmitters/rtpfaketransmitter.cpp index 5c49574..a0d6ad7 100644 --- a/src/extratransmitters/rtpfaketransmitter.cpp +++ b/src/extratransmitters/rtpfaketransmitter.cpp @@ -80,11 +80,6 @@ mreq.imr_interface.s_addr = htonl(bindIP);\ status = setsockopt(socket,IPPROTO_IP,type,(const char *)&mreq,sizeof(struct ip_mreq));\ }*/ -#ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } - int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPFAKETRANS_HASHSIZE; } -#endif // !RTP_SUPPORT_INLINETEMPLATEPARAM - #ifdef RTP_SUPPORT_THREAD #define MAINMUTEX_LOCK { if (threadsafe) mainmutex.Lock(); } #define MAINMUTEX_UNLOCK { if (threadsafe) mainmutex.Unlock(); } @@ -562,7 +557,7 @@ int RTPFakeTransmitter::SendRTPData(const void *data,size_t len) // send to each destination while (destinations.HasCurrentElement()) { - (*params->GetPacketReadyCB())((uint8_t*)data, len, + (*params->GetPacketReadyCB())(params->GetPacketReadyCBData(), (uint8_t*)data, len, destinations.GetCurrentElement().GetIP_NBO(), destinations.GetCurrentElement().GetRTPPort_NBO(), 1); @@ -596,7 +591,7 @@ int RTPFakeTransmitter::SendRTCPData(const void *data,size_t len) // send to each destination while (destinations.HasCurrentElement()) { - (*params->GetPacketReadyCB())((uint8_t*)data, len, + (*params->GetPacketReadyCB())(params->GetPacketReadyCBData(), (uint8_t*)data, len, destinations.GetCurrentElement().GetIP_NBO(), destinations.GetCurrentElement().GetRTCPPort_NBO(), 0); diff --git a/src/extratransmitters/rtpfaketransmitter.h b/src/extratransmitters/rtpfaketransmitter.h index 8ca85a0..c8725a0 100644 --- a/src/extratransmitters/rtpfaketransmitter.h +++ b/src/extratransmitters/rtpfaketransmitter.h @@ -63,7 +63,7 @@ // Definition of a callback that is called when a packet is ready for sending // params (*data, data_len, dest_addr, dest_port, rtp [1 if rtp, 0 if rtcp]) -typedef void(*packet_ready_cb)(uint8_t*, uint16_t, uint32_t, uint16_t, int rtp); +typedef void(*packet_ready_cb)(void*, uint8_t*, uint16_t, uint32_t, uint16_t, int rtp); class RTPFakeTransmissionParams : public RTPTransmissionParams { @@ -80,6 +80,7 @@ class RTPFakeTransmissionParams : public RTPTransmissionParams void SetCurrentDataPort(uint16_t port) { currentdataport = port; } void SetCurrentDataType(bool type) { currentdatatype = type; } void SetPacketReadyCB(packet_ready_cb cb) { packetreadycb = cb; }; + void SetPacketReadyCBData(void *data) { packetreadycbdata = data; }; uint32_t GetBindIP() const { return bindIP; } uint16_t GetPortbase() const { return portbase; } uint8_t GetMulticastTTL() const { return multicastTTL; } @@ -90,6 +91,7 @@ class RTPFakeTransmissionParams : public RTPTransmissionParams uint16_t GetCurrentDataPort() const { return currentdataport; } bool GetCurrentDataType() const { return currentdatatype; } packet_ready_cb GetPacketReadyCB() const { return packetreadycb; } + void* GetPacketReadyCBData() const { return packetreadycbdata; } private: uint16_t portbase; uint32_t bindIP; @@ -101,6 +103,7 @@ class RTPFakeTransmissionParams : public RTPTransmissionParams uint16_t currentdataport; bool currentdatatype; packet_ready_cb packetreadycb; + void *packetreadycbdata; }; class RTPFakeTransmissionInfo : public RTPTransmissionInfo @@ -119,13 +122,17 @@ class RTPFakeTransmissionInfo : public RTPTransmissionInfo RTPFakeTransmissionParams *params; }; -#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } - inline int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPFAKETRANS_HASHSIZE; } -#else // No support for inline function as template parameter - int RTPFakeTrans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); - int RTPFakeTrans_GetHashIndex_uint32_t(const uint32_t &k); -#endif // RTP_SUPPORT_INLINETEMPLATEPARAM +class RTPFakeTrans_GetHashIndex_IPv4Dest +{ +public: + static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } +}; + +class RTPFakeTrans_GetHashIndex_uint32_t +{ +public: + static int GetIndex(const uint32_t &k) { return k%RTPFAKETRANS_HASHSIZE; } +}; #define RTPFAKETRANS_HEADERSIZE (20+8) diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index af20da5..7679fc4 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -284,7 +284,7 @@ int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,cons RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(buf); - sdeshdr->id = itemid; + sdeshdr->sdesid = itemid; sdeshdr->length = itemlength; if (itemlength != 0) memcpy((buf + sizeof(RTCPSDESHeader)),itemdata,(size_t)itemlength); @@ -322,7 +322,7 @@ int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,uint8_t RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(buf); - sdeshdr->id = RTCP_SDES_ID_PRIVATE; + sdeshdr->sdesid = RTCP_SDES_ID_PRIVATE; sdeshdr->length = itemlength; buf[sizeof(RTCPSDESHeader)] = prefixlength; diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 58a8187..9e7f459 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -92,7 +92,7 @@ RTCPSDESPacket::RTCPSDESPacket(uint8_t *data,size_t datalength) return; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(chunk+chunkoffset); - if (sdeshdr->id == 0) // end of item list + if (sdeshdr->sdesid == 0) // end of item list { len--; chunkoffset++; diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index bcc01da..c6bb165 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -114,7 +114,7 @@ inline bool RTCPSDESPacket::GotoNextChunk() size_t offset = sizeof(uint32_t); RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+sizeof(uint32_t)); - while (sdeshdr->id != 0) + while (sdeshdr->sdesid != 0) { offset += sizeof(RTCPSDESHeader); offset += (size_t)(sdeshdr->length); @@ -147,7 +147,7 @@ inline bool RTCPSDESPacket::GotoFirstItem() return false; itemoffset = sizeof(uint32_t); RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id == 0) + if (sdeshdr->sdesid == 0) return false; return true; } @@ -160,14 +160,14 @@ inline bool RTCPSDESPacket::GotoNextItem() return false; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id == 0) + if (sdeshdr->sdesid == 0) return false; size_t offset = itemoffset; offset += sizeof(RTCPSDESHeader); offset += (size_t)(sdeshdr->length); sdeshdr = (RTCPSDESHeader *)(currentchunk+offset); - if (sdeshdr->id == 0) + if (sdeshdr->sdesid == 0) return false; itemoffset = offset; return true; @@ -180,7 +180,7 @@ inline RTCPSDESPacket::ItemType RTCPSDESPacket::GetItemType() const if (currentchunk == 0) return None; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - switch (sdeshdr->id) + switch (sdeshdr->sdesid) { case 0: return None; @@ -213,7 +213,7 @@ inline size_t RTCPSDESPacket::GetItemLength() const if (currentchunk == 0) return None; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id == 0) + if (sdeshdr->sdesid == 0) return 0; return (size_t)(sdeshdr->length); } @@ -225,7 +225,7 @@ inline uint8_t *RTCPSDESPacket::GetItemData() if (currentchunk == 0) return 0; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id == 0) + if (sdeshdr->sdesid == 0) return 0; return (currentchunk+itemoffset+sizeof(RTCPSDESHeader)); } @@ -238,7 +238,7 @@ inline size_t RTCPSDESPacket::GetPRIVPrefixLength() const if (currentchunk == 0) return 0; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id != RTCP_SDES_ID_PRIVATE) + if (sdeshdr->sdesid != RTCP_SDES_ID_PRIVATE) return 0; if (sdeshdr->length == 0) return 0; @@ -256,7 +256,7 @@ inline uint8_t *RTCPSDESPacket::GetPRIVPrefixData() if (currentchunk == 0) return 0; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id != RTCP_SDES_ID_PRIVATE) + if (sdeshdr->sdesid != RTCP_SDES_ID_PRIVATE) return 0; if (sdeshdr->length == 0) return 0; @@ -276,7 +276,7 @@ inline size_t RTCPSDESPacket::GetPRIVValueLength() const if (currentchunk == 0) return 0; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id != RTCP_SDES_ID_PRIVATE) + if (sdeshdr->sdesid != RTCP_SDES_ID_PRIVATE) return 0; if (sdeshdr->length == 0) return 0; @@ -294,7 +294,7 @@ inline uint8_t *RTCPSDESPacket::GetPRIVValueData() if (currentchunk == 0) return 0; RTCPSDESHeader *sdeshdr = (RTCPSDESHeader *)(currentchunk+itemoffset); - if (sdeshdr->id != RTCP_SDES_ID_PRIVATE) + if (sdeshdr->sdesid != RTCP_SDES_ID_PRIVATE) return 0; if (sdeshdr->length == 0) return 0; diff --git a/src/rtpdefines.h b/src/rtpdefines.h index e5fac7e..62965ed 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -72,4 +72,15 @@ #define RTCP_DEFAULTIMMEDIATEBYE true #define RTCP_DEFAULTSRBYE true +#if (defined(WIN32) || defined(_WIN32_WCE)) + #if (!defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) + #define RTP_SNPRINTF _snprintf_s + #else + #define RTP_SNPRINTF _snprintf + #endif +#else + #define RTP_SNPRINTF snprintf +#endif // WIN32 || _WIN32_WCE + #endif // RTPDEFINES_H + diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 2a4793e..77bda4f 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -31,6 +31,7 @@ */ #include "rtperrors.h" +#include "rtpdefines.h" #include "rtpdebug.h" @@ -218,12 +219,11 @@ std::string RTPGetErrorString(int errcode) return std::string(ErrorDescriptions[i].description); i++; } + char str[16]; -#if defined(WIN32) || defined(_WIN32_WCE) - _snprintf(str,16,"(%d)",errcode); -#else - snprintf(str,16,"(%d)",errcode); -#endif // WIN32 || _WIN32_WCE + + RTP_SNPRINTF(str,16,"(%d)",errcode); + return std::string("Unknown error code") + std::string(str); } diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 3ce898b..2ed7b50 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -40,7 +40,8 @@ #include #endif // RTPDEBUG -template +//template +template class RTPHashTable { public: @@ -87,7 +88,7 @@ class RTPHashTable HashElement *curhashelem; }; -template +template inline RTPHashTable::RTPHashTable() { for (int i = 0 ; i < hashsize ; i++) @@ -96,7 +97,7 @@ inline RTPHashTable::RTPHashTable() lasthashelem = 0; } -template +template inline int RTPHashTable::DeleteCurrentElement() { if (curhashelem) @@ -152,13 +153,13 @@ inline int RTPHashTable::DeleteCurrentElement() return 0; } -template +template inline int RTPHashTable::GotoElement(const Element &e) { int index; bool found; - index = GetIndex(e); + index = GetIndex::GetIndex(e); if (index >= hashsize) return ERR_RTP_HASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX; @@ -176,14 +177,14 @@ inline int RTPHashTable::GotoElement(const Element &e return 0; } -template +template inline bool RTPHashTable::HasElement(const Element &e) { int index; bool found; HashElement *tmp; - index = GetIndex(e); + index = GetIndex::GetIndex(e); if (index >= hashsize) return false; @@ -199,21 +200,21 @@ inline bool RTPHashTable::HasElement(const Element &e return found; } -template +template inline void RTPHashTable::GotoNextElement() { if (curhashelem) curhashelem = curhashelem->listnext; } -template +template inline void RTPHashTable::GotoPreviousElement() { if (curhashelem) curhashelem = curhashelem->listprev; } -template +template inline void RTPHashTable::Clear() { HashElement *tmp1,*tmp2; @@ -232,14 +233,14 @@ inline void RTPHashTable::Clear() lasthashelem = 0; } -template +template inline int RTPHashTable::AddElement(const Element &elem) { int index; bool found; HashElement *e,*newelem; - index = GetIndex(elem); + index = GetIndex::GetIndex(elem); if (index >= hashsize) return ERR_RTP_HASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX; @@ -283,7 +284,7 @@ inline int RTPHashTable::AddElement(const Element &el return 0; } -template +template inline int RTPHashTable::DeleteElement(const Element &elem) { int status; @@ -295,7 +296,7 @@ inline int RTPHashTable::DeleteElement(const Element } #ifdef RTPDEBUG -template +template inline void RTPHashTable::Dump() { HashElement *e; diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index b8c2ace..fdc8c77 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -171,13 +171,13 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re return 0; } -int RTPInternalSourceData::ProcessSDESItem(uint8_t id,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis) +int RTPInternalSourceData::ProcessSDESItem(uint8_t sdesid,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis) { *cnamecollis = false; stats.SetLastMessageTime(receivetime); - switch(id) + switch(sdesid) { case RTCP_SDES_ID_CNAME: { diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index 26d53cd..729ec86 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -53,7 +53,7 @@ class RTPInternalSourceData : public RTPSourceData uint32_t jitter,uint32_t lsr,uint32_t dlsr, const RTPTime &receivetime) { RRprevinf = RRinf; RRinf.Set(fractionlost,lostpackets,exthighseqnr,jitter,lsr,dlsr,receivetime); stats.SetLastMessageTime(receivetime); } void UpdateMessageTime(const RTPTime &receivetime) { stats.SetLastMessageTime(receivetime); } - int ProcessSDESItem(uint8_t id,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis); + int ProcessSDESItem(uint8_t sdesid,const uint8_t *data,size_t itemlen,const RTPTime &receivetime,bool *cnamecollis); #ifdef RTP_SUPPORT_SDESPRIV int ProcessPrivateSDESItem(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen,const RTPTime &receivetime); #endif // RTP_SUPPORT_SDESPRIV diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 6e0e2ba..338a905 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -32,6 +32,7 @@ #include "rtpipv4address.h" #ifdef RTPDEBUG + #include "rtpdefines.h" #include #endif // RTPDEBUG @@ -74,7 +75,7 @@ std::string RTPIPv4Address::GetAddressString() const { char str[24]; - snprintf(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF), + RTP_SNPRINTF(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF), (int)(ip&0xFF),(int)port); return std::string(str); } diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 33ffb42..0166791 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -39,6 +39,7 @@ #include #endif // WIN32 #ifdef RTPDEBUG + #include "rtpdefines.h" #include #include #endif // RTPDEBUG @@ -71,7 +72,7 @@ inline std::string RTPIPv4Destination::GetDestinationString() const uint32_t ip = ipaddr_hbo; uint16_t portbase = ntohs(rtpport_nbo); - snprintf(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); + RTP_SNPRINTF(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); return std::string(str); } #endif // RTPDEBUG diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 62e160d..1acbdc7 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -35,6 +35,7 @@ #ifdef RTP_SUPPORT_IPV6 #ifdef RTPDEBUG + #include "rtpdefines.h" #include #endif // RTPDEBUG @@ -97,7 +98,7 @@ std::string RTPIPv6Address::GetAddressString() const ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)port); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)port); return std::string(str); } #endif // RTPDEBUG diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 42b0c5e..6a9a46a 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -44,6 +44,7 @@ #include #endif // WIN32 #ifdef RTPDEBUG + #include "rtpdefines.h" #include #include #endif // RTPDEBUG @@ -72,7 +73,7 @@ inline std::string RTPIPv6Destination::GetDestinationString() const uint16_t portbase = ntohs(rtpport_nbo); int i,j; for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); return std::string(str); } #endif // RTPDEBUG diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 142f5be..14353dc 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -41,7 +41,7 @@ #include #endif // RTPDEBUG -template +template class RTPKeyHashTable { public: @@ -91,7 +91,7 @@ class RTPKeyHashTable HashElement *curhashelem; }; -template +template inline RTPKeyHashTable::RTPKeyHashTable() { for (int i = 0 ; i < hashsize ; i++) @@ -100,7 +100,7 @@ inline RTPKeyHashTable::RTPKeyHashTable() lasthashelem = 0; } -template +template inline int RTPKeyHashTable::DeleteCurrentElement() { if (curhashelem) @@ -156,13 +156,13 @@ inline int RTPKeyHashTable::DeleteCurrentElement( return 0; } -template +template inline int RTPKeyHashTable::GotoElement(const Key &k) { int index; bool found; - index = GetIndex(k); + index = GetIndex::GetIndex(k); if (index >= hashsize) return ERR_RTP_KEYHASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX; @@ -180,14 +180,14 @@ inline int RTPKeyHashTable::GotoElement(const Key return 0; } -template +template inline bool RTPKeyHashTable::HasElement(const Key &k) { int index; bool found; HashElement *tmp; - index = GetIndex(k); + index = GetIndex::GetIndex(k); if (index >= hashsize) return false; @@ -203,21 +203,21 @@ inline bool RTPKeyHashTable::HasElement(const Key return found; } -template +template inline void RTPKeyHashTable::GotoNextElement() { if (curhashelem) curhashelem = curhashelem->listnext; } -template +template inline void RTPKeyHashTable::GotoPreviousElement() { if (curhashelem) curhashelem = curhashelem->listprev; } -template +template inline void RTPKeyHashTable::Clear() { HashElement *tmp1,*tmp2; @@ -236,14 +236,14 @@ inline void RTPKeyHashTable::Clear() lasthashelem = 0; } -template +template inline int RTPKeyHashTable::AddElement(const Key &k,const Element &elem) { int index; bool found; HashElement *e,*newelem; - index = GetIndex(k); + index = GetIndex::GetIndex(k); if (index >= hashsize) return ERR_RTP_KEYHASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX; @@ -287,7 +287,7 @@ inline int RTPKeyHashTable::AddElement(const Key return 0; } -template +template inline int RTPKeyHashTable::DeleteElement(const Key &k) { int status; @@ -299,7 +299,7 @@ inline int RTPKeyHashTable::DeleteElement(const K } #ifdef RTPDEBUG -template +template inline void RTPKeyHashTable::Dump() { HashElement *e; diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 1ab1eab..be3ae68 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -31,9 +31,20 @@ */ #include "rtplibraryversion.h" +#include "rtpdefines.h" RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,4,0); + return RTPLibraryVersion(3,5,0); } +std::string RTPLibraryVersion::GetVersionString() const +{ + char str[16]; + + RTP_SNPRINTF(str,16,"%d.%d.%d",majornr,minornr,debugnr); + + return std::string(str); +} + + diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index da73e66..84d9e80 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -52,17 +52,5 @@ class RTPLibraryVersion int debugnr,minornr,majornr; }; -inline std::string RTPLibraryVersion::GetVersionString() const -{ - char str[16]; - -#if (defined(WIN32) || defined(_WIN32_WCE)) - _snprintf(str,16,"%d.%d.%d",majornr,minornr,debugnr); -#else - snprintf(str,16,"%d.%d.%d",majornr,minornr,debugnr); -#endif // WIN32 || _WIN32_WCE - return std::string(str); -} - #endif // RTPLIBRARYVERSION_H diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 20a1327..e53d82e 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -174,7 +174,7 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) RTPPacket::hasextension = hasextension; if (hasextension) { - RTPPacket::extid = ntohs(rtpextheader->id); + RTPPacket::extid = ntohs(rtpextheader->extid); RTPPacket::extensionlength = ((int)ntohs(rtpextheader->length))*sizeof(uint32_t); RTPPacket::extension = ((uint8_t *)rtpextheader)+sizeof(RTPExtensionHeader); } @@ -304,7 +304,7 @@ int RTPPacket::BuildPacket(uint8_t payloadtype,const void *payloaddata,size_t pa { RTPExtensionHeader *rtpexthdr = (RTPExtensionHeader *)payload; - rtpexthdr->id = htons(extensionid); + rtpexthdr->extid = htons(extensionid); rtpexthdr->length = htons((uint16_t)extensionlen_numwords); payload += sizeof(RTPExtensionHeader); diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index b4d9399..240ad3b 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -30,6 +30,10 @@ */ +#if defined(WIN32) && !defined(_WIN32_WCE) + #define _CRT_RAND_S +#endif // WIN32 || _WIN32_WCE + #include "rtprandom.h" #include #ifndef WIN32 @@ -46,19 +50,24 @@ #include "rtpdebug.h" -#if !defined(RTP_SUPPORT_GNUDRAND) && !defined(RTP_SUPPORT_RANDR) -bool RTPRandom::init = false; -#endif // WIN32 +#if (!defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) + #define RTP_SUPPORT_RANDS +#endif RTPRandom::RTPRandom() { -#if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) +#if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) || defined(RTP_SUPPORT_RANDS) uint32_t x; +#if defined(WIN32) + x = (uint32_t)_getpid(); +#else x = (uint32_t)getpid(); +#endif // WIN32 || _WIN32_WCE + x += (uint32_t)time(0); x -= (uint32_t)clock(); - x ^= (uint32_t)(this); + x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); #ifdef RTP_SUPPORT_GNUDRAND srand48_r(x,&drandbuffer); @@ -67,9 +76,6 @@ RTPRandom::RTPRandom() #endif #else // use simple rand and srand functions - if (init) - return; - uint32_t x; #ifndef _WIN32_WCE @@ -89,8 +95,6 @@ RTPRandom::RTPRandom() #endif // _WIN32_WCE x ^= (uint32_t)(this); srand((unsigned int)x); - - init = true; #endif } @@ -98,7 +102,7 @@ RTPRandom::~RTPRandom() { } -#ifdef RTP_SUPPORT_GNUDRAND +#if defined(RTP_SUPPORT_GNUDRAND) uint8_t RTPRandom::GetRandom8() { @@ -131,8 +135,7 @@ double RTPRandom::GetRandomDouble() return x; } -#else -#ifdef RTP_SUPPORT_RANDR +#elif defined(RTP_SUPPORT_RANDR) uint8_t RTPRandom::GetRandom8() { @@ -170,6 +173,44 @@ double RTPRandom::GetRandomDouble() return x; } +#elif defined(RTP_SUPPORT_RANDS) + +uint8_t RTPRandom::GetRandom8() +{ + uint8_t x; + + x = (uint8_t)(256.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + return x; +} + +uint16_t RTPRandom::GetRandom16() +{ + uint16_t x; + + x = (uint16_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + return x; +} + +uint32_t RTPRandom::GetRandom32() +{ + uint32_t x,y; + + x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + y = x; + x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + y ^= (x<<8); + x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + y ^= (x<<16); + + return y; +} + +double RTPRandom::GetRandomDouble() +{ + double x = ((double)rand_s(&state))/((double)RAND_MAX+1.0); + return x; +} + #else uint8_t RTPRandom::GetRandom8() @@ -208,6 +249,5 @@ double RTPRandom::GetRandomDouble() return x; } -#endif // RTP_SUPPORT_RANDR #endif // RTP_SUPPORT_GNUDRAND diff --git a/src/rtprandom.h b/src/rtprandom.h index df7273f..8ae1f52 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -48,15 +48,12 @@ class RTPRandom uint32_t GetRandom32(); double GetRandomDouble(); // returns random value between 0.0 and 1.0 private: -#ifdef RTP_SUPPORT_GNUDRAND +#if defined(RTP_SUPPORT_GNUDRAND) struct drand48_data drandbuffer; -#else -#ifdef RTP_SUPPORT_RANDR +#elif defined(RTP_SUPPORT_RANDR) || defined(WIN32) || defined(_WIN32_WCE) unsigned int state; -#else - static bool init; -#endif // RTP_SUPPORT_RANDR #endif // RTP_SUPPORT_GNUDRAND }; #endif // RTPRANDOM_H + diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 59b0c83..e320374 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -380,6 +380,9 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t byepackets.pop_front(); rtptrans->SendRTCPData(pack->GetCompoundPacketData(),pack->GetCompoundPacketLength()); + + OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering + delete pack; if (!byepackets.empty()) // more bye packets to send, schedule them rtcpsched.ScheduleBYEPacket((*(byepackets.begin()))->GetCompoundPacketLength()); @@ -1165,6 +1168,8 @@ int RTPSession::ProcessPolledData() delete pack; return status; } + + OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering } else { @@ -1177,6 +1182,8 @@ int RTPSession::ProcessPolledData() delete pack; return status; } + + OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering if (!byepackets.empty()) // more bye packets to send, schedule them { @@ -1237,9 +1244,14 @@ int RTPSession::CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve) #ifndef _WIN32_WCE DWORD len = *bufferlength; if (!GetUserName((LPTSTR)buffer,&len)) - strcpy((char *)buffer,"unknown"); +#if (defined(_MSC_VER) && _MSC_VER >= 1400 ) // Check if we can use the secure strncpy_s + strncpy_s((char *)buffer,*bufferlength,"unknown",_TRUNCATE); +#else + strncpy((char *)buffer,"unknown",*bufferlength); +#endif // Less secure version + #else - strcpy((char *)buffer,"unknown"); + strncpy((char *)buffer,"unknown",*bufferlength); #endif // _WIN32_WCE #endif // WIN32 @@ -1263,9 +1275,17 @@ int RTPSession::CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve) { char hostname[1024]; - strcpy(hostname,"localhost"); // just in case gethostname fails +#if defined(WIN32) && !defined(_WIN32_WCE) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) // Check if we can use the secure strncpy_s + strncpy_s(hostname,1024,"localhost",_TRUNCATE); // just in case gethostname fails +#else + strncpy(hostname,"localhost",1024); // just in case gethostname fails +#endif gethostname(hostname,1024); +#if defined(WIN32) && !defined(_WIN32_WCE) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) // Check if we can use the secure strncpy_s + strncpy_s((char *)(buffer+offset),buflen2,hostname,_TRUNCATE); +#else strncpy((char *)(buffer+offset),hostname,buflen2); +#endif *bufferlength = offset+strlen(hostname); } if (*bufferlength > RTCP_SDES_MAXITEMLENGTH) diff --git a/src/rtpsession.h b/src/rtpsession.h index b23fb3f..a12341f 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -171,6 +171,7 @@ class RTPSession const RTPAddress *senderaddress) { } virtual void OnNoteTimeout(RTPSourceData *srcdat) { } virtual void OnBYEPacket(RTPSourceData *srcdat) { } + virtual void OnSendRTCPCompoundPacket(RTCPCompoundPacket *pack) { } #ifdef RTP_SUPPORT_THREAD virtual void OnPollThreadError(int errcode) { } virtual void OnPollThreadStep() { } @@ -210,6 +211,7 @@ class RTPSession friend class RTPPollThread; #endif // RTP_SUPPORT_THREAD friend class RTPSessionSources; + friend class RTCPSessionPacketBuilder; }; #endif // RTPSESSION_H diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index f057b68..b8ece42 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -90,7 +90,7 @@ class RTPSessionParams private: bool acceptown; bool usepollthread; - int maxpacksize; + size_t maxpacksize; double owntsunit; RTPTransmitter::ReceiveMode receivemode; bool resolvehostname; diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 90df7c0..0e8c892 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -51,10 +51,6 @@ #include "rtpdebug.h" -#ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPSources_GetHashIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } -#endif // !RTP_SUPPORT_INLINETEMPLATEPARAM - RTPSources::RTPSources(ProbationType probtype) { totalcount = 0; @@ -693,31 +689,31 @@ int RTPSources::ProcessSDESNormalItem(uint32_t ssrc,RTCPSDESPacket::ItemType t,s RTPInternalSourceData *srcdat; bool created,cnamecollis; int status; - uint8_t id; + uint8_t sdesid; bool prevactive; switch(t) { case RTCPSDESPacket::CNAME: - id = RTCP_SDES_ID_CNAME; + sdesid = RTCP_SDES_ID_CNAME; break; case RTCPSDESPacket::NAME: - id = RTCP_SDES_ID_NAME; + sdesid = RTCP_SDES_ID_NAME; break; case RTCPSDESPacket::EMAIL: - id = RTCP_SDES_ID_EMAIL; + sdesid = RTCP_SDES_ID_EMAIL; break; case RTCPSDESPacket::PHONE: - id = RTCP_SDES_ID_PHONE; + sdesid = RTCP_SDES_ID_PHONE; break; case RTCPSDESPacket::LOC: - id = RTCP_SDES_ID_LOCATION; + sdesid = RTCP_SDES_ID_LOCATION; break; case RTCPSDESPacket::TOOL: - id = RTCP_SDES_ID_TOOL; + sdesid = RTCP_SDES_ID_TOOL; break; case RTCPSDESPacket::NOTE: - id = RTCP_SDES_ID_NOTE; + sdesid = RTCP_SDES_ID_NOTE; break; default: return ERR_RTP_SOURCES_ILLEGALSDESTYPE; @@ -730,7 +726,7 @@ int RTPSources::ProcessSDESNormalItem(uint32_t ssrc,RTCPSDESPacket::ItemType t,s return 0; prevactive = srcdat->IsActive(); - status = srcdat->ProcessSDESItem(id,(const uint8_t *)itemdata,itemlength,receivetime,&cnamecollis); + status = srcdat->ProcessSDESItem(sdesid,(const uint8_t *)itemdata,itemlength,receivetime,&cnamecollis); if (!prevactive && srcdat->IsActive()) activecount++; @@ -1233,6 +1229,7 @@ void RTPSources::MultipleTimeouts(const RTPTime &curtime,const RTPTime &senderti OnBYETimeout(srcdat); if (normaltimeout) OnTimeout(srcdat); + OnRemoveSource(srcdat); delete srcdat; } } diff --git a/src/rtpsources.h b/src/rtpsources.h index fe50dcf..82f90dd 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -41,11 +41,11 @@ #define RTPSOURCES_HASHSIZE 8317 -#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPSources_GetHashIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } -#else // can't use inline function as template parameter - int RTPSources_GetHashIndex(const uint32_t &ssrc); -#endif // RTP_SUPPORT_INLINETEMPLATEPARAM +class RTPSources_GetHashIndex +{ +public: + static int GetIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } +}; class RTPNTPTime; class RTPTransmitter; diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 991c571..9447a4d 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -64,7 +64,7 @@ struct RTPHeader struct RTPExtensionHeader { - uint16_t id; + uint16_t extid; uint16_t length; }; @@ -111,7 +111,7 @@ struct RTCPReceiverReport struct RTCPSDESHeader { - uint8_t id; + uint8_t sdesid; uint8_t length; }; diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h old mode 100755 new mode 100644 diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index d7da137..746d90b 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -34,6 +34,7 @@ #include "rtprawpacket.h" #include "rtpipv4address.h" #include "rtptimeutilities.h" +#include "rtpdefines.h" #include #if (defined(WIN32) || defined(_WIN32_WCE)) #define RTPSOCKERR INVALID_SOCKET @@ -104,11 +105,6 @@ mreq.imr_interface.s_addr = htonl(mcastifaceIP);\ status = setsockopt(socket,IPPROTO_IP,type,(const char *)&mreq,sizeof(struct ip_mreq));\ } -#ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } - int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } -#endif // !RTP_SUPPORT_INLINETEMPLATEPARAM - #ifdef RTP_SUPPORT_THREAD #define MAINMUTEX_LOCK { if (threadsafe) mainmutex.Lock(); } #define MAINMUTEX_UNLOCK { if (threadsafe) mainmutex.Unlock(); } @@ -512,11 +508,7 @@ int RTPUDPv4Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) it = localIPs.begin(); ip = (*it); -#if (defined(WIN32) || defined(_WIN32_WCE)) - _snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); -#else - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); -#endif // WIN32 || _WIN32_WCE + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); len = strlen(str); localhostnamelength = len; @@ -1908,16 +1900,16 @@ void RTPUDPv4Transmitter::Dump() std::cout << "RTP socket descriptor: " << rtpsock << std::endl; std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; ip = bindIP; - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << "Bind IP address: " << str << std::endl; ip = mcastifaceIP; - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << "Multicast interface IP address: " << str << std::endl; std::cout << "Local IP addresses:" << std::endl; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { ip = (*it); - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; } std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; @@ -1940,7 +1932,7 @@ void RTPUDPv4Transmitter::Dump() while(acceptignoreinfo.HasCurrentElement()) { ip = acceptignoreinfo.GetCurrentKey(); - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); std::cout << " " << str << ": "; if (pinfo->all) @@ -1994,7 +1986,7 @@ void RTPUDPv4Transmitter::Dump() do { ip = multicastgroups.GetCurrentElement(); - snprintf(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); + RTP_SNPRINTF(str,16,"%d.%d.%d.%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF)); std::cout << " " << str << std::endl; multicastgroups.GotoNextElement(); } while (multicastgroups.HasCurrentElement()); diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index e3509eb..70a9353 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -98,13 +98,17 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 }; -#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } - inline int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } -#else // No support for inline function as template parameter - int RTPUDPv4Trans_GetHashIndex_IPv4Dest(const RTPIPv4Destination &d); - int RTPUDPv4Trans_GetHashIndex_uint32_t(const uint32_t &k); -#endif // RTP_SUPPORT_INLINETEMPLATEPARAM +class RTPUDPv4Trans_GetHashIndex_IPv4Dest +{ +public: + static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } +}; + +class RTPUDPv4Trans_GetHashIndex_uint32_t +{ +public: + static int GetIndex(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } +}; #define RTPUDPV4TRANS_HEADERSIZE (20+8) diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 17bd3d5..3bc1671 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -37,6 +37,7 @@ #include "rtprawpacket.h" #include "rtpipv6address.h" #include "rtptimeutilities.h" +#include "rtpdefines.h" #include #if (defined(WIN32) || defined(_WIN32_WCE)) #define RTPSOCKERR INVALID_SOCKET @@ -103,11 +104,6 @@ mreq.ipv6mr_interface = mcastifidx;\ status = setsockopt(socket,IPPROTO_IPV6,type,(const char *)&mreq,sizeof(struct ipv6_mreq));\ } -#ifndef RTP_SUPPORT_INLINETEMPLATEPARAM - int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } - int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } -#endif // !RTP_SUPPORT_INLINETEMPLATEPARAM - #ifdef RTP_SUPPORT_THREAD #define MAINMUTEX_LOCK { if (threadsafe) mainmutex.Lock(); } #define MAINMUTEX_UNLOCK { if (threadsafe) mainmutex.Unlock(); } @@ -522,11 +518,7 @@ int RTPUDPv6Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } -#if (defined(WIN32) || defined(_WIN32_WCE)) - _snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); -#else - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); -#endif // WIN32 || _WIN32_WCE + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); len = strlen(str); localhostnamelength = len; @@ -1865,7 +1857,7 @@ void RTPUDPv6Transmitter::Dump() std::cout << "RTCP socket descriptor: " << rtcpsock << std::endl; ip = bindIP; for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << "Bind IP address: " << str << std::endl; std::Cout << "Multicast interface index: " << mcastifidx << std::endl; std::cout << "Local IP addresses:" << std::endl; @@ -1873,7 +1865,7 @@ void RTPUDPv6Transmitter::Dump() { ip = (*it); for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << " " << str << std::endl; } std::cout << "Multicast TTL: " << (int)multicastTTL << std::endl; @@ -1897,7 +1889,7 @@ void RTPUDPv6Transmitter::Dump() { ip = acceptignoreinfo.GetCurrentKey(); for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); PortInfo *pinfo = acceptignoreinfo.GetCurrentElement(); std::cout << " " << str << ": "; if (pinfo->all) @@ -1952,7 +1944,7 @@ void RTPUDPv6Transmitter::Dump() { ip = multicastgroups.GetCurrentElement(); for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } - snprintf(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); + RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << " " << str << std::endl; multicastgroups.GotoNextElement(); } while (multicastgroups.HasCurrentElement()); diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 2b40b67..2376deb 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -106,13 +106,17 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 }; -#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM - inline int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } - inline int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } -#else // No support for inline function as template parameter - int RTPUDPv6Trans_GetHashIndex_IPv6Dest(const RTPIPv6Destination &d); - int RTPUDPv6Trans_GetHashIndex_in6_addr(const in6_addr &ip); -#endif // RTP_SUPPORT_INLINETEMPLATEPARAM +class RTPUDPv6Trans_GetHashIndex_IPv6Dest +{ +public: + static int GetIndex(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } +}; + +class RTPUDPv6Trans_GetHashIndex_in6_addr +{ +public: + static int GetIndex(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } +}; #define RTPUDPV6TRANS_HEADERSIZE (40+8) From 663ce7fa3e18e67cc74f1da30ee49f164e452c4c Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 009/136] Import of version 3.5.1 --- ChangeLog | 7 ++++++- README.TXT | 4 ++-- configure | 2 +- configure.in | 2 +- doc/jrtplib.tex | 4 ++-- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtcpscheduler.cpp | 39 +++++++++++++++++++++++++++++++++++++-- src/rtplibraryversion.cpp | 2 +- 9 files changed, 52 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5c98ea..e3afc0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ - March 17, 2006 + March 24, 2006 JRTPLIB ChangeLog ----------- + 3.5.1 (March 2006) + * Fixed bug in RTCP scheduler. Due to -= operation on an RTPTime + instance, an incredibly large scheduling interval could be + calculated. + 3.5.0 (March 2006) * Now, the define RTP_SNPRINTF is used instead of snprintf, _snprintf or _snprintf_s. diff --git a/README.TXT b/README.TXT index d1eb113..63db5ba 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - March 17, 2006 + March 24, 2006 - JRTPLIB (v3.5.0) + JRTPLIB (v3.5.1) Developed at the The Expertise Centre for diff --git a/configure b/configure index 6ce9488..7124c9c 100755 --- a/configure +++ b/configure @@ -1806,7 +1806,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.5.0 + VERSION=3.5.1 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index fc8afae..bf8b46e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.5.0) +AM_INIT_AUTOMAKE(jrtplib,3.5.1) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index d7f3ef4..cdbdb09 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.5.0} +\newcommand{\jversion}{3.5.1} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{March 17, 2006\\\vspace{0.5cm}\ \\ + \date{March 24, 2006\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ diff --git a/src/Makefile.am b/src/Makefile.am index 9f9e727..45d8b9a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.1 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index caf9870..a0599cd 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -229,7 +229,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.1 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index 9d71708..b91752e 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -186,6 +186,11 @@ bool RTCPScheduler::IsTime() RTPTime currenttime = RTPTime::CurrentTime(); +// // TODO: for debugging +// double diff = nextrtcptime.GetDouble() - currenttime.GetDouble(); +// +// std::cout << "Delay till next RTCP interval: " << diff << std::endl; + if (currenttime < nextrtcptime) // timer has not yet expired return false; @@ -204,6 +209,8 @@ bool RTCPScheduler::IsTime() else checktime = CalculateBYETransmissionInterval(); +// std::cout << "Calculated checktime: " << checktime.GetDouble() << std::endl; + checktime += prevrtcptime; if (checktime <= currenttime) // Okay @@ -214,6 +221,8 @@ bool RTCPScheduler::IsTime() CalculateNextRTCPTime(); return true; } + +// std::cout << "New delay: " << nextrtcptime.GetDouble() - currenttime.GetDouble() << std::endl; nextrtcptime = checktime; pmembers = sources.GetActiveMemberCount(); @@ -238,6 +247,10 @@ RTPTime RTCPScheduler::CalculateDeterministicInterval(bool sender /* = false */) int numsenders = sources.GetSenderCount(); int numtotal = sources.GetActiveMemberCount(); +// std::cout << "CalculateDeterministicInterval" << std::endl; +// std::cout << " numsenders: " << numsenders << std::endl; +// std::cout << " numtotal: " << numtotal << std::endl; + // Try to avoid division by zero: if (numtotal == 0) numtotal++; @@ -273,6 +286,9 @@ RTPTime RTCPScheduler::CalculateDeterministicInterval(bool sender /* = false */) double ntimesC = n*C; double Td = (tmin>ntimesC)?tmin:ntimesC; + // TODO: for debugging +// std::cout << " Td: " << Td << std::endl; + return RTPTime(Td); } @@ -281,10 +297,16 @@ RTPTime RTCPScheduler::CalculateTransmissionInterval(bool sender) RTPTime Td = CalculateDeterministicInterval(sender); double td,mul,T; +// std::cout << "CalculateTransmissionInterval" << std::endl; + td = Td.GetDouble(); mul = rtprand.GetRandomDouble()+0.5; // gives random value between 0.5 and 1.5 T = (td*mul)/1.21828; // see RFC 3550 p 30 +// std::cout << " Td: " << td << std::endl; +// std::cout << " mul: " << mul << std::endl; +// std::cout << " T: " << T << std::endl; + return RTPTime(T); } @@ -298,9 +320,22 @@ void RTCPScheduler::PerformReverseReconsideration() RTPTime tc = RTPTime::CurrentTime(); RTPTime tn_min_tc = nextrtcptime; - tn_min_tc -= tc; + + if (tn_min_tc > tc) + tn_min_tc -= tc; + else + tn_min_tc = RTPTime(0,0); + +// std::cout << "+tn_min_tc0 " << nextrtcptime.GetDouble()-tc.GetDouble() << std::endl; +// std::cout << "-tn_min_tc0 " << -nextrtcptime.GetDouble()+tc.GetDouble() << std::endl; +// std::cout << "tn_min_tc " << tn_min_tc.GetDouble() << std::endl; + RTPTime tc_min_tp = tc; - tc_min_tp -= prevrtcptime; + + if (tc_min_tp > prevrtcptime) + tc_min_tp -= prevrtcptime; + else + tc_min_tp = 0; if (pmembers == 0) // avoid division by zero pmembers++; diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index be3ae68..91e60cd 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -35,7 +35,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,5,0); + return RTPLibraryVersion(3,5,1); } std::string RTPLibraryVersion::GetVersionString() const From 7779758dac9051280874711c439c9139cb833875 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 010/136] Import of version 3.5.2 --- ChangeLog | 9 +- README.TXT | 4 +- configure | 2 +- configure.in | 2 +- doc/jrtplib.tex | 392 ++++++++++++++++++------------------ src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/rtplibraryversion.cpp | 2 +- src/rtprandom.cpp | 46 +++-- src/rtprandom.h | 2 +- src/rtpudpv4transmitter.cpp | 2 +- src/rtpudpv6transmitter.cpp | 2 +- 12 files changed, 243 insertions(+), 224 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3afc0b..a6e69c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,17 @@ - March 24, 2006 + March 26, 2006 JRTPLIB ChangeLog ----------- + 3.5.2 (March 2006) + * Fixed bug in the random number functions which are used with + MS Visual Studio 2005. Thanks to Jun Ohasi (jun@jnb.odn.ne.jp) + for bringing the incorrect use of rand_s to my attention. + * Changed types like u_int32_t to types like uint32_t in the + documentation. + 3.5.1 (March 2006) * Fixed bug in RTCP scheduler. Due to -= operation on an RTPTime instance, an incredibly large scheduling interval could be diff --git a/README.TXT b/README.TXT index 63db5ba..eeec534 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - March 24, 2006 + March 26, 2006 - JRTPLIB (v3.5.1) + JRTPLIB (v3.5.2) Developed at the The Expertise Centre for diff --git a/configure b/configure index 7124c9c..6805b30 100755 --- a/configure +++ b/configure @@ -1806,7 +1806,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.5.1 + VERSION=3.5.2 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index bf8b46e..9a35dba 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.5.1) +AM_INIT_AUTOMAKE(jrtplib,3.5.2) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex index cdbdb09..88585ac 100644 --- a/doc/jrtplib.tex +++ b/doc/jrtplib.tex @@ -1,6 +1,6 @@ \documentclass[12pt,a4paper]{article} -\newcommand{\jversion}{3.5.1} +\newcommand{\jversion}{3.5.2} \newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} \newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} \newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} @@ -22,7 +22,7 @@ \begin{document} \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{March 24, 2006\\\vspace{0.5cm}\ \\ + \date{March 26, 2006\\\vspace{0.5cm}\ \\ {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), a research institute\\of the Hasselt University}\\\ \\ {\tt http://www.edm.uhasselt.be/}\\ @@ -198,7 +198,7 @@ Suppose that we want to send our data to a process running on the same host at port $9000$, we can do the following: \begin{lstlisting}[frame=tb]{} -u_int8_t localip[]={127,0,0,1}; +uint8_t localip[]={127,0,0,1}; RTPIPv4Address addr(localip,9000); status = session.AddDestination(addr); @@ -233,7 +233,7 @@ $0.020$ seconds. We'll also store the current time so we'll know when one minute has passed. \begin{lstlisting}[frame=tb]{} -u_int8_t silencebuffer[160]; +uint8_t silencebuffer[160]; for (int i = 0 ; i < 160 ; i++) silencebuffer[i] = 128; @@ -371,12 +371,12 @@ and least significant word (LSW) of an NTP timestamp. The class has the following members: \begin{itemize} - \item {\tt RTPNTPTime(u\_int32\_t m, u\_int32\_t l)}\\ + \item {\tt RTPNTPTime(uint32\_t m, uint32\_t l)}\\ This constructor creates and instance with MSW {\tt m} and LSW {\tt l}. - \item {\tt u\_int32\_t GetMSW() const}\\ + \item {\tt uint32\_t GetMSW() const}\\ Returns the most significant word. - \item {\tt u\_int32\_t GetLSW() const}\\ + \item {\tt uint32\_t GetLSW() const}\\ Returns the least significant word. \end{itemize} @@ -386,7 +386,7 @@ etc. It stores a number of seconds and a number of microseconds and it has the following interface: \begin{itemize} - \item {\tt RTPTime(u\_int32\_t seconds, u\_int32\_t microseconds)}\\ + \item {\tt RTPTime(uint32\_t seconds, uint32\_t microseconds)}\\ Creates an instance corresponding to {\tt seconds} and {\tt microseconds}. \item {\tt RTPTime(double t)}\\ @@ -396,9 +396,9 @@ Creates an instance that corresponds to {\tt ntptime}. If the conversion cannot be made, both the seconds and the microseconds are set to zero. - \item {\tt u\_int32\_t GetSeconds() const}\\ + \item {\tt uint32\_t GetSeconds() const}\\ Returns the number of seconds stored in this instance. - \item {\tt u\_int32\_t GetMicroSeconds() const}\\ + \item {\tt uint32\_t GetMicroSeconds() const}\\ Returns the number of microseconds stored in this instance. \item {\tt double GetDouble() const}\\ Returns the time stored in this instance, expressed in @@ -430,11 +430,11 @@ The {\tt RTPRandom} class can be used to generate random numbers. It has the following member functions: \begin{itemize} - \item {\tt u\_int8\_t GetRandom8()}\\ + \item {\tt uint8\_t GetRandom8()}\\ Returns a random eight bit value. - \item {\tt u\_int16\_t GetRandom16()}\\ + \item {\tt uint16\_t GetRandom16()}\\ Returns a random sixteen bit value. - \item {\tt u\_int32\_t GetRandom32()}\\ + \item {\tt uint32\_t GetRandom32()}\\ Returns a random thirty-two bit value. \item {\tt double GetRandomDouble()}\\ Returns a random number between $0.0$ and $1.0$. @@ -447,58 +447,58 @@ \begin{itemize} \item {\tt void Clear()}\\ Clears all SDES information. - \item {\tt int SetCNAME(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetCNAME(const uint8\_t *s, size\_t l)}\\ Sets the SDES CNAME item to {\tt s} with length {\tt l}. - \item {\tt int SetName(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetName(const uint8\_t *s, size\_t l)}\\ Sets the SDES name item to {\tt s} with length {\tt l}. - \item {\tt int SetEMail(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetEMail(const uint8\_t *s, size\_t l)}\\ Sets the SDES e-mail item to {\tt s} with length {\tt l}. - \item {\tt int SetPhone(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetPhone(const uint8\_t *s, size\_t l)}\\ Sets the SDES phone item to {\tt s} with length {\tt l}. - \item {\tt int SetLocation(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetLocation(const uint8\_t *s, size\_t l)}\\ Sets the SDES location item to {\tt s} with length {\tt l}. - \item {\tt int SetTool(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetTool(const uint8\_t *s, size\_t l)}\\ Sets the SDES tool item to {\tt s} with length {\tt l}. - \item {\tt int SetNote(const u\_int8\_t *s, size\_t l)}\\ + \item {\tt int SetNote(const uint8\_t *s, size\_t l)}\\ Sets the SDES note item to {\tt s} with length {\tt l}. - \item {\tt u\_int8\_t *GetCNAME(size\_t *len) const}\\ + \item {\tt uint8\_t *GetCNAME(size\_t *len) const}\\ Returns the SDES CNAME item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetName(size\_t *len) const}\\ + \item {\tt uint8\_t *GetName(size\_t *len) const}\\ Returns the SDES name item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetEMail(size\_t *len) const}\\ + \item {\tt uint8\_t *GetEMail(size\_t *len) const}\\ Returns the SDES e-mail item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetPhone(size\_t *len) const}\\ + \item {\tt uint8\_t *GetPhone(size\_t *len) const}\\ Returns the SDES phone item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetLocation(size\_t *len) const}\\ + \item {\tt uint8\_t *GetLocation(size\_t *len) const}\\ Returns the SDES location item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetTool(size\_t *len) const}\\ + \item {\tt uint8\_t *GetTool(size\_t *len) const}\\ Returns the SDES tool item and stores its length in {\tt len}. - \item {\tt u\_int8\_t *GetNote(size\_t *len) const }\\ + \item {\tt uint8\_t *GetNote(size\_t *len) const }\\ Returns the SDES note item and stores its length in {\tt len}. \end{itemize} If SDES private item support was enabled at compile time, the following member functions are also available: \begin{itemize} - \item {\tt int SetPrivateValue(const u\_int8\_t *prefix, size\_t prefixlen, const u\_int8\_t *value, size\_t valuelen)}\\ + \item {\tt int SetPrivateValue(const uint8\_t *prefix, size\_t prefixlen, const uint8\_t *value, size\_t valuelen)}\\ Sets the entry for the prefix string specified by {\tt prefix} with length {\tt prefixlen} to contain the value string specified by {\tt value} with length {\tt valuelen}. If the maximum allowed number of prefixes was reached, the error code {\tt ERR\_\-RTP\_\-SDES\_\-MAX\-PRIV\-ITEMS} is returned. - \item {\tt int DeletePrivatePrefix(const u\_int8\_t *s, size\_t len)}\\ + \item {\tt int DeletePrivatePrefix(const uint8\_t *s, size\_t len)}\\ Deletes the entry for the prefix specified by {\tt s} with length {\tt len}. \item {\tt void GotoFirstPrivateValue()}\\ Starts the iteration over the stored SDES private item prefixes and their associated values. - \item {\tt bool GetNextPrivateValue(u\_int8\_t **prefix, size\_t *prefixlen, u\_int8\_t **value, size\_t *valuelen)}\\ + \item {\tt bool GetNextPrivateValue(uint8\_t **prefix, size\_t *prefixlen, uint8\_t **value, size\_t *valuelen)}\\ If available, returns {\tt true} and stores the next SDES private item prefix in {\tt prefix} and its length in {\tt prefixlen}. The associated value and its length are then stored in {\tt value} and {\tt valuelen}. Otherwise, it returns {\tt false}. - \item {\tt bool GetPrivateValue(const u\_int8\_t *prefix, size\_t prefixlen, u\_int8\_t **value, size\_t *valuelen) const}\\ + \item {\tt bool GetPrivateValue(const uint8\_t *prefix, size\_t prefixlen, uint8\_t **value, size\_t *valuelen) const}\\ Looks for the entry which corresponds to the SDES private item prefix {\tt prefix} with length {\tt prefixlen}. If found, the function returns {\tt true} and stores the associated @@ -568,7 +568,7 @@ an instance of {\tt RTP\-UDPv4\-Trans\-mission\-Info} or {\tt RTP\-UDPv6\-Trans\-mission\-Info} is returned, depending on the type of the transmitter. The user has to delete the returned instance when it is no longer needed. - \item {\tt int GetLocalHostName(u\_int8\_t *buffer, size\_t *bufferlength)}\\ + \item {\tt int GetLocalHostName(uint8\_t *buffer, size\_t *bufferlength)}\\ Looks up the local host name based upon internal information about the local host's addresses. This function might take some time since a DNS query might be done. {\tt bufferlength} should initially @@ -609,9 +609,9 @@ \item {\tt void ResetPacketCount()}\\ The transmitter keeps track of the amount of RTP and RTCP packets that were sent. This functions resets those counts. - \item {\tt u\_int32\_t GetNumRTPPacketsSent()}\\ + \item {\tt uint32\_t GetNumRTPPacketsSent()}\\ Returns the number of RTP packets sent. - \item {\tt u\_int32\_t GetNumRTCPPacketsSent()}\\ + \item {\tt uint32\_t GetNumRTCPPacketsSent()}\\ Returns the number of RTCP packets sent. \item {\tt int AddDestination(const RTPAddress \&addr)}\\ Adds the address specified by {\tt addr} to the list of @@ -704,29 +704,29 @@ By default, the multicast TTL is set to $1$ and the portbase is set to $5000$. The interface of this class is the following: \begin{itemize} - \item {\tt void SetBindIP(u\_int32\_t ip)}\\ + \item {\tt void SetBindIP(uint32\_t ip)}\\ Sets the IP address which is used to bind the sockets to {\tt ip}. - \item {\tt void SetPortbase(u\_int16\_t pbase)}\\ + \item {\tt void SetPortbase(uint16\_t pbase)}\\ Sets the RTP portbase to {\tt pbase}. This has to be an even number. - \item {\tt void SetMulticastTTL(u\_int8\_t mcastTTL)}\\ + \item {\tt void SetMulticastTTL(uint8\_t mcastTTL)}\\ Sets the multicast TTL to be used to {\tt mcastTTL}. - \item {\tt void SetLocalIPList(std::list \&iplist)}\\ + \item {\tt void SetLocalIPList(std::list \&iplist)}\\ Passes a list of IP addresses which will be used as the local IP addresses. \item {\tt void ClearLocalIPList()}\\ Clears the list of local IP addresses. An empty list will make the transmission component itself determine the local IP addresses. - \item {\tt u\_int32\_t GetBindIP() const}\\ + \item {\tt uint32\_t GetBindIP() const}\\ Returns the IP address which will be used to bind the sockets. - \item {\tt u\_int16\_t GetPortbase() const}\\ + \item {\tt uint16\_t GetPortbase() const}\\ Returns the RTP portbase which will be used. - \item {\tt u\_int8\_t GetMulticastTTL() const}\\ + \item {\tt uint8\_t GetMulticastTTL() const}\\ Returns the multicast TTL which will be used. - \item {\tt const std::list \&GetLocalIPList() const}\\ + \item {\tt const std::list \&GetLocalIPList() const}\\ Returns the list of local IP addresses. \end{itemize} @@ -741,10 +741,10 @@ \item {\tt void SetBindIP(in6\_addr ip)}\\ Sets the IP address which is used to bind the sockets to {\tt ip}. - \item {\tt void SetPortbase(u\_int16\_t pbase)}\\ + \item {\tt void SetPortbase(uint16\_t pbase)}\\ Sets the RTP portbase to {\tt pbase}. This has to be an even number. - \item {\tt void SetMulticastTTL(u\_int8\_t mcastTTL)}\\ + \item {\tt void SetMulticastTTL(uint8\_t mcastTTL)}\\ Sets the multicast TTL to be used to {\tt mcastTTL}. \item {\tt void SetLocalIPList(std::list \&iplist)}\\ Passes a list of IP addresses which will be used as @@ -756,9 +756,9 @@ \item {\tt in6\_addr GetBindIP() const}\\ Returns the IP address which will be used to bind the sockets. - \item {\tt u\_int16\_t GetPortbase() const}\\ + \item {\tt uint16\_t GetPortbase() const}\\ Returns the RTP portbase which will be used. - \item {\tt u\_int8\_t GetMulticastTTL() const}\\ + \item {\tt uint8\_t GetMulticastTTL() const}\\ Returns the multicast TTL which will be used. \item {\tt const std::list \&GetLocalIPList() const}\\ Returns the list of local IP addresses. @@ -782,7 +782,7 @@ information about the UDP over IPv4 transmission component. The following member functions are available: \begin{itemize} - \item {\tt std::list GetLocalIPList() const}\\ + \item {\tt std::list GetLocalIPList() const}\\ Returns the list of IPv4 addresses the transmitter considers to be the local IP addresses. \item {\tt int GetRTPSocket() const}\\ @@ -847,24 +847,24 @@ This class is used by the UDP over IPv4 transmission component. The following member functions are defined in this class: \begin{itemize} - \item {\tt RTPIPv4Address(u\_int32\_t ip = 0, u\_int16\_t port = 0)}\\ + \item {\tt RTPIPv4Address(uint32\_t ip = 0, uint16\_t port = 0)}\\ Creates an instance with IP address {\tt ip} and port number {\tt port}. Both are interpreted in host byte order. - \item {\tt RTPIPv4Address(const u\_int8\_t ip[4], u\_int16\_t port = 0)}\\ + \item {\tt RTPIPv4Address(const uint8\_t ip[4], uint16\_t port = 0)}\\ Creates an instance with IP address {\tt ip} and port {\tt port}. The port number is interpreted in host byte order. - \item {\tt void SetIP(u\_int32\_t ip)}\\ + \item {\tt void SetIP(uint32\_t ip)}\\ Sets the IP address for this instance to {\tt ip} which is assumed to be in host byte order. - \item {\tt void SetIP(const u\_int8\_t ip[4])}\\ + \item {\tt void SetIP(const uint8\_t ip[4])}\\ Sets the IP address of this instance to {\tt ip}. - \item {\tt void SetPort(u\_int16\_t port)}\\ + \item {\tt void SetPort(uint16\_t port)}\\ Sets the port number for this instance to {\tt port} which is interpreted in host byte order. - \item {\tt u\_int32\_t GetIP() const}\\ + \item {\tt uint32\_t GetIP() const}\\ Returns the IP address contained in this instance in host byte order. - \item {\tt u\_int16\_t GetPort() const}\\ + \item {\tt uint16\_t GetPort() const}\\ Returns the port number of this instance in host byte order. \end{itemize} @@ -884,26 +884,26 @@ \item {\tt RTPIPv6Address()}\\ Creates an instance with IP address and port number set to zero. - \item {\tt RTPIPv6Address(const u\_int8\_t ip[16], u\_int16\_t port = 0)}\\ + \item {\tt RTPIPv6Address(const uint8\_t ip[16], uint16\_t port = 0)}\\ Creates an instance with IP address {\tt ip} and port number {\tt port}. The port number is assumed to be in host byte order. - \item {\tt RTPIPv6Address(in6\_addr ip, u\_int16\_t port = 0)}\\ + \item {\tt RTPIPv6Address(in6\_addr ip, uint16\_t port = 0)}\\ Creates an instance with IP address {\tt ip} and port number {\tt port}. The port number is assumed to be in host byte order. \item {\tt void SetIP(in6\_addr ip)}\\ Sets the IP address for this instance to {\tt ip}. - \item {\tt void SetIP(const u\_int8\_t ip[16])}\\ + \item {\tt void SetIP(const uint8\_t ip[16])}\\ Sets the IP address for this instance to {\tt ip}. - \item {\tt void SetPort(u\_int16\_t port)}\\ + \item {\tt void SetPort(uint16\_t port)}\\ Sets the port number for this instance to {\tt port}, which is interpreted in host byte order. - \item {\tt void GetIP(u\_int8\_t ip[16]) const}\\ + \item {\tt void GetIP(uint8\_t ip[16]) const}\\ Copies the IP address of this instance in {\tt ip}. \item {\tt in6\_addr GetIP() const}\\ Returns the IP address of this instance. - \item {\tt u\_int16\_t GetPort() const}\\ + \item {\tt uint16\_t GetPort() const}\\ Returns the port number contained in this instance in host byte order. \end{itemize} @@ -920,7 +920,7 @@ to store the incoming RTP and RTCP data in. It has the following interface: \begin{itemize} - \item {\tt RTPRawPacket(u\_int8\_t *data, size\_t datalen, RTPAddress *address, RTPTime \&recvtime, bool rtp)}\\ + \item {\tt RTPRawPacket(uint8\_t *data, size\_t datalen, RTPAddress *address, RTPTime \&recvtime, bool rtp)}\\ Creates an instance which stores data from {\tt data} with length {\tt datalen}. Only the pointer to the data is stored, no actual copy is made! The address from which this packet @@ -928,7 +928,7 @@ the packet was received is set to {\tt recvtime}. The flag which indicates whether this data is RTP or RTCP data is set to {\tt rtp}. - \item {\tt u\_int8\_t *GetData()}\\ + \item {\tt uint8\_t *GetData()}\\ Returns the pointer to the data which is contained in this packet. \item {\tt size\_t GetDataLength() const}\\ @@ -960,9 +960,9 @@ \item {\tt RTPPacket(RTPRawPacket \&rawpack)}\\ Creates an RTPPacket instance based upon the data in {\tt rawpack}. - \item {\tt RTPPacket(u\_int8\_t payloadtype, const void *payloaddata, size\_t payloadlen, u\_int16\_t seqnr, - u\_int32\_t timestamp, u\_int32\_t ssrc, bool gotmarker, u\_int8\_t numcsrcs, const u\_int32\_t *csrcs, - bool gotextension, u\_int16\_t extensionid, u\_int16\_t extensionlen\_numwords, const void *extensiondata, + \item {\tt RTPPacket(uint8\_t payloadtype, const void *payloaddata, size\_t payloadlen, uint16\_t seqnr, + uint32\_t timestamp, uint32\_t ssrc, bool gotmarker, uint8\_t numcsrcs, const uint32\_t *csrcs, + bool gotextension, uint16\_t extensionid, uint16\_t extensionlen\_numwords, const void *extensiondata, size\_t maxpacksize = 0)}\\ Creates an new buffer for an RTP packet and fills in the fields according to the specified parameters. If {\tt maxpacksize} is @@ -970,9 +970,9 @@ would exceed {\tt maxpacksize}. The arguments of the constructor are self-explanatory. Note that the size of a header extension is specified in a number of $32$-bit words. - \item {\tt RTPPacket(u\_int8\_t payloadtype, const void *payloaddata, size\_t payloadlen, u\_int16\_t seqnr, - u\_int32\_t timestamp, u\_int32\_t ssrc, bool gotmarker, u\_int8\_t numcsrcs, const u\_int32\_t *csrcs, - bool gotextension, u\_int16\_t extensionid, u\_int16\_t extensionlen\_numwords, const void *extensiondata, + \item {\tt RTPPacket(uint8\_t payloadtype, const void *payloaddata, size\_t payloadlen, uint16\_t seqnr, + uint32\_t timestamp, uint32\_t ssrc, bool gotmarker, uint8\_t numcsrcs, const uint32\_t *csrcs, + bool gotextension, uint16\_t extensionid, uint16\_t extensionlen\_numwords, const void *extensiondata, void *buffer, size\_t buffersize)}\\ Pretty much the same function as the previous one, except that data is stored in an external buffer {\tt buffer} with buffer size {\tt buffersize}. @@ -987,35 +987,35 @@ otherwise. \item {\tt int GetCSRCCount() const}\\ Returns the number of CSRCs contained in this packet. - \item {\tt u\_int32\_t GetCSRC(int num) const}\\ + \item {\tt uint32\_t GetCSRC(int num) const}\\ Returns a specific CSRC identifier. The parameter {\tt num} can go from $0$ to {\tt GetCSRCCount()}-$1$. - \item {\tt u\_int8\_t GetPayloadType() const}\\ + \item {\tt uint8\_t GetPayloadType() const}\\ Returns the payload type of the packet. - \item {\tt u\_int32\_t GetExtendedSequenceNumber() const}\\ + \item {\tt uint32\_t GetExtendedSequenceNumber() const}\\ Returns the extended sequence number of the packet. When the packet is just received, only the low $16$ bits will be set. The high $16$ bits can be filled in later. - \item {\tt u\_int16\_t GetSequenceNumber() const}\\ + \item {\tt uint16\_t GetSequenceNumber() const}\\ Returns the sequence number of this packet. - \item {\tt void SetExtendedSequenceNumber(u\_int32\_t seq)}\\ + \item {\tt void SetExtendedSequenceNumber(uint32\_t seq)}\\ Sets the extended sequence number of this packet to {\tt seq}. - \item {\tt u\_int32\_t GetTimestamp() const}\\ + \item {\tt uint32\_t GetTimestamp() const}\\ Returns the timestamp of this packet. - \item {\tt u\_int32\_t GetSSRC() const}\\ + \item {\tt uint32\_t GetSSRC() const}\\ Returns the SSRC identifier stored in this packet. - \item {\tt u\_int8\_t *GetPacketData() const}\\ + \item {\tt uint8\_t *GetPacketData() const}\\ Returns a pointer to the data of the entire packet. - \item {\tt u\_int8\_t *GetPayloadData() const}\\ + \item {\tt uint8\_t *GetPayloadData() const}\\ Returns a pointer to the actual payload data. \item {\tt size\_t GetPacketLength() const}\\ Returns the length of the entire packet. \item {\tt size\_t GetPayloadLength() const}\\ Returns the payload length. - \item {\tt u\_int16\_t GetExtensionID() const}\\ + \item {\tt uint16\_t GetExtensionID() const}\\ If a header extension is present, this function returns the extension identifier. - \item {\tt u\_int8\_t *GetExtensionData() const}\\ + \item {\tt uint8\_t *GetExtensionData() const}\\ Returns a pointer to the header extension data. \item {\tt size\_t GetExtensionLength() const}\\ Returns the length of the header extension data. @@ -1039,7 +1039,7 @@ be parsed, this function returns the error code of what went wrong. If the packet had an invalid format, the return value is {\tt ERR\_\-RTP\_\-RTCPCOMPOUND\_\-INVALID\-PACKET}. - \item {\tt u\_int8\_t *GetCompoundPacketData()}\\ + \item {\tt uint8\_t *GetCompoundPacketData()}\\ Returns a pointer to the data of the entire RTCP compound packet. \item {\tt size\_t GetCompoundPacketLength()}\\ Returns the size of the entire RTCP compound packet @@ -1078,7 +1078,7 @@ \item {\tt RTCPPacket::APP}: indicates an {\tt RTCPAPPPacket} instance \item {\tt RTCPPacket::Unknown}: indicates an {\tt RTCPUnknownPacket} instance \end{itemize} - \item {\tt u\_int8\_t *GetPacketData()}\\ + \item {\tt uint8\_t *GetPacketData()}\\ Returns a pointer to the data of this RTCP packet. \item {\tt size\_t GetPacketLength() const}\\ Returns the length of this RTCP packet. @@ -1089,33 +1089,33 @@ This class describes an RTCP sender report packet. The interface is the following: \begin{itemize} - \item {\tt RTCPSRPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPSRPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is made) one must make sure that the memory it points to is valid as long as the class instance exists. - \item {\tt u\_int32\_t GetSenderSSRC() const}\\ + \item {\tt uint32\_t GetSenderSSRC() const}\\ Returns the SSRC of the participant who sent this packet. \item {\tt RTPNTPTime GetNTPTimestamp() const}\\ Returns the NTP timestamp contained in the sender report. - \item {\tt u\_int32\_t GetRTPTimestamp() const}\\ + \item {\tt uint32\_t GetRTPTimestamp() const}\\ Returns the RTP timestamp contained in the sender report. - \item {\tt u\_int32\_t GetSenderPacketCount() const}\\ + \item {\tt uint32\_t GetSenderPacketCount() const}\\ Returns the sender's packet count contained in the sender report. - \item {\tt u\_int32\_t GetSenderOctetCount() const}\\ + \item {\tt uint32\_t GetSenderOctetCount() const}\\ Returns the sender's octet count contained in the sender report. \item {\tt int GetReceptionReportCount() const}\\ Returns the number of reception report blocks present in this packet. - \item {\tt u\_int32\_t GetSSRC(int index) const}\\ + \item {\tt uint32\_t GetSSRC(int index) const}\\ Returns the SSRC of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int8\_t GetFractionLost(int index) const}\\ + \item {\tt uint8\_t GetFractionLost(int index) const}\\ Returns the `fraction lost' field of the reception report described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that @@ -1125,22 +1125,22 @@ report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetExtendedHighestSequenceNumber(int index) const}\\ + \item {\tt uint32\_t GetExtendedHighestSequenceNumber(int index) const}\\ Returns the extended highest sequence number of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReception\-Report\-Count()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetJitter(int index) const}\\ + \item {\tt uint32\_t GetJitter(int index) const}\\ Returns the jitter field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetLSR(int index) const}\\ + \item {\tt uint32\_t GetLSR(int index) const}\\ Returns the LSR field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetDLSR(int index) const}\\ + \item {\tt uint32\_t GetDLSR(int index) const}\\ Returns the DLSR field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that @@ -1152,23 +1152,23 @@ This class describes an RTCP receiver report packet. The interface is the following: \begin{itemize} - \item {\tt RTCPRRPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPRRPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is made) one must make sure that the memory it points to is valid as long as the class instance exists. - \item {\tt u\_int32\_t GetSenderSSRC() const}\\ + \item {\tt uint32\_t GetSenderSSRC() const}\\ Returns the SSRC of the participant who sent this packet. \item {\tt int GetReceptionReportCount() const}\\ Returns the number of reception report blocks present in this packet. - \item {\tt u\_int32\_t GetSSRC(int index) const}\\ + \item {\tt uint32\_t GetSSRC(int index) const}\\ Returns the SSRC of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int8\_t GetFractionLost(int index) const}\\ + \item {\tt uint8\_t GetFractionLost(int index) const}\\ Returns the `fraction lost' field of the reception report described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that @@ -1178,22 +1178,22 @@ report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetExtendedHighestSequenceNumber(int index) const}\\ + \item {\tt uint32\_t GetExtendedHighestSequenceNumber(int index) const}\\ Returns the extended highest sequence number of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReception\-Report\-Count()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetJitter(int index) const}\\ + \item {\tt uint32\_t GetJitter(int index) const}\\ Returns the jitter field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetLSR(int index) const}\\ + \item {\tt uint32\_t GetLSR(int index) const}\\ Returns the LSR field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. - \item {\tt u\_int32\_t GetDLSR(int index) const}\\ + \item {\tt uint32\_t GetDLSR(int index) const}\\ Returns the DLSR field of the reception report block described by {\tt index} which may have a value from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that @@ -1215,7 +1215,7 @@ The class interface is the following: \begin{itemize} - \item {\tt RTCPSDESPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPSDESPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is @@ -1233,7 +1233,7 @@ Sets the current chunk to the next available chunk. If no next chunk is present, this function returns {\tt false}, otherwise it returns {\tt true}. - \item {\tt u\_int32\_t GetChunkSSRC() const}\\ + \item {\tt uint32\_t GetChunkSSRC() const}\\ Returns the SSRC identifier of the current chunk. \item {\tt bool GotoFirstItem()}\\ Starts the iteration over the SDES items in the current @@ -1250,7 +1250,7 @@ \item {\tt size\_t GetItemLength() const}\\ Returns the item length of the current item in the current chunk. - \item {\tt u\_int8\_t *GetItemData()}\\ + \item {\tt uint8\_t *GetItemData()}\\ Returns the item data of the current item in the current chunk. \end{itemize} @@ -1261,12 +1261,12 @@ \item {\tt size\_t GetPRIVPrefixLength()}\\ Returns the length of the prefix string of the private item. - \item {\tt u\_int8\_t *GetPRIVPrefixData()}\\ + \item {\tt uint8\_t *GetPRIVPrefixData()}\\ Returns the actual data of the prefix string. \item {\tt size\_t GetPRIVValueLength()}\\ Returns the length of the value string of the private item. - \item {\tt u\_int8\_t *GetPRIVValueData()}\\ + \item {\tt uint8\_t *GetPRIVValueData()}\\ Returns the actual value data of the private item. \end{itemize} @@ -1275,20 +1275,20 @@ The class {\tt RTCPAPPPacket} describes an RTCP APP packet. The following member functions are available: \begin{itemize} - \item {\tt RTCPAPPPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPAPPPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is made) one must make sure that the memory it points to is valid as long as the class instance exists. - \item {\tt u\_int8\_t GetSubType() const}\\ + \item {\tt uint8\_t GetSubType() const}\\ Returns the subtype contained in the APP packet. - \item {\tt u\_int32\_t GetSSRC() const}\\ + \item {\tt uint32\_t GetSSRC() const}\\ Returns the SSRC of the source which sent this packet. - \item {\tt u\_int8\_t *GetName()}\\ + \item {\tt uint8\_t *GetName()}\\ Returns the name contained in the APP packet. This always consists of four bytes and is not NULL-terminated. - \item {\tt u\_int8\_t *GetAPPData()}\\ + \item {\tt uint8\_t *GetAPPData()}\\ Returns a pointer to the actual data. \item {\tt size\_t GetAPPDataLength() const}\\ Returns the length of the actual data. @@ -1299,7 +1299,7 @@ An RTCP BYE packet is represented by the class {\tt RTCPBYEPacket} which has the following member functions: \begin{itemize} - \item {\tt RTCPBYEPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPBYEPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is @@ -1308,7 +1308,7 @@ \item {\tt int GetSSRCCount() const}\\ Returns the number of SSRC identifiers present in this BYE packet. - \item {\tt u\_int32\_t GetSSRC(int index) const}\\ + \item {\tt uint32\_t GetSSRC(int index) const}\\ Returns the SSRC described by {\tt index} which may have a value from $0$ to {\tt GetSSRCCount()}-$1$. Note that no check is performed to see if {\tt index} is valid. @@ -1318,7 +1318,7 @@ \item {\tt size\_t GetReasonLength() const}\\ Returns the length of the string which describes why the source(s) left. - \item {\tt u\_int8\_t *GetReasonData()}\\ + \item {\tt uint8\_t *GetReasonData()}\\ Returns the actual reason data. \end{itemize} @@ -1330,7 +1330,7 @@ function will trivially return {\tt true}. Only the following constructor is available: \begin{itemize} - \item {\tt RTCPUnknownPacket(u\_int8\_t *data, size\_t datalen)}\\ + \item {\tt RTCPUnknownPacket(uint8\_t *data, size\_t datalen)}\\ Creates an instance based on the data in {\tt data} with length {\tt datalen}. Since the {\tt data} pointer is referenced inside the class (no copy of the data is @@ -1355,33 +1355,33 @@ \item {\tt int InitBuild(void *externalbuffer, size\_t buffersize)}\\ Starts building a packet. Data will be stored in {\tt externalbuffer} which can contain {\tt buffersize} bytes. - \item {\tt int StartSenderReport(u\_int32\_t senderssrc, const RTPNTPTime \&ntptimestamp, u\_int32\_t rtptimestamp, - u\_int32\_t packetcount, u\_int32\_t octetcount)}\\ + \item {\tt int StartSenderReport(uint32\_t senderssrc, const RTPNTPTime \&ntptimestamp, uint32\_t rtptimestamp, + uint32\_t packetcount, uint32\_t octetcount)}\\ Tells the packet builder that the packet should start with a sender report which will contain the sender information specified by this function's arguments. Once the sender report is started, report blocks can be added using the {\tt AddReportBlock} function. - \item {\tt int StartReceiverReport(u\_int32\_t senderssrc)}\\ + \item {\tt int StartReceiverReport(uint32\_t senderssrc)}\\ Tells the packet builder that the packet should start with a receiver report which will contain the sender SSRC {\tt senderssrc}. Once the sender report is started, report blocks can be added using the {\tt AddReportBlock} function. - \item {\tt int AddReportBlock(u\_int32\_t ssrc, u\_int8\_t fractionlost, int32\_t packetslost, u\_int32\_t exthighestseq, - u\_int32\_t jitter, u\_int32\_t lsr, u\_int32\_t dlsr)}\\ + \item {\tt int AddReportBlock(uint32\_t ssrc, uint8\_t fractionlost, int32\_t packetslost, uint32\_t exthighestseq, + uint32\_t jitter, uint32\_t lsr, uint32\_t dlsr)}\\ Adds the report block information specified by the function's arguments. If more than 31 report blocks are added, the builder will automatically use a new RTCP receiver report packet. - \item {\tt int AddSDESSource(u\_int32\_t ssrc)}\\ + \item {\tt int AddSDESSource(uint32\_t ssrc)}\\ Starts an SDES chunk for participant {\tt ssrc}. - \item {\tt int AddSDESNormalItem(RTCPSDESPacket::ItemType t, const void *itemdata, u\_int8\_t itemlength)}\\ + \item {\tt int AddSDESNormalItem(RTCPSDESPacket::ItemType t, const void *itemdata, uint8\_t itemlength)}\\ Adds a normal (non-private) SDES item of type {\tt t} to the current SDES chunk. The item's value will have length {\tt itemlength} and will contain the data {\tt itemdata}. - \item {\tt int AddBYEPacket(u\_int32\_t *ssrcs, u\_int8\_t numssrcs, const void *reasondata, u\_int8\_t reasonlength)}\\ + \item {\tt int AddBYEPacket(uint32\_t *ssrcs, uint8\_t numssrcs, const void *reasondata, uint8\_t reasonlength)}\\ Adds a BYE packet to the compound packet. It will contain {\tt numssrcs} source identifiers specified in {\tt ssrcs} and will indicate as reason for leaving the string of length {\tt reasonlength} containing data {\tt reasondata}. - \item {\tt int AddAPPPacket(u\_int8\_t subtype, u\_int32\_t ssrc, const u\_int8\_t name[4], const void *appdata, size\_t appdatalen)}\\ + \item {\tt int AddAPPPacket(uint8\_t subtype, uint32\_t ssrc, const uint8\_t name[4], const void *appdata, size\_t appdatalen)}\\ Adds the APP packet specified by the arguments to the compound packet. Note that {\tt appdatalen} has to be a multiple of four. @@ -1394,8 +1394,8 @@ If the library was compiled with SDES private item support, the following member function is also available: \begin{itemize} - \item {\tt int AddSDESPrivateItem(const void *prefixdata, u\_int8\_t prefixlength, const void *valuedata, - u\_int8\_t valuelength)}\\ + \item {\tt int AddSDESPrivateItem(const void *prefixdata, uint8\_t prefixlength, const void *valuedata, + uint8\_t valuelength)}\\ Adds an SDES PRIV item described by the function's arguments to the current SDES chunk. \end{itemize} @@ -1431,7 +1431,7 @@ enabled at compilation time. \item {\tt void Clear()}\\ Clears the source table. - \item {\tt int CreateOwnSSRC(u\_int32\_t ssrc)}\\ + \item {\tt int CreateOwnSSRC(uint32\_t ssrc)}\\ Creates an entry for our own SSRC identifier. \item {\tt int DeleteOwnSSRC()}\\ Deletes the entry for our own SSRC identifier. @@ -1462,38 +1462,38 @@ which was received at time {\tt receivetime} from {\tt senderaddress}. The {\tt senderaddress} parameter must be NULL if the packet was sent by the local participant. - \item {\tt int ProcessRTCPSenderInfo(u\_int32\_t ssrc, const RTPNTPTime \&ntptime, u\_int32\_t rtptime, - u\_int32\_t packetcount, u\_int32\_t octetcount, const RTPTime \&receivetime, + \item {\tt int ProcessRTCPSenderInfo(uint32\_t ssrc, const RTPNTPTime \&ntptime, uint32\_t rtptime, + uint32\_t packetcount, uint32\_t octetcount, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ Process the sender information of SSRC {\tt ssrc} into the source table. The information was received at time {\tt receivetime} from address {\tt senderaddress}. The {\tt senderaddress} parameter must be NULL if the packet was sent by the local participant. - \item {\tt int ProcessRTCPReportBlock(u\_int32\_t ssrc, u\_int8\_t fractionlost, int32\_t lostpackets, - u\_int32\_t exthighseqnr, u\_int32\_t jitter, u\_int32\_t lsr, - u\_int32\_t dlsr, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ + \item {\tt int ProcessRTCPReportBlock(uint32\_t ssrc, uint8\_t fractionlost, int32\_t lostpackets, + uint32\_t exthighseqnr, uint32\_t jitter, uint32\_t lsr, + uint32\_t dlsr, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ Processes the report block information which was sent by participant {\tt ssrc} into the source table. The information was received at time {\tt receivetime} from address {\tt senderaddress}. The {\tt senderaddress} parameter must be NULL if the packet was sent by the local participant. - \item {\tt int ProcessSDESNormalItem(u\_int32\_t ssrc, RTCPSDESPacket::ItemType t, size\_t itemlength, + \item {\tt int ProcessSDESNormalItem(uint32\_t ssrc, RTCPSDESPacket::ItemType t, size\_t itemlength, const void *itemdata, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ Processes the non-private SDES item from source {\tt ssrc} into the source table. The information was received at time {\tt receivetime} from address {\tt senderaddress}. The {\tt senderaddress} parameter must be NULL if the packet was sent by the local participant. - \item {\tt int ProcessBYE(u\_int32\_t ssrc, size\_t reasonlength, const void *reasondata, const RTPTime \&receivetime, + \item {\tt int ProcessBYE(uint32\_t ssrc, size\_t reasonlength, const void *reasondata, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ Processes the BYE message for SSRC {\tt ssrc}. The information was received at time {\tt receivetime} from address {\tt senderaddress}. The {\tt senderaddress} parameter must be NULL if the packet was sent by the local participant. - \item {\tt int UpdateReceiveTime(u\_int32\_t ssrc, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ + \item {\tt int UpdateReceiveTime(uint32\_t ssrc, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ If we heard from source {\tt ssrc}, but no actual data was added to the source table (for example, if no report block was meant for us), this function can @@ -1533,13 +1533,13 @@ \item {\tt RTPSourceData *GetCurrentSourceInfo()}\\ Returns the {\tt RTPSourceData} instance for the currently selected participant. - \item {\tt RTPSourceData *GetSourceInfo(u\_int32\_t ssrc)}\\ + \item {\tt RTPSourceData *GetSourceInfo(uint32\_t ssrc)}\\ Returns the {\tt RTPSourceData} instance for the participant identified by {\tt ssrc}, or NULL if no such entry exists. \item {\tt RTPPacket *GetNextPacket()}\\ Extracts the next packet from the received packets queue of the current participant. - \item {\tt bool GotEntry(u\_int32\_t ssrc)}\\ + \item {\tt bool GotEntry(uint32\_t ssrc)}\\ Returns {\tt true} if an entry for participant {\tt ssrc} exists and {\tt false} otherwise. \item {\tt RTPSourceData *GetOwnSourceInfo()}\\ @@ -1580,7 +1580,7 @@ If SDES private item support was enabled at compile-time, the following member function is also available: \begin{itemize} - \item {\tt int ProcessSDESPrivateItem(u\_int32\_t ssrc, size\_t prefixlen, const void *prefixdata, + \item {\tt int ProcessSDESPrivateItem(uint32\_t ssrc, size\_t prefixlen, const void *prefixdata, size\_t valuelen, const void *valuedata, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ Processes the SDES private item from source {\tt ssrc} @@ -1607,7 +1607,7 @@ addresses and {\tt isrtp} indicates against which address of {\tt srcdat} the check failed. \item {\tt void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, - const u\_int8\_t *cname, size\_t cnamelength)}\\ + const uint8\_t *cname, size\_t cnamelength)}\\ Is called when another CNAME was received than the one already present for source {\tt srcdat}. \item {\tt void OnNewSource(RTPSourceData *srcdat)}\\ @@ -1646,7 +1646,7 @@ The {\tt RTPSourceData} class contains all information about a member of the session. The interface is the following: \begin{itemize} - \item {\tt u\_int32\_t GetSSRC() const}\\ + \item {\tt uint32\_t GetSSRC() const}\\ Returns the SSRC identifier for this member. \item {\tt bool HasData() const}\\ Returns {\tt true} if there are RTP packets which can be extracted. @@ -1696,7 +1696,7 @@ \item {\tt bool ReceivedBYE() const}\\ Returns {\tt true} if we received a BYE message for this participant and {\tt false} otherwise. - \item {\tt u\_int8\_t *GetBYEReason(size\_t *len) const}\\ + \item {\tt uint8\_t *GetBYEReason(size\_t *len) const}\\ Returns the reason for leaving contained in the BYE packet of this participant. The length of the reason is stored in {\tt len}. \item {\tt RTPTime GetBYETime() const}\\ @@ -1714,11 +1714,11 @@ Returns {\tt true} if an RTCP sender report has been received from this participant. \item {\tt RTPNTPTime SR\_GetNTPTimestamp() const}\\ Returns the NTP timestamp contained in the last sender report. - \item {\tt u\_int32\_t SR\_GetRTPTimestamp() const}\\ + \item {\tt uint32\_t SR\_GetRTPTimestamp() const}\\ Returns the RTP timestamp contained in the last sender report. - \item {\tt u\_int32\_t SR\_GetPacketCount() const}\\ + \item {\tt uint32\_t SR\_GetPacketCount() const}\\ Returns the packet count contained in the last sender report. - \item {\tt u\_int32\_t SR\_GetByteCount() const}\\ + \item {\tt uint32\_t SR\_GetByteCount() const}\\ Returns the octet count contained in the last sender report. \item {\tt RTPTime SR\_GetReceiveTime() const}\\ Returns the time at which the last sender report was received. @@ -1726,11 +1726,11 @@ Returns {\tt true} if more than one RTCP sender report has been received. \item {\tt RTPNTPTime SR\_Prev\_GetNTPTimestamp() const}\\ Returns the NTP timestamp contained in the second to last sender report. - \item {\tt u\_int32\_t SR\_Prev\_GetRTPTimestamp() const}\\ + \item {\tt uint32\_t SR\_Prev\_GetRTPTimestamp() const}\\ Returns the RTP timestamp contained in the second to last sender report. - \item {\tt u\_int32\_t SR\_Prev\_GetPacketCount() const}\\ + \item {\tt uint32\_t SR\_Prev\_GetPacketCount() const}\\ Returns the packet count contained in the second to last sender report. - \item {\tt u\_int32\_t SR\_Prev\_GetByteCount() const}\\ + \item {\tt uint32\_t SR\_Prev\_GetByteCount() const}\\ Returns the octet count contained in the second to last sender report. \item {\tt RTPTime SR\_Prev\_GetReceiveTime() const}\\ Returns the time at which the second to last sender report was received. @@ -1741,13 +1741,13 @@ Returns the fraction lost value from the last report. \item {\tt int32\_t RR\_GetPacketsLost() const}\\ Returns the number of lost packets contained in the last report. - \item {\tt u\_int32\_t RR\_GetExtendedHighestSequenceNumber() const}\\ + \item {\tt uint32\_t RR\_GetExtendedHighestSequenceNumber() const}\\ Returns the extended highest sequence number contained in the last report. - \item {\tt u\_int32\_t RR\_GetJitter() const}\\ + \item {\tt uint32\_t RR\_GetJitter() const}\\ Returns the jitter value from the last report. - \item {\tt u\_int32\_t RR\_GetLastSRTimestamp() const}\\ + \item {\tt uint32\_t RR\_GetLastSRTimestamp() const}\\ Returns the LSR value from the last report. - \item {\tt u\_int32\_t RR\_GetDelaySinceLastSR() const}\\ + \item {\tt uint32\_t RR\_GetDelaySinceLastSR() const}\\ Returns the DLSR value from the last report. \item {\tt RTPTime RR\_GetReceiveTime() const}\\ Returns the time at which the last report was received. @@ -1758,13 +1758,13 @@ Returns the fraction lost value from the second to last report. \item {\tt int32\_t RR\_Prev\_GetPacketsLost() const}\\ Returns the number of lost packets contained in the second to last report. - \item {\tt u\_int32\_t RR\_Prev\_GetExtendedHighestSequenceNumber() const}\\ + \item {\tt uint32\_t RR\_Prev\_GetExtendedHighestSequenceNumber() const}\\ Returns the extended highest sequence number contained in the second to last report. - \item {\tt u\_int32\_t RR\_Prev\_GetJitter() const}\\ + \item {\tt uint32\_t RR\_Prev\_GetJitter() const}\\ Returns the jitter value from the second to last report. - \item {\tt u\_int32\_t RR\_Prev\_GetLastSRTimestamp() const}\\ + \item {\tt uint32\_t RR\_Prev\_GetLastSRTimestamp() const}\\ Returns the LSR value from the second to last report. - \item {\tt u\_int32\_t RR\_Prev\_GetDelaySinceLastSR() const}\\ + \item {\tt uint32\_t RR\_Prev\_GetDelaySinceLastSR() const}\\ Returns the DLSR value from the second to last report. \item {\tt RTPTime RR\_Prev\_GetReceiveTime() const}\\ Returns the time at which the second to last report was received. @@ -1773,12 +1773,12 @@ participant. \item {\tt int32\_t INF\_GetNumPacketsReceived() const}\\ Returns the total number of received packets from this participant. - \item {\tt u\_int32\_t INF\_GetBaseSequenceNumber() const}\\ + \item {\tt uint32\_t INF\_GetBaseSequenceNumber() const}\\ Returns the base sequence number of this participant. - \item {\tt u\_int32\_t INF\_GetExtendedHighestSequenceNumber() const}\\ + \item {\tt uint32\_t INF\_GetExtendedHighestSequenceNumber() const}\\ Returns the extended highest sequence number received from this participant. - \item {\tt u\_int32\_t INF\_GetJitter() const}\\ + \item {\tt uint32\_t INF\_GetJitter() const}\\ Returns the current jitter value for this participant. \item {\tt RTPTime INF\_GetLastMessageTime() const}\\ Returns the time at which something was last heard from this member. @@ -1787,10 +1787,10 @@ \item {\tt double INF\_GetEstimatedTimestampUnit() const}\\ Returns the estimated timestamp unit. The estimate is made from two consecutive sender reports. - \item {\tt u\_int32\_t INF\_GetNumPacketsReceivedInInterval() const}\\ + \item {\tt uint32\_t INF\_GetNumPacketsReceivedInInterval() const}\\ Returns the number of packets received since a new interval was started with {\tt INF\_StartNewInterval}. - \item {\tt u\_int32\_t INF\_GetSavedExtendedSequenceNumber() const}\\ + \item {\tt uint32\_t INF\_GetSavedExtendedSequenceNumber() const}\\ Returns the extended sequence number which was stored by the {\tt INF\_StartNewInterval} call. \item {\tt void INF\_StartNewInterval()}\\ @@ -1802,25 +1802,25 @@ last receiver report. \item {\tt RTPTime INF\_GetLastSDESNoteTime() const}\\ Returns the time at which the last SDES NOTE item was received. - \item {\tt u\_int8\_t *SDES\_GetCNAME(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetCNAME(size\_t *len) const}\\ Returns a pointer to the SDES CNAME item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetName(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetName(size\_t *len) const}\\ Returns a pointer to the SDES name item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetEMail(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetEMail(size\_t *len) const}\\ Returns a pointer to the SDES e-mail item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetPhone(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetPhone(size\_t *len) const}\\ Returns a pointer to the SDES phone item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetLocation(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetLocation(size\_t *len) const}\\ Returns a pointer to the SDES location item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetTool(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetTool(size\_t *len) const}\\ Returns a pointer to the SDES tool item of this participant and stores its length in {\tt len}. - \item {\tt u\_int8\_t *SDES\_GetNote(size\_t *len) const}\\ + \item {\tt uint8\_t *SDES\_GetNote(size\_t *len) const}\\ Returns a pointer to the SDES note item of this participant and stores its length in {\tt len}. \end{itemize} @@ -1831,13 +1831,13 @@ \item {\tt void SDES\_GotoFirstPrivateValue()}\\ Starts the iteration over the stored SDES private item prefixes and their associated values. - \item {\tt bool SDES\_GetNextPrivateValue(u\_int8\_t **prefix, size\_t *prefixlen, u\_int8\_t **value, size\_t *valuelen) }\\ + \item {\tt bool SDES\_GetNextPrivateValue(uint8\_t **prefix, size\_t *prefixlen, uint8\_t **value, size\_t *valuelen) }\\ If available, returns {\tt true} and stores the next SDES private item prefix in {\tt prefix} and its length in {\tt prefixlen}. The associated value and its length are then stored in {\tt value} and {\tt valuelen}. Otherwise, it returns {\tt false}. - \item {\tt bool SDES\_GetPrivateValue(u\_int8\_t *prefix, size\_t prefixlen, u\_int8\_t **value, size\_t *valuelen) const}\\ + \item {\tt bool SDES\_GetPrivateValue(uint8\_t *prefix, size\_t prefixlen, uint8\_t **value, size\_t *valuelen) const}\\ Looks for the entry which corresponds to the SDES private item prefix {\tt prefix} with length {\tt prefixlen}. If found, the function returns {\tt true} and stores the associated @@ -1858,18 +1858,18 @@ below {\tt maxpacksize} \item {\tt void Destroy()}\\ Cleans up the builder. - \item {\tt u\_int32\_t GetPacketCount()}\\ + \item {\tt uint32\_t GetPacketCount()}\\ Returns the number of packets which have been created with the current SSRC identifier. - \item {\tt u\_int32\_t GetPayloadOctetCount()}\\ + \item {\tt uint32\_t GetPayloadOctetCount()}\\ Returns the number of payload octets which have been generated with this SSRC identifier. \item {\tt int SetMaximumPacketSize(size\_t maxpacksize)}\\ Sets the maximum allowed packet size to {\tt maxpacksize}. - \item {\tt int AddCSRC(u\_int32\_t csrc)}\\ + \item {\tt int AddCSRC(uint32\_t csrc)}\\ Adds a CSRC to the CSRC list which will be stored in the RTP packets. - \item {\tt int DeleteCSRC(u\_int32\_t csrc)}\\ + \item {\tt int DeleteCSRC(uint32\_t csrc)}\\ Deletes a CSRC from the list which will be stored in the RTP packets. \item {\tt void ClearCSRCList()}\\ @@ -1880,13 +1880,13 @@ used will be those that have been set using the {\tt SetDefault} functions below. \item {\tt int BuildPacket(const void *data, size\_t len, - u\_int8\_t pt, bool mark, u\_int32\_t timestampinc)}\\ + uint8\_t pt, bool mark, uint32\_t timestampinc)}\\ Builds a packet with payload {\tt data} and payload length {\tt len}. The payload type will be set to {\tt pt}, the marker bit to {\tt mark} and after building this packet, the timestamp will be incremented with {\tt timestamp}. \item {\tt int BuildPacketEx(const void *data, size\_t len, - u\_int16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ + uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ Builds a packet with payload {\tt data} and payload length {\tt len}. The payload type, marker and timestamp increment used will be those that have been set using the @@ -1896,8 +1896,8 @@ is given by {\tt numhdrextwords} which expresses the length in a number of $32$-bit words. \item {\tt int BuildPacketEx(const void *data, size\_t len, - u\_int8\_t pt, bool mark, u\_int32\_t timestampinc, - u\_int16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ + uint8\_t pt, bool mark, uint32\_t timestampinc, + uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ Builds a packet with payload {\tt data} and payload length {\tt len}. The payload type will be set to {\tt pt}, the marker bit to {\tt mark} and after building @@ -1907,17 +1907,17 @@ hdrextdata}. The length of the header extension data is given by {\tt numhdrextwords} which expresses the length in a number of $32$-bit words. - \item {\tt u\_int8\_t *GetPacket()}\\ + \item {\tt uint8\_t *GetPacket()}\\ Returns a pointer to the last built RTP packet data. \item {\tt size\_t GetPacketLength()}\\ Returns the size of the last built RTP packet. - \item {\tt int SetDefaultPayloadType(u\_int8\_t pt)}\\ + \item {\tt int SetDefaultPayloadType(uint8\_t pt)}\\ Sets the default payload type to {\tt pt}. \item {\tt int SetDefaultMark(bool m)}\\ Sets the default marker bit to {\tt m}. - \item {\tt int SetDefaultTimestampIncrement(u\_int32\_t timestampinc)}\\ + \item {\tt int SetDefaultTimestampIncrement(uint32\_t timestampinc)}\\ Sets the default timestamp increment to {\tt timestampinc}. - \item {\tt int IncrementTimestamp(u\_int32\_t inc)}\\ + \item {\tt int IncrementTimestamp(uint32\_t inc)}\\ This function increments the timestamp with the amount given by {\tt inc}. This can be useful if, for example, a packet was not sent because it contained only silence. @@ -1934,28 +1934,28 @@ timestamp with the appropriate amount so that the next packets will still be played at the correct time at other hosts. - \item {\tt u\_int32\_t CreateNewSSRC()}\\ + \item {\tt uint32\_t CreateNewSSRC()}\\ Creates a new SSRC to be used in generated packets. This will also generate new timestamp and sequence number offsets. - \item {\tt u\_int32\_t CreateNewSSRC(RTPSources \&sources)}\\ + \item {\tt uint32\_t CreateNewSSRC(RTPSources \&sources)}\\ Creates a new SSRC to be used in generated packets. This will also generate new timestamp and sequence number offsets. The source table {\tt sources} is used to make sure that the chosen SSRC isn't used by another participant yet. - \item {\tt u\_int32\_t GetSSRC()}\\ + \item {\tt uint32\_t GetSSRC()}\\ Returns the current SSRC identifier. - \item {\tt u\_int32\_t GetTimestamp()}\\ + \item {\tt uint32\_t GetTimestamp()}\\ Returns the current RTP timestamp. - \item {\tt u\_int16\_t GetSequenceNumber()}\\ + \item {\tt uint16\_t GetSequenceNumber()}\\ Returns the current sequence number. \item {\tt RTPTime GetPacketTime()}\\ Returns the time at which a packet was generated. This is not necessarily the time at which the last RTP packet was generated: if the timestamp increment was zero, the time is not updated. - \item {\tt u\_int32\_t GetPacketTimestamp()}\\ + \item {\tt uint32\_t GetPacketTimestamp()}\\ Returns the RTP timestamp which corresponds to the time returned by the previous function. \end{itemize} @@ -2360,7 +2360,7 @@ leaving {\tt reason} with length {\tt reasonlength}. \item {\tt bool IsActive()}\\ Returns whether the session has been created or not. - \item {\tt u\_int32\_t GetLocalSSRC()}\\ + \item {\tt uint32\_t GetLocalSSRC()}\\ Returns our own SSRC. \item {\tt int AddDestination(const RTPAddress \&addr)}\\ Adds {\tt addr} to the list of destinations. @@ -2381,12 +2381,12 @@ The used payload type, marker and timestamp increment will be those that have been set using the {\tt SetDefault} member functions. \item {\tt int SendPacket(const void *data, size\_t len, - u\_int8\_t pt, bool mark, u\_int32\_t timestampinc)}\\ + uint8\_t pt, bool mark, uint32\_t timestampinc)}\\ Sends the RTP packet with payload {\tt data} which has length {\tt len}. It will use payload type {\tt pt}, marker {\tt mark} and after the packet has been built, the timestamp will be incremented by {\tt timestampinc}. \item {\tt int SendPacketEx(const void *data, size\_t len, - u\_int16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ + uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ Sends the RTP packet with payload {\tt data} which has length {\tt len}. The packet will contain a header extension with identifier {\tt hdrextID} and containing data {\tt hdrextdata}. The length of this data is given by @@ -2394,22 +2394,22 @@ The used payload type, marker and timestamp increment will be those that have been set using the {\tt SetDefault} member functions. \item {\tt int SendPacketEx(const void *data, size\_t len, - u\_int8\_t pt, bool mark, u\_int32\_t timestampinc, - u\_int16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ + uint8\_t pt, bool mark, uint32\_t timestampinc, + uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ Sends the RTP packet with payload {\tt data} which has length {\tt len}. It will use payload type {\tt pt}, marker {\tt mark} and after the packet has been built, the timestamp will be incremented by {\tt timestampinc}. The packet will contain a header extension with identifier {\tt hdrextID} and containing data {\tt hdrextdata}. The length of this data is given by {\tt numhdrextwords} and is specified in a number of 32-bit words. - \item {\tt int SetDefaultPayloadType(u\_int8\_t pt)}\\ + \item {\tt int SetDefaultPayloadType(uint8\_t pt)}\\ Sets the default payload type for RTP packets to {\tt pt}. \item {\tt int SetDefaultMark(bool m)}\\ Sets the default marker for RTP packets to {\tt m}. - \item {\tt int SetDefaultTimestampIncrement(u\_int32\_t timestampinc)}\\ + \item {\tt int SetDefaultTimestampIncrement(uint32\_t timestampinc)}\\ Sets the default value to increment the timestamp with to {\tt timestampinc}. - \item {\tt int IncrementTimestamp(u\_int32\_t inc)}\\ + \item {\tt int IncrementTimestamp(uint32\_t inc)}\\ This function increments the timestamp with the amount given by {\tt inc}. This can be useful if, for example, a packet was not sent because it contained only silence. @@ -2492,7 +2492,7 @@ \item {\tt RTPSourceData *GetCurrentSourceInfo()}\\ Returns the {\tt RTPSourceData} instance for the currently selected participant. - \item {\tt RTPSourceData *GetSourceInfo(u\_int32\_t ssrc)}\\ + \item {\tt RTPSourceData *GetSourceInfo(uint32\_t ssrc)}\\ Returns the {\tt RTPSourceData} instance for the participant identified by {\tt ssrc}, or NULL if no such entry exists. \item {\tt RTPPacket *GetNextPacket()}\\ @@ -2625,7 +2625,7 @@ addresses and {\tt isrtp} indicates against which address of {\tt srcdat} the check failed. \item {\tt void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, - const u\_int8\_t *cname, size\_t cnamelength)}\\ + const uint8\_t *cname, size\_t cnamelength)}\\ Is called when another CNAME was received than the one already present for source {\tt srcdat}. \item {\tt void OnNewSource(RTPSourceData *srcdat)}\\ diff --git a/src/Makefile.am b/src/Makefile.am index 45d8b9a..533cf2c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.1 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index a0599cd..c8790bf 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -229,7 +229,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.1 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 91e60cd..7a708cf 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -35,7 +35,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,5,1); + return RTPLibraryVersion(3,5,2); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 240ad3b..df1e7ec 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -56,15 +56,12 @@ RTPRandom::RTPRandom() { -#if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) || defined(RTP_SUPPORT_RANDS) +#ifndef RTP_SUPPORT_RANDS + +#if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) uint32_t x; -#if defined(WIN32) - x = (uint32_t)_getpid(); -#else x = (uint32_t)getpid(); -#endif // WIN32 || _WIN32_WCE - x += (uint32_t)time(0); x -= (uint32_t)clock(); x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); @@ -73,7 +70,7 @@ RTPRandom::RTPRandom() srand48_r(x,&drandbuffer); #else state = (unsigned int)x; -#endif +#endif // RTP_SUPPORT_GNUDRAND #else // use simple rand and srand functions uint32_t x; @@ -93,9 +90,13 @@ RTPRandom::RTPRandom() x += ft.dwLowDateTime; #endif // _WIN32_WCE - x ^= (uint32_t)(this); + x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); srand((unsigned int)x); -#endif +#endif // RTP_SUPPORT_GNUDRAND || RTP_SUPPORT_RANDR + +#endif // RTP_SUPPORT_RANDS + + // Note: the rand_s function does not require initialization of a seed } RTPRandom::~RTPRandom() @@ -178,28 +179,36 @@ double RTPRandom::GetRandomDouble() uint8_t RTPRandom::GetRandom8() { uint8_t x; + unsigned int r; - x = (uint8_t)(256.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + rand_s(&r); + x = (uint8_t)(256.0*((double)r)/((double)UINT_MAX+1.0)); return x; } uint16_t RTPRandom::GetRandom16() { uint16_t x; + unsigned int r; - x = (uint16_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + rand_s(&r); + x = (uint16_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); return x; } uint32_t RTPRandom::GetRandom32() { uint32_t x,y; - - x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + unsigned int r; + + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); y = x; - x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); y ^= (x<<8); - x = (uint32_t)(65536.0*((double)rand_s(&state))/((double)RAND_MAX+1.0)); + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); y ^= (x<<16); return y; @@ -207,11 +216,14 @@ uint32_t RTPRandom::GetRandom32() double RTPRandom::GetRandomDouble() { - double x = ((double)rand_s(&state))/((double)RAND_MAX+1.0); + unsigned int r; + + rand_s(&r); + double x = ((double)r)/((double)UINT_MAX+1.0); return x; } -#else +#else // use rand() uint8_t RTPRandom::GetRandom8() { diff --git a/src/rtprandom.h b/src/rtprandom.h index 8ae1f52..8582c26 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -50,7 +50,7 @@ class RTPRandom private: #if defined(RTP_SUPPORT_GNUDRAND) struct drand48_data drandbuffer; -#elif defined(RTP_SUPPORT_RANDR) || defined(WIN32) || defined(_WIN32_WCE) +#elif defined(RTP_SUPPORT_RANDR) unsigned int state; #endif // RTP_SUPPORT_GNUDRAND }; diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 746d90b..521a1bc 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1342,7 +1342,7 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) { RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in); - recvlen = recvfrom(sock,packetbuffer,(int)len,0,(struct sockaddr *)&srcaddr,&fromlen); + recvlen = recvfrom(sock,packetbuffer,RTPUDPV4TRANS_MAXPACKSIZE,0,(struct sockaddr *)&srcaddr,&fromlen); if (recvlen > 0) { bool acceptdata; diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 3bc1671..5ad9b07 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1356,7 +1356,7 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) { RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in6); - recvlen = recvfrom(sock,packetbuffer,(int)len,0,(struct sockaddr *)&srcaddr,&fromlen); + recvlen = recvfrom(sock,packetbuffer,RTPUDPV6TRANS_MAXPACKSIZE,0,(struct sockaddr *)&srcaddr,&fromlen); if (recvlen > 0) { bool acceptdata; From fbf28fe1c368c6c75492da16798c261325defcd1 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:17 +0100 Subject: [PATCH 011/136] Import of version 3.6.0 --- ChangeLog | 22 +- Doxyfile | 1235 ++++++++ Makefile.am | 5 +- Makefile.in | 7 +- README.TXT | 10 +- TODO | 1 + configure | 159 +- configure.in | 61 +- doc/Makefile.am | 10 +- doc/Makefile.in | 15 +- doc/jrtplib.css | 315 ++ doc/jrtplib.h | 347 +++ doc/jrtplib.tex | 2690 ------------------ examples/Makefile.am | 3 +- examples/Makefile.in | 19 +- examples/example1.cpp | 2 +- examples/example2.cpp | 7 +- examples/example3.cpp | 5 +- examples/example4.cpp | 7 +- examples/example5.cpp | 223 ++ jrtplib.dsp | 12 +- jrtplib.vcproj | 12 +- jrtplib_wce.vcproj | 12 +- jrtplib_wce5.sln | 22 + jrtplib_wce5.vcproj | 489 ++++ pkgconfig/Makefile.in | 2 + src/Makefile.am | 3 +- src/Makefile.in | 5 +- src/extratransmitters/rtpfaketransmitter.cpp | 101 +- src/extratransmitters/rtpfaketransmitter.h | 12 +- src/rtcpapppacket.cpp | 2 +- src/rtcpapppacket.h | 25 +- src/rtcpbyepacket.cpp | 2 +- src/rtcpbyepacket.h | 23 +- src/rtcpcompoundpacket.cpp | 101 +- src/rtcpcompoundpacket.h | 43 +- src/rtcpcompoundpacketbuilder.cpp | 43 +- src/rtcpcompoundpacketbuilder.h | 92 +- src/rtcppacket.cpp | 2 +- src/rtcppacket.h | 28 +- src/rtcppacketbuilder.cpp | 51 +- src/rtcppacketbuilder.h | 109 +- src/rtcprrpacket.cpp | 2 +- src/rtcprrpacket.h | 55 +- src/rtcpscheduler.cpp | 2 +- src/rtcpscheduler.h | 73 +- src/rtcpsdesinfo.cpp | 10 +- src/rtcpsdesinfo.h | 115 +- src/rtcpsdespacket.cpp | 2 +- src/rtcpsdespacket.h | 71 +- src/rtcpsrpacket.cpp | 2 +- src/rtcpsrpacket.h | 62 +- src/rtcpunknownpacket.h | 21 +- src/rtpaddress.h | 41 +- src/rtpcollisionlist.cpp | 11 +- src/rtpcollisionlist.h | 26 +- src/rtpconfig.h | 2 +- src/rtpconfig_unix.h.in | 8 +- src/rtpconfig_win.h | 6 +- src/rtpdebug.cpp | 2 +- src/rtpdebug.h | 2 +- src/rtpdefines.h | 2 +- src/rtperrors.cpp | 2 +- src/rtperrors.h | 7 +- src/rtphashtable.h | 25 +- src/rtpinternalsourcedata.cpp | 10 +- src/rtpinternalsourcedata.h | 20 +- src/rtpipv4address.cpp | 7 +- src/rtpipv4address.h | 46 +- src/rtpipv4destination.h | 54 +- src/rtpipv6address.cpp | 7 +- src/rtpipv6address.h | 56 +- src/rtpipv6destination.h | 37 +- src/rtpkeyhashtable.h | 25 +- src/rtplibraryversion.cpp | 4 +- src/rtplibraryversion.h | 19 +- src/rtpmemorymanager.h | 247 ++ src/rtpmemoryobject.h | 69 + src/rtppacket.cpp | 10 +- src/rtppacket.h | 126 +- src/rtppacketbuilder.cpp | 15 +- src/rtppacketbuilder.h | 104 +- src/rtppollthread.cpp | 2 +- src/rtppollthread.h | 6 +- src/rtprandom.cpp | 180 +- src/rtprandom.h | 17 +- src/rtprawpacket.h | 54 +- src/rtpsession.cpp | 256 +- src/rtpsession.h | 344 ++- src/rtpsessionparams.cpp | 2 +- src/rtpsessionparams.h | 109 +- src/rtpsessionsources.cpp | 2 +- src/rtpsessionsources.h | 15 +- src/rtpsourcedata.cpp | 11 +- src/rtpsourcedata.h | 199 +- src/rtpsources.cpp | 34 +- src/rtpsources.h | 240 +- src/rtpstructs.h | 6 +- src/rtptimeutilities.cpp | 3 +- src/rtptimeutilities.h | 55 +- src/rtptransmitter.h | 156 +- src/rtptypes.h | 2 +- src/rtptypes_win.h | 2 +- src/rtpudpv4transmitter.cpp | 110 +- src/rtpudpv4transmitter.h | 79 +- src/rtpudpv6transmitter.cpp | 110 +- src/rtpudpv6transmitter.h | 75 +- tools/Makefile.in | 2 + 108 files changed, 6172 insertions(+), 3638 deletions(-) create mode 100644 Doxyfile create mode 100644 doc/jrtplib.css create mode 100644 doc/jrtplib.h delete mode 100644 doc/jrtplib.tex create mode 100644 examples/example5.cpp create mode 100644 jrtplib_wce5.sln create mode 100644 jrtplib_wce5.vcproj create mode 100644 src/rtpmemorymanager.h create mode 100644 src/rtpmemoryobject.h diff --git a/ChangeLog b/ChangeLog index a6e69c7..b3838d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,30 @@ - March 26, 2006 + June 20, 2006 JRTPLIB ChangeLog ----------- + 3.6.0 (June 2006) + * Added a constructor to the RTCPCompoundPacket class to be able + to parse a compound packet out of a byte array (and not only + out of an RTPRawPacket instance). + * Added a method to RTPSession to send RTCP APP packets. Thanks + to Herman Bastiaens (herman.bastiaens@student.uhasselt.be) + for supplying the patch. + * Fixed Win32 rand_s bug. Thanks to Jeremy Noring + (jnoring@wilife.com) for supplying the patch. + * Removed the GetNumRTPPacketsSent and GetNumRTCPPacketsSent + functions in the transmitter. The counts were only used to + check if packets had been sent. Now, a flag in RTPSession is + used for this purpose. + * Added memory management support. + * Added a member function to RTPSession which allows passing an + RTPTransmitter instance. + * The instances in the destination lists now store struct + sockaddr variables. This makes sending data to each destination + more efficient. + 3.5.2 (March 2006) * Fixed bug in the random number functions which are used with MS Visual Studio 2005. Thanks to Jun Ohasi (jun@jnb.odn.ne.jp) diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..1c7d54e --- /dev/null +++ b/Doxyfile @@ -0,0 +1,1235 @@ +# Doxyfile 1.4.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = jrtplib + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 3.6.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = NO + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is YES. + +SHOW_DIRECTORIES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the progam writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src/ doc/ + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm + +FILE_PATTERNS = *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = doc/ + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = documentation + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = doc/jrtplib.css + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = RTP_SUPPORT_IPV4MULTICAST \ + RTP_SUPPORT_THREAD \ + RTP_SUPPORT_SDESPRIV \ + RTP_SUPPORT_PROBATION \ + RTP_SUPPORT_IPV6 \ + RTP_SUPPORT_IPV6MULTICAST \ + RTP_SUPPORT_SENDAPP \ + RTP_SUPPORT_MEMORYMANAGEMENT + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/Makefile.am b/Makefile.am index 6e07e26..97ecaf4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = src tools doc examples pkgconfig EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ - jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln + jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln jrtplib_wce5.sln \ + jrtplib_wce5.vcproj Doxyfile dist-hook: distclean rm -f $(distdir)/src/rtpconfig_unix.h @@ -15,3 +16,5 @@ dist-hook: distclean chmod a-x $(distdir)/jrtplib.sln chmod a-x $(distdir)/jrtplib_wce.vcproj chmod a-x $(distdir)/jrtplib_wce.sln + chmod a-x $(distdir)/jrtplib_wce5.vcproj + chmod a-x $(distdir)/jrtplib_wce5.sln diff --git a/Makefile.in b/Makefile.in index deeaadc..5c07071 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,9 +133,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -186,7 +188,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src tools doc examples pkgconfig EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ - jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln + jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln jrtplib_wce5.sln \ + jrtplib_wce5.vcproj Doxyfile all: all-recursive @@ -622,6 +625,8 @@ dist-hook: distclean chmod a-x $(distdir)/jrtplib.sln chmod a-x $(distdir)/jrtplib_wce.vcproj chmod a-x $(distdir)/jrtplib_wce.sln + chmod a-x $(distdir)/jrtplib_wce5.vcproj + chmod a-x $(distdir)/jrtplib_wce5.sln # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/README.TXT b/README.TXT index eeec534..41d78d8 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - March 26, 2006 + June 20, 2006 - JRTPLIB (v3.5.2) + JRTPLIB (v3.6.0) Developed at the The Expertise Centre for @@ -21,7 +21,7 @@ from this url: http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html If you have questions about the library, you can mail me at: - jori@lumumba.uhasselt.be + jori.liesenborgs@gmail.com There is also a mailing list for the library. To subscribe to the list, send an e-mail with the text 'subscribe jrtplib' as the message body (not @@ -118,6 +118,10 @@ INSTALLATION NOTES If set, IPv6 support is enabled. - RTP_SUPPORT_IPV6MULTICAST: If set, IPv6 multicasting support is enabled. + - RTP_SUPPORT_SENDAPP: + If set, sending of RTCP app packets is enabled. + - RTP_SUPPORT_MEMORYMANAGEMENT: + If set, the memory management system is enabled. - RTPDEBUG: Enables some memory tracking functions and some debug routines. diff --git a/TODO b/TODO index e69de29..546c940 100644 --- a/TODO +++ b/TODO @@ -0,0 +1 @@ +Adjust the transmitters in 'extratransmitters/' to support memory management diff --git a/configure b/configure index 6805b30..ec917bc 100755 --- a/configure +++ b/configure @@ -463,7 +463,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_LINKLIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_SUPPORT_SENDAPP RTP_SUPPORT_MEMORYMANAGEMENT RTP_LINKLIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1034,6 +1034,8 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --disable-sdespriv Disable support for SDES PRIV items --disable-probation Disable support for probation of a new source + --disable-sendapp Disable support for sending RTCP APP packets + --disable-memory Disable support for memory management --disable-jthread Disable support for JThread --disable-IPv6 Disable support for IPv6 @@ -1806,7 +1808,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.5.2 + VERSION=3.6.0 cat >>confdefs.h <<_ACEOF @@ -1952,8 +1954,12 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" +RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" +RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" RTP_LINKLIBS="" +RTP_CHECK_JTHREADLINK="no" + if test "BLA$CXXFLAGS" = "BLA" ; then CXXFLAGS="-O2 " fi @@ -3676,7 +3682,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3679 "configure"' > conftest.$ac_ext + echo '#line 3685 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5255,7 +5261,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5258:" \ +echo "$as_me:5264:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6324,11 +6330,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6327: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6333: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6331: \$? = $ac_status" >&5 + echo "$as_me:6337: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6579,11 +6585,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6582: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6588: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6586: \$? = $ac_status" >&5 + echo "$as_me:6592: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6639,11 +6645,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6642: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6648: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6646: \$? = $ac_status" >&5 + echo "$as_me:6652: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8839,7 +8845,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11166: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11164: \$? = $ac_status" >&5 + echo "$as_me:11170: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11217,11 +11223,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11220: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11226: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11224: \$? = $ac_status" >&5 + echo "$as_me:11230: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12580,7 +12586,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13542: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13540: \$? = $ac_status" >&5 + echo "$as_me:13546: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13593,11 +13599,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13596: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13602: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13600: \$? = $ac_status" >&5 + echo "$as_me:13606: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15649,11 +15655,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15652: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15658: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15656: \$? = $ac_status" >&5 + echo "$as_me:15662: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15904,11 +15910,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15907: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15913: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15911: \$? = $ac_status" >&5 + echo "$as_me:15917: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15964,11 +15970,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15967: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15973: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15971: \$? = $ac_status" >&5 + echo "$as_me:15977: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18164,7 +18170,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + RTP_CHECK_JTHREADLINK="yes" echo "$as_me:$LINENO: result: >= 1.1.0" >&5 echo "${ECHO_T}>= 1.1.0" >&6 else @@ -19467,7 +19513,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + RTP_CHECK_JTHREADLINK="yes" echo "$as_me:$LINENO: result: >= 1.1.0" >&5 echo "${ECHO_T}>= 1.1.0" >&6 else @@ -19486,6 +19532,51 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi; fi +if test "$RTP_CHECK_JTHREADLINK" = "yes" ; then + echo "$as_me:$LINENO: checking if we can link against jthread and pthread" >&5 +echo $ECHO_N "checking if we can link against jthread and pthread... $ECHO_C" >&6 + oldldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS -ljthread -lpthread" + cat >conftest.$ac_ext <<_ACEOF + int main(void) { } +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$oldldflags" +fi + if test "${ac_cv_header_sys_filio_h+set}" = set; then @@ -20893,6 +20984,8 @@ fi + + @@ -21655,6 +21748,8 @@ s,@RTP_SUPPORT_GETLOGINR@,$RTP_SUPPORT_GETLOGINR,;t t s,@RTP_SUPPORT_IPV6@,$RTP_SUPPORT_IPV6,;t t s,@RTP_SUPPORT_IPV6MULTICAST@,$RTP_SUPPORT_IPV6MULTICAST,;t t s,@RTP_SUPPORT_IFADDRS@,$RTP_SUPPORT_IFADDRS,;t t +s,@RTP_SUPPORT_SENDAPP@,$RTP_SUPPORT_SENDAPP,;t t +s,@RTP_SUPPORT_MEMORYMANAGEMENT@,$RTP_SUPPORT_MEMORYMANAGEMENT,;t t s,@RTP_LINKLIBS@,$RTP_LINKLIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t diff --git a/configure.in b/configure.in index 9a35dba..21ac798 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.5.2) +AM_INIT_AUTOMAKE(jrtplib,3.6.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -16,8 +16,12 @@ RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" +RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" +RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" RTP_LINKLIBS="" +RTP_CHECK_JTHREADLINK="no" + if test "BLA$CXXFLAGS" = "BLA" ; then dnl CXXFLAGS="-g -Werror -Wall" CXXFLAGS="-O2 " @@ -65,6 +69,40 @@ if test "$probsupport" = "yes" ; then RTP_SUPPORT_PROBATION="#define RTP_SUPPORT_PROBATION" fi +dnl --------------------------------------------------------------------------- +dnl Check for RTCP APP sending support +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(sendapp,[ --disable-sendapp Disable support for sending RTCP APP packets],[ + if test "$enableval" = yes ; then + sendappupport="yes" + else + sendappsupport="no" + fi],[ + sendappsupport="yes" + ]) + +if test "$sendappsupport" = "yes" ; then + RTP_SUPPORT_SENDAPP="#define RTP_SUPPORT_SENDAPP" +fi + +dnl --------------------------------------------------------------------------- +dnl Check for memory management support +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(memory,[ --disable-memory Disable support for memory management],[ + if test "$enableval" = yes ; then + memsupport="yes" + else + memsupport="no" + fi],[ + memsupport="yes" + ]) + +if test "$memsupport" = "yes" ; then + RTP_SUPPORT_MEMORYMANAGEMENT="#define RTP_SUPPORT_MEMORYMANAGEMENT" +fi + dnl --------------------------------------------------------------------------- dnl Check for the jthread headers dnl --------------------------------------------------------------------------- @@ -96,7 +134,8 @@ if test "$checkjthread" = "yes" ; then };],[ RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + RTP_CHECK_JTHREADLINK="yes" +dnl RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" AC_MSG_RESULT(>= 1.1.0) ],[ AC_MSG_RESULT(< 1.1.0) AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) @@ -127,14 +166,26 @@ if test "$checkjthread" = "yes" ; then };],[ RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + RTP_CHECK_JTHREADLINK="yes" +dnl RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" AC_MSG_RESULT(>= 1.1.0) ],[ AC_MSG_RESULT(< 1.1.0) AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) fi ]) fi - + +if test "$RTP_CHECK_JTHREADLINK" = "yes" ; then + AC_MSG_CHECKING(if we can link against jthread and pthread) + oldldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS -ljthread -lpthread" + AC_LINK_IFELSE( [ int main(void) { } ] , + [ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" + AC_MSG_RESULT(yes) ] , + [ AC_MSG_RESULT(no) ] ) + LDFLAGS="$oldldflags" +fi + dnl --------------------------------------------------------------------------- dnl Check if sys/filio.h exists (used on solaris) dnl --------------------------------------------------------------------------- @@ -441,6 +492,8 @@ AC_SUBST(RTP_SUPPORT_GETLOGINR) AC_SUBST(RTP_SUPPORT_IPV6) AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) AC_SUBST(RTP_SUPPORT_IFADDRS) +AC_SUBST(RTP_SUPPORT_SENDAPP) +AC_SUBST(RTP_SUPPORT_MEMORYMANAGEMENT) AC_SUBST(RTP_LINKLIBS) AC_OUTPUT(Makefile \ src/Makefile \ diff --git a/doc/Makefile.am b/doc/Makefile.am index 9959e5c..d14421e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,2 @@ -EXTRA_DIST = jrtplib.tex +EXTRA_DIST = jrtplib.h jrtplib.css -doc: jrtplib.pdf - -jrtplib.pdf: jrtplib.tex - pdflatex jrtplib.tex - pdflatex jrtplib.tex - -clean: - rm -f jrtplib.{toc,aux,log,pdf} diff --git a/doc/Makefile.in b/doc/Makefile.in index 9a93485..70a744b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -109,9 +109,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -160,7 +162,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = jrtplib.tex +EXTRA_DIST = jrtplib.h jrtplib.css all: all-am .SUFFIXES: @@ -265,6 +267,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am @@ -319,15 +323,6 @@ uninstall-am: uninstall-info-am mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am - -doc: jrtplib.pdf - -jrtplib.pdf: jrtplib.tex - pdflatex jrtplib.tex - pdflatex jrtplib.tex - -clean: - rm -f jrtplib.{toc,aux,log,pdf} # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/doc/jrtplib.css b/doc/jrtplib.css new file mode 100644 index 0000000..87d29e7 --- /dev/null +++ b/doc/jrtplib.css @@ -0,0 +1,315 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; + text-align: justify; +} + +H1 { + text-align: center; + font-size: 240%; +} +H2 { + font-size: 180%; +} +H3 { + font-size: 120%; +} +H4 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: Fixed, monospace; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #F4F4FB; font-weight: bold; } +TD.mdPrefix { + background-color: #F4F4FB; + color: #606060; + font-size: 80%; +} +TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } +TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #F4F4FB; +} +.mdRow { + padding: 8px 10px; +} +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + diff --git a/doc/jrtplib.h b/doc/jrtplib.h new file mode 100644 index 0000000..ebce471 --- /dev/null +++ b/doc/jrtplib.h @@ -0,0 +1,347 @@ +/**\mainpage JRTPLIB + * + * \author Jori Liesenborgs + * \author Developed at the The Expertise Centre for Digital Media (EDM), a research + * institute of the Hasselt University + * + * \section ack Acknowledgment + * + * I would like thank the people at the Expertise Centre for Digital Media + * for giving me the opportunity to create this rewrite of the library. + * + * \section intro Introduction + * + * This document describes JRTPLIB, an object-oriented + * library written in C++ which aims to help developers in using the + * Real-time Transport Protocol (RTP) as described in RFC 3550. + * + * The library makes it possible for the user to send and receive data + * using RTP, without worrying about SSRC collisions, scheduling and + * transmitting RTCP data etc. The user only needs to provide the library + * with the payload data to be sent and the library gives the user access + * to incoming RTP and RTCP data. + * + * \subsection idea Design idea + * + * The library provides several classes which can be helpful in + * creating RTP applications. Most users will probably need just the + * RTPSession class for building an application. This class + * provides the necessary functions for sending RTP data and handles + * the RTCP part internally. + * + * \subsection changes Changes from version 2.x + * + * One of the most important changes is probably the fact that this + * version is based on RFC 3550 and the 2.x versions were based upon + * RFC 1889 which is now obsolete. + * + * Also, the 2.x series was created with the idea that the user would + * only need to use the RTPSession class which meant that the + * other classes were not very useful by themselves. This version on + * the other hand, aims to provide many useful components to aid the + * user in building RTP capable applications. + * + * In this version, the code which is specific for the underlying + * protocol by which RTP packets are transported, is bundled in + * a class which inherits its interface from a class called + * RTPTransmitter. This makes it easy for different underlying + * protocols to be supported. Currently there is support for UDP over + * IPv4 and UDP over IPv6. + * + * For applications such as a mixer or translator using the + * RTPSession class will not be a good solution. Other components can + * be used for this purpose: a transmission component, an SSRC table, + * an RTCP scheduler etc. Using these, it should be much easier to + * build all kinds of applications. + * \section copyright Copyright license + * + * The library code uses the following copyright license: + * + * \code + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * \endcode + * + * There are two reasons for using this license. First, since this is the + * license of the 2.x series, it only seemed natural that this rewrite + * would contain the same license. Second, since the RTP protocol is + * deliberately incomplete RTP profiles can, for example, define additional + * header fields. The best way to deal with this is to adapt the library + * code itself and that's why I like to keep the license as free as + * possible. + * + * \section starting Getting started with the RTPSession class + * + * To use RTP, you'll have to create an RTPSession object. The constructor + * accepts one parameter, an instance of RTPMemoryManager. By default, no + * memory manager will be used. For now, we'll keep it simple, so this is + * our code so far: + * + * \code + * RTPSession session; + * \endcode + * + * To actually create the session, you'll have to call the Create member + * function which takes three arguments: the first one is of type RTPSessionParams + * and specifies the general options for the session. One parameter of this class + * must be set explicitly, otherwise the session will not be created successfully. + * This parameter is the timestamp unit of the data you intend to send and + * can be calculated by dividing a certain time interval (in seconds) by the + * number of samples in that interval. So, assuming that we'll send 8000 Hz + * voice data, we can use this code: + * + * \code + * RTPSessionParams sessionparams; + * + * sessionparams.SetOwnTimestampUnit(1.0/8000.0); + * \endcode + * + * The other session parameters will probably depend on the actual RTP profile + * you intend to work with. + * + * The second argument of the Create function is a pointer to an RTPTransmissionParams + * instance and describes the parameters for the transmission component. The third + * parameter selects the type of transmission component which will be used. By default, + * an UDP over IPv4 transmitter is used, and for this particular transmitter, the + * transmission parameters should be of type RTPUDPv4TransmissionParams. Assuming + * that we want our RTP portbase to be 8000, we can do the following: + * + * \code + * RTPUDPv4TransmissionParams transparams; + * + * transparams.SetPortbase(8000); + * \endcode + * + * Now, we're ready to call the Create member function of RTPSession. The return + * value is stored in the integer \c status so we can check if something went + * wrong. If this value is negative, it indicates that some error occurred. + * A description of what this error code means can be retrieved by calling + * RTPGetErrorString: + * + * \code + * int status = session.Create(sessionparams,&transparams); + * if (status < 0) + * { + * std::cerr << RTPGetErrorString(status) << std::endl; + * exit(-1); + * } + * \endcode + * + * If the session was created with success, this is probably a good point + * to specify to which destinations RTP and RTCP data should be sent. This is + * done by a call to the RTPSession member function AddDestination. This + * function takes an argument of type RTPAddress. This is an abstract + * class and for the UDP over IPv4 transmitter the actual class to be + * used is RTPIPv4Address. Suppose that we want to send our data to a + * process running on the same host at port 9000, we can do the following: + * + * \code + * uint8_t localip[]={127,0,0,1}; + * RTPIPv4Address addr(localip,9000); + * + * status = session.AddDestination(addr); + * if (status < 0) + * { + * std::cerr << RTPGetErrorString(status) << std::endl; + * exit(-1); + * } + * \endcode + * + * If the library was compiled with JThread support, incoming data is + * processed in the background. If JThread support was not enabled at + * compile time or if you specified in the session parameters that no + * poll thread should be used, you'll have to call the RTPSession + * member function Poll regularly to process incoming data and to send + * RTCP data when necessary. For now, let's assume that we're working + * with the poll thread enabled. + * + * Lets suppose that for a duration of one minute, we want to send + * packets containing 20 ms (or 160 samples) of silence and we want + * to indicate when a packet from someone else has been received. Also + * suppose we have L8 data as defined in RFC 3551 and want to use + * payload type 96. First, we'll set some default values: + * + * \code + * session.SetDefaultPayloadType(96); + * session.SetDefaultMark(false); + * session.SetDefaultTimestampIncrement(160); + * \endcode + * + * Next, we'll create the buffer which contains 160 silence samples + * and create an RTPTime instance which indicates 20 ms or 0.020 seconds. + * We'll also store the current time so we'll know when one minute has + * passed. + * + * \code + * uint8_t silencebuffer[160]; + * + * for (int i = 0 ; i < 160 ; i++) + * silencebuffer[i] = 128; + * + * RTPTime delay(0.020); + * RTPTime starttime = RTPTime::CurrentTime(); + * \endcode + * + * Next, the main loop will be shown. In this loop, a packet containing + * 160 bytes of payload data will be sent. Then, data handling can + * take place but this part is described later in the text. Finally, + * we'll wait 20 ms and check if sixty seconds have passed: + * + * \code + * bool done = false; + * while (!done) + * { + * status = session.SendPacket(silencebuffer,160); + * if (status < 0) + * { + * std::cerr << RTPGetErrorString(status) << std::endl; + * exit(-1); + * } + * + * // + * // Inspect incoming data here + * // + * + * RTPTime::Wait(delay); + * + * RTPTime t = RTPTime::CurrentTime(); + * t -= starttime; + * if (t > RTPTime(60.0)) + * done = true; + * } + * \endcode + * + * Information about participants in the session, packet retrieval + * etc, has to be done between calls to the RTPSession member + * functions BeginDataAccess and EndDataAccess. This ensures that the + * background thread doesn't try to change the same data you're trying + * to access. We'll iterate over the participants using the + * GotoFirstSource and GotoNextSource member functions. Packets from + * the currently selected participant can be retrieved using the + * GetNextPacket member function which returns a pointer to an + * instance of the RTPPacket class. When you don't need the packet + * anymore, it has to be deleted. The processing of incoming data will + * then be as follows: + * + * \code + * session.BeginDataAccess(); + * if (session.GotoFirstSource()) + * { + * do + * { + * RTPPacket *packet; + * while ((packet = session.GetNextPacket()) != 0) + * { + * std::cout << "Got packet with extended sequence number " + * << packet->GetExtendedSequenceNumber() + * << " from SSRC " << packet->GetSSRC() + * << std::endl; + * session.DeletePacket(packet); + * } + * } while (session.GotoNextSource()); + * } + * session.EndDataAccess(); + * \endcode + * + * Information about the currently selected source can be obtained + * by using the GetCurrentSourceInfo member function of the RTPSession class. + * This function returns a pointer to an instance of RTPSourceData which + * contains all information about that source: sender reports from that + * source, receiver reports, SDES info etc. + * + * When the main loop is finished, we'll send a BYE packet to inform other + * participants of our departure and clean up the RTPSession class. Also, + * we want to wait at most 10 seconds for the BYE packet to be sent, + * otherwise we'll just leave the session without sending a BYE packet. + * + * \code + * delay = RTPTime(10.0); + * session.BYEDestroy(delay,"Time's up",9); + * \endcode + * + * The complete code of the program is given in \c example2.cpp. + * + * \section errors Error codes + * + * Unless specified otherwise, functions with a return type \c int + * will return a negative value when an error occurred and zero or a + * positive value upon success. A description of the error code can + * be obtained by using the RTPGetErrorString function, declared + * in rtperrors.h + * + * \section memory Memory management + * + * You can write you own memory manager by deriving a class from RTPMemoryManager. + * The following example shows a very basic implementation. + * + * \code + * class MyMemoryManager : public RTPMemoryManager + * { + * public: + * MyMemoryManager() { } + * ~MyMemoryManager() { } + * + * void *AllocateBuffer(size_t numbytes, int memtype) + * { + * return malloc(numbytes); + * } + * + * void FreeBuffer(void *p) + * { + * free(p); + * } + * }; + * \endcode + * + * In the constructor of RTPSession, you can specify that you would like to use + * this memory manager: + * + * \code + * MyMemoryManager mgr; + * RTPSession session(&mgr); + * \endcode + * + * Now, all memory allocation and deallocation will be done using the AllocateBuffer + * and FreeBuffer implementations of \c mgr. + * + * The second parameter of the RTPMemoryManager::AllocateBuffer member function + * indicates what the purpose is of this memory block. This allows you to handle + * different kinds of data in different ways. + * + * With the introduction of the memory management system, the RTPSession class was + * extended with member function RTPSession::DeletePacket and RTPSession::DeleteTransmissionInfo. + * These functions should be used to deallocate RTPPacket instances and RTPTransmissionInfo + * instances respectively. + * + * \section contact Contact + * + * If you have any questions, remarks or requests about the library or + * if you think you've discovered a bug, you can contact me at + * \c jori(\c dot)\c liesenborgs(\c at)\c gmail(\c dot)\c com + * + * The home page of the library is + * http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html + * + * There is also a mailing list for the library. To subscribe to the list, + * send an e-mail with the text \c subscribe \c jrtplib as the message body + * (not the subject) to \c majordomo(\c at)\c edm(\c dot)\c uhasselt(\c dot)\c be + * and you'll receive further instructions. + */ + diff --git a/doc/jrtplib.tex b/doc/jrtplib.tex deleted file mode 100644 index 88585ac..0000000 --- a/doc/jrtplib.tex +++ /dev/null @@ -1,2690 +0,0 @@ -\documentclass[12pt,a4paper]{article} - -\newcommand{\jversion}{3.5.2} -\newcommand{\headerfile}[1]{\marginpar{\scriptsize Header:\\{\tt #1}}} -\newcommand{\inherits}[1]{\marginpar{\scriptsize Inherits:\\{\tt #1}}} -\newcommand{\Paragraph}[1]{\paragraph{#1}\ \\\addcontentsline{toc}{subsection}{\ \hspace{3cm}\ {#1}}} -%\newcommand{\headerfile}[1]{\marginpar{\pdfannot width 10cm depth 7cm{/Subtype/Text/Contents(Header: #1)}}} - -\usepackage{listings} -\lstset{language=C++} -\lstset{tabsize=4} - -\setlength{\hoffset}{-1.0in} -\addtolength{\hoffset}{1.5cm} -\setlength{\textwidth}{14.5cm} -\setlength{\voffset}{-1.0in} -\addtolength{\voffset}{1.0cm} -\setlength{\textheight}{23.5cm} -\setlength{\topmargin}{0.5cm} -\setlength{\footskip}{2.0cm} - -\begin{document} - \title{\ \vspace{3.5cm}\ \\{\bf JRTPLIB \jversion}} - \author{Jori Liesenborgs\\{\tt jori@lumumba.uhasselt.be}} - \date{March 26, 2006\\\vspace{0.5cm}\ \\ - {\small{\em Developed at the The Expertise Centre for \\Digital Media (EDM), - a research institute\\of the Hasselt University}\\\ \\ - {\tt http://www.edm.uhasselt.be/}\\ - {\tt http://www.uhasselt.be/}}} - \maketitle - - \newpage - \tableofcontents - -\setlength{\parindent}{0cm} -\setlength{\parskip}{0.3cm} - - \newpage - \section*{Acknowledgment}\addcontentsline{toc}{section}{Acknowledgment} - - I would like thank the people at the Expertise Centre for Digital Media - for giving me the opportunity to create this rewrite of the library. - - \newpage - \section{Introduction} - - This document describes JRTPLIB version \jversion, an object-oriented - library written in C++ which aims to help developers in using the - Real-time Transport Protocol (RTP) as described in RFC 3550. - - The library makes it possible for the user to send and receive data - using RTP, without worrying about SSRC collisions, scheduling and - transmitting RTCP data etc. The user only needs to provide the library - with the payload data to be sent and the library gives the user access - to incoming RTP and RTCP data. - - \subsection{Design idea} - - The library provides several classes which can be helpful in - creating RTP applications. Most users will probably need just the - {\tt RTPSession} class for building an application. This class - provides the necessary functions for sending RTP data and handles - the RTCP part internally. - - For applications such as a mixer or translator using the {\tt - RTPSession} class will not be a good solution. Other components can - be used for this purpose: a transmission component, an SSRC table, - an RTCP scheduler etc. Using these, it should be much easier to - build all kinds of applications. - - \subsection{Changes from version 2.x} - - One of the most important changes is probably the fact that this - version is based on RFC 3550 and the 2.x versions were based upon - RFC 1889 which is now obsolete. - - Also, the 2.x series was created with the idea that the user would - only need to use the {\tt RTPSession} class which meant that the - other classes were not very useful by themselves. This version on - the other hand, aims to provide many useful components to aid the - user in building RTP capable applications. - - In this version, the code which is specific for the underlying - protocol by which RTP packets are transported, is bundled in - a class which inherits its interface from a class called {\tt - RTPTransmitter}. This makes it easy for different underlying - protocols to be supported. Currently there is support for UDP over - IPv4 and UDP over IPv6. - - \section{Copyright license} - - The library code uses the following copyright license: - - {\em Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY - KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.} - - There are two reasons for using this license. First, since this is the - license of the 2.x series, it only seemed natural that this rewrite - would contain the same license. Second, since the RTP protocol is - deliberately incomplete RTP profiles can, for example, define additional - header fields. The best way to deal with this is to adapt the library - code itself and that's why I like to keep the license as free as - possible. - - \section{Using JRTPLIB \jversion} - - This section gives information about how to use the library. First, some - simple examples will be given which illustrate how you can work with the - {\tt RTPSession} class. Afterwards, a complete description of the API - will be given. - - \subsection{Getting started with the {\tt RTPSession} class} - - To use RTP, you'll have to create an {\tt RTPSession} object. The - constructor of the {\tt RTPSession} class takes a parameter of - type {\tt RTPTrans\-mitter::Trans\-mission\-Protocol} and defaults - to {\tt RTPTrans\-mitter::IPv4UDPProto}. This means that unless - specified otherwise, the UDP over IPv4 transmission component will - be used. Let's suppose that this is the kind of session you want to - create, then this is our code so far: - - \begin{lstlisting}[frame=tb]{} -RTPSession session; - \end{lstlisting} - - To actually create the session, you'll have to call the {\tt Create} - member function which takes two arguments: the first one is of type - {\tt RTPSession\-Params} and specifies the general options for - the session. One parameter of this class must be set explicitly, - otherwise the session will not be created successfully. This - parameter is the timestamp unit of the data you intend to send and - can be calculated by dividing a certain time interval (in seconds) - by the number of samples in that interval. So, assuming that we'll - send $8000 Hz$ voice data, we can use this code: - - \begin{lstlisting}[frame=tb]{} -RTPSessionParams sessionparams; - -sessionparams.SetOwnTimestampUnit(1.0/8000.0); - \end{lstlisting} - The other parameters will probably depend on the actual RTP profile - you intend to work with. For a complete description of the {\tt - RTPSession\-Params} class, see section \ref{rtpsessionparams}. - - The second argument of the {\tt Create} function is a pointer to - an {\tt RTPTrans\-mission\-Params} instance and describes the - parameters for the transmission component. Since there can be - several transmission components, you'll have to use a class which - inherits {\tt RTPTrans\-mission\-Params} and which is appropriate - for the component you've chosen. For our UDP over IPv4 component, - the class to be used is {\tt RTPUDPv4Trans\-mission\-Params}. - Assuming that we want our RTP portbase to be $8000$, we can do the - following: - \begin{lstlisting}[frame=tb]{} -RTPUDPv4TransmissionParams transparams; - -transparams.SetPortbase(8000); - \end{lstlisting} - - Now, we're ready to call the {\tt Create} member function of - {\tt RTPSession}. The return value is stored in the integer {\tt - status} so we can check if something went wrong. If this value is - negative, it indicates that some error occurred. A description - of what this error code means can be retrieved by calling {\tt - RTPGetErrorString}: - \begin{lstlisting}[frame=tb]{} -int status = session.Create(sessionparams,&transparams); -if (status < 0) -{ - std::cerr << RTPGetErrorString(status) << std::endl; - exit(-1); -} - \end{lstlisting} - - If the session was created with success, this is probably a good - point to specify to which destinations RTP and RTCP data should be - sent. This is done by a call to the {\tt RTPSession} member function - {\tt AddDestination}. This function takes an argument of type {\tt - RTPAddress}. This is an abstract class and for the UDP over IPv4 - transmitter the actual class to be used is {\tt RTPIPv4Address}. - Suppose that we want to send our data to a process running on the - same host at port $9000$, we can do the following: - \begin{lstlisting}[frame=tb]{} -uint8_t localip[]={127,0,0,1}; -RTPIPv4Address addr(localip,9000); - -status = session.AddDestination(addr); -if (status < 0) -{ - std::cerr << RTPGetErrorString(status) << std::endl; - exit(-1); -} - \end{lstlisting} - - If the library was compiled with JThread support, incoming data is - processed in the background. If JThread support was not enabled at - compile time or if you specified in the session parameters that no - poll thread should be used, you'll have to call the {\tt RTPSession} - member function {\tt Poll} regularly to process incoming data and - to send RTCP data when necessary. For now, let's assume that we're - working with the poll thread enabled. - - Lets suppose that for a duration of one minute, we want to send - packets containing $20 ms$ (or $160$ samples) of silence and we want - to indicate when a packet from someone else has been received. Also - suppose we have $L8$ data as defined in RFC 3551 and want to use - payload type $96$. First, we'll set some default values: - \begin{lstlisting}[frame=tb]{} -session.SetDefaultPayloadType(96); -session.SetDefaultMark(false); -session.SetDefaultTimestampIncrement(160); - \end{lstlisting} - - Next, we'll create the buffer which contains $160$ silence samples - and create an {\tt RTPTime} instance which indicates $20 ms$ or - $0.020$ seconds. We'll also store the current time so we'll know - when one minute has passed. - \begin{lstlisting}[frame=tb]{} -uint8_t silencebuffer[160]; - -for (int i = 0 ; i < 160 ; i++) - silencebuffer[i] = 128; - -RTPTime delay(0.020); -RTPTime starttime = RTPTime::CurrentTime(); - \end{lstlisting} - - Next, the main loop will be shown. In this loop, a packet containing - $160$ bytes of payload data will be sent. Then, data handling can - take place but this part is described later in the text. Finally, - we'll wait $20 ms$ and check if sixty seconds have passed: - \begin{lstlisting}[frame=tb]{} -bool done = false; -while (!done) -{ - status = session.SendPacket(silencebuffer,160); - if (status < 0) - { - std::cerr << RTPGetErrorString(status) << std::endl; - exit(-1); - } - - // - // Inspect incoming data here - // - - RTPTime::Wait(delay); - - RTPTime t = RTPTime::CurrentTime(); - t -= starttime; - if (t > RTPTime(60.0)) - done = true; -} - \end{lstlisting} - - Information about participants in the session, packet retrieval - etc, has to be done between calls to the {\tt RTPSession} member - functions {\tt BeginDataAccess} and {\tt EndDataAccess}. This - ensures that the background thread doesn't try to change the same - data you're trying to access. We'll iterate over the participants - using the {\tt GotoFirstSource} and {\tt GotoNextSource} member - functions. Packets from the currently selected participant can - be retrieved using the {\tt GetNextPacket} member function which - returns a pointer to an instance of the {\tt RTPPacket} class. - When you don't need the packet anymore, it has to be deleted. The - processing of incoming data will then be as follows: - \begin{lstlisting}[frame=tb]{} -session.BeginDataAccess(); -if (session.GotoFirstSource()) -{ - do - { - RTPPacket *packet = session.GetNextPacket(); - if (packet) - { - std::cout << "Got packet with extended sequence number " - << packet->GetExtendedSequenceNumber() - << " from SSRC " << packet->GetSSRC() - << std::endl; - delete packet; - } - } while (session.GotoNextSource()); -} -session.EndDataAccess(); - \end{lstlisting} - - Information about the currently selected source can be obtained - by using the {\tt GetCurrentSourceInfo} member function of - the {\tt RTPSession} class. This function returns a pointer to - an instance of {\tt RTPSourceData} which contains all information - about that source: sender reports from that source, receiver - reports, SDES info etc. The {\tt RTPSourceData} class is described - in detail in section \ref{rtpsourcedata}. - - When the main loop is finished, we'll send a BYE packet to - inform other participants of our departure and clean up the {\tt - RTPSession} class. Also, we want to wait at most $10$ seconds for - the BYE packet to be sent, otherwise we'll just leave the session - without sending a BYE packet. - \begin{lstlisting}[frame=tb]{} -delay = RTPTime(10.0); -session.BYEDestroy(delay,"Time's up",9); - \end{lstlisting} - - The complete code of the program is given in {\tt example2.cpp} and - is shown on the following pages. More detailed information about - the {\tt RTPSession} class can be found in section \ref{rtpsession}. - - \newpage - \lstinputlisting{../examples/example2.cpp} - \newpage - - \subsection{The complete API} - - Here, the complete API of the library will be explained. This - will be done in a more or less bottom-to-top fashion. - - \subsubsection{Library version}\headerfile{rtplibraryversion.h} - - The {\tt RTPLibraryVersion} class has a static member which - creates an instance of this class: - \begin{verbatim} - static RTPLibraryVersion GetVersion(); - \end{verbatim} - - The user can access the version data using the following - member functions: - \begin{itemize} - \item {\tt int GetMajorNumber() const}\\ - Returns the major version number. - \item {\tt int GetMinorNumber() const}\\ - Returns the minor version number. - \item {\tt int GetDebugNumber() const}\\ - Returns the debug version number. - \item {\tt std::string GetVersionString() const}\\ - Returns a string describing the library version. - \end{itemize} - - \subsubsection{Error codes}\headerfile{rtperrors.h} - - Unless specified otherwise, functions with a return type {\tt int} - will return a negative value when an error occurred and zero or a - positive value upon success. A description of the error code can - be obtained by using the following function: - \begin{verbatim} - std::string RTPGetErrorString(int errcode) - \end{verbatim} - - \subsubsection{Time utilities}\headerfile{rtptimeutilities.h} - - \Paragraph{\tt RTPNTPTime} - - This is a simple wrapper for the most significant word (MSW) - and least significant word (LSW) of an NTP timestamp. The - class has the following members: - \begin{itemize} - \item {\tt RTPNTPTime(uint32\_t m, uint32\_t l)}\\ - This constructor creates and instance with MSW {\tt m} - and LSW {\tt l}. - \item {\tt uint32\_t GetMSW() const}\\ - Returns the most significant word. - \item {\tt uint32\_t GetLSW() const}\\ - Returns the least significant word. - \end{itemize} - - \Paragraph{\tt RTPTime} - - This class is used to specify wallclock time, delay intervals - etc. It stores a number of seconds and a number of microseconds and - it has the following interface: - \begin{itemize} - \item {\tt RTPTime(uint32\_t seconds, uint32\_t microseconds)}\\ - Creates an instance corresponding to {\tt seconds} and - {\tt microseconds}. - \item {\tt RTPTime(double t)}\\ - Creates an {\tt RTPTime} instance representing {\tt t} which - is expressed in units of seconds. - \item {\tt RTPTime(RTPNTPTime ntptime)}\\ - Creates an instance that corresponds to {\tt ntptime}. If - the conversion cannot be made, both the seconds and the - microseconds are set to zero. - \item {\tt uint32\_t GetSeconds() const}\\ - Returns the number of seconds stored in this instance. - \item {\tt uint32\_t GetMicroSeconds() const}\\ - Returns the number of microseconds stored in this instance. - \item {\tt double GetDouble() const}\\ - Returns the time stored in this instance, expressed in - units of seconds. - \item {\tt RTPNTPTime GetNTPTime() const}\\ - Returns the NTP time corresponding to the time stored in - this instance. - \item {\tt static RTPTime CurrentTime()}\\ - Returns an RTPTime instance representing the current - wallclock time. This is expressed as a number of seconds - since 00:00:00 UTC, January 1, 1970. - \item {\tt static void Wait(const RTPTime \&delay)}\\ - This function waits the amount of time specified in - {\tt delay}. - \end{itemize} - - The following operators are defined in the {\tt RTPTime} class: - \begin{itemize} - \item {\tt operator-=} - \item {\tt operator+=} - \item {\tt operator<} - \item {\tt operator>} - \item {\tt operator<=} - \item {\tt operator>=} - \end{itemize} - - \subsubsection{\tt RTPRandom}\headerfile{rtprandom.h} - - The {\tt RTPRandom} class can be used to generate random numbers. - It has the following member functions: - \begin{itemize} - \item {\tt uint8\_t GetRandom8()}\\ - Returns a random eight bit value. - \item {\tt uint16\_t GetRandom16()}\\ - Returns a random sixteen bit value. - \item {\tt uint32\_t GetRandom32()}\\ - Returns a random thirty-two bit value. - \item {\tt double GetRandomDouble()}\\ - Returns a random number between $0.0$ and $1.0$. - \end{itemize} - - \subsubsection{\tt RTCPSDESInfo}\headerfile{rtcpsdesinfo.h} - - The class {\tt RTCPSDESInfo} is a container for RTCP SDES - information. The interface is the following: - \begin{itemize} - \item {\tt void Clear()}\\ - Clears all SDES information. - \item {\tt int SetCNAME(const uint8\_t *s, size\_t l)}\\ - Sets the SDES CNAME item to {\tt s} with length {\tt l}. - \item {\tt int SetName(const uint8\_t *s, size\_t l)}\\ - Sets the SDES name item to {\tt s} with length {\tt l}. - \item {\tt int SetEMail(const uint8\_t *s, size\_t l)}\\ - Sets the SDES e-mail item to {\tt s} with length {\tt l}. - \item {\tt int SetPhone(const uint8\_t *s, size\_t l)}\\ - Sets the SDES phone item to {\tt s} with length {\tt l}. - \item {\tt int SetLocation(const uint8\_t *s, size\_t l)}\\ - Sets the SDES location item to {\tt s} with length {\tt l}. - \item {\tt int SetTool(const uint8\_t *s, size\_t l)}\\ - Sets the SDES tool item to {\tt s} with length {\tt l}. - \item {\tt int SetNote(const uint8\_t *s, size\_t l)}\\ - Sets the SDES note item to {\tt s} with length {\tt l}. - \item {\tt uint8\_t *GetCNAME(size\_t *len) const}\\ - Returns the SDES CNAME item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetName(size\_t *len) const}\\ - Returns the SDES name item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetEMail(size\_t *len) const}\\ - Returns the SDES e-mail item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetPhone(size\_t *len) const}\\ - Returns the SDES phone item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetLocation(size\_t *len) const}\\ - Returns the SDES location item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetTool(size\_t *len) const}\\ - Returns the SDES tool item and stores its length in {\tt len}. - \item {\tt uint8\_t *GetNote(size\_t *len) const }\\ - Returns the SDES note item and stores its length in {\tt len}. - \end{itemize} - - If SDES private item support was enabled at compile time, the following - member functions are also available: - \begin{itemize} - \item {\tt int SetPrivateValue(const uint8\_t *prefix, size\_t prefixlen, const uint8\_t *value, size\_t valuelen)}\\ - Sets the entry for the prefix string specified by {\tt prefix} with - length {\tt prefixlen} to contain the value string specified by - {\tt value} with length {\tt valuelen}. If the maximum allowed - number of prefixes was reached, the error code - {\tt ERR\_\-RTP\_\-SDES\_\-MAX\-PRIV\-ITEMS} is returned. - \item {\tt int DeletePrivatePrefix(const uint8\_t *s, size\_t len)}\\ - Deletes the entry for the prefix specified by {\tt s} with length - {\tt len}. - \item {\tt void GotoFirstPrivateValue()}\\ - Starts the iteration over the stored SDES private item prefixes - and their associated values. - \item {\tt bool GetNextPrivateValue(uint8\_t **prefix, size\_t *prefixlen, uint8\_t **value, size\_t *valuelen)}\\ - If available, returns {\tt true} and stores the next SDES - private item prefix in {\tt prefix} and its length in - {\tt prefixlen}. The associated value and its length are - then stored in {\tt value} and {\tt valuelen}. Otherwise, - it returns {\tt false}. - \item {\tt bool GetPrivateValue(const uint8\_t *prefix, size\_t prefixlen, uint8\_t **value, size\_t *valuelen) const}\\ - Looks for the entry which corresponds to the SDES private - item prefix {\tt prefix} with length {\tt prefixlen}. If found, - the function returns {\tt true} and stores the associated - value and its length in {\tt value} and {\tt valuelen} - respectively. - \end{itemize} - - \subsubsection{\tt RTPTransmitter}\headerfile{rtptransmitter.h} - - The abstract class {\tt RTPTransmitter} specifies the interface for - actual transmission components. Currently, three implementations exist: - an UDP over IPv4 transmitter and an UDP over IPv6 transmitter. - The {\tt TransmissionProtocol} type - is used to specify a specific kind of transmitter: - \begin{verbatim} - enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, - UserDefinedProto }; - \end{verbatim} - The {\tt UserDefinedProto} can be used to select your own transmission - component when using the {\tt RTPSession} class. In this case, you'll - have to implement the {\tt RTPSession} member function - {\tt NewUserDefinedTransmitter()} which should return a pointer to your - own {\tt RTPTransmitter} implementation. - - Three kind of receive modes can be specified using the {\tt ReceiveMode} - type: - \begin{verbatim} - enum ReceiveMode { AcceptAll, AcceptSome, IgnoreSome }; - \end{verbatim} - Depending on the mode set, incoming data is processed differently: - \begin{itemize} - \item {\tt AcceptAll}\\ - All incoming data is accepted, no matter where it originated - from. - \item {\tt AcceptSome}\\ - Only data coming from specific sources will be accepted. - \item {\tt IgnoreSome}\\ - All incoming data is accepted, except for data coming from - a specific set of sources. - \end{itemize} - - The interface defined by the {\tt RTPTransmission} class is the - following: - \begin{itemize} - \item {\tt int Init(bool threadsafe)} - This function must be called before the transmission component - can be used. Depending on the value of {\tt threadsafe}, the - component will be created for thread-safe usage or not. - \item {\tt int Create(size\_t maxpacksize, const RTPTransmissionParams *transparams)}\\ - Prepares the component to be used. The parameter {\tt maxpacksize} - specifies the maximum size a packet can have: if the packet - is larger it will not be transmitted. The {\tt transparams} - parameter specifies a pointer to an {\tt RTPTransmissionParams} - instance. This is also an abstract class and each actual - component will define its own parameters by inheriting a - a class from {\tt RTPTransmissionParams}. If {\tt transparams} - is NULL, the default transmission parameters for the component - will be used. - \item {\tt int Destroy()}\\ - By calling this function, buffers are cleared and the component - cannot be used anymore. Only when the {\tt Create} function is - called again can the component be used again. - \item {\tt RTPTransmissionInfo *GetTransmissionInfo()}\\ - This function returns an instance of a subclass of {\tt RTPTransmissionInfo} - which will give some additional information about the transmitter - (a list of local IP addresses for example). Currently, either - an instance of {\tt RTP\-UDPv4\-Trans\-mission\-Info} or {\tt RTP\-UDPv6\-Trans\-mission\-Info} - is returned, depending on the type of the transmitter. The user - has to delete the returned instance when it is no longer needed. - \item {\tt int GetLocalHostName(uint8\_t *buffer, size\_t *bufferlength)}\\ - Looks up the local host name based upon internal information about - the local host's addresses. This function might take some time - since a DNS query might be done. {\tt bufferlength} should initially - contain the number of bytes that may be stored in {\tt buffer}. - If the function succeeds, {\tt bufferlength} is set to the - number of bytes stored in {\tt buffer}. Note that the data in - {\tt buffer} is not NULL-terminated. If the function fails because - the buffer isn't large enough, it returns {\tt ERR\_RTP\_TRANS\_BUFFERLENGTHTOOSMALL} - and stores the number of bytes needed in {\tt bufferlength}. - \item {\tt bool ComesFromThisTransmitter(const RTPAddress *addr)}\\ - Returns {\tt true} if the address specified by {\tt addr} is one - of the addresses of the transmitter. - \item {\tt size\_t GetHeaderOverhead()}\\ - Returns the amount of bytes that will be added to the RTP packet - by the underlying layers (excluding the link layer). - \item {\tt int Poll()}\\ - Checks for incoming data and stores it. - \item {\tt bool NewDataAvailable()} - Returns {\tt true} if packets can be obtained using the - {\tt GetNextPacket} member function. - \item {\tt RTPRawPacket *GetNextPacket()}\\ - Returns the raw data of a received RTP packet (received during - the {\tt Poll} function) in an {\tt RTPRawPacket} instance. - \item {\tt int WaitForIncomingData(const RTPTime \&delay,bool *dataavailable = 0)}\\ - Waits at most a time {\tt delay} until incoming data has - been detected. If {\tt dataavailable} is not {\tt NULL}, it should - be set to {\tt true} if data was actually read and to {\tt false} - otherwise. - \item {\tt int AbortWait()}\\ - If the previous function has been called, this one aborts - the waiting. - \item {\tt int SendRTPData(const void *data, size\_t len)}\\ - Send a packet with length {\tt len} containing {\tt data} - to all RTP addresses of the current destination list. - \item {\tt int SendRTCPData(const void *data, size\_t len)}\\ - Send a packet with length {\tt len} containing {\tt data} - to all RTCP addresses of the current destination list. - \item {\tt void ResetPacketCount()}\\ - The transmitter keeps track of the amount of RTP and RTCP - packets that were sent. This functions resets those counts. - \item {\tt uint32\_t GetNumRTPPacketsSent()}\\ - Returns the number of RTP packets sent. - \item {\tt uint32\_t GetNumRTCPPacketsSent()}\\ - Returns the number of RTCP packets sent. - \item {\tt int AddDestination(const RTPAddress \&addr)}\\ - Adds the address specified by {\tt addr} to the list of - destinations. - \item {\tt int DeleteDestination(const RTPAddress \&addr)}\\ - Deletes the address specified by {\tt addr} from the list - of destinations. - \item {\tt void ClearDestinations()}\\ - Clears the list of destinations. - \item {\tt bool SupportsMulticasting()}\\ - Returns {\tt true} if the transmission component supports - multicasting. - \item {\tt int JoinMulticastGroup(const RTPAddress \&addr)}\\ - Joins the multicast group specified by {\tt addr}. - \item {\tt int LeaveMulticastGroup(const RTPAddress \&addr)}\\ - Leaves the multicast group specified by {\tt addr}. - \item {\tt void LeaveAllMulticastGroups()}\\ - Leaves all the multicast groups that have been joined. - \item {\tt int SetReceiveMode(RTPTransmitter::ReceiveMode m)}\\ - Sets the receive mode to m, which is one of the following: - {\tt RTPTrans\-mitter::\-Accept\-All}, {\tt RTPTrans\-mitter::\-Accept\-Some}, - {\tt RTPTrans\-mitter::\-Ignore\-Some}. Note that if the receive - mode is changed, all information about the addresses to ignore - or to accept is lost. - \item {\tt int AddToIgnoreList(const RTPAddress \&addr)}\\ - Adds {\tt addr} to the list of addresses to ignore. - \item {\tt int DeleteFromIgnoreList(const RTPAddress \&addr)}\\ - Deletes {\tt addr} from the list of addresses to ignore. - \item {\tt void ClearIgnoreList()}\\ - Clears the list of addresses to ignore. - \item {\tt int AddToAcceptList(const RTPAddress \&addr)}\\ - Adds {\tt addr} to the list of addresses to accept. - \item {\tt int DeleteFromAcceptList(const RTPAddress \&addr)}\\ - Deletes {\tt addr} from the list of addresses to accept. - \item {\tt void ClearAcceptList()}\\ - Clears the list of addresses to accept. - \item {\tt int SetMaximumPacketSize(size\_t s)}\\ - Sets the maximum packet size which the transmitter should - allow to {\tt s}. - \end{itemize} - - \Paragraph{UDP over IPv4 transmitter}\headerfile{rtpudpv4transmitter.h}\inherits{RTPTransmitter} - - The class {\tt RTPUDPv4Transmitter} inherits the {\tt RTPTransmitter} - interface and implements a transmission component which user UDP - over IPv4 to send and receive RTP and RTCP data. - - The component's parameters are described by the class - {\tt RTPUDPv4Trans\-mission\-Params} and is described in section - \ref{rtpudpv4transmissionparams}. The functions which have - an {\tt RTPAddress} argument require an argument of - type {\tt RTPIPv4Address} which is described in section - \ref{rtpipv4address}. The {\tt Get\-Trans\-mission\-Info} member function - of the {\tt RTP\-UDPv4\-Trans\-mitter} class returns an instance - of type {\tt RTP\-UDPv4\-Trans\-mission\-Info} which is described - in section \ref{rtpudpv4transmissioninfo}. - - \Paragraph{UDP over IPv6 transmitter}\headerfile{rtpudpv6transmitter.h}\inherits{RTPTransmitter} - - The class {\tt RTPUDPv6Transmitter} inherits the {\tt RTPTransmitter} - interface and implements a transmission component which user UDP - over IPv6 to send and receive RTP and RTCP data. - - The component's parameters are described by the class - {\tt RTPUDPv6Trans\-mission\-Params} and is described in section - \ref{rtpudpv6transmissionparams}. The functions which have - an {\tt RTPAddress} argument require an argument of - type {\tt RTPIPv6Address} which is described in section - \ref{rtpipv6address}. The {\tt Get\-Trans\-mission\-Info} member function - of the {\tt RTP\-UDPv6\-Trans\-mitter} class returns an instance - of type {\tt RTP\-UDPv6\-Trans\-mission\-Info} which is described - in section \ref{rtpudpv6transmissioninfo}. - - \subsubsection{\tt RTPTransmissionParams}\headerfile{rtptransmitter.h} - - The {\tt RTPTransmissionParams} class is an abstract class which - will have a specific implementation for a specific kind of - transmission component. All actual implementations inherit the - following function which identify the component type for which - these parameters are valid: - \begin{verbatim} - RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() - \end{verbatim} - - \Paragraph{Parameters for the UDP over IPv4 transmitter}\headerfile{rtpudpv4transmitter.h}\inherits{RTPTransmissionParams} - \label{rtpudpv4transmissionparams} - - The {\tt RTPUDPv4TransmissionParams} class represents the - parameters used by the UDP over IPv4 transmission component. - By default, the multicast TTL is set to $1$ and the portbase - is set to $5000$. The interface of this class is the following: - \begin{itemize} - \item {\tt void SetBindIP(uint32\_t ip)}\\ - Sets the IP address which is used to bind the sockets - to {\tt ip}. - \item {\tt void SetPortbase(uint16\_t pbase)}\\ - Sets the RTP portbase to {\tt pbase}. This has to be - an even number. - \item {\tt void SetMulticastTTL(uint8\_t mcastTTL)}\\ - Sets the multicast TTL to be used to {\tt mcastTTL}. - \item {\tt void SetLocalIPList(std::list \&iplist)}\\ - Passes a list of IP addresses which will be used as - the local IP addresses. - \item {\tt void ClearLocalIPList()}\\ - Clears the list of local IP addresses. An empty list - will make the transmission component itself determine the - local IP addresses. - \item {\tt uint32\_t GetBindIP() const}\\ - Returns the IP address which will be used to bind the - sockets. - \item {\tt uint16\_t GetPortbase() const}\\ - Returns the RTP portbase which will be used. - \item {\tt uint8\_t GetMulticastTTL() const}\\ - Returns the multicast TTL which will be used. - \item {\tt const std::list \&GetLocalIPList() const}\\ - Returns the list of local IP addresses. - \end{itemize} - - \Paragraph{Parameters for the UDP over IPv6 transmitter}\headerfile{rtpudpv6transmitter.h}\inherits{RTPTransmissionParams} - \label{rtpudpv6transmissionparams} - - The {\tt RTPUDPv6TransmissionParams} class represents the - parameters used by the UDP over IPv6 transmission component. - By default, the multicast TTL is set to $1$ and the portbase - is set to $5000$. The interface of this class is the following: - \begin{itemize} - \item {\tt void SetBindIP(in6\_addr ip)}\\ - Sets the IP address which is used to bind the sockets - to {\tt ip}. - \item {\tt void SetPortbase(uint16\_t pbase)}\\ - Sets the RTP portbase to {\tt pbase}. This has to be - an even number. - \item {\tt void SetMulticastTTL(uint8\_t mcastTTL)}\\ - Sets the multicast TTL to be used to {\tt mcastTTL}. - \item {\tt void SetLocalIPList(std::list \&iplist)}\\ - Passes a list of IP addresses which will be used as - the local IP addresses. - \item {\tt void ClearLocalIPList()}\\ - Clears the list of local IP addresses. An empty list - will make the transmission component itself determine the - local IP addresses. - \item {\tt in6\_addr GetBindIP() const}\\ - Returns the IP address which will be used to bind the - sockets. - \item {\tt uint16\_t GetPortbase() const}\\ - Returns the RTP portbase which will be used. - \item {\tt uint8\_t GetMulticastTTL() const}\\ - Returns the multicast TTL which will be used. - \item {\tt const std::list \&GetLocalIPList() const}\\ - Returns the list of local IP addresses. - \end{itemize} - - \subsubsection{\tt RTPTransmissionInfo}\headerfile{rtptransmitter.h} - - The {\tt RTPTransmissionInfo} class is an abstract class which - will have a specific implementation for a specific kind of - transmission component. All actual implementations inherit the - following function which identify the component type for which - these parameters are valid: - \begin{verbatim} - RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() - \end{verbatim} - - \Paragraph{Info about the UDP over IPv4 transmitter}\headerfile{rtpudpv4transmitter.h} - \label{rtpudpv4transmissioninfo} - - The class {\tt RTPUDPv4TransmissionInfo} gives some additional - information about the UDP over IPv4 transmission component. The - following member functions are available: - \begin{itemize} - \item {\tt std::list GetLocalIPList() const}\\ - Returns the list of IPv4 addresses the transmitter - considers to be the local IP addresses. - \item {\tt int GetRTPSocket() const}\\ - Returns the socket descriptor used for receiving and transmitting - RTP packets. - \item {\tt int GetRTCPSocket() const}\\ - Returns the socket descriptor used for receiving and transmitting - RTCP packets. - \end{itemize} - - \Paragraph{Info about the UDP over IPv6 transmitter}\headerfile{rtpudpv6transmitter.h} - \label{rtpudpv6transmissioninfo} - - The class {\tt RTPUDPv6TransmissionInfo} gives some additional - information about the UDP over IPv6 transmission component. The - following member functions are available: - \begin{itemize} - \item {\tt std::list GetLocalIPList() const}\\ - Returns the list of IPv4 addresses the transmitter - considers to be the local IP addresses. - \item {\tt int GetRTPSocket() const}\\ - Returns the socket descriptor used for receiving and transmitting - RTP packets. - \item {\tt int GetRTCPSocket() const}\\ - Returns the socket descriptor used for receiving and transmitting - RTCP packets. - \end{itemize} - - \subsubsection{\tt RTPAddress}\headerfile{rtpaddress.h} - - The class {\tt RTPAddress} is an abstract class which is used to - specify destinations, multicast groups etc. To check which actual - implementation is used, the class defines the following type: - \begin{verbatim} - enum AddressType { IPv4Address, IPv6Address, UserDefinedAddress }; - \end{verbatim} - The type {\tt RTPAddress::IPv4Address} is used by the UDP over IPv4 - transmitter; {\tt RTPAddress::IPv6Address} is used by the UDP over - IPv6 transmitter. The {\tt RTPAddress::UserDefinedAddress} type can - be useful when using a user-defined transmission component. - - The class defines the following interface: - \begin{itemize} - \item {\tt AddressType GetAddressType() const}\\ - Returns the type of address the actual implementation - represents. - \item {\tt RTPAddress *CreateCopy() const}\\ - Creates a copy of the {\tt RTPAddress} instance. - \item {\tt bool IsSameAddress(const RTPAddress *addr) const}\\ - Checks if the address {\tt addr} is the same address as - the one this instance represents. Implementations must be - able ti handle a NULL argument. - \item {\tt bool IsFromSameHost(const RTPAddress *addr) const}\\ - Checks if the address {\tt addr} represents the same host - as this instance. Implementations must be able to handle - a NULL argument. - \end{itemize} - - \Paragraph{\tt RTPIPv4Address}\headerfile{rtpipv4address.h}\inherits{RTPAddress} - \label{rtpipv4address} - - This class is used by the UDP over IPv4 transmission component. - The following member functions are defined in this class: - \begin{itemize} - \item {\tt RTPIPv4Address(uint32\_t ip = 0, uint16\_t port = 0)}\\ - Creates an instance with IP address {\tt ip} and port number {\tt port}. - Both are interpreted in host byte order. - \item {\tt RTPIPv4Address(const uint8\_t ip[4], uint16\_t port = 0)}\\ - Creates an instance with IP address {\tt ip} and port {\tt port}. - The port number is interpreted in host byte order. - \item {\tt void SetIP(uint32\_t ip)}\\ - Sets the IP address for this instance to {\tt ip} which is - assumed to be in host byte order. - \item {\tt void SetIP(const uint8\_t ip[4])}\\ - Sets the IP address of this instance to {\tt ip}. - \item {\tt void SetPort(uint16\_t port)}\\ - Sets the port number for this instance to {\tt port} which - is interpreted in host byte order. - \item {\tt uint32\_t GetIP() const}\\ - Returns the IP address contained in this instance in - host byte order. - \item {\tt uint16\_t GetPort() const}\\ - Returns the port number of this instance in host byte - order. - \end{itemize} - - When an {\tt RTPIPv4Address} is used in one of the multicast - functions of the transmitter, the port number is ignored. When - an instance is used in one of the accept or ignore functions - of the transmitter, a zero port number represents all ports - for the specified IP address. - - \Paragraph{\tt RTPIPv6Address}\headerfile{rtpipv6address.h}\inherits{RTPAddress} - \label{rtpipv6address} - - This class is used by the UDP over IPv4 transmission component. - The following member functions are defined: - \begin{itemize} - \item {\tt RTPIPv6Address()}\\ - Creates an instance with IP address and port number set to - zero. - \item {\tt RTPIPv6Address(const uint8\_t ip[16], uint16\_t port = 0)}\\ - Creates an instance with IP address {\tt ip} and port - number {\tt port}. The port number is assumed to be in - host byte order. - \item {\tt RTPIPv6Address(in6\_addr ip, uint16\_t port = 0)}\\ - Creates an instance with IP address {\tt ip} and port - number {\tt port}. The port number is assumed to be in - host byte order. - \item {\tt void SetIP(in6\_addr ip)}\\ - Sets the IP address for this instance to {\tt ip}. - \item {\tt void SetIP(const uint8\_t ip[16])}\\ - Sets the IP address for this instance to {\tt ip}. - \item {\tt void SetPort(uint16\_t port)}\\ - Sets the port number for this instance to {\tt port}, which - is interpreted in host byte order. - \item {\tt void GetIP(uint8\_t ip[16]) const}\\ - Copies the IP address of this instance in {\tt ip}. - \item {\tt in6\_addr GetIP() const}\\ - Returns the IP address of this instance. - \item {\tt uint16\_t GetPort() const}\\ - Returns the port number contained in this instance in - host byte order. - \end{itemize} - - When an {\tt RTPIPv6Address} is used in one of the multicast - functions of the transmitter, the port number is ignored. When - an instance is used in one of the accept or ignore functions - of the transmitter, a zero port number represents all ports - for the specified IP address. - - \subsubsection{\tt RTPRawPacket}\headerfile{rtprawpacket.h} - - The {\tt RTPRawPacket} class is used by the transmission component - to store the incoming RTP and RTCP data in. It has the following - interface: - \begin{itemize} - \item {\tt RTPRawPacket(uint8\_t *data, size\_t datalen, RTPAddress *address, RTPTime \&recvtime, bool rtp)}\\ - Creates an instance which stores data from {\tt data} with - length {\tt datalen}. Only the pointer to the data is stored, - no actual copy is made! The address from which this packet - originated is set to {\tt address} and the time at which - the packet was received is set to {\tt recvtime}. The flag - which indicates whether this data is RTP or RTCP data is set - to {\tt rtp}. - \item {\tt uint8\_t *GetData()}\\ - Returns the pointer to the data which is contained in this - packet. - \item {\tt size\_t GetDataLength() const}\\ - Returns the length of the packet described by this instance. - \item {\tt RTPTime GetReceiveTime() const}\\ - Returns the time at which this packet was received. - \item {\tt const RTPAddress *GetSenderAddress() const}\\ - Returns the address stored in this packet. - \item {\tt bool IsRTP() const}\\ - Returns {\tt true} if this data is RTP data, {\tt false} if it is RTCP - data. - \item {\tt void ZeroData()}\\ - Sets the pointer to the data stored in this packet to zero. - This will prevent a {\tt delete} call for the actual data when - the destructor of {\tt RTPRawPacket} is called. This function - is used by the {\tt RTPPacket} and {\tt RTCPCompoundPacket} - classes to obtain the packet data (without having to copy it) - and to make sure the data isn't deleted when the destructor - of {\tt RTPRawPacket} is called. - \end{itemize} - - \subsubsection{\tt RTPPacket}\headerfile{rtppacket.h} - - The {\tt RTPPacket} class can be used to parse a {\tt RTPRawPacket} - instance if it represents RTP data. The class can also be used to - create a new RTP packet according to the parameters specified by - the user. The interface of this class is the following: - \begin{itemize} - \item {\tt RTPPacket(RTPRawPacket \&rawpack)}\\ - Creates an RTPPacket instance based upon the data in - {\tt rawpack}. - \item {\tt RTPPacket(uint8\_t payloadtype, const void *payloaddata, size\_t payloadlen, uint16\_t seqnr, - uint32\_t timestamp, uint32\_t ssrc, bool gotmarker, uint8\_t numcsrcs, const uint32\_t *csrcs, - bool gotextension, uint16\_t extensionid, uint16\_t extensionlen\_numwords, const void *extensiondata, - size\_t maxpacksize = 0)}\\ - Creates an new buffer for an RTP packet and fills in the fields - according to the specified parameters. If {\tt maxpacksize} is - not equal to zero, an error is generated if the total packet size - would exceed {\tt maxpacksize}. The arguments of the constructor - are self-explanatory. Note that the size of a header extension is - specified in a number of $32$-bit words. - \item {\tt RTPPacket(uint8\_t payloadtype, const void *payloaddata, size\_t payloadlen, uint16\_t seqnr, - uint32\_t timestamp, uint32\_t ssrc, bool gotmarker, uint8\_t numcsrcs, const uint32\_t *csrcs, - bool gotextension, uint16\_t extensionid, uint16\_t extensionlen\_numwords, const void *extensiondata, - void *buffer, size\_t buffersize)}\\ - Pretty much the same function as the previous one, except that data is stored - in an external buffer {\tt buffer} with buffer size {\tt buffersize}. - \item {\tt int GetCreationError() const}\\ - If an error occurred in one of the constructors, this function - returns the error code. - \item {\tt bool HasExtension() const}\\ - Returns {\tt true} if the RTP packet has a header extension and - {\tt false} otherwise. - \item {\tt bool HasMarker() const}\\ - Returns {\tt true} is the marker bit was set and {\tt false} - otherwise. - \item {\tt int GetCSRCCount() const}\\ - Returns the number of CSRCs contained in this packet. - \item {\tt uint32\_t GetCSRC(int num) const}\\ - Returns a specific CSRC identifier. The parameter {\tt num} - can go from $0$ to {\tt GetCSRCCount()}-$1$. - \item {\tt uint8\_t GetPayloadType() const}\\ - Returns the payload type of the packet. - \item {\tt uint32\_t GetExtendedSequenceNumber() const}\\ - Returns the extended sequence number of the packet. When - the packet is just received, only the low $16$ bits will - be set. The high $16$ bits can be filled in later. - \item {\tt uint16\_t GetSequenceNumber() const}\\ - Returns the sequence number of this packet. - \item {\tt void SetExtendedSequenceNumber(uint32\_t seq)}\\ - Sets the extended sequence number of this packet to {\tt seq}. - \item {\tt uint32\_t GetTimestamp() const}\\ - Returns the timestamp of this packet. - \item {\tt uint32\_t GetSSRC() const}\\ - Returns the SSRC identifier stored in this packet. - \item {\tt uint8\_t *GetPacketData() const}\\ - Returns a pointer to the data of the entire packet. - \item {\tt uint8\_t *GetPayloadData() const}\\ - Returns a pointer to the actual payload data. - \item {\tt size\_t GetPacketLength() const}\\ - Returns the length of the entire packet. - \item {\tt size\_t GetPayloadLength() const}\\ - Returns the payload length. - \item {\tt uint16\_t GetExtensionID() const}\\ - If a header extension is present, this function - returns the extension identifier. - \item {\tt uint8\_t *GetExtensionData() const}\\ - Returns a pointer to the header extension data. - \item {\tt size\_t GetExtensionLength() const}\\ - Returns the length of the header extension data. - \item {\tt RTPTime GetReceiveTime() const}\\ - When an {\tt RTPPacket} instance is created from - an {\tt RTPRawPacket} instance, the raw packet's - reception time is stored in the {\tt RTPPacket} - instance. This function then retrieves that time. - \end{itemize} - - \subsubsection{\tt RTCPCompoundPacket}\headerfile{rtpcompoundpacket.h} - - This class describes an RTCP compound packet and has the following - interface: - \begin{itemize} - \item {\tt RTCPCompoundPacket(RTPRawPacket \&rawpack)}\\ - Creates an {\tt RTCPCompoundPacket} instance from the - data in {\tt rawpack}. - \item {\tt int GetCreationError()}\\ - If the raw packet data in the constructor could not - be parsed, this function returns the error code of - what went wrong. If the packet had an invalid format, - the return value is {\tt ERR\_\-RTP\_\-RTCPCOMPOUND\_\-INVALID\-PACKET}. - \item {\tt uint8\_t *GetCompoundPacketData()}\\ - Returns a pointer to the data of the entire RTCP compound packet. - \item {\tt size\_t GetCompoundPacketLength()}\\ - Returns the size of the entire RTCP compound packet - \item {\tt void GotoFirstPacket()}\\ - Starts the iteration over the individual RTCP packets in - the RTCP compound packet. - \item {\tt RTCPPacket *GetNextPacket()}\\ - Returns a pointer to the next individual RTCP packet. Note - that no {\tt delete} call may be done on the {\tt RTCPPacket} - instance which is returned. The {\tt RTCPPacket} class is - described below. - \end{itemize} - - \Paragraph{\tt RTCPPacket}\headerfile{rtcppacket.h} - - The class {\tt RTCPPacket} is a base class for specific types - of RTCP packets. The following type in the {\tt RTCPPacket} - class identifies the different packet types: - \begin{verbatim} - enum PacketType { SR, RR, SDES, BYE, APP, Unknown }; - \end{verbatim} - - The class contains the following member functions: - \begin{itemize} - \item {\tt bool IsKnownFormat() const}\\ - Returns {\tt true} if the subclass was able to interpret - the data and {\tt false} otherwise. - \item {\tt PacketType GetPacketType() const}\\ - Returns the actual packet type which the subclass - implements: - \begin{itemize} - \item {\tt RTCPPacket::SR}: indicates an {\tt RTCPSRPacket} instance - \item {\tt RTCPPacket::RR}: indicates an {\tt RTCPRRPacket} instance - \item {\tt RTCPPacket::SDES}: indicates an {\tt RTCPSDESPacket} instance - \item {\tt RTCPPacket::BYE}: indicates an {\tt RTCPBYEPacket} instance - \item {\tt RTCPPacket::APP}: indicates an {\tt RTCPAPPPacket} instance - \item {\tt RTCPPacket::Unknown}: indicates an {\tt RTCPUnknownPacket} instance - \end{itemize} - \item {\tt uint8\_t *GetPacketData()}\\ - Returns a pointer to the data of this RTCP packet. - \item {\tt size\_t GetPacketLength() const}\\ - Returns the length of this RTCP packet. - \end{itemize} - - \Paragraph{\tt RTCPSRPacket}\headerfile{rtcpsrpacket.h}\inherits{RTCPPacket} - - This class describes an RTCP sender report packet. The interface - is the following: - \begin{itemize} - \item {\tt RTCPSRPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \item {\tt uint32\_t GetSenderSSRC() const}\\ - Returns the SSRC of the participant who sent this packet. - \item {\tt RTPNTPTime GetNTPTimestamp() const}\\ - Returns the NTP timestamp contained in the sender report. - \item {\tt uint32\_t GetRTPTimestamp() const}\\ - Returns the RTP timestamp contained in the sender report. - \item {\tt uint32\_t GetSenderPacketCount() const}\\ - Returns the sender's packet count contained in the - sender report. - \item {\tt uint32\_t GetSenderOctetCount() const}\\ - Returns the sender's octet count contained in the sender - report. - \item {\tt int GetReceptionReportCount() const}\\ - Returns the number of reception report blocks present - in this packet. - \item {\tt uint32\_t GetSSRC(int index) const}\\ - Returns the SSRC of the reception report block described - by {\tt index} which may have a value from $0$ to - {\tt GetReceptionReportCount()}-$1$. Note that no - check is performed to see if {\tt index} is valid. - \item {\tt uint8\_t GetFractionLost(int index) const}\\ - Returns the `fraction lost' field of the reception - report described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt int32\_t GetLostPacketCount(int index) const}\\ - Returns the number of lost packets in the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetExtendedHighestSequenceNumber(int index) const}\\ - Returns the extended highest sequence number of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReception\-Report\-Count()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetJitter(int index) const}\\ - Returns the jitter field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetLSR(int index) const}\\ - Returns the LSR field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetDLSR(int index) const}\\ - Returns the DLSR field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \end{itemize} - - \Paragraph{\tt RTCPRRPacket}\headerfile{rtcprrpacket.h}\inherits{RTCPPacket} - - This class describes an RTCP receiver report packet. The interface - is the following: - \begin{itemize} - \item {\tt RTCPRRPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \item {\tt uint32\_t GetSenderSSRC() const}\\ - Returns the SSRC of the participant who sent this packet. - \item {\tt int GetReceptionReportCount() const}\\ - Returns the number of reception report blocks present - in this packet. - \item {\tt uint32\_t GetSSRC(int index) const}\\ - Returns the SSRC of the reception report block described - by {\tt index} which may have a value from $0$ to - {\tt GetReceptionReportCount()}-$1$. Note that no - check is performed to see if {\tt index} is valid. - \item {\tt uint8\_t GetFractionLost(int index) const}\\ - Returns the `fraction lost' field of the reception - report described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt int32\_t GetLostPacketCount(int index) const}\\ - Returns the number of lost packets in the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetExtendedHighestSequenceNumber(int index) const}\\ - Returns the extended highest sequence number of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReception\-Report\-Count()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetJitter(int index) const}\\ - Returns the jitter field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetLSR(int index) const}\\ - Returns the LSR field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt uint32\_t GetDLSR(int index) const}\\ - Returns the DLSR field of the reception - report block described by {\tt index} which may have a value - from $0$ to {\tt GetReceptionReportCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \end{itemize} - - \Paragraph{\tt RTCPSDESPacket}\headerfile{rtcpsdespacket.h}\inherits{RTCPPacket} - - This class describes an RTCP SDES packet. In the {\tt RTCP\-SDES\-Packet} - class, the following type is defined: - \begin{verbatim} - enum ItemType { None, CNAME, NAME, EMAIL, PHONE, - LOC, TOOL, NOTE, PRIV, Unknown }; - \end{verbatim} - This type is used to identify the type of an SDES item. The type - {\tt None} is used when the iteration over the items has finished; - {\tt Unknown} is used when there really is an item present, but - the type is not a standard type. - - The class interface is the following: - \begin{itemize} - \item {\tt RTCPSDESPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \item {\tt int GetChunkCount() const}\\ - Returns the number of SDES chunks in the SDES packet. - Each chunk has its own SSRC identifier. - \item {\tt bool GotoFirstChunk()}\\ - Starts the iteration. If no SDES chunks are present, - the function returns {\tt false}. Otherwise, it - returns {\tt true} and sets the current chunk to be - the first chunk. - \item {\tt bool GotoNextChunk()}\\ - Sets the current chunk to the next available chunk. - If no next chunk is present, this function returns - {\tt false}, otherwise it returns {\tt true}. - \item {\tt uint32\_t GetChunkSSRC() const}\\ - Returns the SSRC identifier of the current chunk. - \item {\tt bool GotoFirstItem()}\\ - Starts the iteration over the SDES items in the current - chunk. If no SDES items are present, the function returns - {\tt false}. Otherwise, the function sets the current item - to be the first one and returns {\tt true}. - \item {\tt bool GotoNextItem()}\\ - If there's another item in the chunk, the current item - is set to be the next one and the function returns {\tt true}. - Otherwise, the function returns {\tt false}. - \item {\tt ItemType GetItemType() const}\\ - Returns the SDES item type of the current item in the current - chunk. - \item {\tt size\_t GetItemLength() const}\\ - Returns the item length of the current item in the current - chunk. - \item {\tt uint8\_t *GetItemData()}\\ - Returns the item data of the current item in the current - chunk. - \end{itemize} - - If SDES private item support was enabled at compile-time, the following - members can be used if the current item is an SDES private item. - \begin{itemize} - \item {\tt size\_t GetPRIVPrefixLength()}\\ - Returns the length of the prefix string of the private - item. - \item {\tt uint8\_t *GetPRIVPrefixData()}\\ - Returns the actual data of the prefix string. - \item {\tt size\_t GetPRIVValueLength()}\\ - Returns the length of the value string of the private - item. - \item {\tt uint8\_t *GetPRIVValueData()}\\ - Returns the actual value data of the private item. - \end{itemize} - - \Paragraph{\tt RTCPAPPPacket}\headerfile{rtcpapppacket.h}\inherits{RTCPPacket} - - The class {\tt RTCPAPPPacket} describes an RTCP APP packet. - The following member functions are available: - \begin{itemize} - \item {\tt RTCPAPPPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \item {\tt uint8\_t GetSubType() const}\\ - Returns the subtype contained in the APP packet. - \item {\tt uint32\_t GetSSRC() const}\\ - Returns the SSRC of the source which sent this packet. - \item {\tt uint8\_t *GetName()}\\ - Returns the name contained in the APP packet. This always - consists of four bytes and is not NULL-terminated. - \item {\tt uint8\_t *GetAPPData()}\\ - Returns a pointer to the actual data. - \item {\tt size\_t GetAPPDataLength() const}\\ - Returns the length of the actual data. - \end{itemize} - - \Paragraph{\tt RTCPBYEPacket}\headerfile{rtcpbyepacket.h}\inherits{RTCPPacket} - - An RTCP BYE packet is represented by the class {\tt RTCPBYEPacket} - which has the following member functions: - \begin{itemize} - \item {\tt RTCPBYEPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \item {\tt int GetSSRCCount() const}\\ - Returns the number of SSRC identifiers present in this - BYE packet. - \item {\tt uint32\_t GetSSRC(int index) const}\\ - Returns the SSRC described by {\tt index} which may have a value - from $0$ to {\tt GetSSRCCount()}-$1$. Note that - no check is performed to see if {\tt index} is valid. - \item {\tt bool HasReasonForLeaving() const}\\ - Returns true if the BYE packet contains a reason for - leaving. - \item {\tt size\_t GetReasonLength() const}\\ - Returns the length of the string which describes why - the source(s) left. - \item {\tt uint8\_t *GetReasonData()}\\ - Returns the actual reason data. - \end{itemize} - - \Paragraph{\tt RTCPUnknownPacket}\headerfile{rtcpunknownpacket.h}\inherits{RTCPPacket} - - This class doesn't have any extra member functions besides - the ones it inherited. Note that since an unknown packet type - doesn't have any format to check against, the {\tt IsKnownFormat} - function will trivially return {\tt true}. Only the following - constructor is available: - \begin{itemize} - \item {\tt RTCPUnknownPacket(uint8\_t *data, size\_t datalen)}\\ - Creates an instance based on the data in {\tt data} with - length {\tt datalen}. Since the {\tt data} pointer - is referenced inside the class (no copy of the data is - made) one must make sure that the memory it points to is - valid as long as the class instance exists. - \end{itemize} - - \subsubsection{\tt RTCPCompoundPacketBuilder}\headerfile{rtpcompoundpacket\-builder.h}\inherits{RTCPCompoundPacket} - - The {\tt RTCPCompoundPacketBuilder} class can be used to - construct an RTCP compound packet. It inherits the member - functions of {\tt RTCP\-Compound\-Packet} which can be used - to access the information in the compound packet once it has - been built successfully. The member functions described below - return {\tt ERR\_\-RTP\_\-RTCPCOMP\-PACK\-BUILDER\_\-NOT\-ENOUGH\-BYTES\-LEFT} - if the action would cause the maximum allowed size to be - exceeded. - \begin{itemize} - \item {\tt int InitBuild(size\_t maxpacketsize)}\\ - Starts building an RTCP compound packet with maximum size {\tt maxpacketsize}. - New memory will be allocated to store the packet. - \item {\tt int InitBuild(void *externalbuffer, size\_t buffersize)}\\ - Starts building a packet. Data will be stored in {\tt externalbuffer} which - can contain {\tt buffersize} bytes. - \item {\tt int StartSenderReport(uint32\_t senderssrc, const RTPNTPTime \&ntptimestamp, uint32\_t rtptimestamp, - uint32\_t packetcount, uint32\_t octetcount)}\\ - Tells the packet builder that the packet should start with a sender report which - will contain the sender information specified by this function's - arguments. Once the sender report is started, report blocks can be - added using the {\tt AddReportBlock} function. - \item {\tt int StartReceiverReport(uint32\_t senderssrc)}\\ - Tells the packet builder that the packet should start with a receiver report which - will contain the sender SSRC {\tt senderssrc}. Once the sender report is started, - report blocks can be added using the {\tt AddReportBlock} function. - \item {\tt int AddReportBlock(uint32\_t ssrc, uint8\_t fractionlost, int32\_t packetslost, uint32\_t exthighestseq, - uint32\_t jitter, uint32\_t lsr, uint32\_t dlsr)}\\ - Adds the report block information specified by the function's - arguments. If more than 31 report blocks are added, the builder - will automatically use a new RTCP receiver report packet. - \item {\tt int AddSDESSource(uint32\_t ssrc)}\\ - Starts an SDES chunk for participant {\tt ssrc}. - \item {\tt int AddSDESNormalItem(RTCPSDESPacket::ItemType t, const void *itemdata, uint8\_t itemlength)}\\ - Adds a normal (non-private) SDES item of type {\tt t} to the current SDES - chunk. The item's value will have length {\tt itemlength} and will contain - the data {\tt itemdata}. - \item {\tt int AddBYEPacket(uint32\_t *ssrcs, uint8\_t numssrcs, const void *reasondata, uint8\_t reasonlength)}\\ - Adds a BYE packet to the compound packet. It will contain {\tt numssrcs} - source identifiers specified in {\tt ssrcs} and will indicate - as reason for leaving the string of length {\tt reasonlength} - containing data {\tt reasondata}. - \item {\tt int AddAPPPacket(uint8\_t subtype, uint32\_t ssrc, const uint8\_t name[4], const void *appdata, size\_t appdatalen)}\\ - Adds the APP packet specified by the arguments to the - compound packet. Note that {\tt appdatalen} has to be - a multiple of four. - \item {\tt int EndBuild()}\\ - Finished building the compound packet. If successful, the - {\tt RTCPCompoundPacket} member functions can be used to - access the RTCP packet data. - \end{itemize} - - If the library was compiled with SDES private item support, the - following member function is also available: - \begin{itemize} - \item {\tt int AddSDESPrivateItem(const void *prefixdata, uint8\_t prefixlength, const void *valuedata, - uint8\_t valuelength)}\\ - Adds an SDES PRIV item described by the function's arguments - to the current SDES chunk. - \end{itemize} - - \subsubsection{\tt RTPSources}\headerfile{rtpsources.h} - - The {\tt RTPSources} class represents a table in which information - about the participating sources is kept. The class has member - functions to process RTP and RTCP data and to iterate over the - participants. Note that a NULL address is used to identify packets - from our own session. The class also provides some overridable - functions which can be used to catch certain events (new SSRC, - SSRC collision, \ldots). - - When probation support is enabled, you can select one of - three probation types: - \begin{verbatim} - enum ProbationType { NoProbation, ProbationDiscard, ProbationStore }; - \end{verbatim} - When {\tt NoProbation} is selected, the probation algorithm will - not be used to validate new sources. When {\tt ProbationDiscard} - is used, the probation algorithm is activated but received packets - will be discarded until the source is validated. To activate the - probation routine and store the packets which are received before - the source is validated, the mode {\tt ProbationStore} can be - selected. - - The RTPSources class interface is the following: - \begin{itemize} - \item {\tt RTPSources(ProbationType probationtype = ProbationStore)}\\ - In the constructor you can select the probation type you'd like - to use. This only makes a difference when probation support was - enabled at compilation time. - \item {\tt void Clear()}\\ - Clears the source table. - \item {\tt int CreateOwnSSRC(uint32\_t ssrc)}\\ - Creates an entry for our own SSRC identifier. - \item {\tt int DeleteOwnSSRC()}\\ - Deletes the entry for our own SSRC identifier. - \item {\tt void SentRTPPacket()}\\ - For our own SSRC entry, the sender flag is updated based - upon outgoing packets instead of incoming packets. This - function should be called if our own session has sent an - RTP packet. - \item {\tt int ProcessRawPacket(RTPRawPacket *rawpack, RTPTransmitter *trans, bool acceptownpackets)}\\ - Processes a raw packet {\tt rawpack}. The instance {\tt trans} will be used to - check if this packet is one of our own packets. The flag {\tt acceptownpackets} - indicates whether own packets should be accepted or ignored. - \item {\tt int ProcessRawPacket(RTPRawPacket *rawpack, RTPTransmitter *trans[], int numtrans, bool acceptownpackets)}\\ - Same function as the previous one, except that every transmitter - in the array {\tt trans} of length {\tt numtrans} is used - to check if the packet is from our own session. - \item {\tt int ProcessRTPPacket(RTPPacket *rtppack, const RTPTime \&receivetime, const RTPAddress *senderaddress, bool *stored)}\\ - Processes an {\tt RTPPacket} instance {\tt rtppack} which was - received at time {\tt receivetime}. And which originated from - {\tt senderaddress}. The {\tt senderaddress} parameter must - be NULL if the packet was sent by the local participant. The - flag {\tt stored} indicates whether the packet was stored in - the table or not. If so, the {\tt rtppack} instance may not - be deleted. - \item {\tt int ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Processes the RTCP compound packet {\tt rtcpcomppack} - which was received at time {\tt receivetime} from {\tt - senderaddress}. The {\tt senderaddress} parameter must - be NULL if the packet was sent by the local participant. - \item {\tt int ProcessRTCPSenderInfo(uint32\_t ssrc, const RTPNTPTime \&ntptime, uint32\_t rtptime, - uint32\_t packetcount, uint32\_t octetcount, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Process the sender information of SSRC {\tt ssrc} into - the source table. The information was received at time - {\tt receivetime} from address {\tt senderaddress}. The - {\tt senderaddress} parameter must be NULL if the packet - was sent by the local participant. - \item {\tt int ProcessRTCPReportBlock(uint32\_t ssrc, uint8\_t fractionlost, int32\_t lostpackets, - uint32\_t exthighseqnr, uint32\_t jitter, uint32\_t lsr, - uint32\_t dlsr, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ - Processes the report block information which was sent - by participant {\tt ssrc} into the source table. The - information was received at time {\tt receivetime} from - address {\tt senderaddress}. The {\tt senderaddress} - parameter must be NULL if the packet was sent by the - local participant. - \item {\tt int ProcessSDESNormalItem(uint32\_t ssrc, RTCPSDESPacket::ItemType t, size\_t itemlength, - const void *itemdata, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ - Processes the non-private SDES item from source {\tt - ssrc} into the source table. The information was - received at time {\tt receivetime} from address {\tt - senderaddress}. The {\tt senderaddress} parameter must - be NULL if the packet was sent by the local participant. - \item {\tt int ProcessBYE(uint32\_t ssrc, size\_t reasonlength, const void *reasondata, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Processes the BYE message for SSRC {\tt ssrc}. The - information was received at time {\tt receivetime} from - address {\tt senderaddress}. The {\tt senderaddress} - parameter must be NULL if the packet was sent by the - local participant. - \item {\tt int UpdateReceiveTime(uint32\_t ssrc, const RTPTime \&receivetime, const RTPAddress *senderaddress)}\\ - If we heard from source {\tt ssrc}, but no actual - data was added to the source table (for example, if - no report block was meant for us), this function can - be used to indicate that something was received from - this source. This will prevent a premature timeout for - this participant. The message was received at time {\tt - receivetime} from address {\tt senderaddress}. The {\tt - senderaddress} parameter must be NULL if the packet was - sent by the local participant. - \item {\tt bool GotoFirstSource()}\\ - Starts the iteration over the participants by going to the - first member in the table. If a member was found, the function - returns {\tt true}, otherwise it returns {\tt false}. - \item {\tt bool GotoNextSource()}\\ - Sets the current source to be the next source in the table. - If we're already at the last source, the function returns - {\tt false}, otherwise it returns {\tt true}. - \item {\tt bool GotoPreviousSource()}\\ - Sets the current source to be the previous source in the table. - If we're at the first source, the function returns - {\tt false}, otherwise it returns {\tt true}. - \item {\tt bool GotoFirstSourceWithData()}\\ - Sets the current source to be the first source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt bool GotoNextSourceWithData()}\\ - Sets the current source to be the next source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt bool GotoPreviousSourceWithData()}\\ - Sets the current source to be the previous source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt RTPSourceData *GetCurrentSourceInfo()}\\ - Returns the {\tt RTPSourceData} instance for the currently - selected participant. - \item {\tt RTPSourceData *GetSourceInfo(uint32\_t ssrc)}\\ - Returns the {\tt RTPSourceData} instance for the participant - identified by {\tt ssrc}, or NULL if no such entry exists. - \item {\tt RTPPacket *GetNextPacket()}\\ - Extracts the next packet from the received packets queue - of the current participant. - \item {\tt bool GotEntry(uint32\_t ssrc)}\\ - Returns {\tt true} if an entry for participant {\tt ssrc} exists - and {\tt false} otherwise. - \item {\tt RTPSourceData *GetOwnSourceInfo()}\\ - If present, it returns the {\tt RTPSourceData} instance of - the entry which was created by {\tt CreateOwnSSRC}. - \item {\tt void Timeout(const RTPTime \&curtime, const RTPTime \&timeoutdelay)}\\ - Assuming that the current time is {\tt curtime}, time out the - members from whom we haven't heard during the previous time - interval {\tt timeoutdelay}. - \item {\tt void SenderTimeout(const RTPTime \&curtime, const RTPTime \&timeoutdelay)}\\ - Assuming that the current time is {\tt curtime}, remove the - sender flag for senders from whom we haven't received any RTP - packets during the previous time interval {\tt timeoutdelay}. - \item {\tt void BYETimeout(const RTPTime \&curtime, const RTPTime \&timeoutdelay)}\\ - Assuming that the current time is {\tt curtime}, remove the - members who sent a BYE packet more than the time interval - {\tt timeoutdelay} ago. - \item {\tt void NoteTimeout(const RTPTime \&curtime, const RTPTime \&timeoutdelay)}\\ - Assuming that the current time is {\tt curtime}, clear the SDES - NOTE items which haven't been updated in during the previous - time interval {\tt timeoutdelay}. - \item {\tt void MultipleTimeouts(const RTPTime \&curtime, const RTPTime \&sendertimeout, - const RTPTime \&byetimeout, const RTPTime \&generaltimeout, - const RTPTime \¬etimeout)}\\ - Combines the previous four functions. This is more efficient - than calling all four functions since only one iteration - is needed in this function. - \item {\tt int GetSenderCount() const}\\ - Returns the number of participants which are marked as a - sender. - \item {\tt int GetTotalCount() const}\\ - Returns the total number of entries in the source table. - \item {\tt int GetActiveMemberCount() const}\\ - Returns the number of members which have been validated and - which haven't sent a BYE packet yet. - \end{itemize} - - If SDES private item support was enabled at compile-time, the following - member function is also available: - \begin{itemize} - \item {\tt int ProcessSDESPrivateItem(uint32\_t ssrc, size\_t prefixlen, const void *prefixdata, - size\_t valuelen, const void *valuedata, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Processes the SDES private item from source {\tt ssrc} - into the source table. The information was received at - time {\tt receivetime} from address {\tt senderaddress}. - The {\tt senderaddress} parameter must be NULL if the - packet was sent by the local participant. - \end{itemize} - - By inheriting your own class from {\tt RTPSources} and overriding - one or more of the functions below, your application can be informed - of certain events: - \begin{itemize} - \item {\tt void OnRTPPacket(RTPPacket *pack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an RTP packet is about to be processed. - \item {\tt void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an RTCP packet is about to be processed. - \item {\tt void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)}\\ - Is called when an SSRC collision was detected. The instance - {\tt srcdat} is the one present in the table, the address - {\tt senderaddress} is the one that collided with one of the - addresses and {\tt isrtp} indicates against which address of - {\tt srcdat} the check failed. - \item {\tt void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, - const uint8\_t *cname, size\_t cnamelength)}\\ - Is called when another CNAME was received than the one - already present for source {\tt srcdat}. - \item {\tt void OnNewSource(RTPSourceData *srcdat)}\\ - Is called when a new entry {\tt srcdat} is added to the source - table. - \item {\tt void OnRemoveSource(RTPSourceData *srcdat)}\\ - Is called when the entry {\tt srcdat} is about to be - deleted from the source table. - \item {\tt void OnTimeout(RTPSourceData *srcdat)}\\ - Is called when participant {\tt srcdat} is timed out. - \item {\tt void OnBYETimeout(RTPSourceData *srcdat)}\\ - Is called when participant {\tt srcdat} is timed after - having sent a BYE packet. - \item {\tt void OnBYEPacket(RTPSourceData *srcdat)}\\ - Is called when a BYE packet has been processed for source - {\tt srcdat}. - \item {\tt void OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - In called when an RTCP APP packet {\tt apppacket} has been received - at time {\tt receivetime} from address {\tt senderaddress}. - \item {\tt void OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an unknown RTCP packet type was detected. - \item {\tt void OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an unknown packet format for a known packet - type was detected. - \item {\tt void OnNoteTimeout(RTPSourceData *srcdat)}\\ - Is called when the SDES NOTE item for source {\tt srcdat} - has been timed out. - \end{itemize} - - \subsubsection{\tt RTPSourceData}\headerfile{rtpsourcedata.h} - \label{rtpsourcedata} - - The {\tt RTPSourceData} class contains all information about a member - of the session. The interface is the following: - \begin{itemize} - \item {\tt uint32\_t GetSSRC() const}\\ - Returns the SSRC identifier for this member. - \item {\tt bool HasData() const}\\ - Returns {\tt true} if there are RTP packets which can be extracted. - \item {\tt RTPPacket *GetNextPacket()}\\ - Extracts the first packet of this participants RTP packet queue. - \item {\tt void FlushPackets()}\\ - Clears the participant's RTP packet list. - \item {\tt bool IsOwnSSRC() const}\\ - Returns {\tt true} if the participant was added using the - {\tt RTPSources} member function {\tt CreateOwnSSRC} and - returns {\tt false} otherwise. - \item {\tt bool IsCSRC() const}\\ - Returns true if the source identifier is actually a CSRC from - an RTP packet. - \item {\tt bool IsSender() const}\\ - Returns {\tt true} if this member is marked as a sender and - {\tt false} if not. - \item {\tt bool IsValidated() const}\\ - Returns {\tt true} if the participant is validated: this is so - if a number of consecutive RTP packets have been received or if - a CNAME item has been received for this participant. - \item {\tt bool IsActive() const}\\ - Returns {\tt true} if the source was validated and had not yet - sent a BYE packet. - \item {\tt void SetProcessedInRTCP(bool v)}\\ - This function is used by the {\tt RTCPPacketBuilder} class to mark - whether this participant's information has been processed in a - report block or not. - \item {\tt bool IsProcessedInRTCP() const}\\ - This function is used by the {\tt RTCPPacketBuilder} class and - returns whether this participant has been processed in a report - block or not. - \item {\tt bool IsRTPAddressSet() const}\\ - Returns {\tt true} if the address from which this participant's RTP packets - originate has already been set. - \item {\tt bool IsRTCPAddressSet() const}\\ - Returns {\tt true} if the address from which this participant's RTCP packets - originate has already been set. - \item {\tt const RTPAddress *GetRTPDataAddress() const}\\ - Returns the address from which this participant's RTP packet originate. If the - address has been set and the returned value is NULL, this indicates that it - originated from the local participant. - \item {\tt const RTPAddress *GetRTCPDataAddress() const}\\ - Returns the address from which this participant's RTCP packet originate. If the - address has been set and the returned value is NULL, this indicates that it - originated from the local participant. - \item {\tt bool ReceivedBYE() const}\\ - Returns {\tt true} if we received a BYE message for this participant and - {\tt false} otherwise. - \item {\tt uint8\_t *GetBYEReason(size\_t *len) const}\\ - Returns the reason for leaving contained in the BYE packet of this participant. - The length of the reason is stored in {\tt len}. - \item {\tt RTPTime GetBYETime() const}\\ - Returns the time at which the BYE packet was received. - \item {\tt void SetTimestampUnit(double tsu)}\\ - Sets the value for the timestamp unit to be used in jitter calculations - for data received from this participant. If not set, the library uses an - approximation for the timestamp unit which is calculated from two consecutive - RTCP sender reports. The timestamp unit is defined as a time interval divided - by the number of samples in that interval: for $8000 Hz$ audio this would be - $1.0/8000.0$. - \item {\tt double GetTimestampUnit() const}\\ - Returns the timestamp unit used for this participant. - \item {\tt bool SR\_HasInfo() const}\\ - Returns {\tt true} if an RTCP sender report has been received from this participant. - \item {\tt RTPNTPTime SR\_GetNTPTimestamp() const}\\ - Returns the NTP timestamp contained in the last sender report. - \item {\tt uint32\_t SR\_GetRTPTimestamp() const}\\ - Returns the RTP timestamp contained in the last sender report. - \item {\tt uint32\_t SR\_GetPacketCount() const}\\ - Returns the packet count contained in the last sender report. - \item {\tt uint32\_t SR\_GetByteCount() const}\\ - Returns the octet count contained in the last sender report. - \item {\tt RTPTime SR\_GetReceiveTime() const}\\ - Returns the time at which the last sender report was received. - \item {\tt bool SR\_Prev\_HasInfo() const}\\ - Returns {\tt true} if more than one RTCP sender report has been received. - \item {\tt RTPNTPTime SR\_Prev\_GetNTPTimestamp() const}\\ - Returns the NTP timestamp contained in the second to last sender report. - \item {\tt uint32\_t SR\_Prev\_GetRTPTimestamp() const}\\ - Returns the RTP timestamp contained in the second to last sender report. - \item {\tt uint32\_t SR\_Prev\_GetPacketCount() const}\\ - Returns the packet count contained in the second to last sender report. - \item {\tt uint32\_t SR\_Prev\_GetByteCount() const}\\ - Returns the octet count contained in the second to last sender report. - \item {\tt RTPTime SR\_Prev\_GetReceiveTime() const}\\ - Returns the time at which the second to last sender report was received. - \item {\tt bool RR\_HasInfo() const}\\ - Returns {\tt true} if this participant sent a receiver report with information - about the reception of our data. - \item {\tt double RR\_GetFractionLost() const}\\ - Returns the fraction lost value from the last report. - \item {\tt int32\_t RR\_GetPacketsLost() const}\\ - Returns the number of lost packets contained in the last report. - \item {\tt uint32\_t RR\_GetExtendedHighestSequenceNumber() const}\\ - Returns the extended highest sequence number contained in the last report. - \item {\tt uint32\_t RR\_GetJitter() const}\\ - Returns the jitter value from the last report. - \item {\tt uint32\_t RR\_GetLastSRTimestamp() const}\\ - Returns the LSR value from the last report. - \item {\tt uint32\_t RR\_GetDelaySinceLastSR() const}\\ - Returns the DLSR value from the last report. - \item {\tt RTPTime RR\_GetReceiveTime() const}\\ - Returns the time at which the last report was received. - \item {\tt bool RR\_Prev\_HasInfo() const}\\ - Returns {\tt true} if this participant sent more than one receiver report with information - about the reception of our data. - \item {\tt double RR\_Prev\_GetFractionLost() const}\\ - Returns the fraction lost value from the second to last report. - \item {\tt int32\_t RR\_Prev\_GetPacketsLost() const}\\ - Returns the number of lost packets contained in the second to last report. - \item {\tt uint32\_t RR\_Prev\_GetExtendedHighestSequenceNumber() const}\\ - Returns the extended highest sequence number contained in the second to last report. - \item {\tt uint32\_t RR\_Prev\_GetJitter() const}\\ - Returns the jitter value from the second to last report. - \item {\tt uint32\_t RR\_Prev\_GetLastSRTimestamp() const}\\ - Returns the LSR value from the second to last report. - \item {\tt uint32\_t RR\_Prev\_GetDelaySinceLastSR() const}\\ - Returns the DLSR value from the second to last report. - \item {\tt RTPTime RR\_Prev\_GetReceiveTime() const}\\ - Returns the time at which the second to last report was received. - \item {\tt bool INF\_HasSentData() const}\\ - Returns {\tt true} if validated RTP packets have been received from this - participant. - \item {\tt int32\_t INF\_GetNumPacketsReceived() const}\\ - Returns the total number of received packets from this participant. - \item {\tt uint32\_t INF\_GetBaseSequenceNumber() const}\\ - Returns the base sequence number of this participant. - \item {\tt uint32\_t INF\_GetExtendedHighestSequenceNumber() const}\\ - Returns the extended highest sequence number received from this - participant. - \item {\tt uint32\_t INF\_GetJitter() const}\\ - Returns the current jitter value for this participant. - \item {\tt RTPTime INF\_GetLastMessageTime() const}\\ - Returns the time at which something was last heard from this member. - \item {\tt RTPTime INF\_GetLastRTPPacketTime() const}\\ - Returns the time at which the last RTP packet was received. - \item {\tt double INF\_GetEstimatedTimestampUnit() const}\\ - Returns the estimated timestamp unit. The estimate is made from two - consecutive sender reports. - \item {\tt uint32\_t INF\_GetNumPacketsReceivedInInterval() const}\\ - Returns the number of packets received since a new interval was - started with {\tt INF\_StartNewInterval}. - \item {\tt uint32\_t INF\_GetSavedExtendedSequenceNumber() const}\\ - Returns the extended sequence number which was stored by the - {\tt INF\_StartNewInterval} call. - \item {\tt void INF\_StartNewInterval()}\\ - Starts a new interval to count received packets in. This also stores - the current extended highest sequence number to be able to calculate - the packet loss during the interval. - \item {\tt RTPTime INF\_GetRoundtripTime() const}\\ - Estimates the round trip time by using the LSR and DLSR info from the - last receiver report. - \item {\tt RTPTime INF\_GetLastSDESNoteTime() const}\\ - Returns the time at which the last SDES NOTE item was received. - \item {\tt uint8\_t *SDES\_GetCNAME(size\_t *len) const}\\ - Returns a pointer to the SDES CNAME item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetName(size\_t *len) const}\\ - Returns a pointer to the SDES name item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetEMail(size\_t *len) const}\\ - Returns a pointer to the SDES e-mail item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetPhone(size\_t *len) const}\\ - Returns a pointer to the SDES phone item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetLocation(size\_t *len) const}\\ - Returns a pointer to the SDES location item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetTool(size\_t *len) const}\\ - Returns a pointer to the SDES tool item of this participant and stores - its length in {\tt len}. - \item {\tt uint8\_t *SDES\_GetNote(size\_t *len) const}\\ - Returns a pointer to the SDES note item of this participant and stores - its length in {\tt len}. - \end{itemize} - - If SDES private item support was enabled at compile-time, the following - member functions are also available: - \begin{itemize} - \item {\tt void SDES\_GotoFirstPrivateValue()}\\ - Starts the iteration over the stored SDES private item prefixes - and their associated values. - \item {\tt bool SDES\_GetNextPrivateValue(uint8\_t **prefix, size\_t *prefixlen, uint8\_t **value, size\_t *valuelen) }\\ - If available, returns {\tt true} and stores the next SDES - private item prefix in {\tt prefix} and its length in - {\tt prefixlen}. The associated value and its length are - then stored in {\tt value} and {\tt valuelen}. Otherwise, - it returns {\tt false}. - \item {\tt bool SDES\_GetPrivateValue(uint8\_t *prefix, size\_t prefixlen, uint8\_t **value, size\_t *valuelen) const}\\ - Looks for the entry which corresponds to the SDES private - item prefix {\tt prefix} with length {\tt prefixlen}. If found, - the function returns {\tt true} and stores the associated - value and its length in {\tt value} and {\tt valuelen} - respectively. - \end{itemize} - - \subsubsection{\tt RTPPacketBuilder}\headerfile{rtppacketbuilder.h} - - This class can be used to build RTP packets and is a bit more - high-level than the {\tt RTPPacket} class: it generates an SSRC - identifier, keeps track of timestamp and sequence number etc. - - The interface is the following: - \begin{itemize} - \item {\tt int Init(size\_t maxpacksize)}\\ - Initializes the builder to only allow packets with a size - below {\tt maxpacksize} - \item {\tt void Destroy()}\\ - Cleans up the builder. - \item {\tt uint32\_t GetPacketCount()}\\ - Returns the number of packets which have been created with - the current SSRC identifier. - \item {\tt uint32\_t GetPayloadOctetCount()}\\ - Returns the number of payload octets which have been generated - with this SSRC identifier. - \item {\tt int SetMaximumPacketSize(size\_t maxpacksize)}\\ - Sets the maximum allowed packet size to {\tt maxpacksize}. - \item {\tt int AddCSRC(uint32\_t csrc)}\\ - Adds a CSRC to the CSRC list which will be stored in the - RTP packets. - \item {\tt int DeleteCSRC(uint32\_t csrc)}\\ - Deletes a CSRC from the list which will be stored in the - RTP packets. - \item {\tt void ClearCSRCList()}\\ - Clears the CSRC list. - \item {\tt int BuildPacket(const void *data, size\_t len)}\\ - Builds a packet with payload {\tt data} and payload length - {\tt len}. The payload type, marker and timestamp increment - used will be those that have been set using the - {\tt SetDefault} functions below. - \item {\tt int BuildPacket(const void *data, size\_t len, - uint8\_t pt, bool mark, uint32\_t timestampinc)}\\ - Builds a packet with payload {\tt data} and payload length - {\tt len}. The payload type will be set to {\tt pt}, the - marker bit to {\tt mark} and after building this packet, - the timestamp will be incremented with {\tt timestamp}. - \item {\tt int BuildPacketEx(const void *data, size\_t len, - uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ - Builds a packet with payload {\tt data} and payload length - {\tt len}. The payload type, marker and timestamp increment - used will be those that have been set using the - {\tt SetDefault} functions below. This packet will also contain - an RTP header extension with identifier {\tt hdrextID} and data - {\tt hdrextdata}. The length of the header extension data - is given by {\tt numhdrextwords} which expresses the length - in a number of $32$-bit words. - \item {\tt int BuildPacketEx(const void *data, size\_t len, - uint8\_t pt, bool mark, uint32\_t timestampinc, - uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ - Builds a packet with payload {\tt data} and payload - length {\tt len}. The payload type will be set to {\tt - pt}, the marker bit to {\tt mark} and after building - this packet, the timestamp will be incremented with {\tt - timestamp}. This packet will also contain an RTP header - extension with identifier {\tt hdrextID} and data {\tt - hdrextdata}. The length of the header extension data is - given by {\tt numhdrextwords} which expresses the length - in a number of $32$-bit words. - \item {\tt uint8\_t *GetPacket()}\\ - Returns a pointer to the last built RTP packet data. - \item {\tt size\_t GetPacketLength()}\\ - Returns the size of the last built RTP packet. - \item {\tt int SetDefaultPayloadType(uint8\_t pt)}\\ - Sets the default payload type to {\tt pt}. - \item {\tt int SetDefaultMark(bool m)}\\ - Sets the default marker bit to {\tt m}. - \item {\tt int SetDefaultTimestampIncrement(uint32\_t timestampinc)}\\ - Sets the default timestamp increment to {\tt timestampinc}. - \item {\tt int IncrementTimestamp(uint32\_t inc)}\\ - This function increments the timestamp with the amount - given by {\tt inc}. This can be useful if, for example, - a packet was not sent because it contained only silence. - Then, this function should be called to increment the - timestamp with the appropriate amount so that the next - packets will still be played at the correct time at - other hosts. - \item {\tt int IncrementTimestampDefault()}\\ - This function increments the timestamp with the amount - given set by the {\tt SetDefaultTimestampIncrement} - member function. This can be useful if, for example, - a packet was not sent because it contained only silence. - Then, this function should be called to increment the - timestamp with the appropriate amount so that the next - packets will still be played at the correct time at - other hosts. - \item {\tt uint32\_t CreateNewSSRC()}\\ - Creates a new SSRC to be used in generated packets. This - will also generate new timestamp and sequence number - offsets. - \item {\tt uint32\_t CreateNewSSRC(RTPSources \&sources)}\\ - Creates a new SSRC to be used in generated packets. This - will also generate new timestamp and sequence number - offsets. The source table {\tt sources} is used to make - sure that the chosen SSRC isn't used by another participant - yet. - \item {\tt uint32\_t GetSSRC()}\\ - Returns the current SSRC identifier. - \item {\tt uint32\_t GetTimestamp()}\\ - Returns the current RTP timestamp. - \item {\tt uint16\_t GetSequenceNumber()}\\ - Returns the current sequence number. - \item {\tt RTPTime GetPacketTime()}\\ - Returns the time at which a packet was generated. This - is not necessarily the time at which the last RTP packet - was generated: if the timestamp increment was zero, the - time is not updated. - \item {\tt uint32\_t GetPacketTimestamp()}\\ - Returns the RTP timestamp which corresponds to the time - returned by the previous function. - \end{itemize} - - \subsubsection{\tt RTCPPacketBuilder}\headerfile{rtcppacketbuilder.h} - - The class {\tt RTCPPacketBuilder} can be used to build RTCP - compound packets. This class is more high-level than the - {\tt RTCPCompoundPacketBuilder} class: it uses the information - of an {\tt RTPPacketBuilder} instance and of a {\tt RTPSources} - instance to automatically generate the next compound packet which should - be sent. It also provides functions to determine when SDES items - other than the CNAME item should be sent. - - Its class interface is the following: - \begin{itemize} - \item {\tt RTCPPacketBuilder(RTPSources \&sources,RTPPacketBuilder \&rtppackbuilder)}\\ - Creates an instance which will use the source table - {\tt sources} and the RTP packet builder {\tt rtppackbuilder} - to determine the information for the next RTCP compound packet. - \item {\tt int Init(size\_t maxpacksize, double timestampunit, const void *cname, size\_t cnamelen)}\\ - Initializes the builder to use the maximum allowed - packet size {\tt maxpacksize}, timestamp unit {\tt - timestampunit} and the SDES CNAME item specified by {\tt - cname} with length {\tt cnamelen}. The timestamp unit - is defined as a time interval divided by the number of - samples in that interval: for $8000 Hz$ audio this would - be $1.0/8000.0$. - \item {\tt void Destroy()}\\ - Cleans up the builder. - \item {\tt int SetTimestampUnit(double tsunit)}\\ - Sets the timestamp unit to be used to {\tt tsunit}. The - timestamp unit is defined as a time interval divided - by the number of samples in that interval: for $8000 Hz$ - audio this would be $1.0/8000.0$. - \item {\tt int SetMaximumPacketSize(size\_t maxpacksize)}\\ - Sets the maximum size allowed size of an RTCP compound - packet to {\tt maxpacksize}. - \item {\tt int SetPreTransmissionDelay(const RTPTime \&delay)}\\ - This function allows you to inform RTCP packet builder about the - delay between sampling the first sample of a packet and - sending the packet. This delay is taken into account when - calculating the relation between RTP timestamp and wallclock - time, used for inter-media synchronization. - \item {\tt int BuildNextPacket(RTCPCompoundPacket **pack)}\\ - Builds the next RTCP compound packet which should be - sent and stores it in {\tt pack}. - \item {\tt int BuildBYEPacket(RTCPCompoundPacket **pack, const void *reason, size\_t reasonlength,bool useSRifpossible = true)}\\ - Builds a BYE packet with reason for leaving - specified by {\tt reason} and length - {\tt reasonlength}. If {\tt useSRifpossible} is set to {\tt true}, - the RTCP compound packet will start with a sender report if - allowed. Otherwise, a receiver report is used. - \item {\tt void SetNameInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES name - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetEMailInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES e-mail - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetLocationInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES location - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetPhoneInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES phone - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetToolInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES tool - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetNoteInterval(int count)}\\ - After all possible sources in the source table have been - processed, the class will check if other SDES items - need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES note - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt int SetLocalName(const void *s, size\_t len)}\\ - Sets the SDES name item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalEMail(const void *s, size\_t len)}\\ - Sets the SDES e-mail item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalLocation(const void *s, size\_t len)}\\ - Sets the SDES location item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalPhone(const void *s, size\_t len)}\\ - Sets the SDES phone item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalTool(const void *s, size\_t len)}\\ - Sets the SDES tool item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalNote(const void *s, size\_t len)}\\ - Sets the SDES note item for the local participant to the value {\tt s} - with length {\tt len}. - \end{itemize} - - \subsubsection{\tt RTPCollisionList}\headerfile{rtpcollisionlist.h} - - This class represents a list of addresses from which SSRC collisions were - detected. Its interface is this: - \begin{itemize} - \item {\tt void Clear()}\\ - Clears the list of addresses. - \item {\tt int UpdateAddress(const RTPAddress *addr, const RTPTime \&receivetime, bool *created)}\\ - Updates the entry for address {\tt addr} to indicate that a collision - was detected at time {\tt receivetime}. If the entry did not exist yet, the - flag {\tt created} is set to {\tt true}, otherwise it is set to {\tt false}. - \item {\tt bool HasAddress(const RTPAddress *addr) const}\\ - Returns {\tt true} if the address {\tt addr} appears in the list. - \item {\tt void Timeout(const RTPTime \¤ttime, const RTPTime \&timeoutdelay)}\\ - Assuming that the current time is given by {\tt currenttime}, this function - times out entries which haven't been updated in the previous time interval - specified by {\tt timeoutdelay}. - \end{itemize} - - \subsubsection{\tt RTCPScheduler}\headerfile{rtcpscheduler.h} - - This class determines when RTCP compound packets should be sent. It has - the following interface: - \begin{itemize} - \item {\tt RTCPScheduler(RTPSources \&sources)}\\ - Creates an instance which will use the source table {\tt RTPSources} to - determine when RTCP compound packets should be scheduled. Note that - for correct operation the {\tt sources} instance should have information - about the own SSRC (added by {\tt CreateOwnSSRC}). - \item {\tt void Reset()}\\ - Resets the scheduler. - \item {\tt void SetParameters(const RTCPSchedulerParams \¶ms)}\\ - Sets the scheduler parameters to be used to {\tt params}. The - {\tt RTCPSchedulerParams} class is described below. - \item {\tt RTCPSchedulerParams GetParameters() const}\\ - Returns the currently used scheduler parameters. - \item {\tt void SetHeaderOverhead(size\_t numbytes)}\\ - Sets the header overhead from underlying protocols (for example UDP and - IP) to {\tt numbytes}. - \item {\tt size\_t GetHeaderOverhead() const}\\ - Returns the currently used header overhead. - \item {\tt void AnalyseIncoming(RTCPCompoundPacket \&rtcpcomppack)}\\ - For each incoming RTCP compound packet, this function has to be - called for the scheduler to work correctly. - \item {\tt void AnalyseOutgoing(RTCPCompoundPacket \&rtcpcomppack)}\\ - For each outgoing RTCP compound packet, this function has to be - called for the scheduler to work correctly. - \item {\tt void ActiveMemberDecrease()}\\ - This function has to be called each time a member times out or - sends a BYE packet. - \item {\tt void ScheduleBYEPacket(size\_t packetsize)}\\ - Asks the scheduler to schedule an RTCP compound packet containing a - BYE packet. The compound packet has size {\tt packetsize}. - \item {\tt RTPTime GetTransmissionDelay()}\\ - Returns the delay after which an RTCP compound will possibly have to - be sent. The {\tt IsTime} member function should be called afterwards to - make sure that it actually is time to send an RTCP compound packet. - \item {\tt bool IsTime()}\\ - This function returns {\tt true} if it's time to send an RTCP compound packet - and {\tt false} otherwise. If the function returns {\tt true} it will also - have calculated the next time at which a packet should be sent, so if it - is called again right away, it will return {\tt false}. - \item {\tt RTPTime CalculateDeterministicInterval(bool sender = false)}\\ - Calculates the deterministic interval at this time. This is used -- together - with a certain multiplier -- to time out members, senders etc. - \end{itemize} - - \Paragraph{Scheduler parameters}\headerfile{rtcpscheduler.h} - - The {\tt RTCPSchedulerParams} class describes the parameters to be used by the - scheduler. Its interface is the following: - \begin{itemize} - \item {\tt int SetRTCPBandwidth(double bw)}\\ - Sets the RTCP bandwidth to be used to {\tt bw} (in bytes per second). - \item {\tt double GetRTCPBandwidth() const}\\ - Returns the used RTCP bandwidth in bytes per second. - \item {\tt int SetSenderBandwidthFraction(double fraction)}\\ - Sets the fraction of the RTCP bandwidth reserved for senders - to {\tt fraction}. - \item {\tt double GetSenderBandwidthFraction() const}\\ - Returns the fraction of the RTCP bandwidth reserved for senders. - \item {\tt int SetMinimumTransmissionInterval(const RTPTime \&t)}\\ - Sets the minimum (deterministic) interval between RTCP compound packets - to {\tt t}. - \item {\tt RTPTime GetMinimumTransmissionInterval() const}\\ - Returns the minimum RTCP transmission interval. - \item {\tt void SetUseHalfAtStartup(bool usehalf)}\\ - If {\tt usehalf} is {\tt true}, only use half the minimum interval - before sending the first RTCP compound packet. - \item {\tt bool GetUseHalfAtStartup() const}\\ - Returns if only half the minimum interval should be used before sending - the first RTCP compound packet. - \item {\tt void SetRequestImmediateBYE(bool v)}\\ - If {\tt v} is {\tt true}, the scheduler will schedule a BYE packet - to be sent immediately if allowed. - \item {\tt bool GetRequestImmediateBYE()}\\ - Returns if the scheduler will schedule a BYE packet to be sent immediately - if allowed. - \end{itemize} - - The parameters default to the following values: - \begin{itemize} - \item RTCP bandwidth: 1000 bytes per second - \item Sender bandwidth fraction: 25\% - \item Minimum interval: 5 seconds - \item Use half minimum interval at startup: yes - \item Send BYE packet immediately if possible: yes - \end{itemize} - - \subsubsection{\tt RTPSessionParams}\headerfile{rtpsessionparams.h} - \label{rtpsessionparams} - - Describes the parameters for to be used by an {\tt RTPSession} - instance. Note that the own timestamp unit must be set to a - valid number, otherwise the session can't be created. - The interface of this class is the following: - \begin{itemize} - \item {\tt int SetUsePollThread(bool usethread)}\\ - If {\tt usethread} is {\tt true}, the session will - use a poll thread to automatically process incoming - data and to send RTCP packets when necessary. - \item {\tt bool IsUsingPollThread() const}\\ - Returns whether the session should use a poll thread - or not. - \item {\tt void SetMaximumPacketSize(size\_t max)}\\ - Sets the maximum allowed packet size for the session. - \item {\tt size\_t GetMaximumPacketSize() const}\\ - Returns the maximum allowed packet size. - \item {\tt void SetAcceptOwnPackets(bool accept)}\\ - If the argument is {\tt true}, the session should accept - its own packets and store them accordingly in the source - table. - \item {\tt bool AcceptOwnPackets() const}\\ - Returns {\tt true} if the session should accept its - own packets. - \item {\tt void SetReceiveMode(RTPTransmitter::ReceiveMode recvmode)}\\ - Sets the receive mode to be used by the session. - \item {\tt RTPTransmitter::ReceiveMode GetReceiveMode() const}\\ - Returns the currently set receive mode. - \item {\tt void SetOwnTimestampUnit(double tsunit)}\\ - Sets the timestamp unit for our own data. The timestamp - unit is defined as a time interval in seconds divided by - the number of samples in that interval. For example, for - $8000 Hz audio$, the timestamp unit would be $1.0/8000.0$. - Since this value is initially set to an illegal value, the - user must set this to an allowed value to be able to create - a session. - \item {\tt double GetOwnTimestampUnit() const}\\ - Returns the currently set timestamp unit. - \item {\tt void SetResolveLocalHostname(bool v)}\\ - If {\tt v} is set to {\tt true}, the session will ask - the transmitter to find a host name based upon the IP - addresses in its list of local IP addresses. If set to - {\tt false}, a call to {\tt gethostname} or something - similar will be used to find the local hostname. Note - that the first method might take some time. - \item {\tt bool GetResolveLocalHostname() const}\\ - Returns whether the local hostname should be determined - from the transmitter's list of local IP addresses or not. - \item {\tt void SetProbationType(RTPSources::ProbationType probtype)}\\ - If probation support is enabled, this function sets the - probation type to be used. - \item {\tt RTPSources::ProbationType GetProbationType() const}\\ - Returns the probation type which will be used. - \item {\tt void SetSessionBandwidth(double sessbw)}\\ - Sets the session bandwidth in bytes per second. - \item {\tt double GetSessionBandwidth() const}\\ - Returns the session bandwidth in bytes per second. - \item {\tt void SetControlTrafficFraction(double frac)}\\ - Sets the fraction of the session bandwidth to be used - for control traffic. - \item {\tt double GetControlTrafficFraction() const}\\ - Returns the fraction of the session bandwidth that will - be used for control traffic. - \item {\tt void SetSenderControlBandwidthFraction(double frac)}\\ - Sets the minimum fraction of the control traffic that - will be used by senders. - \item {\tt double GetSenderControlBandwidthFraction() const}\\ - Returns the minimum fraction of the control traffic that - will be used by senders. - \item {\tt void SetMinimumRTCPTransmissionInterval(const RTPTime \&t)}\\ - Set the minimal time interval between sending RTCP packets. - \item {\tt RTPTime GetMinimumRTCPTransmissionInterval() const}\\ - Returns the minimal time interval between sending RTCP packets. - \item {\tt void SetUseHalfRTCPIntervalAtStartup(bool usehalf)}\\ - If {\tt usehalf} is set to {\tt true}, the session will only - wait half of the calculated RTCP interval before sending its - first RTCP packet. - \item {\tt bool GetUseHalfRTCPIntervalAtStartup() const}\\ - Returns whether the session will only - wait half of the calculated RTCP interval before sending its - first RTCP packet or not. - \item {\tt void SetRequestImmediateBYE(bool v) }\\ - If {\tt v} is {\tt true}, the session will send a BYE - packet immediately if this is allowed. - \item {\tt bool GetRequestImmediateBYE() const}\\ - Returns whether the session should send a BYE packet immediately - (if allowed) or not. - \item {\tt void SetSenderReportForBYE(bool v)}\\ - When sending a BYE packet, this indicates whether it will be part - of an RTCP compound packet that begins with a sender report or a - receiver report. Of course, a sender report will only be used if - allowed. - \item {\tt bool GetSenderReportForBYE() const}\\ - Returns {\tt true} if a BYE packet will be sent in an RTCP compound - packet which starts with a sender report. If a receiver report will - be used, the function returns {\tt false}. - \item {\tt void SetSenderTimeoutMultiplier(double m)}\\ - Sets the multiplier to be used when timing out senders. - \item {\tt double GetSenderTimeoutMultiplier() const}\\ - Returns the multiplier to be used when timing out senders. - \item {\tt void SetSourceTimeoutMultiplier(double m)}\\ - Sets the multiplier to be used when timing out members. - \item {\tt double GetSourceTimeoutMultiplier() const}\\ - Returns the multiplier to be used when timing out members. - \item {\tt void SetBYETimeoutMultiplier(double m)}\\ - Sets the multiplier to be used when timing out a member after - it has sent a BYE packet. - \item {\tt double GetBYETimeoutMultiplier() const}\\ - Returns the multiplier to be used when timing out a member after - it has sent a BYE packet. - \item {\tt void SetCollisionTimeoutMultiplier(double m)}\\ - Sets the multiplier to be used when timing out entries - in the collision table. - \item {\tt double GetCollisionTimeoutMultiplier() const}\\ - Returns the multiplier to be used when timing out entries - in the collision table. - \item {\tt void SetNoteTimeoutMultiplier(double m)}\\ - Sets the multiplier to be used when timing out SDES NOTE - information. - \item {\tt double GetNoteTimeoutMultiplier() const}\\ - Returns the multiplier to be used when timing out SDES NOTE - information. - \end{itemize} - - The default values for the parameters are the following: - \begin{itemize} - \item Use poll thread: yes - \item Maximum packet size: 1400 bytes - \item Accept own packets: no - \item Receive mode: accept all packets - \item Resolve local hostname: no - \item Probation type: {\tt ProbationStore} - \item Session bandwidth: 10000 bytes per second - \item Control traffic fraction: 5\% - \item Sender's fraction of control traffic: 25\% - \item Minimum RTCP interval: 5 seconds - \item Use half minimum interval at startup: yes - \item Send BYE packet immediately if allowed: yes - \item Use sender report for BYE packet: yes - \item Sender timeout multiplier: 2 - \item Member timeout multiplier: 5 - \item Timeout multiplier after BYE packet: 1 - \item Timeout multiplier for entries in collision table: 10 - \item Timeout multiplier for SDES NOTE items: 25 - \end{itemize} - - \subsubsection{\tt RTPSession}\headerfile{rtpsession.h} - \label{rtpsession} - - For most RTP based applications, the {\tt RTPSession} class - will probably be the one to use. It handles the RTCP part - completely internally, so the user can focus on sending and - receiving the actual data. - - Note that the {\tt RTPSession} class is not meant to be thread - safe. The user should use some kind of locking mechanism to prevent - different threads from using the same {\tt RTPSession} instance. - - The {\tt RTPSession} class interface is the following: - \begin{itemize} - \item {\tt RTPSession(RTPTransmitter::Transmission\-Protocol proto = RTP\-Trans\-mitter::IPv4\-UDPProto)}\\ - Creates an instance which will use the transmission component given - by {\tt proto}. When {\tt proto} indicates the a user-defined - transmitter, the {\tt NewUserDefinedTransmitter()} member - function should be implemented. - \item {\tt int Create(const RTPSessionParams \&sessparams, const RTPTransmissionParams *transparams = 0)}\\ - Creates the session with parameters {\tt sessparams} and transmission parameters {\tt transparams}. - If {\tt transparams} is NULL, the defaults for the requested transmitter will - be used. - \item {\tt void Destroy()}\\ - Leaves the session without sending a BYE packet. - \item {\tt void BYEDestroy(const RTPTime \&maxwaittime, const void *reason, size\_t reasonlength)}\\ - Sends a BYE packet and leaves the session. At most a time {\tt maxwaittime} will - be waited to send the BYE packet. If this time expires, the session will be - left without sending a BYE packet. The BYE packet will contain as reason for - leaving {\tt reason} with length {\tt reasonlength}. - \item {\tt bool IsActive()}\\ - Returns whether the session has been created or not. - \item {\tt uint32\_t GetLocalSSRC()}\\ - Returns our own SSRC. - \item {\tt int AddDestination(const RTPAddress \&addr)}\\ - Adds {\tt addr} to the list of destinations. - \item {\tt int DeleteDestination(const RTPAddress \&addr)}\\ - Deletes {\tt addr} from the list of destinations. - \item {\tt void ClearDestinations()}\\ - Clears the list of destination. - \item {\tt bool SupportsMulticasting()}\\ - Returns {\tt true} if multicasting is supported. - \item {\tt int JoinMulticastGroup(const RTPAddress \&addr)}\\ - Joins the multicast group specified by {\tt addr}. - \item {\tt int LeaveMulticastGroup(const RTPAddress \&addr)}\\ - Leaves the multicast group specified by {\tt addr}. - \item {\tt void LeaveAllMulticastGroups()}\\ - Leaves all multicast groups. - \item {\tt int SendPacket(const void *data, size\_t len)}\\ - Sends the RTP packet with payload {\tt data} which has length {\tt len}. - The used payload type, marker and timestamp increment will be those that - have been set using the {\tt SetDefault} member functions. - \item {\tt int SendPacket(const void *data, size\_t len, - uint8\_t pt, bool mark, uint32\_t timestampinc)}\\ - Sends the RTP packet with payload {\tt data} which has length {\tt len}. - It will use payload type {\tt pt}, marker {\tt mark} and after the packet - has been built, the timestamp will be incremented by {\tt timestampinc}. - \item {\tt int SendPacketEx(const void *data, size\_t len, - uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ - Sends the RTP packet with payload {\tt data} which has length {\tt len}. - The packet will contain a header extension with identifier {\tt hdrextID} and - containing data {\tt hdrextdata}. The length of this data is given by - {\tt numhdrextwords} and is specified in a number of 32-bit words. - The used payload type, marker and timestamp increment will be those that - have been set using the {\tt SetDefault} member functions. - \item {\tt int SendPacketEx(const void *data, size\_t len, - uint8\_t pt, bool mark, uint32\_t timestampinc, - uint16\_t hdrextID, const void *hdrextdata, size\_t numhdrextwords)}\\ - Sends the RTP packet with payload {\tt data} which has length {\tt len}. - It will use payload type {\tt pt}, marker {\tt mark} and after the packet - has been built, the timestamp will be incremented by {\tt timestampinc}. - The packet will contain a header extension with identifier {\tt hdrextID} and - containing data {\tt hdrextdata}. The length of this data is given by - {\tt numhdrextwords} and is specified in a number of 32-bit words. - \item {\tt int SetDefaultPayloadType(uint8\_t pt)}\\ - Sets the default payload type for RTP packets to {\tt pt}. - \item {\tt int SetDefaultMark(bool m)}\\ - Sets the default marker for RTP packets to {\tt m}. - \item {\tt int SetDefaultTimestampIncrement(uint32\_t timestampinc)}\\ - Sets the default value to increment the timestamp with to - {\tt timestampinc}. - \item {\tt int IncrementTimestamp(uint32\_t inc)}\\ - This function increments the timestamp with the amount - given by {\tt inc}. This can be useful if, for example, - a packet was not sent because it contained only silence. - Then, this function should be called to increment the - timestamp with the appropriate amount so that the next - packets will still be played at the correct time at - other hosts. - \item {\tt int IncrementTimestampDefault()}\\ - This function increments the timestamp with the amount - given set by the {\tt SetDefaultTimestampIncrement} - member function. This can be useful if, for example, - a packet was not sent because it contained only silence. - Then, this function should be called to increment the - timestamp with the appropriate amount so that the next - packets will still be played at the correct time at - other hosts. - \item {\tt int SetPreTransmissionDelay(const RTPTime \&delay)}\\ - This function allows you to inform the library about the - delay between sampling the first sample of a packet and - sending the packet. This delay is taken into account when - calculating the relation between RTP timestamp and wallclock - time, used for inter-media synchronization. - \item {\tt RTPTransmissionInfo *GetTransmissionInfo()}\\ - This function returns an instance of a subclass of {\tt RTPTransmissionInfo} - which will give some additional information about the transmitter - (a list of local IP addresses for example). The user - has to delete the returned instance when it is no longer needed. - \item {\tt int Poll()}\\ - If you're not using the poll thread, this function - must be called regularly to process incoming data - and to send RTCP data when necessary. - \item {\tt int WaitForIncomingData(const RTPTime \&delay,bool *dataavailable = 0)}\\ - Waits at most a time {\tt delay} until incoming data has - been detected. Only works when you're not using the poll - thread. If {\tt dataavailable} is not {\tt NULL}, it should - be set to {\tt true} if data was actually read and to {\tt false} - otherwise. - \item {\tt int AbortWait()}\\ - If the previous function has been called, this one aborts - the waiting. Only works when you're not using the poll - thread. - \item {\tt RTPTime GetRTCPDelay()}\\ - Returns the time interval after which an RTCP compound - packet may have to be sent. Only works when you're not using - the poll thread. - \item {\tt int BeginDataAccess()}\\ - The following member functions (till {\tt EndDataAccess}) - need to be accessed between a call to {\tt BeginDataAccess} - and {\tt EndDataAccess}. The {\tt BeginDataAccess} makes - sure that the poll thread won't access the source table - at the same time. When the {\tt EndDataAccess} is called, - the lock on the source table is freed again. - \item {\tt bool GotoFirstSource()}\\ - Starts the iteration over the participants by going to the - first member in the table. If a member was found, the function - returns {\tt true}, otherwise it returns {\tt false}. - \item {\tt bool GotoNextSource()}\\ - Sets the current source to be the next source in the table. - If we're already at the last source, the function returns - {\tt false}, otherwise it returns {\tt true}. - \item {\tt bool GotoPreviousSource()}\\ - Sets the current source to be the previous source in the table. - If we're at the first source, the function returns - {\tt false}, otherwise it returns {\tt true}. - \item {\tt bool GotoFirstSourceWithData()}\\ - Sets the current source to be the first source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt bool GotoNextSourceWithData()}\\ - Sets the current source to be the next source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt bool GotoPreviousSourceWithData()}\\ - Sets the current source to be the previous source in the table - which has {\tt RTPPacket} instances that we haven't extracted - yet. If no such member was found, the function returns {\tt false}, - otherwise it returns {\tt true}. - \item {\tt RTPSourceData *GetCurrentSourceInfo()}\\ - Returns the {\tt RTPSourceData} instance for the currently - selected participant. - \item {\tt RTPSourceData *GetSourceInfo(uint32\_t ssrc)}\\ - Returns the {\tt RTPSourceData} instance for the participant - identified by {\tt ssrc}, or NULL if no such entry exists. - \item {\tt RTPPacket *GetNextPacket()}\\ - Extracts the next packet from the received packets queue - of the current participant. - \item {\tt int EndDataAccess()}\\ - See {\tt BeginDataAccess}. - \item {\tt int SetReceiveMode(RTPTransmitter::ReceiveMode m)}\\ - Sets the receive mode to {\tt m}, which can be one of the - following: - \begin{itemize} - \item {\tt RTPTransmitter::AcceptAll}\\ - All incoming data is accepted, no matter where it originated - from. - \item {\tt RTPTransmitter::AcceptSome}\\ - Only data coming from specific sources will be accepted. - \item {\tt RTPTransmitter::IgnoreSome}\\ - All incoming data is accepted, except for data coming from - a specific set of sources. - \end{itemize} - Note that when the receive mode is changed, the list of addressed - to be ignored or accepted will be cleared. - \item {\tt int AddToIgnoreList(const RTPAddress \&addr)}\\ - Adds {\tt addr} to the list of addresses to ignore. - \item {\tt int DeleteFromIgnoreList(const RTPAddress \&addr)}\\ - Deletes {\tt addr} from the list of addresses to ignore. - \item {\tt void ClearIgnoreList()}\\ - Clears the list of addresses to ignore. - \item {\tt int AddToAcceptList(const RTPAddress \&addr)}\\ - Adds {\tt addr} to the list of addresses to accept. - \item {\tt int DeleteFromAcceptList(const RTPAddress \&addr)}\\ - Deletes {\tt addr} from the list of addresses to accept. - \item {\tt void ClearAcceptList()}\\ - Clears the list of addresses to accept. - \item {\tt int SetMaximumPacketSize(size\_t s)}\\ - Sets the maximum allowed packet size to {\tt s}. - \item {\tt int SetSessionBandwidth(double bw)}\\ - Sets the session bandwidth to {\tt bw}, which is specified - in bytes per second. - \item {\tt int SetTimestampUnit(double u)}\\ - Sets our own timestamp unit to {\tt u}. The timestamp unit - is defined as a time interval divided by the number of - samples in that interval: for $8000 Hz$ audio this would - be $1.0/8000.0$. - \item {\tt void SetNameInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES name - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetEMailInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES e-mail - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetLocationInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES location - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetPhoneInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES phone - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetToolInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES tool - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt void SetNoteInterval(int count)}\\ - After all possible sources in the source table have been - processed, the RTCP packet builder will check if other (non-CNAME) SDES - items need to be sent. If {\tt count} is zero or negative, nothing - will happen. If {\tt count} is positive, an SDES note - item will be added after the sources in the source table have - been processed {\tt count} times. - \item {\tt int SetLocalName(const void *s, size\_t len)}\\ - Sets the SDES name item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalEMail(const void *s, size\_t len)}\\ - Sets the SDES e-mail item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalLocation(const void *s, size\_t len)}\\ - Sets the SDES location item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalPhone(const void *s, size\_t len)}\\ - Sets the SDES phone item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalTool(const void *s, size\_t len)}\\ - Sets the SDES tool item for the local participant to the value {\tt s} - with length {\tt len}. - \item {\tt int SetLocalNote(const void *s, size\_t len)}\\ - Sets the SDES note item for the local participant to the value {\tt s} - with length {\tt len}. - \end{itemize} - - In case you specified in the constructor that you want to use your own - transmission component, you should override the following function: - \begin{itemize} - \item {\tt RTPTransmitter *NewUserDefinedTransmitter()} - \end{itemize} - The {\tt RTPTransmitter} instance returned by this function will then - be used to send and receive RTP and RTCP packets. Note that when the - session is destroyed, this {\tt RTPTransmitter} instance will be destroyed - with a {\tt delete} call. - - By inheriting your own class from {\tt RTPSession} and overriding - one or more of the functions below, certain events can be detected: - \begin{itemize} - \item {\tt void OnRTPPacket(RTPPacket *pack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an incoming RTP packet is about to be processed. - \item {\tt void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an incoming RTCP packet is about to be processed. - \item {\tt void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)}\\ - Is called when an SSRC collision was detected. The instance - {\tt srcdat} is the one present in the table, the address - {\tt senderaddress} is the one that collided with one of the - addresses and {\tt isrtp} indicates against which address of - {\tt srcdat} the check failed. - \item {\tt void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, - const uint8\_t *cname, size\_t cnamelength)}\\ - Is called when another CNAME was received than the one - already present for source {\tt srcdat}. - \item {\tt void OnNewSource(RTPSourceData *srcdat)}\\ - Is called when a new entry {\tt srcdat} is added to the source - table. - \item {\tt void OnRemoveSource(RTPSourceData *srcdat)}\\ - Is called when the entry {\tt srcdat} is about to be - deleted from the source table. - \item {\tt void OnTimeout(RTPSourceData *srcdat)}\\ - Is called when participant {\tt srcdat} is timed out. - \item {\tt void OnBYETimeout(RTPSourceData *srcdat)}\\ - Is called when participant {\tt srcdat} is timed after - having sent a BYE packet. - \item {\tt void OnBYEPacket(RTPSourceData *srcdat)}\\ - Is called when a BYE packet has been processed for source - {\tt srcdat}. - \item {\tt void OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - In called when an RTCP APP packet {\tt apppacket} has been received - at time {\tt receivetime} from address {\tt senderaddress}. - \item {\tt void OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an unknown RTCP packet type was detected. - \item {\tt void OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime \&receivetime, - const RTPAddress *senderaddress)}\\ - Is called when an unknown packet format for a known packet - type was detected. - \item {\tt void OnNoteTimeout(RTPSourceData *srcdat)}\\ - Is called when the SDES NOTE item for source {\tt srcdat} - has been timed out. - \item {\tt void OnSendRTCPCompoundPacket(RTCPCompoundPacket *pack)}\\ - Is called when an RTCP compound packet has just been sent. Useful - to inspect outgoing RTCP data. - \item {\tt void OnPollThreadError(int errcode)}\\ - Is called when error {\tt errcode} was detected in the - poll thread. - \item {\tt void OnPollThreadStep()}\\ - Is called each time the poll thread loops. This happens when - incoming data was detected or when its time to send an RTCP - compound packet. - \end{itemize} - - \section{Contact} - - If you have any questions, remarks or requests about the library or - if you think you've discovered a bug, you can contact me at: - \begin{verbatim} - jori@lumumba.uhasselt.be - \end{verbatim} - - The home page of the library is: - \begin{verbatim} - http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html - \end{verbatim} - - There is also a mailing list for the library. To subscribe to the list, - send an e-mail with the text {\tt subscribe jrtplib} as the message body (not - the subject) to {\tt majordomo@edm.uhasselt.be} and you'll receive further - instructions. - -\end{document} - diff --git a/examples/Makefile.am b/examples/Makefile.am index f3da73e..d62a796 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,9 +1,10 @@ -noinst_PROGRAMS = example1 example2 example3 example4 +noinst_PROGRAMS = example1 example2 example3 example4 example5 example1_SOURCES = example1.cpp example2_SOURCES = example2.cpp example3_SOURCES = example3.cpp example4_SOURCES = example4.cpp +example5_SOURCES = example5.cpp INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ diff --git a/examples/Makefile.in b/examples/Makefile.in index 9b55a03..fe5f57d 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) $(example4_SOURCES) +SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) $(example4_SOURCES) $(example5_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -39,7 +39,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \ - example3$(EXEEXT) example4$(EXEEXT) + example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -65,6 +65,10 @@ am_example4_OBJECTS = example4.$(OBJEXT) example4_OBJECTS = $(am_example4_OBJECTS) example4_LDADD = $(LDADD) example4_DEPENDENCIES = ../src/.libs/libjrtp.a +am_example5_OBJECTS = example5.$(OBJEXT) +example5_OBJECTS = $(am_example5_OBJECTS) +example5_LDADD = $(LDADD) +example5_DEPENDENCIES = ../src/.libs/libjrtp.a DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -77,9 +81,9 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \ - $(example4_SOURCES) + $(example4_SOURCES) $(example5_SOURCES) DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \ - $(example3_SOURCES) $(example4_SOURCES) + $(example3_SOURCES) $(example4_SOURCES) $(example5_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -146,9 +150,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -201,6 +207,7 @@ example1_SOURCES = example1.cpp example2_SOURCES = example2.cpp example3_SOURCES = example3.cpp example4_SOURCES = example4.cpp +example5_SOURCES = example5.cpp INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ all: all-am @@ -255,6 +262,9 @@ example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES) example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES) @rm -f example4$(EXEEXT) $(CXXLINK) $(example4_LDFLAGS) $(example4_OBJECTS) $(example4_LDADD) $(LIBS) +example5$(EXEEXT): $(example5_OBJECTS) $(example5_DEPENDENCIES) + @rm -f example5$(EXEEXT) + $(CXXLINK) $(example5_LDFLAGS) $(example5_OBJECTS) $(example5_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -266,6 +276,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example5.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ diff --git a/examples/example1.cpp b/examples/example1.cpp index e0e2d15..f90df9f 100644 --- a/examples/example1.cpp +++ b/examples/example1.cpp @@ -124,7 +124,7 @@ int main(void) // we don't longer need the packet, so // we'll delete it - delete pack; + sess.DeletePacket(pack); } } while (sess.GotoNextSourceWithData()); } diff --git a/examples/example2.cpp b/examples/example2.cpp index a682c1f..30b8471 100644 --- a/examples/example2.cpp +++ b/examples/example2.cpp @@ -65,15 +65,16 @@ int main(void) { do { - RTPPacket *packet = session.GetNextPacket(); - if (packet) + RTPPacket *packet; + + while ((packet = session.GetNextPacket()) != 0) { std::cout << "Got packet with " << "extended sequence number " << packet->GetExtendedSequenceNumber() << " from SSRC " << packet->GetSSRC() << std::endl; - delete packet; + session.DeletePacket(packet); } } while (session.GotoNextSource()); } diff --git a/examples/example3.cpp b/examples/example3.cpp index 53ee52e..ee852bc 100644 --- a/examples/example3.cpp +++ b/examples/example3.cpp @@ -150,8 +150,7 @@ int main(void) #endif // WIN32 MyRTPSession sess; - uint16_t portbase,destport; - uint32_t destip; + uint16_t portbase; std::string ipstr; int status,i,num; @@ -199,7 +198,7 @@ int main(void) // we don't longer need the packet, so // we'll delete it - delete pack; + sess.DeletePacket(pack); } } while (sess.GotoNextSourceWithData()); } diff --git a/examples/example4.cpp b/examples/example4.cpp index 95a33ae..56d03f5 100644 --- a/examples/example4.cpp +++ b/examples/example4.cpp @@ -66,7 +66,7 @@ void MyRTPSession::OnPollThreadStep() while ((pack = GetNextPacket()) != NULL) { ProcessRTPPacket(*srcdat,*pack); - delete pack; + DeletePacket(pack); } } while (GotoNextSourceWithData()); } @@ -92,10 +92,9 @@ int main(void) #endif // WIN32 MyRTPSession sess; - uint16_t portbase,destport; - uint32_t destip; + uint16_t portbase; std::string ipstr; - int status,i,num; + int status,num; // First, we'll ask for the necessary information diff --git a/examples/example5.cpp b/examples/example5.cpp new file mode 100644 index 0000000..63ed042 --- /dev/null +++ b/examples/example5.cpp @@ -0,0 +1,223 @@ +/* + This is a modified version of example1.cpp to illustrate the use of a memory + manager. +*/ + +#include "rtpsession.h" +#include "rtppacket.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtpsessionparams.h" +#include "rtperrors.h" +#include "rtpmemorymanager.h" +#ifndef WIN32 + #include + #include +#else + #include +#endif // WIN32 +#include +#include +#include +#include + +// +// This function checks if there was a RTP error. If so, it displays an error +// message and exists. +// + +void checkerror(int rtperr) +{ + if (rtperr < 0) + { + std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl; + exit(-1); + } +} + +// +// The main routine +// + +#ifdef RTP_SUPPORT_THREAD + +class MyMemoryManager : public RTPMemoryManager +{ +public: + MyMemoryManager() + { + mutex.Init(); + alloccount = 0; + freecount = 0; + } + ~MyMemoryManager() + { + std::cout << "alloc: " << alloccount << " free: " << freecount << std::endl; + } + void *AllocateBuffer(size_t numbytes, int memtype) + { + mutex.Lock(); + void *buf = malloc(numbytes); + std::cout << "Allocated " << numbytes << " bytes at location " << buf << " (memtype = " << memtype << ")" << std::endl; + alloccount++; + mutex.Unlock(); + return buf; + } + + void FreeBuffer(void *p) + { + mutex.Lock(); + std::cout << "Freeing block " << p << std::endl; + freecount++; + free(p); + mutex.Unlock(); + } +private: + int alloccount,freecount; + JMutex mutex; +}; + +#else + +class MyMemoryManager : public RTPMemoryManager +{ +public: + MyMemoryManager() + { + alloccount = 0; + freecount = 0; + } + ~MyMemoryManager() + { + std::cout << "alloc: " << alloccount << " free: " << freecount << std::endl; + } + void *AllocateBuffer(size_t numbytes, int memtype) + { + void *buf = malloc(numbytes); + std::cout << "Allocated " << numbytes << " bytes at location " << buf << " (memtype = " << memtype << ")" << std::endl; + alloccount++; + return buf; + } + + void FreeBuffer(void *p) + { + std::cout << "Freeing block " << p << std::endl; + freecount++; + free(p); + } +private: + int alloccount,freecount; +}; + +#endif // RTP_SUPPORT_THREAD + +int main(void) +{ +#ifdef WIN32 + WSADATA dat; + WSAStartup(MAKEWORD(2,2),&dat); +#endif // WIN32 + + MyMemoryManager mgr; + RTPSession sess(&mgr); + uint16_t portbase,destport; + uint32_t destip; + std::string ipstr; + int status,i,num; + + // First, we'll ask for the necessary information + + std::cout << "Enter local portbase:" << std::endl; + std::cin >> portbase; + std::cout << std::endl; + + std::cout << "Enter the destination IP address" << std::endl; + std::cin >> ipstr; + destip = inet_addr(ipstr.c_str()); + if (destip == INADDR_NONE) + { + std::cerr << "Bad IP address specified" << std::endl; + return -1; + } + + // The inet_addr function returns a value in network byte order, but + // we need the IP address in host byte order, so we use a call to + // ntohl + destip = ntohl(destip); + + std::cout << "Enter the destination port" << std::endl; + std::cin >> destport; + + std::cout << std::endl; + std::cout << "Number of packets you wish to be sent:" << std::endl; + std::cin >> num; + + // Now, we'll create a RTP session, set the destination, send some + // packets and poll for incoming data. + + RTPUDPv4TransmissionParams transparams; + RTPSessionParams sessparams; + + // IMPORTANT: The local timestamp unit MUST be set, otherwise + // RTCP Sender Report info will be calculated wrong + // In this case, we'll be sending 10 samples each second, so we'll + // put the timestamp unit to (1.0/10.0) + sessparams.SetOwnTimestampUnit(1.0/10.0); + + sessparams.SetAcceptOwnPackets(true); + transparams.SetPortbase(portbase); + status = sess.Create(sessparams,&transparams); + checkerror(status); + + RTPIPv4Address addr(destip,destport); + + status = sess.AddDestination(addr); + checkerror(status); + + for (i = 1 ; i <= num ; i++) + { + printf("\nSending packet %d/%d\n",i,num); + + // send the packet + status = sess.SendPacket((void *)"1234567890",10,0,false,10); + checkerror(status); + + sess.BeginDataAccess(); + + // check incoming packets + if (sess.GotoFirstSourceWithData()) + { + do + { + RTPPacket *pack; + + while ((pack = sess.GetNextPacket()) != NULL) + { + // You can examine the data here + printf("Got packet !\n"); + + // we don't longer need the packet, so + // we'll delete it + sess.DeletePacket(pack); + } + } while (sess.GotoNextSourceWithData()); + } + + sess.EndDataAccess(); + +#ifndef RTP_SUPPORT_THREAD + status = sess.Poll(); + checkerror(status); +#endif // RTP_SUPPORT_THREAD + + RTPTime::Wait(RTPTime(1,0)); + } + + sess.BYEDestroy(RTPTime(10,0),0,0); + +#ifdef WIN32 + WSACleanup(); +#endif // WIN32 + return 0; +} + diff --git a/jrtplib.dsp b/jrtplib.dsp index 6f30973..793c76d 100644 --- a/jrtplib.dsp +++ b/jrtplib.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.2.0\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.2.1\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD BASE RSC /l 0x813 /d "NDEBUG" # ADD RSC /l 0x813 /d "NDEBUG" BSC32=bscmake.exe @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.2.0\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.2.1\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD BASE RSC /l 0x813 /d "_DEBUG" # ADD RSC /l 0x813 /d "_DEBUG" BSC32=bscmake.exe @@ -387,6 +387,14 @@ SOURCE=.\src\rtpudpv4transmitter.h SOURCE=.\src\rtpudpv6transmitter.h # End Source File +# Begin Source File + +SOURCE=.\src\rtpmemorymanager.h +# End Source File +# Begin Source File + +SOURCE=.\src\rtpmemoryobject.h +# End Source File # End Group # End Target # End Project diff --git a/jrtplib.vcproj b/jrtplib.vcproj index bd7e235..bec8bb8 100644 --- a/jrtplib.vcproj +++ b/jrtplib.vcproj @@ -41,7 +41,7 @@ + + + + diff --git a/jrtplib_wce.vcproj b/jrtplib_wce.vcproj index c32f971..e07dc17 100644 --- a/jrtplib_wce.vcproj +++ b/jrtplib_wce.vcproj @@ -40,7 +40,7 @@ Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" - AdditionalIncludeDirectories="../jthread-1.2.0/src" + AdditionalIncludeDirectories="../jthread-1.2.1/src" PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE" MinimalRebuild="true" RuntimeLibrary="3" @@ -115,7 +115,7 @@ Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" - AdditionalIncludeDirectories="../jthread-1.2.0/src" + AdditionalIncludeDirectories="../jthread-1.2.1/src" PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE" RuntimeLibrary="2" UsePrecompiledHeader="0" @@ -474,6 +474,14 @@ RelativePath=".\src\rtpudpv6transmitter.h" > + + + + diff --git a/jrtplib_wce5.sln b/jrtplib_wce5.sln new file mode 100644 index 0000000..9aa97af --- /dev/null +++ b/jrtplib_wce5.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib_wce5", "jrtplib_wce5.vcproj", "{EE7B2B39-F807-4BD2-8744-152F5C1C6951}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/jrtplib_wce5.vcproj b/jrtplib_wce5.vcproj new file mode 100644 index 0000000..3263626 --- /dev/null +++ b/jrtplib_wce5.vcproj @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index f82f050..df3bcc9 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -120,9 +120,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/src/Makefile.am b/src/Makefile.am index 533cf2c..20f362f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.6.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -29,6 +29,7 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ + rtpmemorymanager.h rtpmemoryobject.h \ extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 diff --git a/src/Makefile.in b/src/Makefile.in index c8790bf..2190d52 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -160,9 +160,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -229,7 +231,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.5.2 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release 3.6.0 @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ @@ -243,6 +245,7 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ + rtpmemorymanager.h rtpmemoryobject.h \ extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in diff --git a/src/extratransmitters/rtpfaketransmitter.cpp b/src/extratransmitters/rtpfaketransmitter.cpp index a0d6ad7..33f66d2 100644 --- a/src/extratransmitters/rtpfaketransmitter.cpp +++ b/src/extratransmitters/rtpfaketransmitter.cpp @@ -17,7 +17,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2004 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair @@ -51,6 +51,7 @@ #include "rtptimeutilities.h" #include +#include #include #include #include @@ -92,7 +93,7 @@ #define WAITMUTEX_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPFakeTransmitter::RTPFakeTransmitter() +RTPFakeTransmitter::RTPFakeTransmitter(RTPMemoryManager *mgr ) : RTPTransmitter(mgr), destinations(mgr,RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT),acceptignoreinfo(mgr,RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; init = false; @@ -136,8 +137,8 @@ int RTPFakeTransmitter::Init(bool tsafe) int RTPFakeTransmitter::Create(size_t maximumpacketsize,const RTPTransmissionParams *transparams) { - struct sockaddr_in addr; - int status; +// struct sockaddr_in addr; +// int status; if (!init) return ERR_RTP_FAKETRANS_NOTINIT; @@ -153,7 +154,7 @@ int RTPFakeTransmitter::Create(size_t maximumpacketsize,const RTPTransmissionPar // Obtain transmission parameters if (transparams == 0) - params = new RTPFakeTransmissionParams; + params = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) RTPFakeTransmissionParams; else { if (transparams->GetTransmissionProtocol() != RTPTransmitter::UserDefinedProto) @@ -217,9 +218,6 @@ int RTPFakeTransmitter::Create(size_t maximumpacketsize,const RTPTransmissionPar localhostname = 0; localhostnamelength = 0; - rtppackcount = 0; - rtcppackcount = 0; - waitingfordata = false; created = true; @@ -241,7 +239,7 @@ void RTPFakeTransmitter::Destroy() if (localhostname) { - delete [] localhostname; + RTPDeleteByteArray(localhostname,GetMemoryManager()); localhostname = 0; localhostnamelength = 0; } @@ -254,7 +252,7 @@ void RTPFakeTransmitter::Destroy() ClearAcceptIgnoreInfo(); localIPs.clear(); created = false; - delete params; + RTPDelete(params,GetMemoryManager()); MAINMUTEX_UNLOCK } @@ -265,8 +263,7 @@ RTPTransmissionInfo *RTPFakeTransmitter::GetTransmissionInfo() return 0; MAINMUTEX_LOCK - RTPTransmissionInfo *tinf = new RTPFakeTransmissionInfo(localIPs, - params); + RTPTransmissionInfo *tinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMISSIONINFO) RTPFakeTransmissionInfo(localIPs, params); MAINMUTEX_UNLOCK return tinf; } @@ -324,7 +321,7 @@ int RTPFakeTransmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new uint8_t [localhostnamelength+1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -349,7 +346,7 @@ int RTPFakeTransmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) len = strlen(str); localhostnamelength = len; - localhostname = new uint8_t [localhostnamelength + 1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength + 1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -564,7 +561,6 @@ int RTPFakeTransmitter::SendRTPData(const void *data,size_t len) destinations.GotoNextElement(); } - rtppackcount++; MAINMUTEX_UNLOCK return 0; } @@ -598,63 +594,10 @@ int RTPFakeTransmitter::SendRTCPData(const void *data,size_t len) destinations.GotoNextElement(); } - rtcppackcount++; MAINMUTEX_UNLOCK return 0; } -void RTPFakeTransmitter::ResetPacketCount() -{ - if (!init) - return; - - MAINMUTEX_LOCK - if (created) - { - rtppackcount = 0; - rtcppackcount = 0; - } - MAINMUTEX_UNLOCK -} - -uint32_t RTPFakeTransmitter::GetNumRTPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - -uint32_t RTPFakeTransmitter::GetNumRTCPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtcppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - int RTPFakeTransmitter::AddDestination(const RTPAddress &addr) { if (!init) @@ -1134,6 +1077,7 @@ bool RTPFakeTransmitter::SetMulticastTTL(uint8_t ttl) if (status != 0) return false; return true;*/ + return true; } #endif // RTP_SUPPORT_IPV4MULTICAST @@ -1142,7 +1086,7 @@ void RTPFakeTransmitter::FlushPackets() std::list::const_iterator it; for (it = rawpacketlist.begin() ; it != rawpacketlist.end() ; ++it) - delete (*it); + RTPDelete(*it,GetMemoryManager()); rawpacketlist.clear(); } @@ -1169,7 +1113,7 @@ int RTPFakeTransmitter::FakePoll() } // let's make a RTPIPv4Address - RTPIPv4Address *addr = new RTPIPv4Address(sourceaddr, sourceport); + RTPIPv4Address *addr = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv4Address(sourceaddr, sourceport); if (addr == 0) { return ERR_RTP_OUTOFMEM; @@ -1177,10 +1121,10 @@ int RTPFakeTransmitter::FakePoll() // ok we got the src addr, now this should be the actual packet uint8_t *datacopy; - datacopy = new uint8_t[data_len]; + datacopy = RTPNew(GetMemoryManager(),(rtp)?RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET:RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET) uint8_t[data_len]; if (datacopy == 0) { - delete addr; + RTPDelete(addr,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } memcpy(datacopy, data, data_len); @@ -1196,11 +1140,11 @@ int RTPFakeTransmitter::FakePoll() // adding packet to queue RTPRawPacket *pack; - pack = new RTPRawPacket(datacopy,data_len,addr,curtime,rtp); + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,data_len,addr,curtime,rtp,GetMemoryManager()); if (pack == 0) { - delete addr; + RTPDelete(addr,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } rawpacketlist.push_back(pack); @@ -1239,7 +1183,7 @@ int RTPFakeTransmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) PortInfo *portinf; int status; - portinf = new PortInfo(); + portinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_ACCEPTIGNOREPORTINFO) PortInfo(); if (port == 0) // select all ports portinf->all = true; else @@ -1248,7 +1192,7 @@ int RTPFakeTransmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) status = acceptignoreinfo.AddElement(ip,portinf); if (status < 0) { - delete portinf; + RTPDelete(portinf,GetMemoryManager()); return status; } } @@ -1264,7 +1208,7 @@ void RTPFakeTransmitter::ClearAcceptIgnoreInfo() PortInfo *inf; inf = acceptignoreinfo.GetCurrentElement(); - delete inf; + RTPDelete(inf,GetMemoryManager()); acceptignoreinfo.GotoNextElement(); } acceptignoreinfo.Clear(); @@ -1494,6 +1438,7 @@ int RTPFakeTransmitter::CreateAbortDescriptors() // if (pipe(abortdesc) < 0) // return ERR_RTP_FAKETRANS_CANTCREATEPIPE; // return 0; + return 0; } void RTPFakeTransmitter::DestroyAbortDescriptors() @@ -1760,8 +1705,6 @@ void RTPFakeTransmitter::Dump() std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; - std::cout << "RTP packet count: " << rtppackcount << std::endl; - std::cout << "RTCP packet count: " << rtcppackcount << std::endl; } MAINMUTEX_UNLOCK diff --git a/src/extratransmitters/rtpfaketransmitter.h b/src/extratransmitters/rtpfaketransmitter.h index c8725a0..88b445e 100644 --- a/src/extratransmitters/rtpfaketransmitter.h +++ b/src/extratransmitters/rtpfaketransmitter.h @@ -15,7 +15,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2004 Jori Liesenborgs - Contact: jori@lumumba.luc.ac.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair @@ -125,7 +125,7 @@ class RTPFakeTransmissionInfo : public RTPTransmissionInfo class RTPFakeTrans_GetHashIndex_IPv4Dest { public: - static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPFAKETRANS_HASHSIZE; } + static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP()%RTPFAKETRANS_HASHSIZE; } }; class RTPFakeTrans_GetHashIndex_uint32_t @@ -139,7 +139,7 @@ class RTPFakeTrans_GetHashIndex_uint32_t class RTPFakeTransmitter : public RTPTransmitter { public: - RTPFakeTransmitter(); + RTPFakeTransmitter(RTPMemoryManager *mgr); ~RTPFakeTransmitter(); int Init(bool treadsafe); @@ -158,10 +158,6 @@ class RTPFakeTransmitter : public RTPTransmitter int SendRTPData(const void *data,size_t len); int SendRTCPData(const void *data,size_t len); - void ResetPacketCount(); - uint32_t GetNumRTPPacketsSent(); - uint32_t GetNumRTCPPacketsSent(); - int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); void ClearDestinations(); @@ -239,8 +235,6 @@ class RTPFakeTransmitter : public RTPTransmitter JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD - - uint32_t rtppackcount,rtcppackcount; }; #endif // RTPFakeTRANSMITTER_H diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index d76024b..f3c179c 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 1019e74..21d395d 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpapppacket.h + */ + #ifndef RTCPAPPPACKET_H #define RTCPAPPPACKET_H @@ -43,16 +47,33 @@ class RTCPCompoundPacket; +/** Describes an RTCP APP packet. */ class RTCPAPPPacket : public RTCPPacket { public: + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it + * points to is valid as long as the class instance exists. + */ RTCPAPPPacket(uint8_t *data,size_t datalen); ~RTCPAPPPacket() { } + /** Returns the subtype contained in the APP packet. */ uint8_t GetSubType() const; + + /** Returns the SSRC of the source which sent this packet. */ uint32_t GetSSRC() const; - uint8_t *GetName(); // Note that the name always consists of 4 octets and is not null-terminated + + /** Returns the name contained in the APP packet. + * Returns the name contained in the APP packet. This alway consists of four bytes and is not NULL-terminated. + */ + uint8_t *GetName(); + + /** Returns a pointer to the actual data. */ uint8_t *GetAPPData(); + + /** Returns the length of the actual data. */ size_t GetAPPDataLength() const; #ifdef RTPDEBUG void Dump(); diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index 708feb7..4d323d3 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 6308116..5a72331 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpbyepacket.h + */ + #ifndef RTCPBYEPACKET_H #define RTCPBYEPACKET_H @@ -43,16 +47,33 @@ class RTCPCompoundPacket; +/** Describes an RTCP BYE packet. */ class RTCPBYEPacket : public RTCPPacket { public: + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it + * points to is valid as long as the class instance exists. + */ RTCPBYEPacket(uint8_t *data,size_t datalen); ~RTCPBYEPacket() { } + /** Returns the number of SSRC identifiers present in this BYE packet. */ int GetSSRCCount() const; + + /** Returns the SSRC described by \c index which may have a value from 0 to GetSSRCCount()-1 + * (note that no check is performed to see if \c index is valid). + */ uint32_t GetSSRC(int index) const; // note: no check is performed to see if index is valid! + + /** Returns true if the BYE packet contains a reason for leaving. */ bool HasReasonForLeaving() const; + + /** Returns the length of the string which describes why the source(s) left. */ size_t GetReasonLength() const; + + /** Returns the actual reason for leaving data. */ uint8_t *GetReasonData(); #ifdef RTPDEBUG diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index 353274e..01024f6 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -47,7 +47,7 @@ #include "rtpdebug.h" -RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) +RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack, RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { compoundpacket = 0; compoundpacketlength = 0; @@ -61,13 +61,50 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) uint8_t *data = rawpack.GetData(); size_t datalen = rawpack.GetDataLength(); + + error = ParseData(data,datalen); + if (error < 0) + return; + + compoundpacket = rawpack.GetData(); + compoundpacketlength = rawpack.GetDataLength(); + deletepacket = true; + + rawpack.ZeroData(); + + rtcppackit = rtcppacklist.begin(); +} + +RTCPCompoundPacket::RTCPCompoundPacket(uint8_t *packet, size_t packetlen, bool deletedata, RTPMemoryManager *mgr) : RTPMemoryObject(mgr) +{ + compoundpacket = 0; + compoundpacketlength = 0; + + error = ParseData(packet,packetlen); + if (error < 0) + return; + + compoundpacket = packet; + compoundpacketlength = packetlen; + deletepacket = deletedata; + + rtcppackit = rtcppacklist.begin(); +} + +RTCPCompoundPacket::RTCPCompoundPacket(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) +{ + compoundpacket = 0; + compoundpacketlength = 0; + error = 0; + deletepacket = true; +} + +int RTCPCompoundPacket::ParseData(uint8_t *data, size_t datalen) +{ bool first; if (datalen < sizeof(RTCPCommonHeader)) - { - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; - } + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; first = true; @@ -80,8 +117,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) if (rtcphdr->version != RTP_VERSION) // check version { ClearPacketList(); - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; } if (first) { @@ -91,8 +127,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) if ( ! (rtcphdr->packettype == RTP_RTCPTYPE_SR || rtcphdr->packettype == RTP_RTCPTYPE_RR)) { ClearPacketList(); - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; } } @@ -103,8 +138,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) if (length > datalen) // invalid length field { ClearPacketList(); - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; } if (rtcphdr->padding) @@ -113,8 +147,7 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) if (length != datalen) { ClearPacketList(); - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; // not last packet + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; } } @@ -123,29 +156,28 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) switch (rtcphdr->packettype) { case RTP_RTCPTYPE_SR: - p = new RTCPSRPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPSRPACKET) RTCPSRPacket(data,length); break; case RTP_RTCPTYPE_RR: - p = new RTCPRRPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPRRPACKET) RTCPRRPacket(data,length); break; case RTP_RTCPTYPE_SDES: - p = new RTCPSDESPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPSDESPACKET) RTCPSDESPacket(data,length); break; case RTP_RTCPTYPE_BYE: - p = new RTCPBYEPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPBYEPACKET) RTCPBYEPacket(data,length); break; case RTP_RTCPTYPE_APP: - p = new RTCPAPPPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPAPPPACKET) RTCPAPPPacket(data,length); break; default: - p = new RTCPUnknownPacket(data,length); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPUNKNOWNPACKET) RTCPUnknownPacket(data,length); } if (p == 0) { ClearPacketList(); - error = ERR_RTP_OUTOFMEM; - return; + return ERR_RTP_OUTOFMEM; } rtcppacklist.push_back(p); @@ -157,30 +189,16 @@ RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack) if (datalen != 0) // some remaining bytes { ClearPacketList(); - error = ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; - return; + return ERR_RTP_RTCPCOMPOUND_INVALIDPACKET; } - - compoundpacket = rawpack.GetData(); - compoundpacketlength = rawpack.GetDataLength(); - - rawpack.ZeroData(); - - rtcppackit = rtcppacklist.begin(); -} - -RTCPCompoundPacket::RTCPCompoundPacket() -{ - compoundpacket = 0; - compoundpacketlength = 0; - error = 0; + return 0; } RTCPCompoundPacket::~RTCPCompoundPacket() { ClearPacketList(); - if (compoundpacket) - delete [] compoundpacket; + if (compoundpacket && deletepacket) + RTPDeleteByteArray(compoundpacket,GetMemoryManager()); } void RTCPCompoundPacket::ClearPacketList() @@ -188,8 +206,7 @@ void RTCPCompoundPacket::ClearPacketList() std::list::const_iterator it; for (it = rtcppacklist.begin() ; it != rtcppacklist.end() ; it++) - delete *it; - + RTPDelete(*it,GetMemoryManager()); rtcppacklist.clear(); rtcppackit = rtcppacklist.begin(); } diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index 8a37f7d..0b77bdc 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,9 @@ */ +/** + * \file rtcpcompoundpacket.h + */ #ifndef RTCPCOMPOUNDPACKET_H @@ -37,39 +40,63 @@ #include "rtpconfig.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" #include class RTPRawPacket; class RTCPPacket; -class RTCPCompoundPacket +/** Represents an RTCP compound packet. */ +class RTCPCompoundPacket : public RTPMemoryObject { public: - RTCPCompoundPacket(RTPRawPacket &rawpack); + /** Creates an RTCPCompoundPacket instance from the data in \c rawpack, installing a memory manager if specified. */ + RTCPCompoundPacket(RTPRawPacket &rawpack, RTPMemoryManager *memmgr = 0); + + /** Creates an RTCPCompoundPacket instance from the data in \c packet}, with size \c len. + * Creates an RTCPCompoundPacket instance from the data in \c packet}, with size \c len. The \c deletedata + * flag specifies if the data in \c packet should be deleted when the compound packet is destroyed. If + * specified, a memory manager will be installed. + */ + RTCPCompoundPacket(uint8_t *packet, size_t len, bool deletedata = true, RTPMemoryManager *memmgr = 0); protected: - RTCPCompoundPacket(); // this is for the compoundpacket builder + RTCPCompoundPacket(RTPMemoryManager *memmgr); // this is for the compoundpacket builder public: virtual ~RTCPCompoundPacket(); - int GetCreationError() { return error; } + /** Checks if the RTCP compound packet was created successfully. + * If the raw packet data in the constructor could not be parsed, this function returns the error code of + * what went wrong. If the packet had an invalid format, the return value is \c ERR_RTP_RTCPCOMPOUND_INVALIDPACKET. + */ + int GetCreationError() { return error; } + + /** Returns a pointer to the data of the entire RTCP compound packet. */ uint8_t *GetCompoundPacketData() { return compoundpacket; } + + /** Returns the size of the entire RTCP compound packet. */ size_t GetCompoundPacketLength() { return compoundpacketlength; } - void GotoFirstPacket() { rtcppackit = rtcppacklist.begin(); } + /** Starts the iteration over the individual RTCP packets in the RTCP compound packet. */ + void GotoFirstPacket() { rtcppackit = rtcppacklist.begin(); } - // Note: the individual RTCPPackets may NOT be deleted! - RTCPPacket *GetNextPacket() { if (rtcppackit == rtcppacklist.end()) return 0; RTCPPacket *p = *rtcppackit; rtcppackit++; return p; } + /** Returns a pointer to the next individual RTCP packet. + * Returns a pointer to the next individual RTCP packet. Note that no \c delete call may be done + * on the RTCPPacket instance which is returned. + */ + RTCPPacket *GetNextPacket() { if (rtcppackit == rtcppacklist.end()) return 0; RTCPPacket *p = *rtcppackit; rtcppackit++; return p; } #ifdef RTPDEBUG void Dump(); #endif // RTPDEBUG protected: void ClearPacketList(); + int ParseData(uint8_t *packet, size_t len); int error; uint8_t *compoundpacket; size_t compoundpacketlength; + bool deletepacket; std::list rtcppacklist; std::list::const_iterator rtcppackit; diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index 7679fc4..18fb61a 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -42,7 +42,7 @@ #include "rtpdebug.h" -RTCPCompoundPacketBuilder::RTCPCompoundPacketBuilder() +RTCPCompoundPacketBuilder::RTCPCompoundPacketBuilder(RTPMemoryManager *mgr) : RTCPCompoundPacket(mgr), report(mgr), sdes(mgr) { byesize = 0; appsize = 0; @@ -66,12 +66,15 @@ void RTCPCompoundPacketBuilder::ClearBuildBuffers() std::list::const_iterator it; for (it = byepackets.begin() ; it != byepackets.end() ; it++) + { if ((*it).packetdata) - delete [] (*it).packetdata; - + RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); + } for (it = apppackets.begin() ; it != apppackets.end() ; it++) + { if ((*it).packetdata) - delete [] (*it).packetdata; + RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); + } byepackets.clear(); apppackets.clear(); @@ -192,7 +195,7 @@ int RTCPCompoundPacketBuilder::AddReportBlock(uint32_t ssrc,uint8_t fractionlost if ((totalothersize+reportsizewithextrablock) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; - uint8_t *buf = new uint8_t[sizeof(RTCPReceiverReport)]; + uint8_t *buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPRECEIVERREPORT) uint8_t[sizeof(RTCPReceiverReport)]; if (buf == 0) return ERR_RTP_OUTOFMEM; @@ -277,7 +280,7 @@ int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,cons uint8_t *buf; size_t len; - buf = new uint8_t[sizeof(RTCPSDESHeader)+(size_t)itemlength]; + buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPSDESBLOCK) uint8_t[sizeof(RTCPSDESHeader)+(size_t)itemlength]; if (buf == 0) return ERR_RTP_OUTOFMEM; len = sizeof(RTCPSDESHeader)+(size_t)itemlength; @@ -315,7 +318,7 @@ int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,uint8_t uint8_t *buf; size_t len; - buf = new uint8_t[sizeof(RTCPSDESHeader)+itemlength]; + buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPSDESBLOCK) uint8_t[sizeof(RTCPSDESHeader)+itemlength]; if (buf == 0) return ERR_RTP_OUTOFMEM; len = sizeof(RTCPSDESHeader)+(size_t)itemlength; @@ -368,7 +371,7 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(uint32_t *ssrcs,uint8_t numssrcs,con uint8_t *buf; size_t numwords; - buf = new uint8_t[packsize]; + buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPBYEPACKET) uint8_t[packsize]; if (buf == 0) return ERR_RTP_OUTOFMEM; @@ -426,7 +429,7 @@ int RTCPCompoundPacketBuilder::AddAPPPacket(uint8_t subtype,uint32_t ssrc,const uint8_t *buf; - buf = new uint8_t[packsize]; + buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPAPPPACKET) uint8_t[packsize]; if (buf == 0) return ERR_RTP_OUTOFMEM; @@ -470,7 +473,7 @@ int RTCPCompoundPacketBuilder::EndBuild() if (!external) { - buf = new uint8_t[len]; + buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPCOMPOUNDPACKET) uint8_t[len]; if (buf == 0) return ERR_RTP_OUTOFMEM; } @@ -525,13 +528,13 @@ int RTCPCompoundPacketBuilder::EndBuild() // add entry in parent's list if (hdr->packettype == RTP_RTCPTYPE_SR) - p = new RTCPSRPacket(curbuf,offset); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPSRPACKET) RTCPSRPacket(curbuf,offset); else - p = new RTCPRRPacket(curbuf,offset); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPRRPACKET) RTCPRRPacket(curbuf,offset); if (p == 0) { if (!external) - delete [] buf; + RTPDeleteByteArray(buf,GetMemoryManager()); ClearPacketList(); return ERR_RTP_OUTOFMEM; } @@ -601,11 +604,11 @@ int RTCPCompoundPacketBuilder::EndBuild() hdr->count = sourcecount; hdr->length = htons((uint16_t)(numwords-1)); - p = new RTCPSDESPacket(curbuf,offset); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPSDESPACKET) RTCPSDESPacket(curbuf,offset); if (p == 0) { if (!external) - delete [] buf; + RTPDeleteByteArray(buf,GetMemoryManager()); ClearPacketList(); return ERR_RTP_OUTOFMEM; } @@ -626,11 +629,11 @@ int RTCPCompoundPacketBuilder::EndBuild() { memcpy(curbuf,(*it).packetdata,(*it).packetlength); - p = new RTCPAPPPacket(curbuf,(*it).packetlength); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPAPPPACKET) RTCPAPPPacket(curbuf,(*it).packetlength); if (p == 0) { if (!external) - delete [] buf; + RTPDeleteByteArray(buf,GetMemoryManager()); ClearPacketList(); return ERR_RTP_OUTOFMEM; } @@ -649,11 +652,11 @@ int RTCPCompoundPacketBuilder::EndBuild() { memcpy(curbuf,(*it).packetdata,(*it).packetlength); - p = new RTCPBYEPacket(curbuf,(*it).packetlength); + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPBYEPACKET) RTCPBYEPacket(curbuf,(*it).packetlength); if (p == 0) { if (!external) - delete [] buf; + RTPDeleteByteArray(buf,GetMemoryManager()); ClearPacketList(); return ERR_RTP_OUTOFMEM; } diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index f611495..70dfc96 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpcompoundpacketbuilder.h + */ + #ifndef RTCPCOMPOUNDPACKETBUILDER_H #define RTCPCOMPOUNDPACKETBUILDER_H @@ -41,33 +45,86 @@ #include "rtperrors.h" #include +class RTPMemoryManager; + +/** This class can be used to construct an RTCP compound packet. + * The RTCPCompoundPacketBuilder class can be used to construct an RTCP compound packet. It inherits the member + * functions of RTCPCompoundPacket which can be used to access the information in the compound packet once it has + * been built successfully. The member functions described below return \c ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT + * if the action would cause the maximum allowed size to be exceeded. + */ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket { public: - RTCPCompoundPacketBuilder(); + /** Constructs an RTCPCompoundPacketBuilder instance, optionally installing a memory manager. */ + RTCPCompoundPacketBuilder(RTPMemoryManager *memmgr = 0); ~RTCPCompoundPacketBuilder(); + /** Starts building an RTCP compound packet with maximum size \c maxpacketsize. + * Starts building an RTCP compound packet with maximum size \c maxpacketsize. New memory will be allocated + * to store the packet. + */ int InitBuild(size_t maxpacketsize); + + /** Starts building a RTCP compound packet. + * Starts building a RTCP compound packet. Data will be stored in \c externalbuffer which + * can contain \c buffersize bytes. + */ int InitBuild(void *externalbuffer,size_t buffersize); + /** Adds a sender report to the compound packet. + * Tells the packet builder that the packet should start with a sender report which will contain + * the sender information specified by this function's arguments. Once the sender report is started, + * report blocks can be added using the AddReportBlock function. + */ int StartSenderReport(uint32_t senderssrc,const RTPNTPTime &ntptimestamp,uint32_t rtptimestamp, uint32_t packetcount,uint32_t octetcount); + + /** Adds a receiver report to the compound packet. + * Tells the packet builder that the packet should start with a receiver report which will contain + * he sender SSRC \c senderssrc. Once the sender report is started, report blocks can be added using the + * AddReportBlock function. + */ int StartReceiverReport(uint32_t senderssrc); + + /** Adds the report block information specified by the function's arguments. + * Adds the report block information specified by the function's arguments. If more than 31 report blocks + * are added, the builder will automatically use a new RTCP receiver report packet. + */ int AddReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t packetslost,uint32_t exthighestseq, uint32_t jitter,uint32_t lsr,uint32_t dlsr); + /** Starts an SDES chunk for participant \c ssrc. */ int AddSDESSource(uint32_t ssrc); + + /** Adds a normal (non-private) SDES item of type \c t to the current SDES chunk. + * Adds a normal (non-private) SDES item of type \c t to the current SDES chunk. The item's value + * will have length \c itemlength and will contain the data \c itemdata. + */ int AddSDESNormalItem(RTCPSDESPacket::ItemType t,const void *itemdata,uint8_t itemlength); #ifdef RTP_SUPPORT_SDESPRIV + /** Adds an SDES PRIV item described by the function's arguments to the current SDES chunk. */ int AddSDESPrivateItem(const void *prefixdata,uint8_t prefixlength,const void *valuedata, uint8_t valuelength); #endif // RTP_SUPPORT_SDESPRIV + /** Adds a BYE packet to the compound packet. + * Adds a BYE packet to the compound packet. It will contain \c numssrcs source identifiers specified in + * \c ssrcs and will indicate as reason for leaving the string of length \c reasonlength + * containing data \c reasondata. + */ int AddBYEPacket(uint32_t *ssrcs,uint8_t numssrcs,const void *reasondata,uint8_t reasonlength); - // note: appdatalen must be a multiple of 4 (32 bits) ! + /** Adds the APP packet specified by the arguments to the compound packet. + * Adds the APP packet specified by the arguments to the compound packet. Note that \c appdatalen has to be + * a multiple of four. + */ int AddAPPPacket(uint8_t subtype,uint32_t ssrc,const uint8_t name[4],const void *appdata,size_t appdatalen); + /** Finishes building the compound packet. + * Finishes building the compound packet. If successful, the RTCPCompoundPacket member functions + * can be used to access the RTCP packet data. + */ int EndBuild(); private: class Buffer @@ -80,18 +137,25 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket size_t packetlength; }; - class Report + class Report : public RTPMemoryObject { public: - Report() { headerdata = (uint8_t *)headerdata32; isSR = false; headerlength = 0; } + Report(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) + { + headerdata = (uint8_t *)headerdata32; + isSR = false; + headerlength = 0; + } ~Report() { Clear(); } void Clear() { std::list::const_iterator it; for (it = reportblocks.begin() ; it != reportblocks.end() ; it++) + { if ((*it).packetdata) - delete [] (*it).packetdata; + RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); + } reportblocks.clear(); isSR = false; headerlength = 0; @@ -144,16 +208,18 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket std::list reportblocks; }; - class SDESSource + class SDESSource : public RTPMemoryObject { public: - SDESSource(uint32_t s) : ssrc(s),totalitemsize(0) { } + SDESSource(uint32_t s,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),ssrc(s),totalitemsize(0) { } ~SDESSource() { std::list::const_iterator it; for (it = items.begin() ; it != items.end() ; it++) + { if ((*it).packetdata) - delete [] (*it).packetdata; + RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); + } items.clear(); } @@ -192,10 +258,10 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket size_t totalitemsize; }; - class SDES + class SDES : public RTPMemoryObject { public: - SDES() { sdesit = sdessources.end(); } + SDES(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { sdesit = sdessources.end(); } ~SDES() { Clear(); } void Clear() @@ -203,13 +269,13 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket std::list::const_iterator it; for (it = sdessources.begin() ; it != sdessources.end() ; it++) - delete (*it); + RTPDelete(*it,GetMemoryManager()); sdessources.clear(); } int AddSSRC(uint32_t ssrc) { - SDESSource *s = new SDESSource(ssrc); + SDESSource *s = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_SDESSOURCE) SDESSource(ssrc,GetMemoryManager()); if (s == 0) return ERR_RTP_OUTOFMEM; sdessources.push_back(s); diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 97abb50..f952a10 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcppacket.h b/src/rtcppacket.h index c36b2ae..500fd03 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcppacket.h + */ + #ifndef RTCPPACKET_H #define RTCPPACKET_H @@ -39,20 +43,36 @@ class RTCPCompoundPacket; +/** Base class for specific types of RTCP packets. */ class RTCPPacket { public: - enum PacketType { SR,RR,SDES,BYE,APP,Unknown }; + /** Identifies the specific kind of RTCP packet. */ + enum PacketType + { + SR, /**< An RTCP sender report. */ + RR, /**< An RTCP receiver report. */ + SDES, /**< An RTCP source description packet. */ + BYE, /**< An RTCP bye packet. */ + APP, /**< An RTCP packet containing application specific data. */ + Unknown /**< The type of RTCP packet was not recognized. */ + }; protected: RTCPPacket(PacketType t,uint8_t *d,size_t dlen) : data(d),datalen(dlen),packettype(t) { knownformat = false; } public: virtual ~RTCPPacket() { } + /** Returns \c true if the subclass was able to interpret the data and \c false otherwise. */ bool IsKnownFormat() const { return knownformat; } - PacketType GetPacketType() const { return packettype; } + /** Returns the actual packet type which the subclass implements. */ + PacketType GetPacketType() const { return packettype; } + + /** Returns a pointer to the data of this RTCP packet. */ uint8_t *GetPacketData() { return data; } - size_t GetPacketLength() const { return datalen; } + + /** Returns the length of this RTCP packet. */ + size_t GetPacketLength() const { return datalen; } #ifdef RTPDEBUG virtual void Dump(); diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index 8c22bbe..b1007f2 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -36,11 +36,12 @@ #include "rtcpscheduler.h" #include "rtpsourcedata.h" #include "rtcpcompoundpacketbuilder.h" +#include "rtpmemorymanager.h" #include "rtpdebug.h" -RTCPPacketBuilder::RTCPPacketBuilder(RTPSources &s,RTPPacketBuilder &pb) - : sources(s),rtppacketbuilder(pb),prevbuildtime(0,0),transmissiondelay(0,0) +RTCPPacketBuilder::RTCPPacketBuilder(RTPSources &s,RTPPacketBuilder &pb,RTPMemoryManager *mgr) + : RTPMemoryObject(mgr),sources(s),rtppacketbuilder(pb),prevbuildtime(0,0),transmissiondelay(0,0),ownsdesinfo(mgr) { init = false; #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -111,13 +112,13 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) *pack = 0; - rtcpcomppack = new RTCPCompoundPacketBuilder(); + rtcpcomppack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPCOMPOUNDPACKETBUILDER) RTCPCompoundPacketBuilder(GetMemoryManager()); if (rtcpcomppack == 0) return ERR_RTP_OUTOFMEM; if ((status = rtcpcomppack->InitBuild(maxpacketsize)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } @@ -146,7 +147,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -156,7 +157,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) { if ((status = rtcpcomppack->StartReceiverReport(ssrc)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -170,14 +171,14 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = rtcpcomppack->AddSDESSource(ssrc)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; } if ((status = rtcpcomppack->AddSDESNormalItem(RTCPSDESPacket::CNAME,owncname,owncnamelen)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -190,13 +191,13 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = FillInReportBlocks(rtcpcomppack,curtime,sources.GetTotalCount(),&full,&added,&skipped,&atendoflist)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } if (full && added == 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; } @@ -225,7 +226,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = FillInSDES(rtcpcomppack,&full,&processedall,&itemcount)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } @@ -243,7 +244,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = FillInReportBlocks(rtcpcomppack,curtime,skipped,&full,&added,&skipped,&atendoflist)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } } @@ -258,13 +259,13 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = FillInSDES(rtcpcomppack,&full,&processedall,&itemcount)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } if (itemcount == 0) // Big problem: packet size is too small to let any progress happen { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; } @@ -282,7 +283,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = FillInReportBlocks(rtcpcomppack,curtime,sources.GetTotalCount(),&full,&added,&skipped,&atendoflist)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } if (atendoflist) // filled in all possible sources @@ -293,7 +294,7 @@ int RTCPPacketBuilder::BuildNextPacket(RTCPCompoundPacket **pack) if ((status = rtcpcomppack->EndBuild()) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } @@ -634,13 +635,13 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas *pack = 0; - rtcpcomppack = new RTCPCompoundPacketBuilder(); + rtcpcomppack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPCOMPOUNDPACKETBUILDER) RTCPCompoundPacketBuilder(GetMemoryManager()); if (rtcpcomppack == 0) return ERR_RTP_OUTOFMEM; if ((status = rtcpcomppack->InitBuild(maxpacketsize)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } @@ -674,7 +675,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas if ((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -684,7 +685,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas { if ((status = rtcpcomppack->StartReceiverReport(ssrc)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -698,14 +699,14 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas if ((status = rtcpcomppack->AddSDESSource(ssrc)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; } if ((status = rtcpcomppack->AddSDESNormalItem(RTCPSDESPacket::CNAME,owncname,owncnamelen)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -717,7 +718,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas if ((status = rtcpcomppack->AddBYEPacket(ssrcs,1,(const uint8_t *)reason,reasonlength)) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); if (status == ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT) return ERR_RTP_RTCPPACKETBUILDER_PACKETFILLEDTOOSOON; return status; @@ -725,7 +726,7 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas if ((status = rtcpcomppack->EndBuild()) < 0) { - delete rtcpcomppack; + RTPDelete(rtcpcomppack,GetMemoryManager()); return status; } diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index c9b0f87..5bd0e53 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcppacketbuilder.h + */ + #ifndef RTCPPACKETBUILDER_H #define RTCPPACKETBUILDER_H @@ -39,6 +43,7 @@ #include "rtperrors.h" #include "rtcpsdesinfo.h" #include "rtptimeutilities.h" +#include "rtpmemoryobject.h" class RTPSources; class RTPPacketBuilder; @@ -46,34 +51,130 @@ class RTCPScheduler; class RTCPCompoundPacket; class RTCPCompoundPacketBuilder; -class RTCPPacketBuilder +/** This class can be used to build RTCP compound packets, on a higher level than the RTCPCompoundPacketBuilder. + * The class RTCPPacketBuilder can be used to build RTCP compound packets. This class is more high-level + * than the RTCPCompoundPacketBuilder class: it uses the information of an RTPPacketBuilder instance and of + * an RTPSources instance to automatically generate the next compound packet which should be sent. It also + * provides functions to determine when SDES items other than the CNAME item should be sent. + */ +class RTCPPacketBuilder : public RTPMemoryObject { public: - RTCPPacketBuilder(RTPSources &sources,RTPPacketBuilder &rtppackbuilder); + /** Creates an RTCPPacketBuilder instance. + * Creates an instance which will use the source table \c sources and the RTP packet builder + * \c rtppackbuilder to determine the information for the next RTCP compound packet. Optionally, + * the memory manager \c mgr can be installed. + */ + RTCPPacketBuilder(RTPSources &sources,RTPPacketBuilder &rtppackbuilder, RTPMemoryManager *mgr = 0); ~RTCPPacketBuilder(); + /** Initializes the builder. + * Initializes the builder to use the maximum allowed packet size \c maxpacksize, timestamp unit + * \c timestampunit and the SDES CNAME item specified by \c cname with length \c cnamelen. + * The timestamp unit is defined as a time interval divided by the timestamp interval corresponding to + * that interval: for 8000 Hz audio this would be 1/8000. + */ int Init(size_t maxpacksize,double timestampunit,const void *cname,size_t cnamelen); + + /** Cleans up the builder. */ void Destroy(); + /** Sets the timestamp unit to be used to \c tsunit. + * Sets the timestamp unit to be used to \c tsunit. The timestamp unit is defined as a time interval + * divided by the timestamp interval corresponding to that interval: for 8000 Hz audio this would + * be 1/8000. + */ int SetTimestampUnit(double tsunit) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; if (tsunit < 0) return ERR_RTP_RTCPPACKETBUILDER_ILLEGALTIMESTAMPUNIT; timestampunit = tsunit; return 0; } + + /** Sets the maximum size allowed size of an RTCP compound packet to \c maxpacksize. */ int SetMaximumPacketSize(size_t maxpacksize) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; if (maxpacksize < RTP_MINPACKETSIZE) return ERR_RTP_RTCPPACKETBUILDER_ILLEGALMAXPACKSIZE; maxpacketsize = maxpacksize; return 0; } + + /** This function allows you to inform RTCP packet builder about the delay between sampling the first + * sample of a packet and sending the packet. + * This function allows you to inform RTCP packet builder about the delay between sampling the first + * sample of a packet and sending the packet. This delay is taken into account when calculating the + * relation between RTP timestamp and wallclock time, used for inter-media synchronization. + */ int SetPreTransmissionDelay(const RTPTime &delay) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; transmissiondelay = delay; return 0; } + /** Builds the next RTCP compound packet which should be sent and stores it in \c pack. */ int BuildNextPacket(RTCPCompoundPacket **pack); + + /** Builds a BYE packet with reason for leaving specified by \c reason and length \c reasonlength. + * Builds a BYE packet with reason for leaving specified by \c reason and length \c reasonlength. If + * \c useSRifpossible is set to \c true, the RTCP compound packet will start with a sender report if + * allowed. Otherwise, a receiver report is used. + */ int BuildBYEPacket(RTCPCompoundPacket **pack,const void *reason,size_t reasonlength,bool useSRifpossible = true); + /** Sets the RTCP interval for the SDES name item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES name item will be added after the sources in the source table have been + * processed \c count times. + */ void SetNameInterval(int count) { if (!init) return; interval_name = count; } + + /** Sets the RTCP interval for the SDES e-mail item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES e-mail item will be added after the sources in the source table have been + * processed \c count times. + */ void SetEMailInterval(int count) { if (!init) return; interval_email = count; } + + /** Sets the RTCP interval for the SDES location item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES location item will be added after the sources in the source table have been + * processed \c count times. + */ void SetLocationInterval(int count) { if (!init) return; interval_location = count; } + + /** Sets the RTCP interval for the SDES phone item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES phone item will be added after the sources in the source table have been + * processed \c count times. + */ void SetPhoneInterval(int count) { if (!init) return; interval_phone = count; } + + /** Sets the RTCP interval for the SDES tool item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES tool item will be added after the sources in the source table have been + * processed \c count times. + */ void SetToolInterval(int count) { if (!init) return; interval_tool = count; } + + /** Sets the RTCP interval for the SDES note item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES note item will be added after the sources in the source table have been + * processed \c count times. + */ void SetNoteInterval(int count) { if (!init) return; interval_note = count; } + + /** Sets the SDES name item for the local participant to the value \c s with length \c len. */ int SetLocalName(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetName((const uint8_t *)s,len); } + + /** Sets the SDES e-mail item for the local participant to the value \c s with length \c len. */ int SetLocalEMail(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetEMail((const uint8_t *)s,len); } + + /** Sets the SDES location item for the local participant to the value \c s with length \c len. */ int SetLocalLocation(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetLocation((const uint8_t *)s,len); } + + /** Sets the SDES phone item for the local participant to the value \c s with length \c len. */ int SetLocalPhone(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetPhone((const uint8_t *)s,len); } + + /** Sets the SDES tool item for the local participant to the value \c s with length \c len. */ int SetLocalTool(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetTool((const uint8_t *)s,len); } + + /** Sets the SDES note item for the local participant to the value \c s with length \c len. */ int SetLocalNote(const void *s,size_t len) { if (!init) return ERR_RTP_RTCPPACKETBUILDER_NOTINIT; return ownsdesinfo.SetNote((const uint8_t *)s,len); } + + /** Returns the own CNAME item with length \c len */ + uint8_t *GetLocalCNAME(size_t *len) const { if (!init) return 0; return ownsdesinfo.GetCNAME(len); } private: void ClearAllSourceFlags(); int FillInReportBlocks(RTCPCompoundPacketBuilder *pack,const RTPTime &curtime,int maxcount,bool *full,int *added,int *skipped,bool *atendoflist); @@ -92,7 +193,7 @@ class RTCPPacketBuilder class RTCPSDESInfoInternal : public RTCPSDESInfo { public: - RTCPSDESInfoInternal() { ClearFlags(); } + RTCPSDESInfoInternal(RTPMemoryManager *mgr) : RTCPSDESInfo(mgr) { ClearFlags(); } void ClearFlags() { pname = false; pemail = false; plocation = false; pphone = false; ptool = false; pnote = false; } bool ProcessedName() const { return pname; } bool ProcessedEMail() const { return pemail; } diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index caaf991..f4cbbf9 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 5b76e8e..1737746 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcprrpacket.h + */ + #ifndef RTCPRRPACKET_H #define RTCPRRPACKET_H @@ -43,28 +47,67 @@ class RTCPCompoundPacket; +/** Describes an RTCP receiver report packet. */ class RTCPRRPacket : public RTCPPacket { public: + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it points + * to is valid as long as the class instance exists. + */ RTCPRRPacket(uint8_t *data,size_t datalen); ~RTCPRRPacket() { } - // Sender info - + /** Returns the SSRC of the participant who sent this packet. */ uint32_t GetSenderSSRC() const; - // Reportblocks - + /** Returns the number of reception report blocks present in this packet. */ int GetReceptionReportCount() const; - // Note: the validity of index is NOT checked! + + /** Returns the SSRC of the reception report block described by \c index which may have a value + * from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetSSRC(int index) const; + + /** Returns the `fraction lost' field of the reception report described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint8_t GetFractionLost(int index) const; + + /** Returns the number of lost packets in the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ int32_t GetLostPacketCount(int index) const; + + /** Returns the extended highest sequence number of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetExtendedHighestSequenceNumber(int index) const; + + /** Returns the jitter field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetJitter(int index) const; + + /** Returns the LSR field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetLSR(int index) const; + + /** Returns the DLSR field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetDLSR(int index) const; + #ifdef RTPDEBUG void Dump(); #endif // RTPDEBUG diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index b91752e..dd4bc56 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index f02286a..19a72ee 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpscheduler.h + */ + #ifndef RTCPSCHEDULER_H #define RTCPSCHEDULER_H @@ -42,20 +46,45 @@ class RTCPCompoundPacket; class RTPPacket; class RTPSources; +/** Describes parameters used by the RTCPScheduler class. */ class RTCPSchedulerParams { public: RTCPSchedulerParams(); ~RTCPSchedulerParams(); - int SetRTCPBandwidth(double bw); // bandwidth is in bytes per second + + /** Sets the RTCP bandwidth to be used to \c bw (in bytes per second). */ + int SetRTCPBandwidth(double bw); + + /** Returns the used RTCP bandwidth in bytes per second (default is 1000). */ double GetRTCPBandwidth() const { return bandwidth; } + + /** Sets the fraction of the RTCP bandwidth reserved for senders to \c fraction. */ int SetSenderBandwidthFraction(double fraction); + + /** Returns the fraction of the RTCP bandwidth reserved for senders (default is 25%). */ double GetSenderBandwidthFraction() const { return senderfraction; } + + /** Sets the minimum (deterministic) interval between RTCP compound packets to \c t. */ int SetMinimumTransmissionInterval(const RTPTime &t); + + /** Returns the minimum RTCP transmission interval (default is 5 seconds). */ RTPTime GetMinimumTransmissionInterval() const { return mininterval; } + + /** If \c usehalf is \c true, only use half the minimum interval before sending the first RTCP compound packet. */ void SetUseHalfAtStartup(bool usehalf) { usehalfatstartup = usehalf; } + + /** Returns \c true if only half the minimum interval should be used before sending the first RTCP compound packet + * (defualt is \c true). + */ bool GetUseHalfAtStartup() const { return usehalfatstartup; } + + /** If \c v is \c true, the scheduler will schedule a BYE packet to be sent immediately if allowed. */ void SetRequestImmediateBYE(bool v) { immediatebye = v; } + + /** Returns if the scheduler will schedule a BYE packet to be sent immediately if allowed + * (default is \c true). + */ bool GetRequestImmediateBYE() const { return immediatebye; } private: double bandwidth; @@ -65,33 +94,65 @@ class RTCPSchedulerParams bool immediatebye; }; +/** This class determines when RTCP compound packets should be sent. */ class RTCPScheduler { public: + /** Creates an instance which will use the source table RTPSources to determine when RTCP compound + * packets should be scheduled. + * Creates an instance which will use the source table RTPSources to determine when RTCP compound + * packets should be scheduled. Note that for correct operation the \c sources instance should have information + * about the own SSRC (added by RTPSources::CreateOwnSSRC). + */ RTCPScheduler(RTPSources &sources); ~RTCPScheduler(); + + /** Resets the scheduler. */ void Reset(); + /** Sets the scheduler parameters to be used to \c params. */ void SetParameters(const RTCPSchedulerParams ¶ms) { schedparams = params; } + + /** Returns the currently used scheduler parameters. */ RTCPSchedulerParams GetParameters() const { return schedparams; } + /** Sets the header overhead from underlying protocols (for example UDP and IP) to \c numbytes. */ void SetHeaderOverhead(size_t numbytes) { headeroverhead = numbytes; } + + /** Returns the currently used header overhead. */ size_t GetHeaderOverhead() const { return headeroverhead; } + /** For each incoming RTCP compound packet, this function has to be called for the scheduler to work correctly. */ void AnalyseIncoming(RTCPCompoundPacket &rtcpcomppack); + + /** For each outgoing RTCP compound packet, this function has to be called for the scheduler to work correctly. */ void AnalyseOutgoing(RTCPCompoundPacket &rtcpcomppack); - // is to be called when a source times out or when a bye packet was received + /** This function has to be called each time a member times out or sends a BYE packet. */ void ActiveMemberDecrease(); + + /** Asks the scheduler to schedule an RTCP compound packet containing a BYE packetl; the compound packet + * has size \c packetsize. + */ void ScheduleBYEPacket(size_t packetsize); + /** Returns the delay after which an RTCP compound will possibly have to be sent. + * Returns the delay after which an RTCP compound will possibly have to be sent. The IsTime member function + * should be called afterwards to make sure that it actually is time to send an RTCP compound packet. + */ RTPTime GetTransmissionDelay(); - // Returns true is it is time to send a packet and then recalculates the next rtcp time - // So, if the function would be called immediately after it returned true, it would then - // return false + /** This function returns \c true if it's time to send an RTCP compound packet and \c false otherwise. + * This function returns \c true if it's time to send an RTCP compound packet and \c false otherwise. + * If the function returns \c true, it will also have calculated the next time at which a packet should + * be sent, so if it is called again right away, it will return \c false. + */ bool IsTime(); + /** Calculates the deterministic interval at this time. + * Calculates the deterministic interval at this time. This is used - in combination with a certain multiplier - + * to time out members, senders etc. + */ RTPTime CalculateDeterministicInterval(bool sender = false); private: void CalculateNextRTCPTime(); diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index ede99be..331497d 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -40,7 +40,7 @@ void RTCPSDESInfo::Clear() std::list::const_iterator it; for (it = privitems.begin() ; it != privitems.end() ; ++it) - delete *it; + RTPDelete(*it,GetMemoryManager()); privitems.clear(); #endif // RTP_SUPPORT_SDESPRIV } @@ -83,12 +83,12 @@ int RTCPSDESInfo::SetPrivateValue(const uint8_t *prefix,size_t prefixlen,const u int status; - item = new SDESPrivateItem(); + item = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_SDESPRIVATEITEM) SDESPrivateItem(GetMemoryManager()); if (item == 0) return ERR_RTP_OUTOFMEM; if ((status = item->SetPrefix(prefix,prefixlen)) < 0) { - delete item; + RTPDelete(item,GetMemoryManager()); return status; } privitems.push_front(item); @@ -124,7 +124,7 @@ int RTCPSDESInfo::DeletePrivatePrefix(const uint8_t *prefix,size_t prefixlen) if (!found) return ERR_RTP_SDES_PREFIXNOTFOUND; - delete (*it); + RTPDelete(*it,GetMemoryManager()); privitems.erase(it); return 0; } diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index 648fc68..b719395 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpsdesinfo.h + */ + #ifndef RTCPSDESINFO_H #define RTCPSDESINFO_H @@ -38,73 +42,138 @@ #include "rtperrors.h" #include "rtpdefines.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" #include #include -class RTCPSDESInfo +/** The class RTCPSDESInfo is a container for RTCP SDES information. */ +class RTCPSDESInfo : public RTPMemoryObject { public: - RTCPSDESInfo() { } + /** Constructs an instance, optionally installing a memory manager. */ + RTCPSDESInfo(RTPMemoryManager *mgr = 0) : RTPMemoryObject(mgr) { for (int i = 0 ; i < RTCP_SDES_NUMITEMS_NONPRIVATE ; i++) nonprivateitems[i].SetMemoryManager(mgr); } virtual ~RTCPSDESInfo() { Clear(); } + + /** Clears all SDES information. */ void Clear(); - int SetCNAME(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_CNAME-1,s,l); } + /** Sets the SDES CNAME item to \c s with length \c l. */ + int SetCNAME(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_CNAME-1,s,l); } + + /** Sets the SDES name item to \c s with length \c l. */ int SetName(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NAME-1,s,l); } - int SetEMail(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,s,l); } - int SetPhone(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_PHONE-1,s,l); } + + /** Sets the SDES e-mail item to \c s with length \c l. */ + int SetEMail(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,s,l); } + + /** Sets the SDES phone item to \c s with length \c l. */ + int SetPhone(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_PHONE-1,s,l); } + + /** Sets the SDES location item to \c s with length \c l. */ int SetLocation(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,s,l); } + + /** Sets the SDES tool item to \c s with length \c l. */ int SetTool(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_TOOL-1,s,l); } + + /** Sets the SDES note item to \c s with length \c l. */ int SetNote(const uint8_t *s,size_t l) { return SetNonPrivateItem(RTCP_SDES_ID_NOTE-1,s,l); } #ifdef RTP_SUPPORT_SDESPRIV + /** Sets the entry for the prefix string specified by \c prefix with length \c prefixlen to contain + * the value string specified by \c value with length \c valuelen (if the maximum allowed + * number of prefixes was reached, the error code \c ERR_RTP_SDES_MAXPRIVITEMS is returned. + */ int SetPrivateValue(const uint8_t *prefix,size_t prefixlen,const uint8_t *value,size_t valuelen); + + /** Deletes the entry for the prefix specified by \c s with length \c len. */ int DeletePrivatePrefix(const uint8_t *s,size_t len); #endif // RTP_SUPPORT_SDESPRIV + /** Returns the SDES CNAME item and stores its length in \c len. */ uint8_t *GetCNAME(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_CNAME-1,len); } - uint8_t *GetName(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NAME-1,len); } + + /** Returns the SDES name item and stores its length in \c len. */ + uint8_t *GetName(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NAME-1,len); } + + /** Returns the SDES e-mail item and stores its length in \c len. */ uint8_t *GetEMail(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,len); } + + /** Returns the SDES phone item and stores its length in \c len. */ uint8_t *GetPhone(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_PHONE-1,len); } - uint8_t *GetLocation(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,len); } - uint8_t *GetTool(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_TOOL-1,len); } - uint8_t *GetNote(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NOTE-1,len); } + /** Returns the SDES location item and stores its length in \c len. */ + uint8_t *GetLocation(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,len); } + + /** Returns the SDES tool item and stores its length in \c len. */ + uint8_t *GetTool(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_TOOL-1,len); } + + /** Returns the SDES note item and stores its length in \c len. */ + uint8_t *GetNote(size_t *len) const { return GetNonPrivateItem(RTCP_SDES_ID_NOTE-1,len); } #ifdef RTP_SUPPORT_SDESPRIV + /** Starts the iteration over the stored SDES private item prefixes and their associated values. */ void GotoFirstPrivateValue(); + + /** Returns SDES priv item information. + * If available, returns \c true and stores the next SDES + * private item prefix in \c prefix and its length in + * \c prefixlen. The associated value and its length are + * then stored in \c value and \c valuelen. Otherwise, + * it returns \c false. + */ bool GetNextPrivateValue(uint8_t **prefix,size_t *prefixlen,uint8_t **value,size_t *valuelen); + + /** Returns SDES priv item information. + * Looks for the entry which corresponds to the SDES private + * item prefix \c prefix with length \c prefixlen. If found, + * the function returns \c true and stores the associated + * value and its length in \c value and \c valuelen + * respectively. + */ bool GetPrivateValue(const uint8_t *prefix,size_t prefixlen,uint8_t **value,size_t *valuelen) const; #endif // RTP_SUPPORT_SDESPRIV private: int SetNonPrivateItem(int itemno,const uint8_t *s,size_t l) { if (l > RTCP_SDES_MAXITEMLENGTH) return ERR_RTP_SDES_LENGTHTOOBIG; return nonprivateitems[itemno].SetInfo(s,l); } uint8_t *GetNonPrivateItem(int itemno,size_t *len) const { return nonprivateitems[itemno].GetInfo(len); } - class SDESItem + class SDESItem : public RTPMemoryObject { public: - SDESItem() { str = 0; length = 0; } - ~SDESItem() { if (str) delete [] str; } + SDESItem(RTPMemoryManager *mgr = 0) : RTPMemoryObject(mgr) + { + str = 0; + length = 0; + } + void SetMemoryManager(RTPMemoryManager *mgr) + { + RTPMemoryObject::SetMemoryManager(mgr); + } + ~SDESItem() + { + if (str) + RTPDeleteByteArray(str,GetMemoryManager()); + } uint8_t *GetInfo(size_t *len) const { *len = length; return str; } int SetInfo(const uint8_t *s,size_t len) { return SetString(&str,&length,s,len); } protected: - static int SetString(uint8_t **dest,size_t *destlen,const uint8_t *s,size_t len) + int SetString(uint8_t **dest,size_t *destlen,const uint8_t *s,size_t len) { if (len <= 0) { if (*dest) - delete [] (*dest); + RTPDeleteByteArray((*dest),GetMemoryManager()); *dest = 0; *destlen = 0; } else { len = (len>RTCP_SDES_MAXITEMLENGTH)?RTCP_SDES_MAXITEMLENGTH:len; - uint8_t *str2 = new uint8_t[len]; + uint8_t *str2 = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_SDESITEM) uint8_t[len]; if (str2 == 0) return ERR_RTP_OUTOFMEM; memcpy(str2,s,len); *destlen = len; if (*dest) - delete [] (*dest); + RTPDeleteByteArray((*dest),GetMemoryManager()); *dest = str2; } return 0; @@ -120,8 +189,16 @@ class RTCPSDESInfo class SDESPrivateItem : public SDESItem { public: - SDESPrivateItem() { prefixlen = 0; prefix = 0; } - ~SDESPrivateItem() { if (prefix) delete [] prefix; } + SDESPrivateItem(RTPMemoryManager *mgr) : SDESItem(mgr) + { + prefixlen = 0; + prefix = 0; + } + ~SDESPrivateItem() + { + if (prefix) + RTPDeleteByteArray(prefix,GetMemoryManager()); + } uint8_t *GetPrefix(size_t *len) const { *len = prefixlen; return prefix; } int SetPrefix(const uint8_t *s,size_t len) { return SetString(&prefix,&prefixlen,s,len); } private: diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 9e7f459..8b60710 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index c6bb165..3623024 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpsdespacket.h + */ + #ifndef RTCPSDESPACKET_H #define RTCPSDESPACKET_H @@ -44,31 +48,94 @@ class RTCPCompoundPacket; +/** Describes an RTCP source description packet. */ class RTCPSDESPacket : public RTCPPacket { public: - enum ItemType { None,CNAME,NAME,EMAIL,PHONE,LOC,TOOL,NOTE,PRIV,Unknown }; + /** Identifies the type of an SDES item. */ + enum ItemType + { + None, /**< Used when the iteration over the items has finished. */ + CNAME, /**< Used for a CNAME (canonical name) item. */ + NAME, /**< Used for a NAME item. */ + EMAIL, /**< Used for an EMAIL item. */ + PHONE, /**< Used for a PHONE item. */ + LOC, /**< Used for a LOC (location) item. */ + TOOL, /**< Used for a TOOL item. */ + NOTE, /**< Used for a NOTE item. */ + PRIV, /**< Used for a PRIV item. */ + Unknown /**< Used when there is an item present, but the type is not recognized. */ + }; + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it + * points to is valid as long as the class instance exists. + */ RTCPSDESPacket(uint8_t *data,size_t datalen); ~RTCPSDESPacket() { } + /** Returns the number of SDES chunks in the SDES packet. + * Returns the number of SDES chunks in the SDES packet. Each chunk has its own SSRC identifier. + */ int GetChunkCount() const; + /** Starts the iteration over the chunks. + * Starts the iteration. If no SDES chunks are present, the function returns \c false. Otherwise, + * it returns \c true and sets the current chunk to be the first chunk. + */ bool GotoFirstChunk(); + + /** Sets the current chunk to the next available chunk. + * Sets the current chunk to the next available chunk. If no next chunk is present, this function returns + * \c false, otherwise it returns \c true. + */ bool GotoNextChunk(); + /** Returns the SSRC identifier of the current chunk. */ uint32_t GetChunkSSRC() const; + + /** Starts the iteration over the SDES items in the current chunk. + * Starts the iteration over the SDES items in the current chunk. If no SDES items are + * present, the function returns \c false. Otherwise, the function sets the current item + * to be the first one and returns \c true. + */ bool GotoFirstItem(); + + /** Advances the iteration to the next item in the current chunk. + * If there's another item in the chunk, the current item is set to be the next one and the function + * returns \c true. Otherwise, the function returns \c false. + */ bool GotoNextItem(); + /** Returns the SDES item type of the current item in the current chunk. */ ItemType GetItemType() const; + + /** Returns the item length of the current item in the current chunk. */ size_t GetItemLength() const; + + /** Returns the item data of the current item in the current chunk. */ uint8_t *GetItemData(); #ifdef RTP_SUPPORT_SDESPRIV + /** If the current item is an SDES PRIV item, this function returns the length of the + * prefix string of the private item. + */ size_t GetPRIVPrefixLength() const; + + /** If the current item is an SDES PRIV item, this function returns actual data of the + * prefix string. + */ uint8_t *GetPRIVPrefixData(); + + /** If the current item is an SDES PRIV item, this function returns the length of the + * value string of the private item. + */ size_t GetPRIVValueLength() const; + + /** If the current item is an SDES PRIV item, this function returns actual value data of the + * private item. + */ uint8_t *GetPRIVValueData(); #endif // RTP_SUPPORT_SDESPRIV diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index 810b8ba..53fcff2 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index d4c4611..81269f4 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpsrpacket.h + */ + #ifndef RTCPSRPACKET_H #define RTCPSRPACKET_H @@ -44,30 +48,76 @@ class RTCPCompoundPacket; +/** Describes an RTCP sender report packet. */ class RTCPSRPacket : public RTCPPacket { public: + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it + * points to is valid as long as the class instance exists. + */ RTCPSRPacket(uint8_t *data,size_t datalength); ~RTCPSRPacket() { } - // Sender info - + /** Returns the SSRC of the participant who sent this packet. */ uint32_t GetSenderSSRC() const; + + /** Returns the NTP timestamp contained in the sender report. */ RTPNTPTime GetNTPTimestamp() const; + + /** Returns the RTP timestamp contained in the sender report. */ uint32_t GetRTPTimestamp() const; + + /** Returns the sender's packet count contained in the sender report. */ uint32_t GetSenderPacketCount() const; + + /** Returns the sender's octet count contained in the sender report. */ uint32_t GetSenderOctetCount() const; - // Reportblocks - + /** Returns the number of reception report blocks present in this packet. */ int GetReceptionReportCount() const; - // Note: the validity of index is NOT checked! + + /** Returns the SSRC of the reception report block described by \c index which may have a value + * from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetSSRC(int index) const; + + /** Returns the `fraction lost' field of the reception report described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint8_t GetFractionLost(int index) const; + + /** Returns the number of lost packets in the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ int32_t GetLostPacketCount(int index) const; + + /** Returns the extended highest sequence number of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetExtendedHighestSequenceNumber(int index) const; + + /** Returns the jitter field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetJitter(int index) const; + + /** Returns the LSR field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetLSR(int index) const; + + /** Returns the DLSR field of the reception report block described by \c index which may have + * a value from 0 to GetReceptionReportCount()-1 (note that no check is performed to see if \c index is + * valid). + */ uint32_t GetDLSR(int index) const; #ifdef RTPDEBUG diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 2deb637..265ffb5 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtcpunknownpacket.h + */ + #ifndef RTCPUNKNOWNPACKET_H #define RTCPUNKNOWNPACKET_H @@ -39,16 +43,25 @@ class RTCPCompoundPacket; +/** Describes an RTCP packet of unknown type. + * Describes an RTCP packet of unknown type. This class doesn't have any extra member functions besides + * the ones it inherited. Note that since an unknown packet type doesn't have any format to check + * against, the IsKnownFormat function will trivially return \c true. + */ class RTCPUnknownPacket : public RTCPPacket { public: - RTCPUnknownPacket(uint8_t *data,size_t datalen) : - RTCPPacket(Unknown,data,datalen) + /** Creates an instance based on the data in \c data with length \c datalen. + * Creates an instance based on the data in \c data with length \c datalen. Since the \c data pointer + * is referenced inside the class (no copy of the data is made) one must make sure that the memory it + * points to is valid as long as the class instance exists. + */ + RTCPUnknownPacket(uint8_t *data,size_t datalen) : RTCPPacket(Unknown,data,datalen) { // Since we don't expect a format, we'll trivially put knownformat = true knownformat = true; } - ~RTCPUnknownPacket() { } + ~RTCPUnknownPacket() { } }; #endif // RTCPUNKNOWNPACKET_H diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 4cf596b..da985ce 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpaddress.h + */ + #ifndef RTPADDRESS_H #define RTPADDRESS_H @@ -37,16 +41,40 @@ #include "rtpconfig.h" #include +class RTPMemoryManager; + +/** This class is an abstract class which is used to specify destinations, multicast groups etc. */ class RTPAddress { public: - enum AddressType { IPv4Address, IPv6Address, UserDefinedAddress }; + /** Identifies the actual implementation being used. */ + enum AddressType + { + IPv4Address, /**< Used by the UDP over IPv4 transmitter. */ + IPv6Address, /**< Used by the UDP over IPv6 transmitter. */ + UserDefinedAddress /**< Can be useful for a user-defined transmitter. */ + }; + + /** Returns the type of address the actual implementation represents. */ AddressType GetAddressType() const { return addresstype; } - virtual RTPAddress *CreateCopy() const = 0; - - // note: these functions should be able to handle a NULL argument + /** Creates a copy of the RTPAddress instance. + * Creates a copy of the RTPAddress instance. If \c mgr is not NULL, the + * corresponding memory manager will be used to allocate the memory for the address + * copy. + */ + virtual RTPAddress *CreateCopy(RTPMemoryManager *mgr) const = 0; + + /** Checks if the address \c addr is the same address as the one this instance represents. + * Checks if the address \c addr is the same address as the one this instance represents. + * Implementations must be able to handle a NULL argument. + */ virtual bool IsSameAddress(const RTPAddress *addr) const = 0; + + /** Checks if the address \c addr represents the same host as this instance. + * Checks if the address \c addr represents the same host as this instance. Implementations + * must be able to handle a NULL argument. + */ virtual bool IsFromSameHost(const RTPAddress *addr) const = 0; #ifdef RTPDEBUG @@ -55,7 +83,8 @@ class RTPAddress virtual ~RTPAddress() { } protected: - RTPAddress(const AddressType t) : addresstype(t) { } // only allow subclasses to be created + // only allow subclasses to be created + RTPAddress(const AddressType t) : addresstype(t) { } private: const AddressType addresstype; }; diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index 77da3fa..54f7671 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -32,13 +32,14 @@ #include "rtpcollisionlist.h" #include "rtperrors.h" +#include "rtpmemorymanager.h" #ifdef RTPDEBUG #include #endif // RTPDEBUG #include "rtpdebug.h" -RTPCollisionList::RTPCollisionList() +RTPCollisionList::RTPCollisionList(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { #if (defined(WIN32) || defined(_WIN32_WCE)) timeinit.Dummy(); @@ -50,7 +51,7 @@ void RTPCollisionList::Clear() std::list::iterator it; for (it = addresslist.begin() ; it != addresslist.end() ; it++) - delete (*it).addr; + RTPDelete((*it).addr,GetMemoryManager()); addresslist.clear(); } @@ -71,7 +72,7 @@ int RTPCollisionList::UpdateAddress(const RTPAddress *addr,const RTPTime &receiv } } - RTPAddress *newaddr = addr->CreateCopy(); + RTPAddress *newaddr = addr->CreateCopy(GetMemoryManager()); if (newaddr == 0) return ERR_RTP_OUTOFMEM; @@ -104,7 +105,7 @@ void RTPCollisionList::Timeout(const RTPTime ¤ttime,const RTPTime &timeout { if ((*it).recvtime < checktime) // timeout { - delete (*it).addr; + RTPDelete((*it).addr,GetMemoryManager()); it = addresslist.erase(it); } else diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index 48b1e32..f28b0ee 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpcollisionlist.h + */ + #ifndef RTPCOLLISIONLIST_H #define RTPCOLLISIONLIST_H @@ -37,18 +41,34 @@ #include "rtpconfig.h" #include "rtpaddress.h" #include "rtptimeutilities.h" +#include "rtpmemoryobject.h" #include class RTPAddress; -class RTPCollisionList +/** This class represents a list of addresses from which SSRC collisions were detected. */ +class RTPCollisionList : public RTPMemoryObject { public: - RTPCollisionList(); + /** Constructs an instance, optionally installing a memory manager. */ + RTPCollisionList(RTPMemoryManager *mgr = 0); ~RTPCollisionList() { Clear(); } + + /** Clears the list of addresses. */ void Clear(); + + /** Updates the entry for address \c addr to indicate that a collision was detected at time \c receivetime. + * Updates the entry for address \c addr to indicate that a collision was detected at time \c receivetime. + * If the entry did not exist yet, the flag \c created is set to \c true, otherwise it is set to \c false. + */ int UpdateAddress(const RTPAddress *addr,const RTPTime &receivetime,bool *created); + + /** Returns \c true} if the address \c addr appears in the list. */ bool HasAddress(const RTPAddress *addr) const; + + /** Assuming that the current time is given by \c currenttime, this function times out entries which + * haven't been updated in the previous time interval specified by \c timeoutdelay. + */ void Timeout(const RTPTime ¤ttime,const RTPTime &timeoutdelay); #ifdef RTPDEBUG void Dump(); diff --git a/src/rtpconfig.h b/src/rtpconfig.h index 6319104..c93e442 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index 905930d..1436466 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -50,8 +50,6 @@ @RTP_SUPPORT_SDESPRIV@ -@RTP_SUPPORT_INLINETEMPLATEPARAM@ - @RTP_SUPPORT_PROBATION@ @RTP_SUPPORT_GNUDRAND@ @@ -66,5 +64,9 @@ @RTP_SUPPORT_IFADDRS@ +@RTP_SUPPORT_SENDAPP@ + +@RTP_SUPPORT_MEMORYMANAGEMENT@ + #endif // RTPCONFIG_UNIX_H diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index aecb5cc..dd31255 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -46,5 +46,9 @@ //#define RTP_SUPPORT_IPV6MULTICAST +#define RTP_SUPPORT_SENDAPP + +#define RTP_SUPPORT_MEMORYMANAGEMENT + #endif // RTPCONFIG_WIN_H diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index e4720da..616c7ab 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpdebug.h b/src/rtpdebug.h index baa978e..54e1a5d 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpdefines.h b/src/rtpdefines.h index 62965ed..1315174 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 77bda4f..943c5ab 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtperrors.h b/src/rtperrors.h index ffa720c..01ea49a 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,12 +30,17 @@ */ +/** + * \file rtperrors.h + */ + #ifndef RTPERRORS_H #define RTPERRORS_H #include +/** Returns a string describing the error code \c errcode. */ std::string RTPGetErrorString(int errcode); #define ERR_RTP_OUTOFMEM -1 diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 2ed7b50..652c740 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -34,7 +34,12 @@ #define RTPHASHTABLE_H +/** + * \file rtphashtable.h + */ + #include "rtperrors.h" +#include "rtpmemoryobject.h" #ifdef RTPDEBUG #include @@ -42,10 +47,10 @@ //template template -class RTPHashTable +class RTPHashTable : public RTPMemoryObject { public: - RTPHashTable(); + RTPHashTable(RTPMemoryManager *mgr = 0, int memtype = RTPMEM_TYPE_OTHER); ~RTPHashTable() { Clear(); } void GotoFirstElement() { curhashelem = firsthashelem; } @@ -86,15 +91,21 @@ class RTPHashTable HashElement *table[hashsize]; HashElement *firsthashelem,*lasthashelem; HashElement *curhashelem; +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + int memorytype; +#endif // RTP_SUPPORT_MEMORYMANAGEMENT }; template -inline RTPHashTable::RTPHashTable() +inline RTPHashTable::RTPHashTable(RTPMemoryManager *mgr,int memtype) : RTPMemoryObject(mgr) { for (int i = 0 ; i < hashsize ; i++) table[i] = 0; firsthashelem = 0; lasthashelem = 0; +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + memorytype = memtype; +#endif // RTP_SUPPORT_MEMORYMANAGEMENT } template @@ -145,7 +156,7 @@ inline int RTPHashTable::DeleteCurrentElement() } // finally, with everything being relinked, we can delete curhashelem - delete curhashelem; + RTPDelete(curhashelem,GetMemoryManager()); curhashelem = tmp2; // Set to next element in the list } else @@ -226,7 +237,7 @@ inline void RTPHashTable::Clear() while (tmp1 != 0) { tmp2 = tmp1->listnext; - delete tmp1; + RTPDelete(tmp1,GetMemoryManager()); tmp1 = tmp2; } firsthashelem = 0; @@ -258,7 +269,7 @@ inline int RTPHashTable::AddElement(const Element &el // Okay, the key doesn't exist, so we can add the new element in the hash table - newelem = new HashElement(elem,index); + newelem = RTPNew(GetMemoryManager(),memorytype) HashElement(elem,index); if (newelem == 0) return ERR_RTP_OUTOFMEM; diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index fdc8c77..9484f23 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -38,7 +38,7 @@ #define RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS 32 -RTPInternalSourceData::RTPInternalSourceData(uint32_t ssrc,RTPSources::ProbationType probtype):RTPSourceData(ssrc) +RTPInternalSourceData::RTPInternalSourceData(uint32_t ssrc,RTPSources::ProbationType probtype,RTPMemoryManager *mgr):RTPSourceData(ssrc,mgr) { #ifdef RTP_SUPPORT_PROBATION probationtype = probtype; @@ -123,7 +123,7 @@ int RTPInternalSourceData::ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &re { RTPPacket *p = *(packetlist.begin()); packetlist.pop_front(); - delete p; + RTPDelete(p,GetMemoryManager()); } } @@ -264,13 +264,13 @@ int RTPInternalSourceData::ProcessBYEPacket(const uint8_t *reason,size_t reasonl { if (byereason) { - delete [] byereason; + RTPDeleteByteArray(byereason,GetMemoryManager()); byereason = 0; byereasonlen = 0; } byetime = receivetime; - byereason = new uint8_t[reasonlen]; + byereason = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTCPBYEREASON) uint8_t[reasonlen]; if (byereason == 0) return ERR_RTP_OUTOFMEM; memcpy(byereason,reason,reasonlen); diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index 729ec86..fc348be 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpinternalsourcedata.h + */ + #ifndef RTPINTERNALSOURCEDATA_H #define RTPINTERNALSOURCEDATA_H @@ -43,7 +47,7 @@ class RTPInternalSourceData : public RTPSourceData { public: - RTPInternalSourceData(uint32_t ssrc, RTPSources::ProbationType probtype); + RTPInternalSourceData(uint32_t ssrc, RTPSources::ProbationType probtype, RTPMemoryManager *mgr = 0); ~RTPInternalSourceData(); int ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,bool *stored); @@ -80,18 +84,18 @@ inline int RTPInternalSourceData::SetRTPDataAddress(const RTPAddress *a) { if (rtpaddr) { - delete rtpaddr; + RTPDelete(rtpaddr,GetMemoryManager()); rtpaddr = 0; } } else { - RTPAddress *newaddr = a->CreateCopy(); + RTPAddress *newaddr = a->CreateCopy(GetMemoryManager()); if (newaddr == 0) return ERR_RTP_OUTOFMEM; if (rtpaddr && a != rtpaddr) - delete rtpaddr; + RTPDelete(rtpaddr,GetMemoryManager()); rtpaddr = newaddr; } isrtpaddrset = true; @@ -104,18 +108,18 @@ inline int RTPInternalSourceData::SetRTCPDataAddress(const RTPAddress *a) { if (rtcpaddr) { - delete rtcpaddr; + RTPDelete(rtcpaddr,GetMemoryManager()); rtcpaddr = 0; } } else { - RTPAddress *newaddr = a->CreateCopy(); + RTPAddress *newaddr = a->CreateCopy(GetMemoryManager()); if (newaddr == 0) return ERR_RTP_OUTOFMEM; if (rtcpaddr && a != rtcpaddr) - delete rtcpaddr; + RTPDelete(rtcpaddr,GetMemoryManager()); rtcpaddr = newaddr; } isrtcpaddrset = true; diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 338a905..f95bf30 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -31,6 +31,7 @@ */ #include "rtpipv4address.h" +#include "rtpmemorymanager.h" #ifdef RTPDEBUG #include "rtpdefines.h" #include @@ -64,9 +65,9 @@ bool RTPIPv4Address::IsFromSameHost(const RTPAddress *addr) const return false; } -RTPAddress *RTPIPv4Address::CreateCopy() const +RTPAddress *RTPIPv4Address::CreateCopy(RTPMemoryManager *mgr) const { - RTPIPv4Address *a = new RTPIPv4Address(ip,port); + RTPIPv4Address *a = RTPNew(mgr,RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv4Address(ip,port); return a; } diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index f76cfb0..f14941c 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpipv4address.h + */ + #ifndef RTPIPV4ADDRESS_H #define RTPIPV4ADDRESS_H @@ -38,18 +42,40 @@ #include "rtpaddress.h" #include "rtptypes.h" +class RTPMemoryManager; + +/** Represents an IPv4 IP address and port. + * This class is used by the UDP over IPv4 transmission component. + * When an RTPIPv4Address is used in one of the multicast functions of the transmitter, the port + * number is ignored. When an instance is used in one of the accept or ignore functions of the + * transmitter, a zero port number represents all ports for the specified IP address. + */ class RTPIPv4Address : public RTPAddress { public: - RTPIPv4Address(uint32_t ip = 0, uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = ip; RTPIPv4Address::port = port; } - RTPIPv4Address(const uint8_t ip[4],uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); RTPIPv4Address::port = port; } - ~RTPIPv4Address() { } - void SetIP(uint32_t ip) { RTPIPv4Address::ip = ip; } - void SetIP(const uint8_t ip[4]) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); } - void SetPort(uint16_t port) { RTPIPv4Address::port = port; } - uint32_t GetIP() const { return ip; } - uint16_t GetPort() const { return port; } - RTPAddress *CreateCopy() const; + /** Creates an instance with IP address \c ip and port number \c port (both are interpreted in host byte order). */ + RTPIPv4Address(uint32_t ip = 0, uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = ip; RTPIPv4Address::port = port; } + + /** Creates an instance with IP address \c ip and port number \c port (\c port is interpreted in host byte order). */ + RTPIPv4Address(const uint8_t ip[4],uint16_t port = 0):RTPAddress(IPv4Address) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); RTPIPv4Address::port = port; } + ~RTPIPv4Address() { } + + /** Sets the IP address for this instance to \c ip which is assumed to be in host byte order. */ + void SetIP(uint32_t ip) { RTPIPv4Address::ip = ip; } + + /** Sets the IP address of this instance to \c ip. */ + void SetIP(const uint8_t ip[4]) { RTPIPv4Address::ip = (uint32_t)ip[3]; RTPIPv4Address::ip |= (((uint32_t)ip[2])<<8); RTPIPv4Address::ip |= (((uint32_t)ip[1])<<16); RTPIPv4Address::ip |= (((uint32_t)ip[0])<<24); } + + /** Sets the port number for this instance to \c port which is interpreted in host byte order. */ + void SetPort(uint16_t port) { RTPIPv4Address::port = port; } + + /** Returns the IP address contained in this instance in host byte order. */ + uint32_t GetIP() const { return ip; } + + /** Returns the port number of this instance in host byte order. */ + uint16_t GetPort() const { return port; } + + RTPAddress *CreateCopy(RTPMemoryManager *mgr) const; bool IsSameAddress(const RTPAddress *addr) const; bool IsFromSameHost(const RTPAddress *addr) const; #ifdef RTPDEBUG diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 0166791..a09027f 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpipv4destination.h + */ + #ifndef RTPIPV4DESTINATION_H #define RTPIPV4DESTINATION_H @@ -37,32 +41,55 @@ #include "rtpconfig.h" #if ! (defined(WIN32) || defined(_WIN32_WCE)) #include + #include + #include #endif // WIN32 #ifdef RTPDEBUG #include "rtpdefines.h" #include #include #endif // RTPDEBUG +#include class RTPIPv4Destination { public: - // (nbo = network byte order, hbo = host byte order) - - RTPIPv4Destination(uint32_t ip,uint16_t rtpportbase) { ipaddr_hbo = ip; ipaddr_nbo = htonl(ip); rtpport_nbo = htons(rtpportbase); rtcpport_nbo = htons(rtpportbase+1); } - uint32_t GetIP_HBO() const { return ipaddr_hbo; } - uint32_t GetIP_NBO() const { return ipaddr_nbo; } - uint16_t GetRTPPort_NBO() const { return rtpport_nbo; } - uint16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } - bool operator==(const RTPIPv4Destination &src) const { if (src.ipaddr_nbo == ipaddr_nbo && src.rtpport_nbo == rtpport_nbo) return true; return false; } // NOTE: I only check IP and portbase + RTPIPv4Destination(uint32_t ip,uint16_t rtpportbase) + { + memset(&rtpaddr,0,sizeof(struct sockaddr_in)); + memset(&rtcpaddr,0,sizeof(struct sockaddr_in)); + + rtpaddr.sin_family = AF_INET; + rtpaddr.sin_port = htons(rtpportbase); + rtpaddr.sin_addr.s_addr = htonl(ip); + + rtcpaddr.sin_family = AF_INET; + rtcpaddr.sin_port = htons(rtpportbase+1); + rtcpaddr.sin_addr.s_addr = htonl(ip); + + RTPIPv4Destination::ip = ip; + } + + bool operator==(const RTPIPv4Destination &src) const + { + if (rtpaddr.sin_addr.s_addr == src.rtpaddr.sin_addr.s_addr && rtpaddr.sin_port == src.rtpaddr.sin_port) + return true; + return false; + } + uint32_t GetIP() const { return ip; } + // nbo = network byte order + uint32_t GetIP_NBO() const { return rtpaddr.sin_addr.s_addr; } + uint16_t GetRTPPort_NBO() const { return rtpaddr.sin_port; } + uint16_t GetRTCPPort_NBO() const { return rtcpaddr.sin_port; } + const struct sockaddr_in *GetRTPSockAddr() const { return &rtpaddr; } + const struct sockaddr_in *GetRTCPSockAddr() const { return &rtcpaddr; } #ifdef RTPDEBUG std::string GetDestinationString() const; #endif // RTPDEBUG private: - uint32_t ipaddr_hbo; - uint32_t ipaddr_nbo; - uint16_t rtpport_nbo; - uint16_t rtcpport_nbo; + uint32_t ip; + struct sockaddr_in rtpaddr; + struct sockaddr_in rtcpaddr; }; #ifdef RTPDEBUG @@ -78,3 +105,4 @@ inline std::string RTPIPv4Destination::GetDestinationString() const #endif // RTPDEBUG #endif // RTPIPV4DESTINATION_H + diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 1acbdc7..f42ba9b 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -31,6 +31,7 @@ */ #include "rtpipv6address.h" +#include "rtpmemorymanager.h" #ifdef RTP_SUPPORT_IPV6 @@ -41,9 +42,9 @@ #include "rtpdebug.h" -RTPAddress *RTPIPv6Address::CreateCopy() const +RTPAddress *RTPIPv6Address::CreateCopy(RTPMemoryManager *mgr) const { - RTPIPv6Address *newaddr = new RTPIPv6Address(ip,port); + RTPIPv6Address *newaddr = RTPNew(mgr,RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv6Address(ip,port); return newaddr; } diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index 070082b..a96fce7 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpipv6address.h + */ + #ifndef RTPIPV6ADDRESS_H #define RTPIPV6ADDRESS_H @@ -44,21 +48,47 @@ #include #endif // WIN32 +/** Represents an IPv6 IP address and port. + * This class is used by the UDP over IPv4 transmission component. + * When an RTPIPv6Address is used in one of the multicast functions of the + * transmitter, the port number is ignored. When an instance is used in one of + * the accept or ignore functions of the transmitter, a zero port number represents + * all ports for the specified IP address. + */ class RTPIPv6Address : public RTPAddress { public: - RTPIPv6Address():RTPAddress(IPv6Address) { for (int i = 0 ; i < 16 ; i++) ip.s6_addr[i] = 0; port = 0; } - RTPIPv6Address(const uint8_t ip[16],uint16_t port = 0):RTPAddress(IPv6Address) { SetIP(ip); RTPIPv6Address::port = port; } - RTPIPv6Address(in6_addr ip,uint16_t port = 0):RTPAddress(IPv6Address) { RTPIPv6Address::ip = ip; RTPIPv6Address::port = port; } - ~RTPIPv6Address() { } - void SetIP(in6_addr ip) { RTPIPv6Address::ip = ip; } - void SetIP(const uint8_t ip[16]) { for (int i = 0 ; i < 16 ; i++) RTPIPv6Address::ip.s6_addr[i] = ip[i]; } - void SetPort(uint16_t port) { RTPIPv6Address::port = port; } - void GetIP(uint8_t ip[16]) const { for (int i = 0 ; i < 16 ; i++) ip[i] = RTPIPv6Address::ip.s6_addr[i]; } - in6_addr GetIP() const { return ip; } - uint16_t GetPort() const { return port; } - - RTPAddress *CreateCopy() const; + /** Creates an instance with IP address and port number set to zero. */ + RTPIPv6Address():RTPAddress(IPv6Address) { for (int i = 0 ; i < 16 ; i++) ip.s6_addr[i] = 0; port = 0; } + + /** Creates an instance with IP address \c ip and port number \c port (the port number is assumed to be in + * host byte order). */ + RTPIPv6Address(const uint8_t ip[16],uint16_t port = 0):RTPAddress(IPv6Address) { SetIP(ip); RTPIPv6Address::port = port; } + + /** Creates an instance with IP address \c ip and port number \c port (the port number is assumed to be in + * host byte order). */ + RTPIPv6Address(in6_addr ip,uint16_t port = 0):RTPAddress(IPv6Address) { RTPIPv6Address::ip = ip; RTPIPv6Address::port = port; } + ~RTPIPv6Address() { } + + /** Sets the IP address for this instance to \c ip. */ + void SetIP(in6_addr ip) { RTPIPv6Address::ip = ip; } + + /** Sets the IP address for this instance to \c ip. */ + void SetIP(const uint8_t ip[16]) { for (int i = 0 ; i < 16 ; i++) RTPIPv6Address::ip.s6_addr[i] = ip[i]; } + + /** Sets the port number for this instance to \c port, which is interpreted in host byte order. */ + void SetPort(uint16_t port) { RTPIPv6Address::port = port; } + + /** Copies the IP address of this instance in \c ip. */ + void GetIP(uint8_t ip[16]) const { for (int i = 0 ; i < 16 ; i++) ip[i] = RTPIPv6Address::ip.s6_addr[i]; } + + /** Returns the IP address of this instance. */ + in6_addr GetIP() const { return ip; } + + /** Returns the port number contained in this instance in host byte order. */ + uint16_t GetPort() const { return port; } + + RTPAddress *CreateCopy(RTPMemoryManager *mgr) const; bool IsSameAddress(const RTPAddress *addr) const; bool IsFromSameHost(const RTPAddress *addr) const; #ifdef RTPDEBUG diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 6a9a46a..075ea0f 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpipv6destination.h + */ + #ifndef RTPIPV6DESTINATION_H #define RTPIPV6DESTINATION_H @@ -42,6 +46,8 @@ #include #ifndef WIN32 #include + #include + #include #endif // WIN32 #ifdef RTPDEBUG #include "rtpdefines.h" @@ -52,17 +58,32 @@ class RTPIPv6Destination { public: - RTPIPv6Destination(in6_addr ip,uint16_t portbase) { RTPIPv6Destination::ip = ip; rtpport_nbo = htons(portbase); rtcpport_nbo = htons(portbase+1); } - in6_addr GetIP() const { return ip; } - uint16_t GetRTPPort_NBO() const { return rtpport_nbo; } - uint16_t GetRTCPPort_NBO() const { return rtcpport_nbo; } - bool operator==(const RTPIPv6Destination &src) const { if (src.rtpport_nbo == rtpport_nbo && (memcmp(&(src.ip),&ip,sizeof(in6_addr)) == 0)) return true; return false; } // NOTE: I only check IP and portbase + RTPIPv6Destination(in6_addr ip,uint16_t portbase) + { + memset(&rtpaddr,0,sizeof(struct sockaddr_in6)); + memset(&rtcpaddr,0,sizeof(struct sockaddr_in6)); + rtpaddr.sin6_family = AF_INET6; + rtpaddr.sin6_port = htons(portbase); + rtpaddr.sin6_addr = ip; + rtpaddr.sin6_family = AF_INET6; + rtpaddr.sin6_port = htons(portbase+1); + rtpaddr.sin6_addr = ip; + } + in6_addr GetIP() const { return rtpaddr.sin6_addr; } + bool operator==(const RTPIPv6Destination &src) const + { + if (rtpaddr.sin6_port == src.rtpaddr.sin6_port && (memcmp(&(src.rtpaddr.sin6_addr),&(rtpaddr.sin6_addr),sizeof(in6_addr)) == 0)) + return true; + return false; + } + const struct sockaddr_in6 *GetRTPSockAddr() const { return &rtpaddr; } + const struct sockaddr_in6 *GetRTCPSockAddr() const { return &rtcpaddr; } #ifdef RTPDEBUG std::string GetDestinationString() const; #endif // RTPDEBUG private: - in6_addr ip; - uint16_t rtpport_nbo,rtcpport_nbo; + struct sockaddr_in6 rtpaddr; + struct sockaddr_in6 rtcpaddr; }; #ifdef RTPDEBUG diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 14353dc..9c8df0d 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,22 +30,27 @@ */ +/** + * \file rtpkeyhashtable.h + */ + #ifndef RTPKEYHASHTABLE_H #define RTPKEYHASHTABLE_H #include "rtpconfig.h" #include "rtperrors.h" +#include "rtpmemoryobject.h" #ifdef RTPDEBUG #include #endif // RTPDEBUG template -class RTPKeyHashTable +class RTPKeyHashTable : public RTPMemoryObject { public: - RTPKeyHashTable(); + RTPKeyHashTable(RTPMemoryManager *mgr = 0,int memtype = RTPMEM_TYPE_OTHER); ~RTPKeyHashTable() { Clear(); } void GotoFirstElement() { curhashelem = firsthashelem; } @@ -89,15 +94,21 @@ class RTPKeyHashTable HashElement *table[hashsize]; HashElement *firsthashelem,*lasthashelem; HashElement *curhashelem; +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + int memorytype; +#endif // RTP_SUPPORT_MEMORYMANAGEMENT }; template -inline RTPKeyHashTable::RTPKeyHashTable() +inline RTPKeyHashTable::RTPKeyHashTable(RTPMemoryManager *mgr,int memtype) : RTPMemoryObject(mgr) { for (int i = 0 ; i < hashsize ; i++) table[i] = 0; firsthashelem = 0; lasthashelem = 0; +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + memorytype = memtype; +#endif // RTP_SUPPORT_MEMORYMANAGEMENT } template @@ -148,7 +159,7 @@ inline int RTPKeyHashTable::DeleteCurrentElement( } // finally, with everything being relinked, we can delete curhashelem - delete curhashelem; + RTPDelete(curhashelem,GetMemoryManager()); curhashelem = tmp2; // Set to next element in list } else @@ -229,7 +240,7 @@ inline void RTPKeyHashTable::Clear() while (tmp1 != 0) { tmp2 = tmp1->listnext; - delete tmp1; + RTPDelete(tmp1,GetMemoryManager()); tmp1 = tmp2; } firsthashelem = 0; @@ -261,7 +272,7 @@ inline int RTPKeyHashTable::AddElement(const Key // Okay, the key doesn't exist, so we can add the new element in the hash table - newelem = new HashElement(k,elem,index); + newelem = RTPNew(GetMemoryManager(),memorytype) HashElement(k,elem,index); if (newelem == 0) return ERR_RTP_OUTOFMEM; diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 7a708cf..b2a4969 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -35,7 +35,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,5,2); + return RTPLibraryVersion(3,6,0); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 84d9e80..6800e31 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtplibraryversion.h + */ + #ifndef RTPLIBRARYVERSION_H #define RTPLIBRARYVERSION_H @@ -37,16 +41,27 @@ #include #include +/** + * Used to provide information about the version of the library. + */ class RTPLibraryVersion { public: - static RTPLibraryVersion GetVersion(); + /** Returns an instance of RTPLibraryVersion describing the version of the library. */ + static RTPLibraryVersion GetVersion(); private: RTPLibraryVersion(int major,int minor,int debug) { majornr = major; minornr = minor; debugnr = debug; } public: + /** Returns the major version number. */ int GetMajorNumber() const { return majornr; } + + /** Returns the minor version number. */ int GetMinorNumber() const { return minornr; } + + /** Returns the debug version number. */ int GetDebugNumber() const { return debugnr; } + + /** Returns a string describing the library version. */ std::string GetVersionString() const; private: int debugnr,minornr,majornr; diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h new file mode 100644 index 0000000..8cb1bea --- /dev/null +++ b/src/rtpmemorymanager.h @@ -0,0 +1,247 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2006 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtpmemorymanager.h + */ + +#ifndef RTPMEMORYMANAGER_H + +#define RTPMEMORYMANAGER_H + +#include "rtpconfig.h" +#include "rtptypes.h" + +/** Used to indicate a general kind of memory block. */ +#define RTPMEM_TYPE_OTHER 0 + +/** Buffer to store an incoming RTP packet. */ +#define RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET 1 + +/** Buffer to store an incoming RTCP packet. */ +#define RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET 2 + +/** Buffer to store an RTCP APP packet. */ +#define RTPMEM_TYPE_BUFFER_RTCPAPPPACKET 3 + +/** Buffer to store an RTCP BYE packet. */ +#define RTPMEM_TYPE_BUFFER_RTCPBYEPACKET 4 + +/** Buffer to store a BYE reason. */ +#define RTPMEM_TYPE_BUFFER_RTCPBYEREASON 5 + +/** Buffer to store an RTCP compound packet. */ +#define RTPMEM_TYPE_BUFFER_RTCPCOMPOUNDPACKET 6 + +/** Buffer to store an SDES block. */ +#define RTPMEM_TYPE_BUFFER_RTCPSDESBLOCK 7 + +/** Buffer to store an RTP packet. */ +#define RTPMEM_TYPE_BUFFER_RTPPACKET 8 + +/** Buffer used by an RTPPacketBuilder instance. */ +#define RTPMEM_TYPE_BUFFER_RTPPACKETBUILDERBUFFER 9 + +/** Buffer to store an SDES item. */ +#define RTPMEM_TYPE_BUFFER_SDESITEM 10 + +/** Hash element used in the accept/ignore table. */ +#define RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT 11 + +/** Buffer to store a PortInfo instance, used by the UDP over IPv4 and IPv6 transmitters. */ +#define RTPMEM_TYPE_CLASS_ACCEPTIGNOREPORTINFO 12 + +/** Buffer to store a HashElement instance for the destination hash table. */ +#define RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT 13 + +/** Buffer to store a HashElement instance for the multicast hash table. */ +#define RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT 14 + +/** Buffer to store an instance of RTCPAPPPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPAPPPACKET 15 + +/** Buffer to store an instance of RTCPBYEPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPBYEPACKET 16 + +/** Buffer to store an instance of RTCPCompoundPacketBuilder. */ +#define RTPMEM_TYPE_CLASS_RTCPCOMPOUNDPACKETBUILDER 17 + +/** Buffer to store an RTCPReceiverReport instance. */ +#define RTPMEM_TYPE_CLASS_RTCPRECEIVERREPORT 18 + +/** Buffer to store an instance of RTCPRRPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPRRPACKET 19 + +/** Buffer to store an instance of RTCPSDESPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPSDESPACKET 20 + +/** Buffer to store an instance of RTCPSRPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPSRPACKET 21 + +/** Buffer to store an instance of RTCPUnknownPacket. */ +#define RTPMEM_TYPE_CLASS_RTCPUNKNOWNPACKET 22 + +/** Buffer to store an instance of an RTPAddress derived class. */ +#define RTPMEM_TYPE_CLASS_RTPADDRESS 23 + +/** Buffer to store an instance of RTPInternalSourceData. */ +#define RTPMEM_TYPE_CLASS_RTPINTERNALSOURCEDATA 24 + +/** Buffer to store an RTPPacket instance. */ +#define RTPMEM_TYPE_CLASS_RTPPACKET 25 + +/** Buffer to store an RTPPollThread instance. */ +#define RTPMEM_TYPE_CLASS_RTPPOLLTHREAD 26 + +/** Buffer to store an RTPRawPacket instance. */ +#define RTPMEM_TYPE_CLASS_RTPRAWPACKET 27 + +/** Buffer to store an RTPTransmissionInfo derived class. */ +#define RTPMEM_TYPE_CLASS_RTPTRANSMISSIONINFO 28 + +/** Buffer to store an RTPTransmitter derived class. */ +#define RTPMEM_TYPE_CLASS_RTPTRANSMITTER 29 + +/** Buffer to store an SDESPrivateItem instance. */ +#define RTPMEM_TYPE_CLASS_SDESPRIVATEITEM 30 + +/** Buffer to store an SDESSource instance. */ +#define RTPMEM_TYPE_CLASS_SDESSOURCE 31 + +/** Buffer to store a HashElement instance for the source table. */ +#define RTPMEM_TYPE_CLASS_SOURCETABLEHASHELEMENT 32 + +/** A memory manager. */ +class RTPMemoryManager +{ +public: + RTPMemoryManager() { } + virtual ~RTPMemoryManager() { } + + /** Called to allocate \c numbytes of memory. + * Called to allocate \c numbytes of memory. The \c memtype parameter + * indicates what the purpose of the memory block is. Relevant values + * can be found in rtpmemorymanager.h . Note that the types starting with + * \c RTPMEM_TYPE_CLASS indicate fixed size buffers and that types starting + * with \c RTPMEM_TYPE_BUFFER indicate variable size buffers. + */ + virtual void *AllocateBuffer(size_t numbytes, int memtype) = 0; + + /** Frees the previously allocated memory block \c buffer */ + virtual void FreeBuffer(void *buffer) = 0; +}; + +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + +#include + +inline void *operator new(size_t numbytes, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + return operator new(numbytes); + return mgr->AllocateBuffer(numbytes,memtype); +} + +inline void operator delete(void *buffer, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + operator delete(buffer); + else + mgr->FreeBuffer(buffer); +} + +#if defined(WIN32) || defined(_WIN32_WCE) +#if _MSC_VER >= 1300 +inline void *operator new[](size_t numbytes, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + return operator new[](numbytes); + return mgr->AllocateBuffer(numbytes,memtype); +} + +inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + operator delete[](buffer); + else + mgr->FreeBuffer(buffer); +} +#endif // _MSC_VER >= 1300 +#else +inline void *operator new[](size_t numbytes, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + return operator new[](numbytes); + return mgr->AllocateBuffer(numbytes,memtype); +} + +inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) +{ + if (mgr == 0) + operator delete[](buffer); + else + mgr->FreeBuffer(buffer); +} +#endif // WIN32 || _WIN32_WCE + +inline void RTPDeleteByteArray(uint8_t *buf, RTPMemoryManager *mgr) +{ + if (mgr == 0) + delete [] buf; + else + mgr->FreeBuffer(buf); +} + +template +inline void RTPDelete(ClassName *obj, RTPMemoryManager *mgr) +{ + if (mgr == 0) + delete obj; + else + { + obj->~ClassName(); + mgr->FreeBuffer(obj); + } +} + +#define RTPNew(a,b) new(a,b) + +#else + +#define RTPNew(a,b) new +#define RTPDelete(a,b) delete a +#define RTPDeleteByteArray(a,b) delete [] a; + +#endif // RTP_SUPPORT_MEMORYMANAGEMENT + +#endif // RTPMEMORYMANAGER_H + diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h new file mode 100644 index 0000000..7a7b636 --- /dev/null +++ b/src/rtpmemoryobject.h @@ -0,0 +1,69 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2006 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the "Expertisecentrum Digitale Media" + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtpmemoryobject.h + */ + +#ifndef RTPMEMORYOBJECT_H + +#define RTPMEMORYOBJECT_H + +#include "rtpconfig.h" +#include "rtpmemorymanager.h" + +class RTPMemoryObject +{ +protected: +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + RTPMemoryObject(RTPMemoryManager *memmgr) : mgr(memmgr) { } +#else + RTPMemoryObject(RTPMemoryManager *memmgr) { } +#endif // RTP_SUPPORT_MEMORYMANAGEMENT + virtual ~RTPMemoryObject() { } + +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT + RTPMemoryManager *GetMemoryManager() const { return mgr; } + void SetMemoryManager(RTPMemoryManager *m) { mgr = m; } +#else + RTPMemoryManager *GetMemoryManager() const { return 0; } + void SetMemoryManager(RTPMemoryManager *m) { } +#endif // RTP_SUPPORT_MEMORYMANAGEMENT + +#ifdef RTP_SUPPORT_MEMORYMANAGEMENT +private: + RTPMemoryManager *mgr; +#endif // RTP_SUPPORT_MEMORYMANAGEMENT +}; + +#endif // RTPMEMORYOBJECT_H + diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index e53d82e..0f5ed84 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -65,7 +65,7 @@ void RTPPacket::Clear() externalbuffer = false; } -RTPPacket::RTPPacket(RTPRawPacket &rawpack) : receivetime(rawpack.GetReceiveTime()) +RTPPacket::RTPPacket(RTPRawPacket &rawpack,RTPMemoryManager *mgr) : receivetime(rawpack.GetReceiveTime()),RTPMemoryObject(mgr) { Clear(); error = ParseRawPacket(rawpack); @@ -74,7 +74,7 @@ RTPPacket::RTPPacket(RTPRawPacket &rawpack) : receivetime(rawpack.GetReceiveTime RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - size_t maxpacksize /* = 0 */ ) : receivetime(0,0) + size_t maxpacksize, RTPMemoryManager *mgr) : receivetime(0,0),RTPMemoryObject(mgr) { Clear(); error = BuildPacket(payloadtype,payloaddata,payloadlen,seqnr,timestamp,ssrc,gotmarker,numcsrcs, @@ -84,7 +84,7 @@ RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadl RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - void *buffer,size_t buffersize) : receivetime(0,0) + void *buffer,size_t buffersize, RTPMemoryManager *mgr) : receivetime(0,0),RTPMemoryObject(mgr) { Clear(); if (buffer == 0) @@ -250,7 +250,7 @@ int RTPPacket::BuildPacket(uint8_t payloadtype,const void *payloaddata,size_t pa if (buffer == 0) { - packet = new uint8_t [packetlength]; + packet = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTPPACKET) uint8_t [packetlength]; if (packet == 0) { packetlength = 0; diff --git a/src/rtppacket.h b/src/rtppacket.h index ae6764f..855347b 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtppacket.h + */ + #ifndef RTPPACKET_H #define RTPPACKET_H @@ -37,62 +41,112 @@ #include "rtpconfig.h" #include "rtptypes.h" #include "rtptimeutilities.h" +#include "rtpmemoryobject.h" class RTPRawPacket; -class RTPPacket +/** Represents an RTP Packet. + * The RTPPacket class can be used to parse a RTPRawPacket instance if it represents RTP data. + * The class can also be used to create a new RTP packet according to the parameters specified by + * the user. + */ +class RTPPacket : public RTPMemoryObject { public: - // If successfull, the data is moved from the raw packet to the RTPPacket instance - RTPPacket(RTPRawPacket &rawpack); - - // if maxpacksize == 0, it is ignored + /** Creates an RTPPacket instance based upon the data in \c rawpack, optionally installing a memory manager. + * Creates an RTPPacket instance based upon the data in \c rawpack, optionally installing a memory manager. + * If successful, the data is moved from the raw packet to the RTPPacket instance. + */ + RTPPacket(RTPRawPacket &rawpack,RTPMemoryManager *mgr = 0); + + /** Creates a new buffer for an RTP packet and fills in the fields according to the specified parameters. + * Creates a new buffer for an RTP packet and fills in the fields according to the specified parameters. + * If \c maxpacksize is not equal to zero, an error is generated if the total packet size would exceed + * \c maxpacksize. The arguments of the constructor are self-explanatory. Note that the size of a header + * extension is specified in a number of 32-bit words. A memory manager can be installed. + */ RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - size_t maxpacksize = 0); - // pretty much the same function, except that here the data is placed in an external buffer + size_t maxpacksize, RTPMemoryManager *mgr = 0); + + /** This constructor is similar to the other constructor, but here data is stored in an external buffer + * \c buffer with size \c buffersize. */ RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - void *buffer,size_t buffersize); + void *buffer,size_t buffersize,RTPMemoryManager *mgr = 0); + + virtual ~RTPPacket() { if (packet && !externalbuffer) RTPDeleteByteArray(packet,GetMemoryManager()); } + + /** If an error occurred in one of the constructors, this function returns the error code. */ + int GetCreationError() const { return error; } - virtual ~RTPPacket() { if (packet && !externalbuffer) delete [] packet; } - int GetCreationError() const { return error; } + /** Returns \c true if the RTP packet has a header extension and \c false otherwise. */ + bool HasExtension() const { return hasextension; } - bool HasExtension() const { return hasextension; } - bool HasMarker() const { return hasmarker; } + /** Returns \c true if the marker bit was set and \c false otherwise. */ + bool HasMarker() const { return hasmarker; } - int GetCSRCCount() const { return numcsrcs; } + /** Returns the number of CSRCs contained in this packet. */ + int GetCSRCCount() const { return numcsrcs; } + + /** Returns a specific CSRC identifier. + * Returns a specific CSRC identifier. The parameter \c num can go from 0 to GetCSRCCount()-1. + */ uint32_t GetCSRC(int num) const; - uint8_t GetPayloadType() const { return payloadtype; } - - // On reception, this is actually a 16 bit value. The high 16 bits - // are filled in when the packet is processed in the source - // table - uint32_t GetExtendedSequenceNumber() const { return extseqnr; } - uint16_t GetSequenceNumber() const { return (uint16_t)(extseqnr&0x0000FFFF); } - void SetExtendedSequenceNumber(uint32_t seq) { extseqnr = seq; } - - uint32_t GetTimestamp() const { return timestamp; } - uint32_t GetSSRC() const { return ssrc; } - - uint8_t *GetPacketData() const { return packet; } - uint8_t *GetPayloadData() const { return payload; } - size_t GetPacketLength() const { return packetlength; } - size_t GetPayloadLength() const { return payloadlength; } + /** Returns the payload type of the packet. */ + uint8_t GetPayloadType() const { return payloadtype; } + + /** Returns the extended sequence number of the packet. + * Returns the extended sequence number of the packet. When the packet is just received, + * only the low $16$ bits will be set. The high 16 bits can be filled in later. + */ + uint32_t GetExtendedSequenceNumber() const { return extseqnr; } + + /** Returns the sequence number of this packet. */ + uint16_t GetSequenceNumber() const { return (uint16_t)(extseqnr&0x0000FFFF); } + + /** Sets the extended sequence number of this packet to \c seq. */ + void SetExtendedSequenceNumber(uint32_t seq) { extseqnr = seq; } + + /** Returns the timestamp of this packet. */ + uint32_t GetTimestamp() const { return timestamp; } + + /** Returns the SSRC identifier stored in this packet. */ + uint32_t GetSSRC() const { return ssrc; } + + /** Returns a pointer to the data of the entire packet. */ + uint8_t *GetPacketData() const { return packet; } + + /** Returns a pointer to the actual payload data. */ + uint8_t *GetPayloadData() const { return payload; } + + /** Returns the length of the entire packet. */ + size_t GetPacketLength() const { return packetlength; } + + /** Returns the payload length. */ + size_t GetPayloadLength() const { return payloadlength; } + + /** If a header extension is present, this function returns the extension identifier. */ + uint16_t GetExtensionID() const { return extid; } + + /** Returns the length of the header extension data. */ + uint8_t *GetExtensionData() const { return extension; } - uint16_t GetExtensionID() const { return extid; } - uint8_t *GetExtensionData() const { return extension; } - size_t GetExtensionLength() const { return extensionlength; } + /** Returns the length of the header extension data. */ + size_t GetExtensionLength() const { return extensionlength; } #ifdef RTPDEBUG void Dump(); #endif // RTPDEBUG - // If parsed from a raw packet, the receive time is also copied. - // This function can be used to retrieve it. - RTPTime GetReceiveTime() const { return receivetime; } + /** Returns the time at which this packet was received. + * When an RTPPacket instance is created from an RTPRawPacket instance, the raw packet's + * reception time is stored in the RTPPacket instance. This function then retrieves that + * time. + */ + RTPTime GetReceiveTime() const { return receivetime; } private: void Clear(); int ParseRawPacket(RTPRawPacket &rawpack); diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index ed3b1f2..6e47386 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -42,7 +42,7 @@ #include "rtpdebug.h" -RTPPacketBuilder::RTPPacketBuilder() : lastwallclocktime(0,0) +RTPPacketBuilder::RTPPacketBuilder(RTPMemoryManager *mgr) : lastwallclocktime(0,0),RTPMemoryObject(mgr) { init = false; #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -63,7 +63,7 @@ int RTPPacketBuilder::Init(size_t max) return ERR_RTP_PACKBUILD_INVALIDMAXPACKETSIZE; maxpacksize = max; - buffer = new uint8_t [max]; + buffer = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTPPACKETBUILDERBUFFER) uint8_t [max]; if (buffer == 0) return ERR_RTP_OUTOFMEM; packetlength = 0; @@ -84,7 +84,7 @@ void RTPPacketBuilder::Destroy() { if (!init) return; - delete [] buffer; + RTPDeleteByteArray(buffer,GetMemoryManager()); init = false; } @@ -94,11 +94,11 @@ int RTPPacketBuilder::SetMaximumPacketSize(size_t max) if (max <= 0) return ERR_RTP_PACKBUILD_INVALIDMAXPACKETSIZE; - newbuf = new uint8_t[max]; + newbuf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RTPPACKETBUILDERBUFFER) uint8_t[max]; if (newbuf == 0) return ERR_RTP_OUTOFMEM; - delete [] buffer; + RTPDeleteByteArray(buffer,GetMemoryManager()); buffer = newbuf; maxpacksize = max; return 0; @@ -237,7 +237,7 @@ int RTPPacketBuilder::PrivateBuildPacket(const void *data,size_t len, uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords) { RTPPacket p(pt,data,len,seqnr,timestamp,ssrc,mark,numcsrcs,csrcs,gotextension,hdrextID, - (uint16_t)numhdrextwords,hdrextdata,buffer,maxpacksize); + (uint16_t)numhdrextwords,hdrextdata,buffer,maxpacksize,GetMemoryManager()); int status = p.GetCreationError(); if (status < 0) @@ -262,7 +262,6 @@ int RTPPacketBuilder::PrivateBuildPacket(const void *data,size_t len, timestamp += timestampinc; seqnr++; - return 0; } diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index 654fa21..c4cd31b 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtppacketbuilder.h + */ + #ifndef RTPPACKETBUILDER_H #define RTPPACKETBUILDER_H @@ -40,49 +44,141 @@ #include "rtprandom.h" #include "rtptimeutilities.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" class RTPSources; -class RTPPacketBuilder +/** This class can be used to build RTP packets and is a bit more high-level than the RTPPacket + * class: it generates an SSRC identifier, keeps track of timestamp and sequence number etc. + */ +class RTPPacketBuilder : public RTPMemoryObject { public: - RTPPacketBuilder(); + /** Constructs an instance, optionally installing a memory manager. */ + RTPPacketBuilder(RTPMemoryManager *mgr = 0); ~RTPPacketBuilder(); + + /** Initializes the builder to only allow packets with a size below \c maxpacksize. */ int Init(size_t maxpacksize); + + /** Cleans up the builder. */ void Destroy(); + + /** Returns the number of packets which have been created with the current SSRC identifier. */ uint32_t GetPacketCount() { if (!init) return 0; return numpackets; } + + /** Returns the number of payload octets which have been generated with this SSRC identifier. */ uint32_t GetPayloadOctetCount() { if (!init) return 0; return numpayloadbytes; } + + /** Sets the maximum allowed packet size to \c maxpacksize. */ int SetMaximumPacketSize(size_t maxpacksize); + /** Adds a CSRC to the CSRC list which will be stored in the RTP packets. */ int AddCSRC(uint32_t csrc); + + /** Deletes a CSRC from the list which will be stored in the RTP packets. */ int DeleteCSRC(uint32_t csrc); + + /** Clears the CSRC list. */ void ClearCSRCList(); + /** Builds a packet with payload \c data and payload length \c len. + * Builds a packet with payload \c data and payload length \c len. The payload type, marker + * and timestamp increment used will be those that have been set using the \c SetDefault + * functions below. + */ int BuildPacket(const void *data,size_t len); + + /** Builds a packet with payload \c data and payload length \c len. + * Builds a packet with payload \c data and payload length \c len. The payload type will be + * set to \c pt, the marker bit to \c mark and after building this packet, the timestamp will + * be incremented with \c timestamp. + */ int BuildPacket(const void *data,size_t len, uint8_t pt,bool mark,uint32_t timestampinc); + + /** Builds a packet with payload \c data and payload length \c len. + * Builds a packet with payload \c data and payload length \c len. The payload type, marker + * and timestamp increment used will be those that have been set using the \c SetDefault + * functions below. This packet will also contain an RTP header extension with identifier + * \c hdrextID and data \c hdrextdata. The length of the header extension data is given by + * \c numhdrextwords which expresses the length in a number of 32-bit words. + */ int BuildPacketEx(const void *data,size_t len, uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + + /** Builds a packet with payload \c data and payload length \c len. + * Builds a packet with payload \c data and payload length \c len. The payload type will be set + * to \c pt, the marker bit to \c mark and after building this packet, the timestamp will + * be incremented with \c timestamp. This packet will also contain an RTP header extension + * with identifier \c hdrextID and data \c hdrextdata. The length of the header extension + * data is given by \c numhdrextwords which expresses the length in a number of 32-bit words. + */ int BuildPacketEx(const void *data,size_t len, uint8_t pt,bool mark,uint32_t timestampinc, uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + + /** Returns a pointer to the last built RTP packet data. */ uint8_t *GetPacket() { if (!init) return 0; return buffer; } + + /** Returns the size of the last built RTP packet. */ size_t GetPacketLength() { if (!init) return 0; return packetlength; } + /** Sets the default payload type to \c pt. */ int SetDefaultPayloadType(uint8_t pt); + + /** Sets the default marker bit to \c m. */ int SetDefaultMark(bool m); + + /** Sets the default timestamp increment to \c timestampinc. */ int SetDefaultTimestampIncrement(uint32_t timestampinc); + + /** This function increments the timestamp with the amount given by \c inc. + * This function increments the timestamp with the amount given by \c inc. This can be useful + * if, for example, a packet was not sent because it contained only silence. Then, this function + * should be called to increment the timestamp with the appropriate amount so that the next packets + * will still be played at the correct time at other hosts. + */ int IncrementTimestamp(uint32_t inc); + + /** This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement + * member function. + * This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement + * member function. This can be useful if, for example, a packet was not sent because it contained only silence. + * Then, this function should be called to increment the timestamp with the appropriate amount so that the next + * packets will still be played at the correct time at other hosts. + */ int IncrementTimestampDefault(); + /** Creates a new SSRC to be used in generated packets. + * Creates a new SSRC to be used in generated packets. This will also generate new timestamp and + * sequence number offsets. + */ uint32_t CreateNewSSRC(); + + /** Creates a new SSRC to be used in generated packets. + * Creates a new SSRC to be used in generated packets. This will also generate new timestamp and + * sequence number offsets. The source table \c sources is used to make sure that the chosen SSRC + * isn't used by another participant yet. + */ uint32_t CreateNewSSRC(RTPSources &sources); + + /** Returns the current SSRC identifier. */ uint32_t GetSSRC() const { if (!init) return 0; return ssrc; } + + /** Returns the current RTP timestamp. */ uint32_t GetTimestamp() const { if (!init) return 0; return timestamp; } + + /** Returns the current sequence number. */ uint16_t GetSequenceNumber() const { if (!init) return 0; return seqnr; } - // note: these are not necessarily from the last packet! + /** Returns the time at which a packet was generated. + * Returns the time at which a packet was generated. This is not necessarily the time at which + * the last RTP packet was generated: if the timestamp increment was zero, the time is not updated. + */ RTPTime GetPacketTime() const { if (!init) return RTPTime(0,0); return lastwallclocktime; } + + /** Returns the RTP timestamp which corresponds to the time returned by the previous function. */ uint32_t GetPacketTimestamp() const { if (!init) return 0; return lastrtptimestamp; } private: int PrivateBuildPacket(const void *data,size_t len, diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index 568abf5..a4996ba 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 4116f7d..9db258e 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtppollthread.h + */ + #ifndef RTPPOLLTHREAD_H #define RTPPOLLTHREAD_H diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index df1e7ec..0f5dcf7 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -50,14 +50,29 @@ #include "rtpdebug.h" -#if (!defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) +#if (defined(WIN32) && !defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) + // If compiling on VC 8 or later for full Windows, we'll attempt to use rand_s, + // which generates better random numbers. However, its only supported on Windows XP, + // Windows Server 2003, and later, so we'll do a run-time check to see if we can + // use it (it won't work on Windows 2000 SP4 for example). #define RTP_SUPPORT_RANDS + #define QUOTEPROCNAME(x) #x + #ifndef RtlGenRandom + #define RtlGenRandom SystemFunction036 + #endif + + static bool checked_rand_s = false; + static bool use_rand_s = false; #endif +uint8_t GetRandom8_Default(); +uint16_t GetRandom16_Default(); +uint32_t GetRandom32_Default(); +double GetRandomDouble_Default(); + RTPRandom::RTPRandom() { -#ifndef RTP_SUPPORT_RANDS - + #if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) uint32_t x; @@ -72,11 +87,35 @@ RTPRandom::RTPRandom() state = (unsigned int)x; #endif // RTP_SUPPORT_GNUDRAND -#else // use simple rand and srand functions +#else // use simple rand and srand functions (or maybe rand_s) + +#ifdef RTP_SUPPORT_RANDS + if(checked_rand_s == false) + { + checked_rand_s = true; + use_rand_s = false; + + HMODULE hAdvApi32 = LoadLibrary("ADVAPI32.DLL"); + if(hAdvApi32 != NULL) + { + if(NULL != GetProcAddress( hAdvApi32, QUOTEPROCNAME( RtlGenRandom ) )) + { + use_rand_s = true; + } + FreeLibrary(hAdvApi32); + hAdvApi32 = NULL; + } + } + + // Note: If we use the rand_s function, it does not require initialization of a seed. + if(!use_rand_s) + { +#endif + uint32_t x; #ifndef _WIN32_WCE - x = (uint32_t)getpid(); + x = (uint32_t)_getpid(); x += (uint32_t)time(0); x -= (uint32_t)clock(); #else @@ -92,11 +131,13 @@ RTPRandom::RTPRandom() #endif // _WIN32_WCE x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); srand((unsigned int)x); -#endif // RTP_SUPPORT_GNUDRAND || RTP_SUPPORT_RANDR -#endif // RTP_SUPPORT_RANDS +#ifdef RTP_SUPPORT_RANDS + } // !support_rand_s +#endif + +#endif // RTP_SUPPORT_GNUDRAND || RTP_SUPPORT_RANDR - // Note: the rand_s function does not require initialization of a seed } RTPRandom::~RTPRandom() @@ -178,54 +219,105 @@ double RTPRandom::GetRandomDouble() uint8_t RTPRandom::GetRandom8() { - uint8_t x; - unsigned int r; - - rand_s(&r); - x = (uint8_t)(256.0*((double)r)/((double)UINT_MAX+1.0)); - return x; + if(use_rand_s) + { + uint8_t x; + unsigned int r; + + rand_s(&r); + x = (uint8_t)(256.0*((double)r)/((double)UINT_MAX+1.0)); + return x; + } + else + { + return GetRandom8_Default(); + } } uint16_t RTPRandom::GetRandom16() { - uint16_t x; - unsigned int r; - - rand_s(&r); - x = (uint16_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - return x; + if(use_rand_s) + { + uint16_t x; + unsigned int r; + + rand_s(&r); + x = (uint16_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); + return x; + } + else + { + return GetRandom16_Default(); + } } uint32_t RTPRandom::GetRandom32() { - uint32_t x,y; - unsigned int r; - - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y = x; - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y ^= (x<<8); - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y ^= (x<<16); - - return y; + if(use_rand_s) + { + uint32_t x,y; + unsigned int r; + + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); + y = x; + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); + y ^= (x<<8); + rand_s(&r); + x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); + y ^= (x<<16); + + return y; + } + else + { + return GetRandom32_Default(); + } } double RTPRandom::GetRandomDouble() { - unsigned int r; - - rand_s(&r); - double x = ((double)r)/((double)UINT_MAX+1.0); - return x; + if(use_rand_s) + { + unsigned int r; + + rand_s(&r); + double x = ((double)r)/((double)UINT_MAX+1.0); + return x; + } + else + { + return GetRandomDouble_Default(); + } } #else // use rand() uint8_t RTPRandom::GetRandom8() +{ + return GetRandom8_Default(); +} + +uint16_t RTPRandom::GetRandom16() +{ + return GetRandom16_Default(); +} + +uint32_t RTPRandom::GetRandom32() +{ + return GetRandom32_Default(); +} + +double RTPRandom::GetRandomDouble() +{ + return GetRandomDouble_Default(); +} + +#endif // RTP_SUPPORT_GNUDRAND + + +uint8_t GetRandom8_Default() { uint8_t x; @@ -233,7 +325,7 @@ uint8_t RTPRandom::GetRandom8() return x; } -uint16_t RTPRandom::GetRandom16() +uint16_t GetRandom16_Default() { uint16_t x; @@ -241,7 +333,7 @@ uint16_t RTPRandom::GetRandom16() return x; } -uint32_t RTPRandom::GetRandom32() +uint32_t GetRandom32_Default() { uint32_t x,y; @@ -255,11 +347,9 @@ uint32_t RTPRandom::GetRandom32() return y; } -double RTPRandom::GetRandomDouble() +double GetRandomDouble_Default() { double x = ((double)rand())/((double)RAND_MAX+1.0); return x; } -#endif // RTP_SUPPORT_GNUDRAND - diff --git a/src/rtprandom.h b/src/rtprandom.h index 8582c26..1e81698 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtprandom.h + */ + #ifndef RTPRANDOM_H #define RTPRANDOM_H @@ -38,15 +42,24 @@ #include "rtptypes.h" #include +/** The RTPRandom class can be used to generate random numbers. */ class RTPRandom { public: RTPRandom(); ~RTPRandom(); + + /** Returns a random eight bit value. */ uint8_t GetRandom8(); + + /** Returns a random sixteen bit value. */ uint16_t GetRandom16(); + + /** Returns a random thirty-two bit value. */ uint32_t GetRandom32(); - double GetRandomDouble(); // returns random value between 0.0 and 1.0 + + /** Returns a random number between $0.0$ and $1.0$. */ + double GetRandomDouble(); private: #if defined(RTP_SUPPORT_GNUDRAND) struct drand48_data drandbuffer; diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 11a88c6..83ab202 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtprawpacket.h + */ + #ifndef RTPRAWPACKET_H #define RTPRAWPACKET_H @@ -38,19 +42,45 @@ #include "rtptimeutilities.h" #include "rtpaddress.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" -class RTPRawPacket +/** This class is used by the transmission component to store the incoming RTP and RTCP data in. */ +class RTPRawPacket : public RTPMemoryObject { public: - RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp); + /** Creates an instance which stores data from \c data with length \c datalen. + * Creates an instance which stores data from \c data with length \c datalen. Only the pointer + * to the data is stored, no actual copy is made! The address from which this packet originated + * is set to \c address and the time at which the packet was received is set to \c recvtime. + * The flag which indicates whether this data is RTP or RTCP data is set to \c rtp. A memory + * manager can be installed as well. + */ + RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp,RTPMemoryManager *mgr = 0); ~RTPRawPacket(); - uint8_t *GetData() { return packetdata; } - size_t GetDataLength() const { return packetdatalength; } - RTPTime GetReceiveTime() const { return receivetime; } - const RTPAddress *GetSenderAddress() const { return senderaddress; } - bool IsRTP() const { return isrtp; } - void ZeroData() { packetdata = 0; packetdatalength = 0; } + /** Returns the pointer to the data which is contained in this packet. */ + uint8_t *GetData() { return packetdata; } + + /** Returns the length of the packet described by this instance. */ + size_t GetDataLength() const { return packetdatalength; } + + /** Returns the time at which this packet was received. */ + RTPTime GetReceiveTime() const { return receivetime; } + + /** Returns the address stored in this packet. */ + const RTPAddress *GetSenderAddress() const { return senderaddress; } + + /** Returns \c true if this data is RTP data, \c false if it is RTCP data. */ + bool IsRTP() const { return isrtp; } + + /** Sets the pointer to the data stored in this packet to zero. + * Sets the pointer to the data stored in this packet to zero. This will prevent + * a \c delete call for the actual data when the destructor of RTPRawPacket is called. + * This function is used by the RTPPacket and RTCPCompoundPacket classes to obtain + * the packet data (without having to copy it) and to make sure the data isn't deleted + * when the destructor of RTPRawPacket is called. + */ + void ZeroData() { packetdata = 0; packetdatalength = 0; } private: uint8_t *packetdata; size_t packetdatalength; @@ -59,7 +89,7 @@ class RTPRawPacket bool isrtp; }; -inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp):receivetime(recvtime) +inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp,RTPMemoryManager *mgr):receivetime(recvtime),RTPMemoryObject(mgr) { packetdata = data; packetdatalength = datalen; @@ -70,9 +100,9 @@ inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *addre inline RTPRawPacket::~RTPRawPacket() { if (packetdata) - delete [] packetdata; + RTPDeleteByteArray(packetdata,GetMemoryManager()); if (senderaddress) - delete senderaddress; + RTPDelete(senderaddress,GetMemoryManager()); } #endif // RTPRAWPACKET_H diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index e320374..3e8a604 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -40,7 +40,10 @@ #include "rtprawpacket.h" #include "rtppacket.h" #include "rtptimeutilities.h" -#include "rtcpcompoundpacket.h" +#include "rtpmemorymanager.h" +#ifdef RTP_SUPPORT_SENDAPP + #include "rtcpcompoundpacket.h" +#endif // RTP_SUPPORT_SENDAPP #ifndef WIN32 #include #include @@ -61,6 +64,8 @@ #define BUILDER_UNLOCK { if (usingpollthread) buildermutex.Unlock(); } #define SCHED_LOCK { if (usingpollthread) schedmutex.Lock(); } #define SCHED_UNLOCK { if (usingpollthread) schedmutex.Unlock(); } + #define PACKSENT_LOCK { if (usingpollthread) packsentmutex.Lock(); } + #define PACKSENT_UNLOCK { if (usingpollthread) packsentmutex.Unlock(); } #else #define SOURCES_LOCK #define SOURCES_UNLOCK @@ -68,10 +73,13 @@ #define BUILDER_UNLOCK #define SCHED_LOCK #define SCHED_UNLOCK + #define PACKSENT_LOCK + #define PACKSENT_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPSession::RTPSession(RTPTransmitter::TransmissionProtocol proto /* = RTPTransmitter::IPv4UDPProto */ ) - : protocol(proto),sources(*this),rtcpsched(sources),rtcpbuilder(sources,packetbuilder) +RTPSession::RTPSession(RTPMemoryManager *mgr) + : sources(*this,mgr),rtcpsched(sources),rtcpbuilder(sources,packetbuilder,mgr),RTPMemoryObject(mgr), + packetbuilder(mgr),collisionlist(mgr) { created = false; #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -84,7 +92,8 @@ RTPSession::~RTPSession() Destroy(); } -int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionParams *transparams /* = 0 */) +int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionParams *transparams /* = 0 */, + RTPTransmitter::TransmissionProtocol protocol) { int status; @@ -93,6 +102,7 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP usingpollthread = sessparams.IsUsingPollThread(); useSR_BYEifpossible = sessparams.GetSenderReportForBYE(); + sentpackets = false; // Check max packet size @@ -105,11 +115,11 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP switch(protocol) { case RTPTransmitter::IPv4UDPProto: - rtptrans = new RTPUDPv4Transmitter(); + rtptrans = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMITTER) RTPUDPv4Transmitter(GetMemoryManager()); break; #ifdef RTP_SUPPORT_IPV6 case RTPTransmitter::IPv6UDPProto: - rtptrans = new RTPUDPv6Transmitter(); + rtptrans = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMITTER) RTPUDPv6Transmitter(GetMemoryManager()); break; #endif // RTP_SUPPORT_IPV6 case RTPTransmitter::UserDefinedProto: @@ -125,20 +135,54 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP return ERR_RTP_OUTOFMEM; if ((status = rtptrans->Init(usingpollthread)) < 0) { - delete rtptrans; + RTPDelete(rtptrans,GetMemoryManager()); return status; } if ((status = rtptrans->Create(maxpacksize,transparams)) < 0) { - delete rtptrans; + RTPDelete(rtptrans,GetMemoryManager()); return status; } + deletetransmitter = true; + return InternalCreate(sessparams); +} + +int RTPSession::Create(const RTPSessionParams &sessparams,RTPTransmitter *transmitter) +{ + int status; + + if (created) + return ERR_RTP_SESSION_ALREADYCREATED; + + usingpollthread = sessparams.IsUsingPollThread(); + useSR_BYEifpossible = sessparams.GetSenderReportForBYE(); + sentpackets = false; + + // Check max packet size + + if ((maxpacksize = sessparams.GetMaximumPacketSize()) < RTP_MINPACKETSIZE) + return ERR_RTP_SESSION_MAXPACKETSIZETOOSMALL; + + rtptrans = transmitter; + + if ((status = rtptrans->SetMaximumPacketSize(maxpacksize)) < 0) + return status; + + deletetransmitter = false; + return InternalCreate(sessparams); +} + +int RTPSession::InternalCreate(const RTPSessionParams &sessparams) +{ + int status; + // Initialize packet builder if ((status = packetbuilder.Init(maxpacksize)) < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); return status; } @@ -154,7 +198,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP if ((status = sources.CreateOwnSSRC(packetbuilder.GetSSRC())) < 0) { packetbuilder.Destroy(); - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); return status; } @@ -164,7 +209,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { packetbuilder.Destroy(); sources.Clear(); - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); return status; } @@ -178,7 +224,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { packetbuilder.Destroy(); sources.Clear(); - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); return status; } @@ -186,7 +233,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { packetbuilder.Destroy(); sources.Clear(); - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); return status; } @@ -202,7 +250,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP if ((status = schedparams.SetRTCPBandwidth(sessionbandwidth*controlfragment)) < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -210,7 +259,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP } if ((status = schedparams.SetSenderBandwidthFraction(sessparams.GetSenderControlBandwidthFraction())) < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -218,7 +268,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP } if ((status = schedparams.SetMinimumTransmissionInterval(sessparams.GetMinimumRTCPTransmissionInterval())) < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -248,7 +299,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { if (sourcesmutex.Init() < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -259,7 +311,8 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { if (buildermutex.Init() < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -270,7 +323,20 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP { if (schedmutex.Init() < 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); + packetbuilder.Destroy(); + sources.Clear(); + rtcpbuilder.Destroy(); + return ERR_RTP_SESSION_CANTINITMUTEX; + } + } + if (!packsentmutex.IsInitialized()) + { + if (packsentmutex.Init() < 0) + { + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -278,10 +344,11 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP } } - pollthread = new RTPPollThread(*this,rtcpsched); + pollthread = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPPOLLTHREAD) RTPPollThread(*this,rtcpsched); if (pollthread == 0) { - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -289,8 +356,9 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP } if ((status = pollthread->Start(rtptrans)) < 0) { - delete rtptrans; - delete pollthread; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); + RTPDelete(pollthread,GetMemoryManager()); packetbuilder.Destroy(); sources.Clear(); rtcpbuilder.Destroy(); @@ -303,6 +371,7 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP return 0; } + void RTPSession::Destroy() { if (!created) @@ -310,10 +379,11 @@ void RTPSession::Destroy() #ifdef RTP_SUPPORT_THREAD if (pollthread) - delete pollthread; + RTPDelete(pollthread,GetMemoryManager()); #endif // RTP_SUPPORT_THREAD - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); rtcpbuilder.Destroy(); rtcpsched.Reset(); @@ -323,7 +393,7 @@ void RTPSession::Destroy() std::list::const_iterator it; for (it = byepackets.begin() ; it != byepackets.end() ; it++) - delete (*it); + RTPDelete(*it,GetMemoryManager()); byepackets.clear(); created = false; @@ -338,7 +408,7 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t #ifdef RTP_SUPPORT_THREAD if (pollthread) - delete pollthread; + RTPDelete(pollthread,GetMemoryManager()); #endif // RTP_SUPPORT_THREAD RTPTime stoptime = RTPTime::CurrentTime(); @@ -348,7 +418,7 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t RTCPCompoundPacket *pack; - if (rtptrans->GetNumRTPPacketsSent() != 0 || rtptrans->GetNumRTCPPacketsSent() != 0) + if (sentpackets) { int status; @@ -383,7 +453,7 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering - delete pack; + RTPDelete(pack,GetMemoryManager()); if (!byepackets.empty()) // more bye packets to send, schedule them rtcpsched.ScheduleBYEPacket((*(byepackets.begin()))->GetCompoundPacketLength()); else @@ -394,7 +464,8 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t } } - delete rtptrans; + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); packetbuilder.Destroy(); rtcpbuilder.Destroy(); rtcpsched.Reset(); @@ -405,7 +476,7 @@ void RTPSession::BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t std::list::const_iterator it; for (it = byepackets.begin() ; it != byepackets.end() ; it++) - delete (*it); + RTPDelete(*it,GetMemoryManager()); byepackets.clear(); created = false; @@ -501,6 +572,9 @@ int RTPSession::SendPacket(const void *data,size_t len) SOURCES_LOCK sources.SentRTPPacket(); SOURCES_UNLOCK + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK return 0; } @@ -528,6 +602,9 @@ int RTPSession::SendPacket(const void *data,size_t len, SOURCES_LOCK sources.SentRTPPacket(); SOURCES_UNLOCK + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK return 0; } @@ -555,6 +632,9 @@ int RTPSession::SendPacketEx(const void *data,size_t len, SOURCES_LOCK sources.SentRTPPacket(); SOURCES_UNLOCK + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK return 0; } @@ -583,9 +663,72 @@ int RTPSession::SendPacketEx(const void *data,size_t len, SOURCES_LOCK sources.SentRTPPacket(); SOURCES_UNLOCK + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK return 0; } +#ifdef RTP_SUPPORT_SENDAPP + +int RTPSession::SendRTCPAPPPacket(uint8_t subtype, const uint8_t name[4], const void *appdata, size_t appdatalen) +{ + int status; + + if (!created) + return ERR_RTP_SESSION_NOTCREATED; + + BUILDER_LOCK + uint32_t ssrc = packetbuilder.GetSSRC(); + BUILDER_UNLOCK + + RTCPCompoundPacketBuilder pb(GetMemoryManager()); + + status = pb.InitBuild(maxpacksize); + + if(status < 0) + return status; + + //first packet in an rtcp compound packet should always be SR or RR + if((status = pb.StartReceiverReport(ssrc)) < 0) + return status; + + //add SDES packet with CNAME item + if ((status = pb.AddSDESSource(ssrc)) < 0) + return status; + + BUILDER_LOCK + size_t owncnamelen = 0; + uint8_t *owncname = rtcpbuilder.GetLocalCNAME(&owncnamelen); + + if ((status = pb.AddSDESNormalItem(RTCPSDESPacket::CNAME,owncname,owncnamelen)) < 0) + { + BUILDER_UNLOCK + return status; + } + BUILDER_UNLOCK + + //add our application specific packet + if((status = pb.AddAPPPacket(subtype, ssrc, name, appdata, appdatalen)) < 0) + return status; + + if((status = pb.EndBuild()) < 0) + return status; + + //send packet + status = rtptrans->SendRTCPData(pb.GetCompoundPacketData(),pb.GetCompoundPacketLength()); + if(status < 0) + return status; + + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK + + return pb.GetCompoundPacketLength(); +} + +#endif // RTP_SUPPORT_SENDAPP + int RTPSession::SetDefaultPayloadType(uint8_t pt) { if (!created) @@ -671,6 +814,11 @@ RTPTransmissionInfo *RTPSession::GetTransmissionInfo() return rtptrans->GetTransmissionInfo(); } +void RTPSession::DeleteTransmissionInfo(RTPTransmissionInfo *inf) +{ + RTPDelete(inf,GetMemoryManager()); +} + int RTPSession::Poll() { int status; @@ -788,6 +936,11 @@ RTPPacket *RTPSession::GetNextPacket() return sources.GetNextPacket(); } +void RTPSession::DeletePacket(RTPPacket *p) +{ + RTPDelete(p,GetMemoryManager()); +} + int RTPSession::EndDataAccess() { if (!created) @@ -1053,7 +1206,7 @@ int RTPSession::ProcessPolledData() { SCHED_UNLOCK SOURCES_UNLOCK - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); return status; } SCHED_UNLOCK @@ -1065,13 +1218,17 @@ int RTPSession::ProcessPolledData() if ((status = collisionlist.UpdateAddress(rawpack->GetSenderAddress(),rawpack->GetReceiveTime(),&created)) < 0) { SOURCES_UNLOCK - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); return status; } if (created) // first time we've encountered this address, send bye packet and { // change our own SSRC - if (rtptrans->GetNumRTPPacketsSent() != 0 || rtptrans->GetNumRTCPPacketsSent() != 0) + PACKSENT_LOCK + bool hassentpackets = sentpackets; + PACKSENT_UNLOCK + + if (hassentpackets) { // Only send BYE packet if we've actually sent data using this // SSRC @@ -1083,7 +1240,7 @@ int RTPSession::ProcessPolledData() { BUILDER_UNLOCK SOURCES_UNLOCK - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); return status; } BUILDER_UNLOCK @@ -1103,26 +1260,27 @@ int RTPSession::ProcessPolledData() uint32_t newssrc = packetbuilder.CreateNewSSRC(sources); BUILDER_UNLOCK - rtptrans->ResetPacketCount(); - + PACKSENT_LOCK + sentpackets = false; + PACKSENT_UNLOCK + // remove old entry in source table and add new one if ((status = sources.DeleteOwnSSRC()) < 0) { SOURCES_UNLOCK - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); return status; } if ((status = sources.CreateOwnSSRC(newssrc)) < 0) { SOURCES_UNLOCK - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); return status; } } } - - delete rawpack; + RTPDelete(rawpack,GetMemoryManager()); } SCHED_LOCK @@ -1165,9 +1323,13 @@ int RTPSession::ProcessPolledData() if ((status = rtptrans->SendRTCPData(pack->GetCompoundPacketData(),pack->GetCompoundPacketLength())) < 0) { SOURCES_UNLOCK - delete pack; + RTPDelete(pack,GetMemoryManager()); return status; } + + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering } @@ -1179,9 +1341,13 @@ int RTPSession::ProcessPolledData() if ((status = rtptrans->SendRTCPData(pack->GetCompoundPacketData(),pack->GetCompoundPacketLength())) < 0) { SOURCES_UNLOCK - delete pack; + RTPDelete(pack,GetMemoryManager()); return status; } + + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK OnSendRTCPCompoundPacket(pack); // we'll place this after the actual send to avoid tampering @@ -1197,7 +1363,7 @@ int RTPSession::ProcessPolledData() rtcpsched.AnalyseOutgoing(*pack); SCHED_UNLOCK - delete pack; + RTPDelete(pack,GetMemoryManager()); } SOURCES_UNLOCK return 0; diff --git a/src/rtpsession.h b/src/rtpsession.h index a12341f..b7d8183 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpsession.h + */ + #ifndef RTPSESSION_H #define RTPSESSION_H @@ -43,6 +47,8 @@ #include "rtcpscheduler.h" #include "rtcppacketbuilder.h" #include "rtptimeutilities.h" +#include "rtcpcompoundpacketbuilder.h" +#include "rtpmemoryobject.h" #include #ifdef RTP_SUPPORT_THREAD @@ -61,88 +67,358 @@ class RTCPCompoundPacket; class RTCPPacket; class RTCPAPPPacket; -class RTPSession +/** High level class for using RTP. + * For most RTP based applications, the RTPSession class will probably be the one to use. It handles + * the RTCP part completely internally, so the user can focus on sending and receiving the actual data. + * \note The RTPSession class is not meant to be thread safe. The user should use some kind of locking + * mechanism to prevent different threads from using the same RTPSession instance. + */ +class RTPSession : public RTPMemoryObject { public: - RTPSession(RTPTransmitter::TransmissionProtocol proto = RTPTransmitter::IPv4UDPProto); + /** Constructs an RTPSession instance, optionally installing a memory manager. */ + RTPSession(RTPMemoryManager *mgr = 0); virtual ~RTPSession(); - int Create(const RTPSessionParams &sessparams,const RTPTransmissionParams *transparams = 0); + /** Creates an RTP session. + * This function creates an RTP session with parameters \c sessparams, which will use a transmitter + * corresponding to \c proto. Parameters for this transmitter can be specified as well. If \c + * proto is of type RTPTransmitter::UserDefinedProto, the NewUserDefinedTransmitter function must + * be implemented. + */ + int Create(const RTPSessionParams &sessparams,const RTPTransmissionParams *transparams = 0, RTPTransmitter::TransmissionProtocol proto = RTPTransmitter::IPv4UDPProto); + + /** Creates an RTP session using \c transmitter as transmission component. + * This function creates an RTP session with parameters \c sessparams, which will use the + * transmission component \c transmitter. Initialization and destruction of the transmitter + * will not be done by the RTPSession class if this Create function is used. This function + * can be useful if you which to reuse the transmission component in another RTPSession + * instance, once the original RTPSession isn't using the transmitter anymore. + */ + int Create(const RTPSessionParams &sessparams,RTPTransmitter *transmitter); + + /** Leaves the session without sending a BYE packet. */ void Destroy(); + + /** Sends a BYE packet and leaves the session. + * Sends a BYE packet and leaves the session. At most a time \c maxwaittime will be waited to + * send the BYE packet. If this time expires, the session will be left without sending a BYE packet. + * The BYE packet will contain as reason for leaving \c reason with length \c reasonlength. + */ void BYEDestroy(const RTPTime &maxwaittime,const void *reason,size_t reasonlength); + + /** Returns whether the session has been created or not. */ bool IsActive(); + /** Returns our own SSRC. */ uint32_t GetLocalSSRC(); + /** Adds \c addr to the list of destinations. */ int AddDestination(const RTPAddress &addr); + + /** Deletes \c addr from the list of destinations. */ int DeleteDestination(const RTPAddress &addr); + + /** Clears the list of destinations. */ void ClearDestinations(); + /** Returns \c true if multicasting is supported. */ bool SupportsMulticasting(); + + /** Joins the multicast group specified by \c addr. */ int JoinMulticastGroup(const RTPAddress &addr); + + /** Leaves the multicast group specified by \c addr. */ int LeaveMulticastGroup(const RTPAddress &addr); + + /** Leaves all multicast groups. */ void LeaveAllMulticastGroups(); + /** Sends the RTP packet with payload \c data which has length \c len. + * Sends the RTP packet with payload \c data which has length \c len. + * The used payload type, marker and timestamp increment will be those that have been set + * using the \c SetDefault member functions. + */ int SendPacket(const void *data,size_t len); + + /** Sends the RTP packet with payload \c data which has length \c len. + * It will use payload type \c pt, marker \c mark and after the packet has been built, the + * timestamp will be incremented by \c timestampinc. + */ int SendPacket(const void *data,size_t len, uint8_t pt,bool mark,uint32_t timestampinc); + + /** Sends the RTP packet with payload \c data which has length \c len. + * The packet will contain a header extension with identifier \c hdrextID and containing data + * \c hdrextdata. The length of this data is given by \c numhdrextwords and is specified in a + * number of 32-bit words. The used payload type, marker and timestamp increment will be those that + * have been set using the \c SetDefault member functions. + */ int SendPacketEx(const void *data,size_t len, uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); + + /** Sends the RTP packet with payload \c data which has length \c len. + * It will use payload type \c pt, marker \c mark and after the packet has been built, the + * timestamp will be incremented by \c timestampinc. The packet will contain a header + * extension with identifier \c hdrextID and containing data \c hdrextdata. The length + * of this data is given by \c numhdrextwords and is specified in a number of 32-bit words. + */ int SendPacketEx(const void *data,size_t len, uint8_t pt,bool mark,uint32_t timestampinc, uint16_t hdrextID,const void *hdrextdata,size_t numhdrextwords); +#ifdef RTP_SUPPORT_SENDAPP + /** If sending of RTCP APP packets was enabled at compile time, this function creates a compound packet + * containing an RTCP APP packet and sends it immediately. + * If sending of RTCP APP packets was enabled at compile time, this function creates a compound packet + * containing an RTCP APP packet and sends it immediately. If successful, the function returns the number + * of bytes in the RTCP compound packet. Note that this immediate sending is not compliant with the RTP + * specification, so use with care. + */ + int SendRTCPAPPPacket(uint8_t subtype, const uint8_t name[4], const void *appdata, size_t appdatalen); +#endif // RTP_SUPPORT_SENDAPP + + /** Sets the default payload type for RTP packets to \c pt. */ int SetDefaultPayloadType(uint8_t pt); + + /** Sets the default marker for RTP packets to \c m. */ int SetDefaultMark(bool m); + + /** Sets the default value to increment the timestamp with to \c timestampinc. */ int SetDefaultTimestampIncrement(uint32_t timestampinc); + + /** This function increments the timestamp with the amount given by \c inc. + * This function increments the timestamp with the amount given by \c inc. This can be useful + * if, for example, a packet was not sent because it contained only silence. Then, this function + * should be called to increment the timestamp with the appropriate amount so that the next packets + * will still be played at the correct time at other hosts. + */ int IncrementTimestamp(uint32_t inc); + + /** This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement + * member function. + * This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement + * member function. This can be useful if, for example, a packet was not sent because it contained only silence. + * Then, this function should be called to increment the timestamp with the appropriate amount so that the next + * packets will still be played at the correct time at other hosts. + */ int IncrementTimestampDefault(); + + /** This function allows you to inform the library about the delay between sampling the first + * sample of a packet and sending the packet. + * This function allows you to inform the library about the delay between sampling the first + * sample of a packet and sending the packet. This delay is taken into account when calculating the + * relation between RTP timestamp and wallclock time, used for inter-media synchronization. + */ int SetPreTransmissionDelay(const RTPTime &delay); + /** This function returns an instance of a subclass of RTPTransmissionInfo which will give some + * additional information about the transmitter (a list of local IP addresses for example). + * This function returns an instance of a subclass of RTPTransmissionInfo which will give some + * additional information about the transmitter (a list of local IP addresses for example). The user + * has to free the returned instance when it is no longer needed, preferably using the DeleteTransmissionInfo + * function. + */ RTPTransmissionInfo *GetTransmissionInfo(); + + /** Frees the memory used by the transmission information \c inf. */ + void DeleteTransmissionInfo(RTPTransmissionInfo *inf); + + /** If you're not using the poll thread, this function must be called regularly to process incoming data + * and to send RTCP data when necessary. + */ int Poll(); + + /** Waits at most a time \c delay until incoming data has been detected. + * Waits at most a time \c delay until incoming data has been detected. Only works when you're not + * using the poll thread. If \c dataavailable is not \c NULL, it should be set to \c true if data + * was actually read and to \c false otherwise. + */ int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); + + /** If the previous function has been called, this one aborts the waiting (only works when you're not + * using the poll thread). + */ int AbortWait(); + + /** Returns the time interval after which an RTCP compound packet may have to be sent (only works when + * you're not using the poll thread. + */ RTPTime GetRTCPDelay(); - // The following methods (GotoFirstSource till GetNextPacket) should - // be called between calls to BeginDataAccess end EndDataAccess. This - // makes sure that nasty things don't happen (e.g. when a background - // thread is polling for data) + /** The following member functions (till EndDataAccess}) need to be accessed between a call + * to BeginDataAccess and EndDataAccess. + * The BeginDataAccess function makes sure that the poll thread won't access the source table + * at the same time that you're using it. When the EndDataAccess is called, the lock on the + * source table is freed again. + */ int BeginDataAccess(); + + /** Starts the iteration over the participants by going to the first member in the table. + * Starts the iteration over the participants by going to the first member in the table. + * If a member was found, the function returns \c true, otherwise it returns \c false. + */ bool GotoFirstSource(); + + /** Sets the current source to be the next source in the table. + * Sets the current source to be the next source in the table. If we're already at the last + * source, the function returns \c false, otherwise it returns \c true. + */ bool GotoNextSource(); + + /** Sets the current source to be the previous source in the table. + * Sets the current source to be the previous source in the table. If we're at the first source, + * the function returns \c false, otherwise it returns \c true. + */ bool GotoPreviousSource(); + + /** Sets the current source to be the first source in the table which has RTPPacket instances + * that we haven't extracted yet. + * Sets the current source to be the first source in the table which has RTPPacket instances + * that we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoFirstSourceWithData(); + + /** Sets the current source to be the next source in the table which has RTPPacket instances + * that we haven't extracted yet. + * Sets the current source to be the next source in the table which has RTPPacket instances + * that we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoNextSourceWithData(); + + /** Sets the current source to be the previous source in the table which has RTPPacket + * instances that we haven't extracted yet. + * Sets the current source to be the previous source in the table which has RTPPacket + * instances that we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoPreviousSourceWithData(); + + /** Returns the \c RTPSourceData instance for the currently selected participant. */ RTPSourceData *GetCurrentSourceInfo(); + + /** Returns the \c RTPSourceData instance for the participant identified by \c ssrc, + * or NULL if no such entry exists. + */ RTPSourceData *GetSourceInfo(uint32_t ssrc); + + /** Extracts the next packet from the received packets queue of the current participant, + * or NULL if no more packets are available. + * Extracts the next packet from the received packets queue of the current participant, + * or NULL if no more packets are available. When the packet is no longer needed, its + * memory should be freed using the DeletePacket member function. + */ RTPPacket *GetNextPacket(); + + /** Frees the memory used by \c p. */ + void DeletePacket(RTPPacket *p); + + /** See BeginDataAccess. */ int EndDataAccess(); + /** Sets the receive mode to \c m. + * Sets the receive mode to \c m. Note that when the receive mode is changed, the list of + * addresses to be ignored ot accepted will be cleared. + */ int SetReceiveMode(RTPTransmitter::ReceiveMode m); + + /** Adds \c addr to the list of addresses to ignore. */ int AddToIgnoreList(const RTPAddress &addr); + + /** Deletes \c addr from the list of addresses to ignore. */ int DeleteFromIgnoreList(const RTPAddress &addr); + + /** Clears the list of addresses to ignore. */ void ClearIgnoreList(); + + /** Adds \c addr to the list of addresses to accept. */ int AddToAcceptList(const RTPAddress &addr); + + /** Deletes \c addr from the list of addresses to accept. */ int DeleteFromAcceptList(const RTPAddress &addr); + + /** Clears the list of addresses to accept. */ void ClearAcceptList(); + /** Sets the maximum allowed packet size to \c s. */ int SetMaximumPacketSize(size_t s); + + /** Sets the session bandwidth to \c bw, which is specified in bytes per second. */ int SetSessionBandwidth(double bw); + + /** Sets the timestamp unit for our own data. + * Sets the timestamp unit for our own data. The timestamp unit is defined as a time interval in + * seconds divided by the corresponding timestamp interval. For example, for 8000 Hz audio, the + * timestamp unit would typically be 1/8000. Since this value is initially set to an illegal value, + * the user must set this to an allowed value to be able to create a session. + */ int SetTimestampUnit(double u); + /** Sets the RTCP interval for the SDES name item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES name item will be added after the sources in the source table have been + * processed \c count times. + */ void SetNameInterval(int count); + + /** Sets the RTCP interval for the SDES e-mail item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES e-mail item will be added after the sources in the source table have been + * processed \c count times. + */ void SetEMailInterval(int count); + + /** Sets the RTCP interval for the SDES location item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES location item will be added after the sources in the source table have been + * processed \c count times. + */ void SetLocationInterval(int count); + + /** Sets the RTCP interval for the SDES phone item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES phone item will be added after the sources in the source table have been + * processed \c count times. + */ void SetPhoneInterval(int count); + + /** Sets the RTCP interval for the SDES tool item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES tool item will be added after the sources in the source table have been + * processed \c count times. + */ void SetToolInterval(int count); + + /** Sets the RTCP interval for the SDES note item. + * After all possible sources in the source table have been processed, the class will check if other + * SDES items need to be sent. If \c count is zero or negative, nothing will happen. If \c count + * is positive, an SDES note item will be added after the sources in the source table have been + * processed \c count times. + */ void SetNoteInterval(int count); + + /** Sets the SDES name item for the local participant to the value \c s with length \c len. */ int SetLocalName(const void *s,size_t len); + + /** Sets the SDES e-mail item for the local participant to the value \c s with length \c len. */ int SetLocalEMail(const void *s,size_t len); + + /** Sets the SDES location item for the local participant to the value \c s with length \c len. */ int SetLocalLocation(const void *s,size_t len); + + /** Sets the SDES phone item for the local participant to the value \c s with length \c len. */ int SetLocalPhone(const void *s,size_t len); + + /** Sets the SDES tool item for the local participant to the value \c s with length \c len. */ int SetLocalTool(const void *s,size_t len); + + /** Sets the SDES note item for the local participant to the value \c s with length \c len. */ int SetLocalNote(const void *s,size_t len); #ifdef RTPDEBUG @@ -150,40 +426,87 @@ class RTPSession void DumpTransmitter(); #endif // RTPDEBUG protected: + /** Allocate a user defined transmitter. + * In case you specified in the Create function that you want to use a + * user defined transmitter, you should override this function. The RTPTransmitter + * instance returned by this function will then be used to send and receive RTP and + * RTCP packets. Note that when the session is destroyed, this RTPTransmitter + * instance will be destroyed as well. + */ virtual RTPTransmitter *NewUserDefinedTransmitter() { return 0; } + /** Is called when an incoming RTCP packet is about to be processed. */ virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when an incoming RTCP packet is about to be processed. */ virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when an SSRC collision was detected. + * Is called when an SSRC collision was detected. The instance \c srcdat is the one present in + * the table, the address \c senderaddress is the one that collided with one of the addresses + * and \c isrtp indicates against which address of \c srcdat the check failed. + */ virtual void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp) { } + + /** Is called when another CNAME was received than the one already present for source \c srcdat. */ virtual void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, const uint8_t *cname,size_t cnamelength) { } + + /** Is called when a new entry \c srcdat is added to the source table. */ virtual void OnNewSource(RTPSourceData *srcdat) { } + + /** Is called when the entry \c srcdat is about to be deleted from the source table. */ virtual void OnRemoveSource(RTPSourceData *srcdat) { } + + /** Is called when participant \c srcdat is timed out. */ virtual void OnTimeout(RTPSourceData *srcdat) { } + + /** Is called when participant \c srcdat is timed after having sent a BYE packet. */ virtual void OnBYETimeout(RTPSourceData *srcdat) { } + + /** Is called when an RTCP APP packet \c apppacket has been received at time \c receivetime + * from address \c senderaddress. + */ virtual void OnAPPPacket(RTCPAPPPacket *apppacket,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when an unknown RTCP packet type was detected. */ virtual void OnUnknownPacketType(RTCPPacket *rtcppack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when an unknown packet format for a known packet type was detected. */ virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when the SDES NOTE item for source \c srcdat has been timed out. */ virtual void OnNoteTimeout(RTPSourceData *srcdat) { } + + /** Is called when a BYE packet has been processed for source \c srcdat. */ virtual void OnBYEPacket(RTPSourceData *srcdat) { } + + /** Is called when an RTCP compound packet has just been sent (useful to inspect outgoing RTCP data). */ virtual void OnSendRTCPCompoundPacket(RTCPCompoundPacket *pack) { } #ifdef RTP_SUPPORT_THREAD + /** Is called when error \c errcode was detected in the poll thread. */ virtual void OnPollThreadError(int errcode) { } + + /** Is called each time the poll thread loops. + * Is called each time the poll thread loops. This happens when incoming data was + * detected or when it's time to send an RTCP compound packet. + */ virtual void OnPollThreadStep() { } #endif // RTP_SUPPORT_THREAD private: + int InternalCreate(const RTPSessionParams &sessparams); int CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve); int ProcessPolledData(); int ProcessRTCPCompoundPacket(RTCPCompoundPacket &rtcpcomppack,RTPRawPacket *pack); RTPTransmitter *rtptrans; - const RTPTransmitter::TransmissionProtocol protocol; bool created; + bool deletetransmitter; bool usingpollthread; bool acceptownpackets; bool useSR_BYEifpossible; @@ -195,6 +518,7 @@ class RTPSession double membermultiplier; double collisionmultiplier; double notemultiplier; + bool sentpackets; RTPSessionSources sources; RTPPacketBuilder packetbuilder; @@ -206,7 +530,7 @@ class RTPSession #ifdef RTP_SUPPORT_THREAD RTPPollThread *pollthread; - JMutex sourcesmutex,buildermutex,schedmutex; + JMutex sourcesmutex,buildermutex,schedmutex,packsentmutex; friend class RTPPollThread; #endif // RTP_SUPPORT_THREAD diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index b18d9d2..2539017 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index b8ece42..dc28eea 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpsessionparams.h + */ + #ifndef RTPSESSIONPARAMS_H #define RTPSESSIONPARAMS_H @@ -40,52 +44,151 @@ #include "rtptimeutilities.h" #include "rtpsources.h" +/** Describes the parameters for to be used by an RTPSession instance. + * Describes the parameters for to be used by an RTPSession instance. Note that the own timestamp + * unit must be set to a valid number, otherwise the session can't be created. + */ class RTPSessionParams { public: RTPSessionParams(); - + + /** If \c usethread is \c true, the session will use a poll thread to automatically process incoming + * data and to send RTCP packets when necessary. + */ int SetUsePollThread(bool usethread); + + /** Returns whether the session should use a poll thread or not (default is \c true). */ bool IsUsingPollThread() const { return usepollthread; } + + /** Sets the maximum allowed packet size for the session. */ void SetMaximumPacketSize(size_t max) { maxpacksize = max; } + + /** Returns the maximum allowed packet size (default is 1400 bytes). */ size_t GetMaximumPacketSize() const { return maxpacksize; } + + /** If the argument is \c true, the session should accept its own packets and store + * them accordingly in the source table. + */ void SetAcceptOwnPackets(bool accept) { acceptown = accept; } + + /** Returns \c true if the session should accept its own packets (default is \c false). */ bool AcceptOwnPackets() const { return acceptown; } + + /** Sets the receive mode to be used by the session. */ void SetReceiveMode(RTPTransmitter::ReceiveMode recvmode) { receivemode = recvmode; } + + /** Sets the receive mode to be used by the session (default is: accept all packets). */ RTPTransmitter::ReceiveMode GetReceiveMode() const { return receivemode; } + + /** Sets the timestamp unit for our own data. + * Sets the timestamp unit for our own data. The timestamp unit is defined as a time interval in + * seconds divided by the corresponding timestamp interval. For example, for 8000 Hz audio, the + * timestamp unit would typically be 1/8000. Since this value is initially set to an illegal value, + * the user must set this to an allowed value to be able to create a session. + */ void SetOwnTimestampUnit(double tsunit) { owntsunit = tsunit; } + + /** Returns the currently set timestamp unit. */ double GetOwnTimestampUnit() const { return owntsunit; } + + /** Sets a flag indicating if a DNS lookup should be done to determine our hostname (to construct a CNAME item). + * If \c v is set to \c true, the session will ask the transmitter to find a host name based upon the IP + * addresses in its list of local IP addresses. If set to \c false, a call to \c gethostname or something + * similar will be used to find the local hostname. Note that the first method might take some time. + */ void SetResolveLocalHostname(bool v) { resolvehostname = v; } + + /** Returns whether the local hostname should be determined from the transmitter's list of local IP addresses + * or not (default is \c false). + */ bool GetResolveLocalHostname() const { return resolvehostname; } #ifdef RTP_SUPPORT_PROBATION + /** If probation support is enabled, this function sets the probation type to be used. */ void SetProbationType(RTPSources::ProbationType probtype) { probationtype = probtype; } + + /** Returns the probation type which will be used (default is RTPSources::ProbationStore). */ RTPSources::ProbationType GetProbationType() const { return probationtype; } #endif // RTP_SUPPORT_PROBATION + /** Sets the session bandwidth in bytes per second. */ void SetSessionBandwidth(double sessbw) { sessionbandwidth = sessbw; } + + /** Returns the session bandwidth in bytes per second (default is 10000 bytes per second). */ double GetSessionBandwidth() const { return sessionbandwidth; } + + /** Sets the fraction of the session bandwidth to be used for control traffic. */ void SetControlTrafficFraction(double frac) { controlfrac = frac; } + + /** Returns the fraction of the session bandwidth that will be used for control traffic (default is 5%). */ double GetControlTrafficFraction() const { return controlfrac; } + + /** Sets the minimum fraction of the control traffic that will be used by senders. */ void SetSenderControlBandwidthFraction(double frac) { senderfrac = frac; } + + /** Returns the minimum fraction of the control traffic that will be used by senders (default is 25%). */ double GetSenderControlBandwidthFraction() const { return senderfrac; } + + /** Set the minimal time interval between sending RTCP packets. */ void SetMinimumRTCPTransmissionInterval(const RTPTime &t) { mininterval = t; } + + /** Returns the minimal time interval between sending RTCP packets (default is 5 seconds). */ RTPTime GetMinimumRTCPTransmissionInterval() const { return mininterval; } + + /** If \c usehalf is set to \c true, the session will only wait half of the calculated RTCP + * interval before sending its first RTCP packet. + */ void SetUseHalfRTCPIntervalAtStartup(bool usehalf) { usehalfatstartup = usehalf; } + + /** Returns whether the session will only wait half of the calculated RTCP interval before sending its + * first RTCP packet or not (default is \c true). + */ bool GetUseHalfRTCPIntervalAtStartup() const { return usehalfatstartup; } + + /** If \c v is \c true, the session will send a BYE packet immediately if this is allowed. */ void SetRequestImmediateBYE(bool v) { immediatebye = v; } + + /** Returns whether the session should send a BYE packet immediately (if allowed) or not (default is \c true). */ bool GetRequestImmediateBYE() const { return immediatebye; } + + /** When sending a BYE packet, this indicates whether it will be part of an RTCP compound packet + * that begins with a sender report (if allowed) or a receiver report. + */ void SetSenderReportForBYE(bool v) { SR_BYE = v; } - bool GetSenderReportForBYE() const { return SR_BYE; } + /** Returns \c true if a BYE packet will be sent in an RTCP compound packet which starts with a + * sender report; if a receiver report will be used, the function returns \c false (default is \c true). + */ + bool GetSenderReportForBYE() const { return SR_BYE; } + + /** Sets the multiplier to be used when timing out senders. */ void SetSenderTimeoutMultiplier(double m) { sendermultiplier = m; } + + /** Returns the multiplier to be used when timing out senders (default is 2). */ double GetSenderTimeoutMultiplier() const { return sendermultiplier; } + + /** Sets the multiplier to be used when timing out members. */ void SetSourceTimeoutMultiplier(double m) { generaltimeoutmultiplier = m; } + + /** Returns the multiplier to be used when timing out members (default is 5). */ double GetSourceTimeoutMultiplier() const { return generaltimeoutmultiplier; } + + /** Sets the multiplier to be used when timing out a member after it has sent a BYE packet. */ void SetBYETimeoutMultiplier(double m) { byetimeoutmultiplier = m; } + + /** Returns the multiplier to be used when timing out a member after it has sent a BYE packet (default is 1). */ double GetBYETimeoutMultiplier() const { return byetimeoutmultiplier; } + + /** Sets the multiplier to be used when timing out entries in the collision table. */ void SetCollisionTimeoutMultiplier(double m) { collisionmultiplier = m; } + + /** Returns the multiplier to be used when timing out entries in the collision table (default is 10). */ double GetCollisionTimeoutMultiplier() const { return collisionmultiplier; } + + /** Sets the multiplier to be used when timing out SDES NOTE information. */ void SetNoteTimeoutMultiplier(double m) { notemultiplier = m; } + + /** Returns the multiplier to be used when timing out SDES NOTE information (default is 25). */ double GetNoteTimeoutMultiplier() const { return notemultiplier; } private: bool acceptown; diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index f42fb4f..e30069b 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index 9be4e56..7429d97 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpsessionsources.h + */ + #ifndef RTPSESSIONSOURCES_H #define RTPSESSIONSOURCES_H @@ -42,10 +46,11 @@ class RTPSession; class RTPSessionSources : public RTPSources { public: - RTPSessionSources(RTPSession &sess) : rtpsession(sess) { owncollision = false; } - ~RTPSessionSources() { } - void ClearOwnCollisionFlag() { owncollision = false; } - bool DetectedOwnCollision() const { return owncollision; } + RTPSessionSources(RTPSession &sess,RTPMemoryManager *mgr) : rtpsession(sess),RTPSources(RTPSources::ProbationStore,mgr) + { owncollision = false; } + ~RTPSessionSources() { } + void ClearOwnCollisionFlag() { owncollision = false; } + bool DetectedOwnCollision() const { return owncollision; } private: void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress); diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index 24f8a97..3ffc32e 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -33,6 +33,7 @@ #include "rtpsourcedata.h" #include "rtpdefines.h" #include "rtpaddress.h" +#include "rtpmemorymanager.h" #if ! (defined(WIN32) || defined(_WIN32_WCE)) #include #endif // WIN32 @@ -206,7 +207,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do } } -RTPSourceData::RTPSourceData(uint32_t s) : byetime(0,0) +RTPSourceData::RTPSourceData(uint32_t s, RTPMemoryManager *mgr) : byetime(0,0),RTPMemoryObject(mgr),SDESinf(mgr) { ssrc = s; issender = false; @@ -228,11 +229,11 @@ RTPSourceData::~RTPSourceData() { FlushPackets(); if (byereason) - delete [] byereason; + RTPDeleteByteArray(byereason,GetMemoryManager()); if (rtpaddr) - delete rtpaddr; + RTPDelete(rtpaddr,GetMemoryManager()); if (rtcpaddr) - delete rtcpaddr; + RTPDelete(rtcpaddr,GetMemoryManager()); } double RTPSourceData::INF_GetEstimatedTimestampUnit() const diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index addc991..c4de452 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpsourcedata.h + */ + #ifndef RTPSOURCEDATA_H #define RTPSOURCEDATA_H @@ -40,6 +44,7 @@ #include "rtcpsdesinfo.h" #include "rtptypes.h" #include "rtpsources.h" +#include "rtpmemoryobject.h" #include class RTPAddress; @@ -54,7 +59,7 @@ class RTCPSenderReportInfo bool HasInfo() const { return hasinfo; } RTPNTPTime GetNTPTimestamp() const { return ntptimestamp; } uint32_t GetRTPTimestamp() const { return rtptimestamp; } - uint32_t GetPacketCount() const { return packetcount; } + uint32_t GetPacketCount() const { return packetcount; } uint32_t GetByteCount() const { return bytecount; } RTPTime GetReceiveTime() const { return receivetime; } private: @@ -71,7 +76,7 @@ class RTCPReceiverReportInfo public: RTCPReceiverReportInfo():receivetime(0,0) { hasinfo = false; fractionlost = 0; packetslost = 0; exthighseqnr = 0; jitter = 0; lsr = 0; dlsr = 0; } void Set(uint8_t fraclost,int32_t plost,uint32_t exthigh, - uint32_t jit,uint32_t l,uint32_t dl,const RTPTime &rcvtime) { fractionlost = ((double)fraclost)/256.0; packetslost = plost; exthighseqnr = exthigh; jitter = jit; lsr = l; dlsr = dl; receivetime = rcvtime; hasinfo = true; } + uint32_t jit,uint32_t l,uint32_t dl,const RTPTime &rcvtime) { fractionlost = ((double)fraclost)/256.0; packetslost = plost; exthighseqnr = exthigh; jitter = jit; lsr = l; dlsr = dl; receivetime = rcvtime; hasinfo = true; } bool HasInfo() const { return hasinfo; } double GetFractionLost() const { return fractionlost; } @@ -155,99 +160,263 @@ inline RTPSourceStats::RTPSourceStats():prevpacktime(0,0),lastmsgtime(0,0),lastr #endif // RTP_SUPPORT_PROBATION } -class RTPSourceData +/** Describes an entry in the RTPSources source table. */ +class RTPSourceData : public RTPMemoryObject { protected: - RTPSourceData(uint32_t ssrc); + RTPSourceData(uint32_t ssrc, RTPMemoryManager *mgr = 0); virtual ~RTPSourceData(); public: + /** Extracts the first packet of this participants RTP packet queue. */ RTPPacket *GetNextPacket(); + + /** Clears the participant's RTP packet list. */ void FlushPackets(); + + /** Returns \c true if there are RTP packets which can be extracted. */ bool HasData() const { if (!validated) return false; return packetlist.empty()?false:true; } + + /** Returns the SSRC identifier for this member. */ uint32_t GetSSRC() const { return ssrc; } + + /** Returns \c true if the participant was added using the RTPSources member function CreateOwnSSRC and + * returns \c false otherwise. + */ bool IsOwnSSRC() const { return ownssrc; } + + /** Returns \c true if the source identifier is actually a CSRC from an RTP packet. */ bool IsCSRC() const { return iscsrc; } + + /** Returns \c true if this member is marked as a sender and \c false if not. */ bool IsSender() const { return issender; } + + /** Returns \c true if the participant is validated, which is the case if a number of + * consecutive RTP packets have been received or if a CNAME item has been received for + * this participant. + */ bool IsValidated() const { return validated; } + + /** Returns \c true if the source was validated and had not yet sent a BYE packet. */ bool IsActive() const { if (!validated) return false; if (receivedbye) return false; return true; } + /** This function is used by the RTCPPacketBuilder class to mark whether this participant's + * information has been processed in a report block or not. + */ void SetProcessedInRTCP(bool v) { processedinrtcp = v; } + + /** This function is used by the RTCPPacketBuilder class and returns whether this participant + * has been processed in a report block or not. + */ bool IsProcessedInRTCP() const { return processedinrtcp; } + /** Returns \c true if the address from which this participant's RTP packets originate has + * already been set. + */ bool IsRTPAddressSet() const { return isrtpaddrset; } + + /** Returns \c true if the address from which this participant's RTCP packets originate has + * already been set. + */ bool IsRTCPAddressSet() const { return isrtcpaddrset; } + + /** Returns the address from which this participant's RTP packets originate. + * Returns the address from which this participant's RTP packets originate. If the address has + * been set and the returned value is NULL, this indicates that it originated from the local + * participant. + */ const RTPAddress *GetRTPDataAddress() const { return rtpaddr; } + + /** Returns the address from which this participant's RTCP packets originate. + * Returns the address from which this participant's RTCP packets originate. If the address has + * been set and the returned value is NULL, this indicates that it originated from the local + * participant. + */ const RTPAddress *GetRTCPDataAddress() const { return rtcpaddr; } - + + /** Returns \c true if we received a BYE message for this participant and \c false otherwise. */ bool ReceivedBYE() const { return receivedbye; } + + /** Returns the reason for leaving contained in the BYE packet of this participant. + * Returns the reason for leaving contained in the BYE packet of this participant. The length of + * the reason is stored in \c len. + */ uint8_t *GetBYEReason(size_t *len) const { *len = byereasonlen; return byereason; } + + /** Returns the time at which the BYE packet was received. */ RTPTime GetBYETime() const { return byetime; } + /** Sets the value for the timestamp unit to be used in jitter calculations for data received from this participant. + * Sets the value for the timestamp unit to be used in jitter calculations for data received from this participant. + * If not set, the library uses an approximation for the timestamp unit which is calculated from two consecutive + * RTCP sender reports. The timestamp unit is defined as a time interval divided by the corresponding timestamp + * interval. For 8000 Hz audio this would be 1/8000. For video, often a timestamp unit of 1/90000 is used. + */ void SetTimestampUnit(double tsu) { timestampunit = tsu; } + + /** Returns the timestamp unit used for this participant. */ double GetTimestampUnit() const { return timestampunit; } - // Here is the info received in the last RTCP SR packet from this source - bool SR_HasInfo() const { return SRinf.HasInfo(); } - RTPNTPTime SR_GetNTPTimestamp() const { return SRinf.GetNTPTimestamp(); } + /** Returns \c true if an RTCP sender report has been received from this participant. */ + bool SR_HasInfo() const { return SRinf.HasInfo(); } + + /** Returns the NTP timestamp contained in the last sender report. */ + RTPNTPTime SR_GetNTPTimestamp() const { return SRinf.GetNTPTimestamp(); } + + /** Returns the RTP timestamp contained in the last sender report. */ uint32_t SR_GetRTPTimestamp() const { return SRinf.GetRTPTimestamp(); } + + /** Returns the packet count contained in the last sender report. */ uint32_t SR_GetPacketCount() const { return SRinf.GetPacketCount(); } + + /** Returns the octet count contained in the last sender report. */ uint32_t SR_GetByteCount() const { return SRinf.GetByteCount(); } + + /** Returns the time at which the last sender report was received. */ RTPTime SR_GetReceiveTime() const { return SRinf.GetReceiveTime(); } - // Here is the info received in the previous RTCP SR packet from this source + /** Returns \c true if more than one RTCP sender report has been received. */ bool SR_Prev_HasInfo() const { return SRprevinf.HasInfo(); } + + /** Returns the NTP timestamp contained in the second to last sender report. */ RTPNTPTime SR_Prev_GetNTPTimestamp() const { return SRprevinf.GetNTPTimestamp(); } + + /** Returns the RTP timestamp contained in the second to last sender report. */ uint32_t SR_Prev_GetRTPTimestamp() const { return SRprevinf.GetRTPTimestamp(); } + + /** Returns the packet count contained in the second to last sender report. */ uint32_t SR_Prev_GetPacketCount() const { return SRprevinf.GetPacketCount(); } + + /** Returns the octet count contained in the second to last sender report. */ uint32_t SR_Prev_GetByteCount() const { return SRprevinf.GetByteCount(); } + + /** Returns the time at which the second to last sender report was received. */ RTPTime SR_Prev_GetReceiveTime() const { return SRprevinf.GetReceiveTime(); } - // Here is the info received in the last RTCP RR packet from this source + /** Returns \c true if this participant sent a receiver report with information about the reception of our data. */ bool RR_HasInfo() const { return RRinf.HasInfo(); } + + /** Returns the fraction lost value from the last report. */ double RR_GetFractionLost() const { return RRinf.GetFractionLost(); } + + /** Returns the number of lost packets contained in the last report. */ int32_t RR_GetPacketsLost() const { return RRinf.GetPacketsLost(); } + + /** Returns the extended highest sequence number contained in the last report. */ uint32_t RR_GetExtendedHighestSequenceNumber() const { return RRinf.GetExtendedHighestSequenceNumber(); } + + /** Returns the jitter value from the last report. */ uint32_t RR_GetJitter() const { return RRinf.GetJitter(); } + + /** Returns the LSR value from the last report. */ uint32_t RR_GetLastSRTimestamp() const { return RRinf.GetLastSRTimestamp(); } + + /** Returns the DLSR value from the last report. */ uint32_t RR_GetDelaySinceLastSR() const { return RRinf.GetDelaySinceLastSR(); } + + /** Returns the time at which the last report was received. */ RTPTime RR_GetReceiveTime() const { return RRinf.GetReceiveTime(); } - // Here is the info received in the last RTCP RR packet from this source + /** Returns \c true if this participant sent more than one receiver report with information + * about the reception of our data. + */ bool RR_Prev_HasInfo() const { return RRprevinf.HasInfo(); } + + /** Returns the fraction lost value from the second to last report. */ double RR_Prev_GetFractionLost() const { return RRprevinf.GetFractionLost(); } + + /** Returns the number of lost packets contained in the second to last report. */ int32_t RR_Prev_GetPacketsLost() const { return RRprevinf.GetPacketsLost(); } + + /** Returns the extended highest sequence number contained in the second to last report. */ uint32_t RR_Prev_GetExtendedHighestSequenceNumber() const { return RRprevinf.GetExtendedHighestSequenceNumber(); } + + /** Returns the jitter value from the second to last report. */ uint32_t RR_Prev_GetJitter() const { return RRprevinf.GetJitter(); } + + /** Returns the LSR value from the second to last report. */ uint32_t RR_Prev_GetLastSRTimestamp() const { return RRprevinf.GetLastSRTimestamp(); } + + /** Returns the DLSR value from the second to last report. */ uint32_t RR_Prev_GetDelaySinceLastSR() const { return RRprevinf.GetDelaySinceLastSR(); } + + /** Returns the time at which the second to last report was received. */ RTPTime RR_Prev_GetReceiveTime() const { return RRprevinf.GetReceiveTime(); } - // Here is info which is used when sending RTCP packets to this source + /** Returns \c true if validated RTP packets have been received from this participant. */ bool INF_HasSentData() const { return stats.HasSentData(); } + + /** Returns the total number of received packets from this participant. */ int32_t INF_GetNumPacketsReceived() const { return stats.GetNumPacketsReceived(); } + + /** Returns the base sequence number of this participant. */ uint32_t INF_GetBaseSequenceNumber() const { return stats.GetBaseSequenceNumber(); } + + /** Returns the extended highest sequence number received from this participant. */ uint32_t INF_GetExtendedHighestSequenceNumber() const { return stats.GetExtendedHighestSequenceNumber(); } + + /** Returns the current jitter value for this participant. */ uint32_t INF_GetJitter() const { return stats.GetJitter(); } + + /** Returns the time at which something was last heard from this member. */ RTPTime INF_GetLastMessageTime() const { return stats.GetLastMessageTime(); } + + /** Returns the time at which the last RTP packet was received. */ RTPTime INF_GetLastRTPPacketTime() const { return stats.GetLastRTPPacketTime(); } + + /** Returns the estimated timestamp unit, calculated from two consecutive sender reports. */ double INF_GetEstimatedTimestampUnit() const; + + /** Returns the number of packets received since a new interval was started with INF_StartNewInterval. */ uint32_t INF_GetNumPacketsReceivedInInterval() const { return stats.GetNumPacketsReceivedInInterval(); } + + /** Returns the extended sequence number which was stored by the INF_StartNewInterval call. */ uint32_t INF_GetSavedExtendedSequenceNumber() const { return stats.GetSavedExtendedSequenceNumber(); } + + /** Starts a new interval to count received packets in; this also stores the current extended highest sequence + * number to be able to calculate the packet loss during the interval. + */ void INF_StartNewInterval() { stats.StartNewInterval(); } + + /** Estimates the round trip time by using the LSR and DLSR info from the last receiver report. */ RTPTime INF_GetRoundtripTime() const; + + /** Returns the time at which the last SDES NOTE item was received. */ RTPTime INF_GetLastSDESNoteTime() const { return stats.GetLastNoteTime(); } + /** Returns a pointer to the SDES CNAME item of this participant and stores its length in \c len. */ uint8_t *SDES_GetCNAME(size_t *len) const { return SDESinf.GetCNAME(len); } + + /** Returns a pointer to the SDES name item of this participant and stores its length in \c len. */ uint8_t *SDES_GetName(size_t *len) const { return SDESinf.GetName(len); } + + /** Returns a pointer to the SDES e-mail item of this participant and stores its length in \c len. */ uint8_t *SDES_GetEMail(size_t *len) const { return SDESinf.GetEMail(len); } + + /** Returns a pointer to the SDES phone item of this participant and stores its length in \c len. */ uint8_t *SDES_GetPhone(size_t *len) const { return SDESinf.GetPhone(len); } - uint8_t *SDES_GetLocation(size_t *len) const { return SDESinf.GetLocation(len); } + + /** Returns a pointer to the SDES location item of this participant and stores its length in \c len. */ + uint8_t *SDES_GetLocation(size_t *len) const { return SDESinf.GetLocation(len); } + + /** Returns a pointer to the SDES tool item of this participant and stores its length in \c len. */ uint8_t *SDES_GetTool(size_t *len) const { return SDESinf.GetTool(len); } + + /** Returns a pointer to the SDES note item of this participant and stores its length in \c len. */ uint8_t *SDES_GetNote(size_t *len) const { return SDESinf.GetNote(len); } #ifdef RTP_SUPPORT_SDESPRIV + /** Starts the iteration over the stored SDES private item prefixes and their associated values. */ void SDES_GotoFirstPrivateValue() { SDESinf.GotoFirstPrivateValue(); } + + /** If available, returns \c true and stores the next SDES private item prefix in \c prefix and its length in + * \c prefixlen; the associated value and its length are then stored in \c value and \c valuelen. + */ bool SDES_GetNextPrivateValue(uint8_t **prefix,size_t *prefixlen,uint8_t **value,size_t *valuelen) { return SDESinf.GetNextPrivateValue(prefix,prefixlen,value,valuelen); } + + /** Looks for the entry which corresponds to the SDES private item prefix \c prefix with length + * \c prefixlen; if found, the function returns \c true and stores the associated value and + * its length in \c value and \c valuelen respectively. + */ bool SDES_GetPrivateValue(uint8_t *prefix,size_t prefixlen,uint8_t **value,size_t *valuelen) const { return SDESinf.GetPrivateValue(prefix,prefixlen,value,valuelen); } #endif // RTP_SUPPORT_SDESPRIV @@ -298,7 +467,7 @@ inline void RTPSourceData::FlushPackets() std::list::const_iterator it; for (it = packetlist.begin() ; it != packetlist.end() ; ++it) - delete (*it); + RTPDelete(*it,GetMemoryManager()); packetlist.clear(); } #endif // RTPSOURCEDATA_H diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 0e8c892..82ff71d 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -51,7 +51,7 @@ #include "rtpdebug.h" -RTPSources::RTPSources(ProbationType probtype) +RTPSources::RTPSources(ProbationType probtype,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),sourcelist(mgr,RTPMEM_TYPE_CLASS_SOURCETABLEHASHELEMENT) { totalcount = 0; sendercount = 0; @@ -80,7 +80,7 @@ void RTPSources::ClearSourceList() RTPInternalSourceData *sourcedata; sourcedata = sourcelist.GetCurrentElement(); - delete sourcedata; + RTPDelete(sourcedata,GetMemoryManager()); sourcelist.GotoNextElement(); } sourcelist.Clear(); @@ -135,7 +135,7 @@ int RTPSources::DeleteOwnSSRC() OnRemoveSource(owndata); - delete owndata; + RTPDelete(owndata,GetMemoryManager()); owndata = 0; return 0; } @@ -174,19 +174,19 @@ int RTPSources::ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *rtptrans[ RTPPacket *rtppack; // First, we'll see if the packet can be parsed - rtppack = new RTPPacket(*rawpack); + rtppack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPPACKET) RTPPacket(*rawpack,GetMemoryManager()); if (rtppack == 0) return ERR_RTP_OUTOFMEM; if ((status = rtppack->GetCreationError()) < 0) { if (status == ERR_RTP_PACKET_INVALIDPACKET) { - delete rtppack; + RTPDelete(rtppack,GetMemoryManager()); rtppack = 0; } else { - delete rtppack; + RTPDelete(rtppack,GetMemoryManager()); return status; } } @@ -216,7 +216,7 @@ int RTPSources::ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *rtptrans[ if ((status = ProcessRTPPacket(rtppack,rawpack->GetReceiveTime(),0,&stored)) < 0) { if (!stored) - delete rtppack; + RTPDelete(rtppack,GetMemoryManager()); return status; } } @@ -226,17 +226,17 @@ int RTPSources::ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *rtptrans[ if ((status = ProcessRTPPacket(rtppack,rawpack->GetReceiveTime(),senderaddress,&stored)) < 0) { if (!stored) - delete rtppack; + RTPDelete(rtppack,GetMemoryManager()); return status; } } if (!stored) - delete rtppack; + RTPDelete(rtppack,GetMemoryManager()); } } else // RTCP packet { - RTCPCompoundPacket rtcpcomppack(*rawpack); + RTCPCompoundPacket rtcpcomppack(*rawpack,GetMemoryManager()); bool valid = false; if ((status = rtcpcomppack.GetCreationError()) < 0) @@ -800,15 +800,15 @@ int RTPSources::ObtainSourceDataInstance(uint32_t ssrc,RTPInternalSourceData **s if (sourcelist.GotoElement(ssrc) < 0) // No entry for this source { #ifdef RTP_SUPPORT_PROBATION - srcdat2 = new RTPInternalSourceData(ssrc,probationtype); + srcdat2 = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPINTERNALSOURCEDATA) RTPInternalSourceData(ssrc,probationtype,GetMemoryManager()); #else - srcdat2 = new RTPInternalSourceData(ssrc,RTPSources::NoProbation); + srcdat2 = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPINTERNALSOURCEDATA) RTPInternalSourceData(ssrc,RTPSources::NoProbation,GetMemoryManager()); #endif // RTP_SUPPORT_PROBATION if (srcdat2 == 0) return ERR_RTP_OUTOFMEM; if ((status = sourcelist.AddElement(ssrc,srcdat2)) < 0) { - delete srcdat2; + RTPDelete(srcdat2,GetMemoryManager()); return status; } *srcdat = srcdat2; @@ -903,7 +903,7 @@ void RTPSources::Timeout(const RTPTime &curtime,const RTPTime &timeoutdelay) OnTimeout(srcdat); OnRemoveSource(srcdat); - delete srcdat; + RTPDelete(srcdat,GetMemoryManager()); } else { @@ -1021,7 +1021,7 @@ void RTPSources::BYETimeout(const RTPTime &curtime,const RTPTime &timeoutdelay) sourcelist.DeleteCurrentElement(); OnBYETimeout(srcdat); OnRemoveSource(srcdat); - delete srcdat; + RTPDelete(srcdat,GetMemoryManager()); } else { @@ -1230,7 +1230,7 @@ void RTPSources::MultipleTimeouts(const RTPTime &curtime,const RTPTime &senderti if (normaltimeout) OnTimeout(srcdat); OnRemoveSource(srcdat); - delete srcdat; + RTPDelete(srcdat,GetMemoryManager()); } } diff --git a/src/rtpsources.h b/src/rtpsources.h index 82f90dd..7183948 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpsources.h + */ + #ifndef RTPSOURCES_H #define RTPSOURCES_H @@ -38,6 +42,7 @@ #include "rtpkeyhashtable.h" #include "rtcpsdespacket.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" #define RTPSOURCES_HASHSIZE 8317 @@ -57,73 +62,224 @@ class RTPTime; class RTPAddress; class RTPSourceData; -class RTPSources +/** Represents a table in which information about the participating sources is kept. + * Represents a table in which information about the participating sources is kept. The class has member + * functions to process RTP and RTCP data and to iterate over the participants. Note that a NULL address + * is used to identify packets from our own session. The class also provides some overridable functions + * which can be used to catch certain events (new SSRC, SSRC collision, ...). + */ +class RTPSources : public RTPMemoryObject { public: - enum ProbationType { NoProbation, ProbationDiscard, ProbationStore }; + /** Type of probation to use for new sources. */ + enum ProbationType + { + NoProbation, /**< Don't use the probation algorithm; accept RTP packets immediately. */ + ProbationDiscard, /**< Discard incoming RTP packets originating from a source that's on probation. */ + ProbationStore /**< Store incoming RTP packet from a source that's on probation for later retrieval. */ + }; - RTPSources(ProbationType = ProbationStore); + /** In the constructor you can select the probation type you'd like to use and also a memory manager. */ + RTPSources(ProbationType = ProbationStore,RTPMemoryManager *mgr = 0); virtual ~RTPSources(); + + /** Clears the source table. */ void Clear(); #ifdef RTP_SUPPORT_PROBATION + /** Changes the current probation type. */ void SetProbationType(ProbationType probtype) { probationtype = probtype; } #endif // RTP_SUPPORT_PROBATION + /** Creates an entry for our own SSRC identifier. */ int CreateOwnSSRC(uint32_t ssrc); + + /** Deletes the entry for our own SSRC identifier. */ int DeleteOwnSSRC(); + + /** This function should be called if our own session has sent an RTP packet. + * This function should be called if our own session has sent an RTP packet. + * For our own SSRC entry, the sender flag is updated based upon outgoing packets instead of incoming packets. + */ void SentRTPPacket(); + /** Processes a raw packet \c rawpack. + * Processes a raw packet \c rawpack. The instance \c trans will be used to check if this + * packet is one of our own packets. The flag \c acceptownpackets indicates whether own packets should be + * accepted or ignored. + */ int ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *trans,bool acceptownpackets); + + /** Processes a raw packet \c rawpack. + * Processes a raw packet \c rawpack. Every transmitter in the array \c trans of length \c numtrans + * is used to check if the packet is from our own session. The flag \c acceptownpackets indicates + * whether own packets should be accepted or ignored. + */ int ProcessRawPacket(RTPRawPacket *rawpack,RTPTransmitter *trans[],int numtrans,bool acceptownpackets); - // Note: if the packet originated from our own session, senderaddress has to be NULL + /** Processes an RTPPacket instance \c rtppack which was received at time \c receivetime and + * which originated from \c senderaddres. + * Processes an RTPPacket instance \c rtppack which was received at time \c receivetime and + * which originated from \c senderaddres. The \c senderaddress parameter must be NULL if + * the packet was sent by the local participant. The flag \c stored indicates whether the packet + * was stored in the table or not. If so, the \c rtppack instance may not be deleted. + */ int ProcessRTPPacket(RTPPacket *rtppack,const RTPTime &receivetime,const RTPAddress *senderaddress,bool *stored); + + /** Processes the RTCP compound packet \c rtcpcomppack which was received at time \c receivetime from \c senderaddress. + * Processes the RTCP compound packet \c rtcpcomppack which was received at time \c receivetime from \c senderaddress. + * The \c senderaddress parameter must be NULL if the packet was sent by the local participant. + */ int ProcessRTCPCompoundPacket(RTCPCompoundPacket *rtcpcomppack,const RTPTime &receivetime, const RTPAddress *senderaddress); + /** Process the sender information of SSRC \c ssrc into the source table. + * Process the sender information of SSRC \c ssrc into the source table. The information was received + * at time \c receivetime from address \c senderaddress. The \c senderaddress} parameter must be NULL + * if the packet was sent by the local participant. + */ int ProcessRTCPSenderInfo(uint32_t ssrc,const RTPNTPTime &ntptime,uint32_t rtptime, uint32_t packetcount,uint32_t octetcount,const RTPTime &receivetime, const RTPAddress *senderaddress); + + /** Processes the report block information which was sent by participant \c ssrc into the source table. + * Processes the report block information which was sent by participant \c ssrc into the source table. + * The information was received at time \c receivetime from address \c senderaddress The \c senderaddress + * parameter must be NULL if the packet was sent by the local participant. + */ int ProcessRTCPReportBlock(uint32_t ssrc,uint8_t fractionlost,int32_t lostpackets, uint32_t exthighseqnr,uint32_t jitter,uint32_t lsr, - uint32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress); + uint32_t dlsr,const RTPTime &receivetime,const RTPAddress *senderaddress); + + /** Processes the non-private SDES item from source \c ssrc into the source table. + * Processes the non-private SDES item from source \c ssrc into the source table. The information was + * received at time \c receivetime from address \c senderaddress. The \c senderaddress parameter must + * be NULL if the packet was sent by the local participant. + */ int ProcessSDESNormalItem(uint32_t ssrc,RTCPSDESPacket::ItemType t,size_t itemlength, const void *itemdata,const RTPTime &receivetime,const RTPAddress *senderaddress); #ifdef RTP_SUPPORT_SDESPRIV + /** Processes the SDES private item from source \c ssrc into the source table. + * Processes the SDES private item from source \c ssrc into the source table. The information was + * received at time \c receivetime from address \c senderaddress. The \c senderaddress + * parameter must be NULL if the packet was sent by the local participant. + */ int ProcessSDESPrivateItem(uint32_t ssrc,size_t prefixlen,const void *prefixdata, size_t valuelen,const void *valuedata,const RTPTime &receivetime, - const RTPAddress *senderaddress); + const RTPAddress *senderaddress); #endif //RTP_SUPPORT_SDESPRIV + /** Processes the BYE message for SSRC \c ssrc. + * Processes the BYE message for SSRC \c ssrc. The information was received at time \c receivetime from + * address \c senderaddress. The \c senderaddress parameter must be NULL if the packet was sent by the + * local participant. + */ int ProcessBYE(uint32_t ssrc,size_t reasonlength,const void *reasondata,const RTPTime &receivetime, const RTPAddress *senderaddress); - // If no specific info was sent to us, but we did receive a packet from a SSRC, the following - // function can be used to update the time at which we last heard something from the SSRC. - // This way, premature timeouts can be avoided. + /** If we heard from source \c ssrc, but no actual data was added to the source table (for example, if + * no report block was meant for us), this function can e used to indicate that something was received from + * this source. + * If we heard from source \c ssrc, but no actual data was added to the source table (for example, if + * no report block was meant for us), this function can e used to indicate that something was received from + * this source. This will prevent a premature timeout for this participant. The message was received at time + * \c receivetime from address \c senderaddress. The \c senderaddress parameter must be NULL if the + * packet was sent by the local participant. + */ int UpdateReceiveTime(uint32_t ssrc,const RTPTime &receivetime,const RTPAddress *senderaddress); + /** Starts the iteration over the participants by going to the first member in the table. + * Starts the iteration over the participants by going to the first member in the table. + * If a member was found, the function returns \c true, otherwise it returns \c false. + */ bool GotoFirstSource(); + + /** Sets the current source to be the next source in the table. + * Sets the current source to be the next source in the table. If we're already at the last source, + * the function returns \c false, otherwise it returns \c true. + */ bool GotoNextSource(); + + /** Sets the current source to be the previous source in the table. + * Sets the current source to be the previous source in the table. If we're at the first source, + * the function returns \c false, otherwise it returns \c true. + */ bool GotoPreviousSource(); + + /** Sets the current source to be the first source in the table which has RTPPacket instances + * that we haven't extracted yet. + * Sets the current source to be the first source in the table which has RTPPacket instances + * that we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoFirstSourceWithData(); + + /** Sets the current source to be the next source in the table which has RTPPacket instances that + * we haven't extracted yet. + * Sets the current source to be the next source in the table which has RTPPacket instances that + * we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoNextSourceWithData(); + + /** Sets the current source to be the previous source in the table which has RTPPacket instances + * that we haven't extracted yet. + * Sets the current source to be the previous source in the table which has RTPPacket instances + * that we haven't extracted yet. If no such member was found, the function returns \c false, + * otherwise it returns \c true. + */ bool GotoPreviousSourceWithData(); + + /** Returns the RTPSourceData instance for the currently selected participant. */ RTPSourceData *GetCurrentSourceInfo(); + + /** Returns the RTPSourceData instance for the participant identified by \c ssrc, or + * NULL if no such entry exists. + */ RTPSourceData *GetSourceInfo(uint32_t ssrc); + + /** Extracts the next packet from the received packets queue of the current participant. */ RTPPacket *GetNextPacket(); + + /** Returns \c true if an entry for participant \c ssrc exists and \c false otherwise. */ bool GotEntry(uint32_t ssrc); + + /** If present, it returns the RTPSourceData instance of the entry which was created by CreateOwnSSRC. */ RTPSourceData *GetOwnSourceInfo() { return (RTPSourceData *)owndata; } + /** Assuming that the current time is \c curtime, time out the members from whom we haven't heard + * during the previous time interval \c timeoutdelay. + */ void Timeout(const RTPTime &curtime,const RTPTime &timeoutdelay); + + /** Assuming that the current time is \c curtime, remove the sender flag for senders from whom we haven't + * received any RTP packets during the previous time interval \c timeoutdelay. + */ void SenderTimeout(const RTPTime &curtime,const RTPTime &timeoutdelay); + + /** Assuming that the current time is \c curtime, remove the members who sent a BYE packet more than + * the time interval \c timeoutdelay ago. + */ void BYETimeout(const RTPTime &curtime,const RTPTime &timeoutdelay); + + /** Assuming that the current time is \c curtime, clear the SDES NOTE items which haven't been updated + * during the previous time interval \c timeoutdelay. + */ void NoteTimeout(const RTPTime &curtime,const RTPTime &timeoutdelay); + + /** Combines the functions SenderTimeout, BYETimeout, Timeout and NoteTimeout. + * Combines the functions SenderTimeout, BYETimeout, Timeout and NoteTimeout. This is more efficient + * than calling all four functions since only one iteration is needed in this function. + */ void MultipleTimeouts(const RTPTime &curtime,const RTPTime &sendertimeout, const RTPTime &byetimeout,const RTPTime &generaltimeout, const RTPTime ¬etimeout); - int GetSenderCount() const { return sendercount; } - int GetTotalCount() const { return totalcount; } + /** Returns the number of participants which are marked as a sender. */ + int GetSenderCount() const { return sendercount; } + + /** Returns the total number of entries in the source table. */ + int GetTotalCount() const { return totalcount; } + + /** Returns the number of members which have been validated and which haven't sent a BYE packet yet. */ int GetActiveMemberCount() const { return activecount; } #ifdef RTPDEBUG void Dump(); @@ -132,25 +288,55 @@ class RTPSources void SafeCountActive(); #endif // RTPDEBUG protected: - virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, - const RTPAddress *senderaddress) { } - virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack,const RTPTime &receivetime, - const RTPAddress *senderaddress) { } - virtual void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp) { } + /** Is called when an RTP packet is about to be processed. */ + virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } + + /** Is called when an RTCP compound packet is about to be processed. */ + virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack,const RTPTime &receivetime, + const RTPAddress *senderaddress) { } + + /** Is called when an SSRC collision was detected. + * Is called when an SSRC collision was detected. The instance \c srcdat is the one present in + * the table, the address \c senderaddress is the one that collided with one of the addresses + * and \c isrtp indicates against which address of \c srcdat the check failed. + */ + virtual void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp) { } + + /** Is called when another CNAME was received than the one already present for source \c srcdat. */ virtual void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, - const uint8_t *cname,size_t cnamelength) { } - virtual void OnNewSource(RTPSourceData *srcdat) { } - virtual void OnRemoveSource(RTPSourceData *srcdat) { } - virtual void OnTimeout(RTPSourceData *srcdat) { } - virtual void OnBYETimeout(RTPSourceData *srcdat) { } - virtual void OnBYEPacket(RTPSourceData *srcdat) { } + const uint8_t *cname,size_t cnamelength) { } + + /** Is called when a new entry \c srcdat is added to the source table. */ + virtual void OnNewSource(RTPSourceData *srcdat) { } + + /** Is called when the entry \c srcdat is about to be deleted from the source table. */ + virtual void OnRemoveSource(RTPSourceData *srcdat) { } + + /** Is called when participant \c srcdat is timed out. */ + virtual void OnTimeout(RTPSourceData *srcdat) { } + + /** Is called when participant \c srcdat is timed after having sent a BYE packet. */ + virtual void OnBYETimeout(RTPSourceData *srcdat) { } + + /** Is called when a BYE packet has been processed for source \c srcdat. */ + virtual void OnBYEPacket(RTPSourceData *srcdat) { } + + /** Is called when an RTCP APP packet \c apppacket has been received at time \c receivetime + * from address \c senderaddress. + */ virtual void OnAPPPacket(RTCPAPPPacket *apppacket,const RTPTime &receivetime, - const RTPAddress *senderaddress) { } + const RTPAddress *senderaddress) { } + + /** Is called when an unknown RTCP packet type was detected. */ virtual void OnUnknownPacketType(RTCPPacket *rtcppack,const RTPTime &receivetime, - const RTPAddress *senderaddress) { } + const RTPAddress *senderaddress) { } + + /** Is called when an unknown packet format for a known packet type was detected. */ virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime, - const RTPAddress *senderaddress) { } - virtual void OnNoteTimeout(RTPSourceData *srcdat) { } + const RTPAddress *senderaddress) { } + + /** Is called when the SDES NOTE item for source \c srcdat has been timed out. */ + virtual void OnNoteTimeout(RTPSourceData *srcdat) { } private: void ClearSourceList(); int ObtainSourceDataInstance(uint32_t ssrc,RTPInternalSourceData **srcdat,bool *created); diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 9447a4d..62f331b 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpstructs.h + */ + #ifndef RTPSTRUCTS_H #define RTPSTRUCTS_H diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index e027e93..0471f5b 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -43,6 +43,7 @@ RTPTimeInitializer::RTPTimeInitializer() std::cout << "RTPTimeInitializer: Initializing RTPTime::CurrentTime()" << std::endl; #endif // RTPDEBUG RTPTime curtime = RTPTime::CurrentTime(); + dummy = -1; } RTPTimeInitializer timeinit; diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 4dbbfc2..94b62e5 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtptimeutilities.h + */ + #ifndef RTPTIMEUTILITIES_H #define RTPTIMEUTILITIES_H @@ -47,31 +51,68 @@ #define RTP_NTPTIMEOFFSET 2208988800UL +/** + * This is a simple wrapper for the most significant word (MSW) and least + * significant word (LSW) of an NTP timestamp. + */ class RTPNTPTime { public: + /** This constructor creates and instance with MSW \c m and LSW \c l. */ RTPNTPTime(uint32_t m,uint32_t l) { msw = m ; lsw = l; } + + /** Returns the most significant word. */ uint32_t GetMSW() const { return msw; } + + /** Returns the least significant word. */ uint32_t GetLSW() const { return lsw; } private: uint32_t msw,lsw; }; +/** This class is used to specify wallclock time, delay intervals etc. + * This class is used to specify wallclock time, delay intervals etc. + * It stores a number of seconds and a number of microseconds. + */ class RTPTime { public: + /** Returns an RTPTime instance representing the current wallclock time. + * Returns an RTPTime instance representing the current wallclock time. This is expressed + * as a number of seconds since 00:00:00 UTC, January 1, 1970. + */ static RTPTime CurrentTime(); + + /** This function waits the amount of time specified in \c delay. */ static void Wait(const RTPTime &delay); + /** Creates an RTPTime instance representing \c t, which is expressed in units of seconds. */ RTPTime(double t); + + /** Creates an instance that corresponds to \c ntptime. + * Creates an instance that corresponds to \c ntptime. If + * the conversion cannot be made, both the seconds and the + * microseconds are set to zero. + */ RTPTime(RTPNTPTime ntptime); + + /** Creates an instance corresponding to \c seconds and \c microseconds. */ RTPTime(uint32_t seconds,uint32_t microseconds) { sec = seconds; microsec = microseconds; } - uint32_t GetSeconds() const { return sec; } - uint32_t GetMicroSeconds() const { return microsec; } - double GetDouble() const { return (((double)sec)+(((double)microsec)/1000000.0)); } + + /** Returns the number of seconds stored in this instance. */ + uint32_t GetSeconds() const { return sec; } + + /** Returns the number of microseconds stored in this instance. */ + uint32_t GetMicroSeconds() const { return microsec; } + + /** Returns the time stored in this instance, expressed in units of seconds. */ + double GetDouble() const { return (((double)sec)+(((double)microsec)/1000000.0)); } + + /** Returns the NTP time corresponding to the time stored in this instance. */ + RTPNTPTime GetNTPTime() const; + RTPTime &operator-=(const RTPTime &t); RTPTime &operator+=(const RTPTime &t); - RTPNTPTime GetNTPTime() const; bool operator<(const RTPTime &t) const; bool operator>(const RTPTime &t) const; bool operator<=(const RTPTime &t) const; @@ -152,7 +193,9 @@ class RTPTimeInitializer { public: RTPTimeInitializer(); - void Dummy() { } + void Dummy() { dummy++; } +private: + int dummy; }; extern RTPTimeInitializer timeinit; diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index daf996d..aacac30 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,12 +30,17 @@ */ +/** + * \file rtptransmitter.h + */ + #ifndef RTPTRANSMITTER_H #define RTPTRANSMITTER_H #include "rtpconfig.h" #include "rtptypes.h" +#include "rtpmemoryobject.h" class RTPRawPacket; class RTPAddress; @@ -43,95 +48,198 @@ class RTPTransmissionParams; class RTPTime; class RTPTransmissionInfo; -// Abstract class from which actual transmission components should be derived - -class RTPTransmitter +/** Abstract class from which actual transmission components should be derived. + * Abstract class from which actual transmission components should be derived. + * The abstract class RTPTransmitter specifies the interface for + * actual transmission components. Currently, two implementations exist: + * an UDP over IPv4 transmitter and an UDP over IPv6 transmitter. + */ +class RTPTransmitter : public RTPMemoryObject { public: - enum TransmissionProtocol { IPv4UDPProto, IPv6UDPProto, UserDefinedProto }; - enum ReceiveMode { AcceptAll,AcceptSome,IgnoreSome }; + /** Used to identify a specific transmitter. + * If UserDefinedProto is used in the RTPSession::Create function, the RTPSession + * virtual member function NewUserDefinedTransmitter will be called to create + * a transmission component. + */ + enum TransmissionProtocol + { + IPv4UDPProto, /**< Specifies the internal UDP over IPv4 transmitter. */ + IPv6UDPProto, /**< Specifies the internal UDP over IPv6 transmitter. */ + UserDefinedProto /**< Specifies a user defined, external transmitter. */ + }; + + /** Three kind of receive modes can be specified. */ + enum ReceiveMode + { + AcceptAll, /**< All incoming data is accepted, no matter where it originated from. */ + AcceptSome, /**< Only data coming from specific sources will be accepted. */ + IgnoreSome /**< All incoming data is accepted, except for data coming from a specific set of sources. */ + }; protected: - RTPTransmitter() { } + /** Constructor in which you can specify a memory manager to use. */ + RTPTransmitter(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { } public: virtual ~RTPTransmitter() { } - // The init function is there for initialization before any other threads - // may access the object (e.g. initialization of mutexes) + /** This function must be called before the transmission component can be used. + * This function must be called before the transmission component can be used. Depending on + * the value of \c threadsafe, the component will be created for thread-safe usage or not. + */ virtual int Init(bool threadsafe) = 0; + + /** Prepares the component to be used. + * Prepares the component to be used. The parameter \c maxpacksize specifies the maximum size + * a packet can have: if the packet is larger it will not be transmitted. The \c transparams + * parameter specifies a pointer to an RTPTransmissionParams instance. This is also an abstract + * class and each actual component will define its own parameters by inheriting a class + * from RTPTransmissionParams. If \c transparams is NULL, the default transmission parameters + * for the component will be used. + */ virtual int Create(size_t maxpacksize,const RTPTransmissionParams *transparams) = 0; + + /** By calling this function, buffers are cleared and the component cannot be used anymore. + * By calling this function, buffers are cleared and the component cannot be used anymore. + * Only when the Create function is called again can the component be used again. */ virtual void Destroy() = 0; - // The user MUST delete the returned instance when it is no longer needed + /** Returns additional information about the transmitter. + * This function returns an instance of a subclass of RTPTransmissionInfo which will give + * some additional information about the transmitter (a list of local IP addresses for example). + * Currently, either an instance of RTPUDPv4TransmissionInfo or RTPUDPv6TransmissionInfo is + * returned, depending on the type of the transmitter. The user has to deallocate the returned + * instance when it is no longer needed. + */ virtual RTPTransmissionInfo *GetTransmissionInfo() = 0; - // If the buffersize ins't large enough, the transmitter must fill in the - // required length in 'bufferlength' - // If the size is ok, bufferlength is adjusted so that it indicates the - // amount of bytes in the buffer that are part of the hostname. - // The buffer is NOT null terminated! + /** Looks up the local host name. + * Looks up the local host name based upon internal information about the local host's + * addresses. This function might take some time since a DNS query might be done. \c bufferlength + * should initially contain the number of bytes that may be stored in \c buffer. If the function + * succeeds, \c bufferlength is set to the number of bytes stored in \c buffer. Note that the data + * in \c buffer is not NULL-terminated. If the function fails because the buffer isn't large enough, + * it returns \c ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL and stores the number of bytes needed in + * \c bufferlength. + */ virtual int GetLocalHostName(uint8_t *buffer,size_t *bufferlength) = 0; + /** Returns \c true if the address specified by \c addr is one of the addresses of the transmitter. */ virtual bool ComesFromThisTransmitter(const RTPAddress *addr) = 0; + + /** Returns the amount of bytes that will be added to the RTP packet by the underlying layers (excluding + * the link layer). */ virtual size_t GetHeaderOverhead() = 0; + /** Checks for incoming data and stores it. */ virtual int Poll() = 0; - // If dataavailable is not NULL, it should be set to true if true if data was read - // and to false otherwise + + /** Waits until incoming data is detected. + * Waits at most a time \c delay until incoming data has been detected. If \c dataavailable is not NULL, + * it should be set to \c true if data was actually read and to \c false otherwise. + */ virtual int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0) = 0; + + /** If the previous function has been called, this one aborts the waiting. */ virtual int AbortWait() = 0; + /** Send a packet with length \c len containing \c data to all RTP addresses of the current destination list. */ virtual int SendRTPData(const void *data,size_t len) = 0; + + /** Send a packet with length \c len containing \c data to all RTCP addresses of the current destination list. */ virtual int SendRTCPData(const void *data,size_t len) = 0; - virtual void ResetPacketCount() = 0; - virtual uint32_t GetNumRTPPacketsSent() = 0; - virtual uint32_t GetNumRTCPPacketsSent() = 0; - + /** Adds the address specified by \c addr to the list of destinations. */ virtual int AddDestination(const RTPAddress &addr) = 0; + + /** Deletes the address specified by \c addr from the list of destinations. */ virtual int DeleteDestination(const RTPAddress &addr) = 0; + + /** Clears the list of destinations. */ virtual void ClearDestinations() = 0; + /** Returns \c true if the transmission component supports multicasting. */ virtual bool SupportsMulticasting() = 0; + + /** Joins the multicast group specified by \c addr. */ virtual int JoinMulticastGroup(const RTPAddress &addr) = 0; + + /** Leaves the multicast group specified by \c addr. */ virtual int LeaveMulticastGroup(const RTPAddress &addr) = 0; + + /** Leaves all the multicast groups that have been joined. */ virtual void LeaveAllMulticastGroups() = 0; - // Note: the list of addresses must be cleared when the receive mode is changed! + /** Sets the receive mode. + * Sets the receive mode to \c m, which is one of the following: RTPTransmitter::AcceptAll, + * RTPTransmitter::AcceptSome or RTPTransmitter::IgnoreSome. Note that if the receive + * mode is changed, all information about the addresses to ignore to accept is lost. + */ virtual int SetReceiveMode(RTPTransmitter::ReceiveMode m) = 0; + + /** Adds \c addr to the list of addresses to ignore. */ virtual int AddToIgnoreList(const RTPAddress &addr) = 0; + + /** Deletes \c addr from the list of addresses to accept. */ virtual int DeleteFromIgnoreList(const RTPAddress &addr)= 0; + + /** Clears the list of addresses to ignore. */ virtual void ClearIgnoreList() = 0; + + /** Adds \c addr to the list of addresses to accept. */ virtual int AddToAcceptList(const RTPAddress &addr) = 0; + + /** Deletes \c addr from the list of addresses to accept. */ virtual int DeleteFromAcceptList(const RTPAddress &addr) = 0; + + /** Clears the list of addresses to accept. */ virtual void ClearAcceptList() = 0; + + /** Sets the maximum packet size which the transmitter should allow to \c s. */ virtual int SetMaximumPacketSize(size_t s) = 0; + /** Returns \c true if packets can be obtained using the GetNextPacket member function. */ virtual bool NewDataAvailable() = 0; + + /** Returns the raw data of a received RTP packet (received during the Poll function) + * in an RTPRawPacket instance. */ virtual RTPRawPacket *GetNextPacket() = 0; #ifdef RTPDEBUG virtual void Dump() = 0; #endif // RTPDEBUG }; -// Abstract class from which actual transmission parameters should be derived - +/** Base class for transmission parameters. + * This class is an abstract class which will have a specific implementation for a + * specific kind of transmission component. All actual implementations inherit the + * GetTransmissionProtocol function which identifies the component type for which + * these parameters are valid. + */ class RTPTransmissionParams { protected: RTPTransmissionParams(RTPTransmitter::TransmissionProtocol p) { protocol = p; } public: virtual ~RTPTransmissionParams() { } + + /** Returns the transmitter type for which these parameters are valid. */ RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const { return protocol; } private: RTPTransmitter::TransmissionProtocol protocol; }; +/** Base class for additional information about the transmitter. + * This class is an abstract class which will have a specific implementation for a + * specific kind of transmission component. All actual implementations inherit the + * GetTransmissionProtocol function which identifies the component type for which + * these parameters are valid. + */ class RTPTransmissionInfo { protected: RTPTransmissionInfo(RTPTransmitter::TransmissionProtocol p) { protocol = p; } public: virtual ~RTPTransmissionInfo() { } + /** Returns the transmitter type for which these parameters are valid. */ RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const { return protocol; } private: RTPTransmitter::TransmissionProtocol protocol; diff --git a/src/rtptypes.h b/src/rtptypes.h index 6467e94..dbbadd7 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 4e8185b..20c00b2 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 521a1bc..0f7036b 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -117,7 +117,8 @@ #define WAITMUTEX_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPUDPv4Transmitter::RTPUDPv4Transmitter() +RTPUDPv4Transmitter::RTPUDPv4Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr),destinations(mgr,RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT),multicastgroups(mgr,RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), + acceptignoreinfo(mgr,RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; init = false; @@ -338,9 +339,6 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa localhostname = 0; localhostnamelength = 0; - rtppackcount = 0; - rtcppackcount = 0; - waitingfordata = false; created = true; MAINMUTEX_UNLOCK @@ -361,7 +359,7 @@ void RTPUDPv4Transmitter::Destroy() if (localhostname) { - delete [] localhostname; + RTPDeleteByteArray(localhostname,GetMemoryManager()); localhostname = 0; localhostnamelength = 0; } @@ -397,7 +395,7 @@ RTPTransmissionInfo *RTPUDPv4Transmitter::GetTransmissionInfo() return 0; MAINMUTEX_LOCK - RTPTransmissionInfo *tinf = new RTPUDPv4TransmissionInfo(localIPs,rtpsock,rtcpsock); + RTPTransmissionInfo *tinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMISSIONINFO) RTPUDPv4TransmissionInfo(localIPs,rtpsock,rtcpsock); MAINMUTEX_UNLOCK return tinf; } @@ -487,7 +485,7 @@ int RTPUDPv4Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new uint8_t [localhostnamelength+1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -512,7 +510,7 @@ int RTPUDPv4Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) len = strlen(str); localhostnamelength = len; - localhostname = new uint8_t [localhostnamelength + 1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength + 1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -711,8 +709,6 @@ int RTPUDPv4Transmitter::SendRTPData(const void *data,size_t len) MAINMUTEX_LOCK - struct sockaddr_in saddr; - if (!created) { MAINMUTEX_UNLOCK @@ -724,18 +720,13 @@ int RTPUDPv4Transmitter::SendRTPData(const void *data,size_t len) return ERR_RTP_UDPV4TRANS_SPECIFIEDSIZETOOBIG; } - memset(&saddr,0,sizeof(struct sockaddr_in)); - saddr.sin_family = AF_INET; destinations.GotoFirstElement(); while (destinations.HasCurrentElement()) { - saddr.sin_port = destinations.GetCurrentElement().GetRTPPort_NBO(); - saddr.sin_addr.s_addr = destinations.GetCurrentElement().GetIP_NBO(); - sendto(rtpsock,(const char *)data,len,0,(struct sockaddr *)&saddr,sizeof(struct sockaddr_in)); + sendto(rtpsock,(const char *)data,len,0,(const struct sockaddr *)destinations.GetCurrentElement().GetRTPSockAddr(),sizeof(struct sockaddr_in)); destinations.GotoNextElement(); } - rtppackcount++; MAINMUTEX_UNLOCK return 0; } @@ -747,8 +738,6 @@ int RTPUDPv4Transmitter::SendRTCPData(const void *data,size_t len) MAINMUTEX_LOCK - struct sockaddr_in saddr; - if (!created) { MAINMUTEX_UNLOCK @@ -760,74 +749,17 @@ int RTPUDPv4Transmitter::SendRTCPData(const void *data,size_t len) return ERR_RTP_UDPV4TRANS_SPECIFIEDSIZETOOBIG; } - memset(&saddr,0,sizeof(struct sockaddr_in)); - saddr.sin_family = AF_INET; destinations.GotoFirstElement(); while (destinations.HasCurrentElement()) { - saddr.sin_port = destinations.GetCurrentElement().GetRTCPPort_NBO(); - saddr.sin_addr.s_addr = destinations.GetCurrentElement().GetIP_NBO(); - sendto(rtcpsock,(const char *)data,len,0,(struct sockaddr *)&saddr,sizeof(struct sockaddr_in)); + sendto(rtcpsock,(const char *)data,len,0,(const struct sockaddr *)destinations.GetCurrentElement().GetRTCPSockAddr(),sizeof(struct sockaddr_in)); destinations.GotoNextElement(); } - rtcppackcount++; MAINMUTEX_UNLOCK return 0; } -void RTPUDPv4Transmitter::ResetPacketCount() -{ - if (!init) - return; - - MAINMUTEX_LOCK - if (created) - { - rtppackcount = 0; - rtcppackcount = 0; - } - MAINMUTEX_UNLOCK -} - -uint32_t RTPUDPv4Transmitter::GetNumRTPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - -uint32_t RTPUDPv4Transmitter::GetNumRTCPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtcppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - int RTPUDPv4Transmitter::AddDestination(const RTPAddress &addr) { if (!init) @@ -1310,7 +1242,7 @@ void RTPUDPv4Transmitter::FlushPackets() std::list::const_iterator it; for (it = rawpacketlist.begin() ; it != rawpacketlist.end() ; ++it) - delete (*it); + RTPDelete(*it,GetMemoryManager()); rawpacketlist.clear(); } @@ -1359,22 +1291,22 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) RTPIPv4Address *addr; uint8_t *datacopy; - addr = new RTPIPv4Address(ntohl(srcaddr.sin_addr.s_addr),ntohs(srcaddr.sin_port)); + addr = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv4Address(ntohl(srcaddr.sin_addr.s_addr),ntohs(srcaddr.sin_port)); if (addr == 0) return ERR_RTP_OUTOFMEM; - datacopy = new uint8_t[recvlen]; + datacopy = RTPNew(GetMemoryManager(),(rtp)?RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET:RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET) uint8_t[recvlen]; if (datacopy == 0) { - delete addr; + RTPDelete(addr,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } memcpy(datacopy,packetbuffer,recvlen); - pack = new RTPRawPacket(datacopy,recvlen,addr,curtime,rtp); - + + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,recvlen,addr,curtime,rtp,GetMemoryManager()); if (pack == 0) { - delete addr; - delete [] datacopy; + RTPDelete(addr,GetMemoryManager()); + RTPDeleteByteArray(datacopy,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } rawpacketlist.push_back(pack); @@ -1417,7 +1349,7 @@ int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) PortInfo *portinf; int status; - portinf = new PortInfo(); + portinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_ACCEPTIGNOREPORTINFO) PortInfo(); if (port == 0) // select all ports portinf->all = true; else @@ -1426,7 +1358,7 @@ int RTPUDPv4Transmitter::ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port) status = acceptignoreinfo.AddElement(ip,portinf); if (status < 0) { - delete portinf; + RTPDelete(portinf,GetMemoryManager()); return status; } } @@ -1442,7 +1374,7 @@ void RTPUDPv4Transmitter::ClearAcceptIgnoreInfo() PortInfo *inf; inf = acceptignoreinfo.GetCurrentElement(); - delete inf; + RTPDelete(inf,GetMemoryManager()); acceptignoreinfo.GotoNextElement(); } acceptignoreinfo.Clear(); @@ -1997,8 +1929,6 @@ void RTPUDPv4Transmitter::Dump() std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; - std::cout << "RTP packet count: " << rtppackcount << std::endl; - std::cout << "RTCP packet count: " << rtcppackcount << std::endl; } MAINMUTEX_UNLOCK diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 70a9353..8ca8339 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpudpv4transmitter.h + */ + #ifndef RTPUDPV4TRANSMITTER_H #define RTPUDPV4TRANSMITTER_H @@ -48,21 +52,47 @@ #define RTPUDPV4TRANS_HASHSIZE 8317 #define RTPUDPV4TRANS_DEFAULTPORTBASE 5000 +/** Parameters for the UDP over IPv4 transmitter. */ class RTPUDPv4TransmissionParams : public RTPTransmissionParams { public: RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; mcastifaceIP = 0; } - void SetBindIP(uint32_t ip) { bindIP = ip; } - void SetMulticastInterfaceIP(uint32_t ip) { mcastifaceIP = ip; } + + /** Sets the IP address which is used to bind the sockets to \c ip. */ + void SetBindIP(uint32_t ip) { bindIP = ip; } + + /** Sets the multicast interface IP address. */ + void SetMulticastInterfaceIP(uint32_t ip) { mcastifaceIP = ip; } + + /** Sets the RTP portbase to \c pbase. This has to be an even number. */ void SetPortbase(uint16_t pbase) { portbase = pbase; } - void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } - void SetLocalIPList(std::list &iplist) { localIPs = iplist; } - void ClearLocalIPList() { localIPs.clear(); } - uint32_t GetBindIP() const { return bindIP; } - uint32_t GetMulticastInterfaceIP() const { return mcastifaceIP; } + + /** Sets the multicast TTL to be used to \c mcastTTL. */ + void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } + + /** Passes a list of IP addresses which will be used as the local IP addresses. */ + void SetLocalIPList(std::list &iplist) { localIPs = iplist; } + + /** Clears the list of local IP addresses. + * Clears the list of local IP addresses. An empty list will make the transmission + * component itself determine the local IP addresses. + */ + void ClearLocalIPList() { localIPs.clear(); } + + /** Returns the IP address which will be used to bind the sockets. */ + uint32_t GetBindIP() const { return bindIP; } + + /** Returns the multicast interface IP address. */ + uint32_t GetMulticastInterfaceIP() const { return mcastifaceIP; } + + /** Returns the RTP portbase which will be used (default is 5000). */ uint16_t GetPortbase() const { return portbase; } - uint8_t GetMulticastTTL() const { return multicastTTL; } - const std::list &GetLocalIPList() const { return localIPs; } + + /** Returns the multicast TTL which will be used (default is 1). */ + uint8_t GetMulticastTTL() const { return multicastTTL; } + + /** Returns the list of local IP addresses. */ + const std::list &GetLocalIPList() const { return localIPs; } private: uint16_t portbase; uint32_t bindIP, mcastifaceIP; @@ -70,6 +100,7 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams uint8_t multicastTTL; }; +/** Additional information about the UDP over IPv4 transmitter. */ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo { public: @@ -78,16 +109,21 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo #else RTPUDPv4TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv4UDPProto) #endif // WIN32 - { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } + { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } ~RTPUDPv4TransmissionInfo() { } - std::list GetLocalIPList() const { return localIPlist; } + + /** Returns the list of IPv4 addresses the transmitter considers to be the local IP addresses. */ + std::list GetLocalIPList() const { return localIPlist; } #if ! (defined(WIN32) || defined(_WIN32_WCE)) + /** Returns the socket descriptor used for receiving and transmitting RTP packets. */ int GetRTPSocket() const { return rtpsocket; } + + /** Returns the socket descriptor used for receiving and transmitting RTCP packets. */ int GetRTCPSocket() const { return rtcpsocket; } #else SOCKET GetRTPSocket() const { return rtpsocket; } - SOCKET GetRTCPSocket() const { return rtcpsocket; } + SOCKET GetRTCPSocket() const { return rtcpsocket; } #endif // WIN32 private: std::list localIPlist; @@ -101,7 +137,7 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo class RTPUDPv4Trans_GetHashIndex_IPv4Dest { public: - static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP_HBO()%RTPUDPV4TRANS_HASHSIZE; } + static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP()%RTPUDPV4TRANS_HASHSIZE; } }; class RTPUDPv4Trans_GetHashIndex_uint32_t @@ -112,10 +148,17 @@ class RTPUDPv4Trans_GetHashIndex_uint32_t #define RTPUDPV4TRANS_HEADERSIZE (20+8) +/** An UDP over IPv4 transmission component. + * This class inherits the RTPTransmitter interface and implements a transmission component + * which uses UDP over IPv4 to send and receive RTP and RTCP data. The component's parameters + * are described by the class RTPUDPv4TransmissionParams. The functions which have an RTPAddress + * argument require an argument of RTPIPv4Address. The GetTransmissionInfo member function + * returns an instance of type RTPUDPv4TransmissionInfo. + */ class RTPUDPv4Transmitter : public RTPTransmitter { public: - RTPUDPv4Transmitter(); + RTPUDPv4Transmitter(RTPMemoryManager *mgr); ~RTPUDPv4Transmitter(); int Init(bool treadsafe); @@ -134,10 +177,6 @@ class RTPUDPv4Transmitter : public RTPTransmitter int SendRTPData(const void *data,size_t len); int SendRTCPData(const void *data,size_t len); - void ResetPacketCount(); - uint32_t GetNumRTPPacketsSent(); - uint32_t GetNumRTCPPacketsSent(); - int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); void ClearDestinations(); @@ -226,8 +265,6 @@ class RTPUDPv4Transmitter : public RTPTransmitter JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD - - uint32_t rtppackcount,rtcppackcount; }; #endif // RTPUDPV4TRANSMITTER_H diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 5ad9b07..bb97720 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -123,7 +123,9 @@ inline bool operator==(const in6_addr &ip1,const in6_addr &ip2) return false; } -RTPUDPv6Transmitter::RTPUDPv6Transmitter() +RTPUDPv6Transmitter::RTPUDPv6Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr),multicastgroups(GetMemoryManager(),RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), + destinations(GetMemoryManager(),RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT), + acceptignoreinfo(GetMemoryManager(),RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; init = false; @@ -345,9 +347,6 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa localhostname = 0; localhostnamelength = 0; - rtppackcount = 0; - rtcppackcount = 0; - waitingfordata = false; created = true; MAINMUTEX_UNLOCK @@ -368,7 +367,7 @@ void RTPUDPv6Transmitter::Destroy() if (localhostname) { - delete [] localhostname; + RTPDeleteByteArray(localhostname,GetMemoryManager()); localhostname = 0; localhostnamelength = 0; } @@ -404,7 +403,7 @@ RTPTransmissionInfo *RTPUDPv6Transmitter::GetTransmissionInfo() return 0; MAINMUTEX_LOCK - RTPTransmissionInfo *tinf = new RTPUDPv6TransmissionInfo(localIPs,rtpsock,rtcpsock); + RTPTransmissionInfo *tinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMISSIONINFO) RTPUDPv6TransmissionInfo(localIPs,rtpsock,rtcpsock); MAINMUTEX_UNLOCK return tinf; } @@ -489,7 +488,7 @@ int RTPUDPv6Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { found = true; localhostnamelength = (*it).length(); - localhostname = new uint8_t [localhostnamelength+1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -522,7 +521,7 @@ int RTPUDPv6Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) len = strlen(str); localhostnamelength = len; - localhostname = new uint8_t [localhostnamelength+1]; + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength+1]; if (localhostname == 0) { MAINMUTEX_UNLOCK @@ -723,8 +722,6 @@ int RTPUDPv6Transmitter::SendRTPData(const void *data,size_t len) MAINMUTEX_LOCK - struct sockaddr_in6 saddr; - if (!created) { MAINMUTEX_UNLOCK @@ -736,18 +733,13 @@ int RTPUDPv6Transmitter::SendRTPData(const void *data,size_t len) return ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG; } - memset(&saddr,0,sizeof(struct sockaddr_in6)); - saddr.sin6_family = AF_INET6; destinations.GotoFirstElement(); while (destinations.HasCurrentElement()) { - saddr.sin6_port = destinations.GetCurrentElement().GetRTPPort_NBO(); - saddr.sin6_addr = destinations.GetCurrentElement().GetIP(); - sendto(rtpsock,(const char *)data,len,0,(struct sockaddr *)&saddr,sizeof(struct sockaddr_in6)); + sendto(rtpsock,(const char *)data,len,0,(const struct sockaddr *)destinations.GetCurrentElement().GetRTPSockAddr(),sizeof(struct sockaddr_in6)); destinations.GotoNextElement(); } - rtppackcount++; MAINMUTEX_UNLOCK return 0; } @@ -759,8 +751,6 @@ int RTPUDPv6Transmitter::SendRTCPData(const void *data,size_t len) MAINMUTEX_LOCK - struct sockaddr_in6 saddr; - if (!created) { MAINMUTEX_UNLOCK @@ -772,74 +762,17 @@ int RTPUDPv6Transmitter::SendRTCPData(const void *data,size_t len) return ERR_RTP_UDPV6TRANS_SPECIFIEDSIZETOOBIG; } - memset(&saddr,0,sizeof(struct sockaddr_in6)); - saddr.sin6_family = AF_INET6; destinations.GotoFirstElement(); while (destinations.HasCurrentElement()) { - saddr.sin6_port = destinations.GetCurrentElement().GetRTCPPort_NBO(); - saddr.sin6_addr = destinations.GetCurrentElement().GetIP(); - sendto(rtcpsock,(const char *)data,len,0,(struct sockaddr *)&saddr,sizeof(struct sockaddr_in6)); + sendto(rtcpsock,(const char *)data,len,0,(const struct sockaddr *)destinations.GetCurrentElement().GetRTCPSockAddr(),sizeof(struct sockaddr_in6)); destinations.GotoNextElement(); } - rtcppackcount++; MAINMUTEX_UNLOCK return 0; } -void RTPUDPv6Transmitter::ResetPacketCount() -{ - if (!init) - return; - - MAINMUTEX_LOCK - if (created) - { - rtppackcount = 0; - rtcppackcount = 0; - } - MAINMUTEX_UNLOCK -} - -uint32_t RTPUDPv6Transmitter::GetNumRTPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - -uint32_t RTPUDPv6Transmitter::GetNumRTCPPacketsSent() -{ - if (!init) - return 0; - - MAINMUTEX_LOCK - - uint32_t num; - - if (!created) - num = 0; - else - num = rtcppackcount; - - MAINMUTEX_UNLOCK - - return num; -} - int RTPUDPv6Transmitter::AddDestination(const RTPAddress &addr) { if (!init) @@ -1324,7 +1257,7 @@ void RTPUDPv6Transmitter::FlushPackets() std::list::const_iterator it; for (it = rawpacketlist.begin() ; it != rawpacketlist.end() ; ++it) - delete (*it); + RTPDelete(*it,GetMemoryManager()); rawpacketlist.clear(); } @@ -1373,21 +1306,22 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) RTPIPv6Address *addr; uint8_t *datacopy; - addr = new RTPIPv6Address(srcaddr.sin6_addr,ntohs(srcaddr.sin6_port)); + addr = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv6Address(srcaddr.sin6_addr,ntohs(srcaddr.sin6_port)); if (addr == 0) return ERR_RTP_OUTOFMEM; - datacopy = new uint8_t[recvlen]; + datacopy = RTPNew(GetMemoryManager(),(rtp)?RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET:RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET) uint8_t[recvlen]; if (datacopy == 0) { - delete addr; + RTPDelete(addr,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } memcpy(datacopy,packetbuffer,recvlen); - pack = new RTPRawPacket(datacopy,recvlen,addr,curtime,rtp); + + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,recvlen,addr,curtime,rtp,GetMemoryManager()); if (pack == 0) { - delete addr; - delete [] datacopy; + RTPDelete(addr,GetMemoryManager()); + RTPDeleteByteArray(datacopy,GetMemoryManager()); return ERR_RTP_OUTOFMEM; } rawpacketlist.push_back(pack); @@ -1430,7 +1364,7 @@ int RTPUDPv6Transmitter::ProcessAddAcceptIgnoreEntry(in6_addr ip,uint16_t port) PortInfo *portinf; int status; - portinf = new PortInfo(); + portinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_ACCEPTIGNOREPORTINFO) PortInfo(); if (port == 0) // select all ports portinf->all = true; else @@ -1439,7 +1373,7 @@ int RTPUDPv6Transmitter::ProcessAddAcceptIgnoreEntry(in6_addr ip,uint16_t port) status = acceptignoreinfo.AddElement(ip,portinf); if (status < 0) { - delete portinf; + RTPDelete(portinf,GetMemoryManager()); return status; } } @@ -1454,7 +1388,7 @@ void RTPUDPv6Transmitter::ClearAcceptIgnoreInfo() PortInfo *inf; inf = acceptignoreinfo.GetCurrentElement(); - delete inf; + RTPDelete(inf,GetMemoryManager()); acceptignoreinfo.GotoNextElement(); } acceptignoreinfo.Clear(); @@ -1955,8 +1889,6 @@ void RTPUDPv6Transmitter::Dump() std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; - std::cout << "RTP packet count: " << rtppackcount << std::endl; - std::cout << "RTCP packet count: " << rtcppackcount << std::endl; } MAINMUTEX_UNLOCK diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 2376deb..9911c8e 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -3,7 +3,7 @@ This file is a part of JRTPLIB Copyright (c) 1999-2006 Jori Liesenborgs - Contact: jori@lumumba.uhasselt.be + Contact: jori.liesenborgs@gmail.com This library was developed at the "Expertisecentrum Digitale Media" (http://www.edm.uhasselt.be), a research center of the Hasselt University @@ -30,6 +30,10 @@ */ +/** + * \file rtpudpv6transmitter.h + */ + #ifndef RTPUDPV6TRANSMITTER_H #define RTPUDPV6TRANSMITTER_H @@ -52,23 +56,49 @@ #include #endif // RTP_SUPPORT_THREAD -#define RTPUDPV6TRANS_HASHSIZE 8317 +#define RTPUDPV6TRANS_HASHSIZE 8317 #define RTPUDPV6TRANS_DEFAULTPORTBASE 5000 +/** Parameters for the UDP over IPv6 transmitter. */ class RTPUDPv6TransmissionParams : public RTPTransmissionParams { public: RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; } - void SetBindIP(in6_addr ip) { bindIP = ip; } + + /** Sets the IP address which is used to bind the sockets to \c ip. */ + void SetBindIP(in6_addr ip) { bindIP = ip; } + + /** Sets the multicast interface index. */ void SetMulticastInterfaceIndex(unsigned int idx) { mcastifidx = idx; } - void SetPortbase(uint16_t pbase) { portbase = pbase; } - void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } + + /** Sets the RTP portbase to \c pbase. This has to be an even number. */ + void SetPortbase(uint16_t pbase) { portbase = pbase; } + + /** Sets the multicast TTL to be used to \c mcastTTL. */ + void SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } + + /** Passes a list of IP addresses which will be used as the local IP addresses. */ void SetLocalIPList(std::list &iplist) { localIPs = iplist; } - void ClearLocalIPList() { localIPs.clear(); } - in6_addr GetBindIP() const { return bindIP; } + + /** Clears the list of local IP addresses. + * Clears the list of local IP addresses. An empty list will make the transmission component + * itself determine the local IP addresses. + */ + void ClearLocalIPList() { localIPs.clear(); } + + /** Returns the IP address which will be used to bind the sockets. */ + in6_addr GetBindIP() const { return bindIP; } + + /** Returns the multicast interface index. */ unsigned int GetMulticastInterfaceIndex() const { return mcastifidx; } - uint16_t GetPortbase() const { return portbase; } - uint8_t GetMulticastTTL() const { return multicastTTL; } + + /** Returns the RTP portbase which will be used (default is 5000). */ + uint16_t GetPortbase() const { return portbase; } + + /** Returns the multicast TTL which will be used (default is 1). */ + uint8_t GetMulticastTTL() const { return multicastTTL; } + + /** Returns the list of local IP addresses. */ const std::list &GetLocalIPList() const { return localIPs; } private: uint16_t portbase; @@ -78,6 +108,7 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams uint8_t multicastTTL; }; +/** Additional information about the UDP over IPv6 transmitter. */ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo { public: @@ -86,16 +117,21 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo #else RTPUDPv6TransmissionInfo(std::list iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto) #endif // WIN32 - { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } + { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; } ~RTPUDPv6TransmissionInfo() { } - std::list GetLocalIPList() const { return localIPlist; } + + /** Returns the list of IPv6 addresses the transmitter considers to be the local IP addresses. */ + std::list GetLocalIPList() const { return localIPlist; } #if ! (defined(WIN32) || defined(_WIN32_WCE)) + /** Returns the socket descriptor used for receiving and transmitting RTP packets. */ int GetRTPSocket() const { return rtpsocket; } + + /** Returns the socket descriptor used for receiving and transmitting RTCP packets. */ int GetRTCPSocket() const { return rtcpsocket; } #else SOCKET GetRTPSocket() const { return rtpsocket; } - SOCKET GetRTCPSocket() const { return rtcpsocket; } + SOCKET GetRTCPSocket() const { return rtcpsocket; } #endif // WIN32 private: std::list localIPlist; @@ -120,10 +156,17 @@ class RTPUDPv6Trans_GetHashIndex_in6_addr #define RTPUDPV6TRANS_HEADERSIZE (40+8) +/** An UDP over IPv6 transmitter. + * This class inherits the RTPTransmitter interface and implements a transmission component + * which uses UDP over IPv6 to send and receive RTP and RTCP data. The component's parameters + * are described by the class RTPUDPv6TransmissionParams. The functions which have an RTPAddress + * argument require an argument of RTPIPv6Address. The GetTransmissionInfo member function + * returns an instance of type RTPUDPv6TransmissionInfo. + */ class RTPUDPv6Transmitter : public RTPTransmitter { public: - RTPUDPv6Transmitter(); + RTPUDPv6Transmitter(RTPMemoryManager *mgr); ~RTPUDPv6Transmitter(); int Init(bool treadsafe); @@ -142,10 +185,6 @@ class RTPUDPv6Transmitter : public RTPTransmitter int SendRTPData(const void *data,size_t len); int SendRTCPData(const void *data,size_t len); - void ResetPacketCount(); - uint32_t GetNumRTPPacketsSent(); - uint32_t GetNumRTCPPacketsSent(); - int AddDestination(const RTPAddress &addr); int DeleteDestination(const RTPAddress &addr); void ClearDestinations(); @@ -235,8 +274,6 @@ class RTPUDPv6Transmitter : public RTPTransmitter JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD - - uint32_t rtppackcount,rtcppackcount; }; #endif // RTP_SUPPORT_IPV6 diff --git a/tools/Makefile.in b/tools/Makefile.in index 93d37e1..4daa85a 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -109,9 +109,11 @@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ +RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ From 3aaa7eff82e1d647f6cd216f0ba85b6c98fed667 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 012/136] Import of version 3.7.0 --- ChangeLog | 12 +- Doxyfile | 2 +- Makefile.in | 2 +- README.TXT | 4 +- aclocal.m4 | 1184 ++-- configure | 9097 +++++++++++++---------------- configure.in | 2 +- doc/Makefile.in | 2 +- examples/Makefile.in | 4 +- pkgconfig/Makefile.in | 2 +- src/Makefile.am | 2 +- src/Makefile.in | 6 +- src/rtcpapppacket.cpp | 2 +- src/rtcpapppacket.h | 2 +- src/rtcpbyepacket.cpp | 2 +- src/rtcpbyepacket.h | 2 +- src/rtcpcompoundpacket.cpp | 2 +- src/rtcpcompoundpacket.h | 2 +- src/rtcpcompoundpacketbuilder.cpp | 2 +- src/rtcpcompoundpacketbuilder.h | 2 +- src/rtcppacket.cpp | 2 +- src/rtcppacket.h | 2 +- src/rtcppacketbuilder.cpp | 2 +- src/rtcppacketbuilder.h | 2 +- src/rtcprrpacket.cpp | 2 +- src/rtcprrpacket.h | 2 +- src/rtcpscheduler.cpp | 2 +- src/rtcpscheduler.h | 2 +- src/rtcpsdesinfo.cpp | 2 +- src/rtcpsdesinfo.h | 2 +- src/rtcpsdespacket.cpp | 2 +- src/rtcpsdespacket.h | 2 +- src/rtcpsrpacket.cpp | 2 +- src/rtcpsrpacket.h | 2 +- src/rtcpunknownpacket.h | 2 +- src/rtpaddress.h | 2 +- src/rtpcollisionlist.cpp | 2 +- src/rtpcollisionlist.h | 2 +- src/rtpconfig.h | 2 +- src/rtpconfig_unix.h.in | 2 +- src/rtpconfig_win.h | 2 +- src/rtpdebug.cpp | 2 +- src/rtpdebug.h | 2 +- src/rtpdefines.h | 2 +- src/rtperrors.cpp | 2 +- src/rtperrors.h | 2 +- src/rtphashtable.h | 2 +- src/rtpinternalsourcedata.cpp | 2 +- src/rtpinternalsourcedata.h | 2 +- src/rtpipv4address.cpp | 2 +- src/rtpipv4address.h | 2 +- src/rtpipv4destination.h | 2 +- src/rtpipv6address.cpp | 2 +- src/rtpipv6address.h | 2 +- src/rtpipv6destination.h | 8 +- src/rtpkeyhashtable.h | 2 +- src/rtplibraryversion.cpp | 4 +- src/rtplibraryversion.h | 2 +- src/rtpmemorymanager.h | 2 +- src/rtpmemoryobject.h | 2 +- src/rtppacket.cpp | 8 +- src/rtppacket.h | 2 +- src/rtppacketbuilder.cpp | 4 +- src/rtppacketbuilder.h | 2 +- src/rtppollthread.cpp | 2 +- src/rtppollthread.h | 2 +- src/rtprandom.cpp | 2 +- src/rtprandom.h | 2 +- src/rtprawpacket.h | 4 +- src/rtpsession.cpp | 6 +- src/rtpsession.h | 2 +- src/rtpsessionparams.cpp | 2 +- src/rtpsessionparams.h | 2 +- src/rtpsessionsources.cpp | 2 +- src/rtpsessionsources.h | 4 +- src/rtpsourcedata.cpp | 4 +- src/rtpsourcedata.h | 2 +- src/rtpsources.cpp | 2 +- src/rtpsources.h | 2 +- src/rtpstructs.h | 2 +- src/rtptimeutilities.cpp | 2 +- src/rtptimeutilities.h | 2 +- src/rtptransmitter.h | 2 +- src/rtptypes.h | 2 +- src/rtptypes_win.h | 2 +- src/rtpudpv4transmitter.cpp | 29 +- src/rtpudpv4transmitter.h | 35 +- src/rtpudpv6transmitter.cpp | 32 +- src/rtpudpv6transmitter.h | 35 +- tools/Makefile.in | 2 +- 90 files changed, 5127 insertions(+), 5497 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3838d9..b91b99d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,20 @@ - June 20, 2006 + January 31, 2007 JRTPLIB ChangeLog ----------- + 3.7.0 (January 2007) + * Send and receive socket buffer sizes can now be set in the + transmission parameters. Thanks to Dmitry Shandyba + (Dmitry.Shandyba@materialise.kiev.ua) for suggesting this. + * Changed a 'htons' call to a 'ntohs' call in ShouldAcceptData + in both the IPv4 and IPv6 transmitters. + * Fixed bug in RTPIPv6Destination. Thanks to Yi-Huan Chan + (yhchan@csie.nctu.edu.tw) and Franco Sinhori + (francosinhori@gmail.com) for bringing this to my attention. + 3.6.0 (June 2006) * Added a constructor to the RTCPCompoundPacket class to be able to parse a compound packet out of a byte array (and not only diff --git a/Doxyfile b/Doxyfile index 1c7d54e..b2bcbb6 100644 --- a/Doxyfile +++ b/Doxyfile @@ -23,7 +23,7 @@ PROJECT_NAME = jrtplib # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.6.0 +PROJECT_NUMBER = 3.7.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/Makefile.in b/Makefile.in index 5c07071..75f7fbc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/README.TXT b/README.TXT index 41d78d8..d7bf086 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - June 20, 2006 + January 31, 2007 - JRTPLIB (v3.6.0) + JRTPLIB (v3.7.0) Developed at the The Expertise Centre for diff --git a/aclocal.m4 b/aclocal.m4 index 0044e21..4723f85 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.9.5 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. @@ -13,7 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 47 AC_PROG_LIBTOOL +# serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -123,7 +123,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. @@ -143,7 +143,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -163,6 +163,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -182,16 +183,16 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in @@ -233,11 +234,56 @@ AC_DEFUN([_LT_AC_SYS_COMPILER], # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable @@ -317,8 +363,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -487,7 +533,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -538,6 +584,22 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) @@ -569,7 +631,7 @@ AC_CACHE_CHECK([$1], [$2], # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -579,8 +641,10 @@ AC_CACHE_CHECK([$1], [$2], echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi @@ -606,11 +670,16 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi else $2=yes fi @@ -676,24 +745,42 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 - # + # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but @@ -725,7 +812,7 @@ fi # _LT_AC_CHECK_DLFCN -# -------------------- +# ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN @@ -733,7 +820,7 @@ AC_DEFUN([_LT_AC_CHECK_DLFCN], # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ +# --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : @@ -799,17 +886,19 @@ int main () else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; + x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed @@ -821,7 +910,7 @@ rm -fr conftest* # AC_LIBTOOL_DLOPEN_SELF -# ------------------- +# ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then @@ -892,7 +981,7 @@ else test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -905,7 +994,7 @@ else ]) if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( @@ -953,7 +1042,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -965,11 +1054,13 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -1229,7 +1320,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -1282,7 +1374,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -1320,7 +1412,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -1342,10 +1441,15 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -1365,7 +1469,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -1405,6 +1509,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -1464,7 +1580,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1526,8 +1642,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -1565,13 +1686,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -1597,7 +1711,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -1630,6 +1744,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -1643,6 +1780,11 @@ uts4*) esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER @@ -1667,6 +1809,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -1757,7 +1902,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN], # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -1795,7 +1940,7 @@ AC_ARG_ENABLE([shared], # AC_DISABLE_SHARED # ----------------- -#- set the default shared flag to --disable-shared +# set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) @@ -1931,7 +2076,7 @@ dnl not every word. This closes a longstanding sh security hole. if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -2041,7 +2186,7 @@ AC_CACHE_VAL(lt_cv_path_LD, if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 &1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" @@ -2361,13 +2517,13 @@ esac # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in @@ -2386,13 +2542,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE], # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided and an installed libltdl is not found, it is -# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single -# quotes!). If your package is not flat and you're not using automake, -# define top_builddir and top_srcdir appropriately in the Makefiles. +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl @@ -2435,7 +2591,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP -# --------------- +# ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) @@ -2484,7 +2640,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) # AC_LIBTOOL_RC -# -------------- +# ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) @@ -2517,36 +2673,9 @@ lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) @@ -2556,9 +2685,9 @@ AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) +AC_LIBTOOL_DLOPEN_SELF -# Report which librarie types wil actually be built +# Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -2567,7 +2696,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -2617,6 +2746,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= @@ -2634,7 +2764,7 @@ _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -2644,11 +2774,15 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -2659,18 +2793,18 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -2759,6 +2893,7 @@ case $host_os in ;; esac done + ;; esac exp_sym_flag='-bexport' @@ -2796,6 +2931,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then @@ -2827,12 +2963,12 @@ case $host_os in _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -2841,16 +2977,26 @@ case $host_os in # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + chorus*) case $cc_basename in *) @@ -2860,7 +3006,6 @@ case $host_os in esac ;; - cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. @@ -2870,7 +3015,7 @@ case $host_os in _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -2879,13 +3024,13 @@ case $host_os in echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -2923,7 +3068,7 @@ case $host_os in _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -2931,12 +3076,12 @@ case $host_os in fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -2949,11 +3094,11 @@ case $host_os in dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -2988,11 +3133,11 @@ case $host_os in # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) + aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -3016,33 +3161,22 @@ case $host_os in ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -3053,14 +3187,17 @@ case $host_os in esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3079,9 +3216,12 @@ case $host_os in *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3095,11 +3235,25 @@ case $host_os in ;; esac ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -3110,7 +3264,7 @@ case $host_os in *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -3123,7 +3277,7 @@ case $host_os in ;; linux*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3148,7 +3302,7 @@ case $host_os in # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -3173,15 +3327,16 @@ case $host_os in _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC) + pgCC*) # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; - cxx) + cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -3212,7 +3367,7 @@ case $host_os in ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; @@ -3251,7 +3406,7 @@ case $host_os in ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3267,14 +3422,14 @@ case $host_os in _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3292,7 +3447,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3311,7 +3466,7 @@ case $host_os in ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3326,17 +3481,17 @@ case $host_os in # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -3355,7 +3510,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3376,27 +3531,14 @@ case $host_os in # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3409,12 +3551,13 @@ case $host_os in ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -3423,22 +3566,18 @@ case $host_os in *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -3446,7 +3585,7 @@ case $host_os in # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -3484,12 +3623,63 @@ case $host_os in ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3522,8 +3712,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3541,7 +3729,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ +# ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary @@ -3595,7 +3783,7 @@ if AC_TRY_EVAL(ac_compile); then # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -3671,13 +3859,37 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + ;; + esac + ;; +esac +]) + case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG -# ------------------------ +# -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3721,12 +3933,16 @@ lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -3736,7 +3952,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -3745,7 +3961,9 @@ aix3*) fi ;; aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac AC_MSG_RESULT([$enable_shared]) @@ -3755,8 +3973,6 @@ AC_MSG_CHECKING([whether to build static libraries]) test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" @@ -3766,8 +3982,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP - AC_LIBTOOL_CONFIG($1) @@ -3801,15 +4015,22 @@ lt_simple_link_test_code='public class conftest { public static void main(String # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) @@ -3817,8 +4038,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3828,7 +4047,7 @@ CC="$lt_save_CC" # AC_LIBTOOL_LANG_RC_CONFIG -# -------------------------- +# ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3852,11 +4071,16 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) @@ -3886,7 +4110,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -3992,7 +4216,7 @@ ifelse([$1], [], # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -4003,7 +4227,7 @@ ifelse([$1], [], SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -4055,6 +4279,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) @@ -4120,7 +4347,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -4428,9 +4655,18 @@ irix* | nonstopux*) osf*) symcode='[[BCDEGQRST]]' ;; -solaris* | sysv5*) +solaris*) symcode='[[BDRT]]' ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; sysv4) symcode='[[DFNSTU]]' ;; @@ -4613,6 +4849,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic @@ -4621,7 +4861,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -4646,7 +4886,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; @@ -4655,7 +4895,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4664,10 +4904,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; dgux*) case $cc_basename in - ec++) + ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4680,17 +4920,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; - aCC) + aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4703,9 +4943,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. @@ -4716,7 +4960,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; linux*) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' @@ -4727,13 +4971,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - pgCC) + pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - cxx) + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -4750,7 +4994,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; mvs*) case $cc_basename in - cxx) + cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) @@ -4761,14 +5005,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -4782,24 +5026,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; psos*) ;; - sco*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; @@ -4809,12 +5044,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - lcc) + lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4824,7 +5059,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; @@ -4832,7 +5067,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -4879,6 +5121,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -4895,7 +5142,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4924,7 +5171,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4942,7 +5189,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4972,12 +5219,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - pgcc | pgf77 | pgf90) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4993,15 +5240,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac ;; sunos4*) @@ -5010,7 +5257,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5023,6 +5270,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no @@ -5055,7 +5308,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= @@ -5064,6 +5317,16 @@ case "$host_os" in _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) @@ -5131,7 +5394,8 @@ ifelse([$1],[CXX],[ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= - + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time @@ -5141,6 +5405,10 @@ ifelse([$1],[CXX],[ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -5151,6 +5419,27 @@ ifelse([$1],[CXX],[ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -5204,7 +5493,7 @@ EOF _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -5213,7 +5502,53 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi @@ -5229,7 +5564,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 @@ -5250,6 +5585,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -5257,41 +5619,6 @@ EOF _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $CC,$host_cpu in - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - tmp_addflag=' -fpic' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1) - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -5302,16 +5629,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -5323,7 +5645,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5357,6 +5679,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -5394,6 +5717,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then @@ -5406,11 +5730,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -5424,12 +5748,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -5438,13 +5762,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -5483,7 +5805,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -5512,16 +5834,16 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -5585,47 +5907,62 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' @@ -5719,7 +6056,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5727,21 +6064,15 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -5750,8 +6081,18 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -5808,36 +6149,45 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi ;; - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -5855,11 +6205,6 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -5887,6 +6232,7 @@ x|xyes) libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= @@ -6059,7 +6405,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.5])]) + [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- diff --git a/configure b/configure index ec917bc..e107910 100755 --- a/configure +++ b/configure @@ -285,8 +285,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -1808,7 +1808,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.6.0 + VERSION=3.7.0 cat >>confdefs.h <<_ACEOF @@ -3332,7 +3332,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi @@ -3536,7 +3543,7 @@ gnu*) hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -3552,6 +3559,11 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -3597,15 +3609,11 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' @@ -3626,10 +3634,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -3647,6 +3658,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC @@ -3682,7 +3696,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3685 "configure"' > conftest.$ac_ext + echo '#line 3699 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -3725,7 +3739,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -3838,6 +3852,26 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + esac @@ -5261,7 +5295,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5264:" \ +echo "$as_me:5298:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5458,11 +5492,18 @@ else elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -5476,6 +5517,17 @@ else esac fi ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but @@ -5561,9 +5613,18 @@ irix* | nonstopux*) osf*) symcode='[BCDEGQRST]' ;; -solaris* | sysv5*) +solaris*) symcode='[BDRT]' ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; sysv4) symcode='[DFNSTU]' ;; @@ -5752,7 +5813,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. @@ -5772,7 +5833,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -6029,6 +6090,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -6048,16 +6110,25 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # Only perform the check for file, if the check method requires it case $deplibs_check_method in @@ -6084,7 +6155,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6146,7 +6217,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6241,68 +6312,25 @@ lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC -# -# Check for any special shared library compilation flags. -# -lt_prog_cc_shlib= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - lt_prog_cc_shlib='-belf' - ;; - esac -fi -if test -n "$lt_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_prog_compiler_static" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* @@ -6327,18 +6355,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6333: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6361: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6337: \$? = $ac_status" >&5 + echo "$as_me:6365: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -6399,6 +6429,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -6415,7 +6450,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -6444,7 +6479,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' @@ -6462,7 +6497,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -6492,12 +6527,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - pgcc | pgf77 | pgf90) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-static' + lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' @@ -6513,15 +6548,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' - ;; - solaris*) - lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac ;; sunos4*) @@ -6530,7 +6565,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -6543,6 +6578,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no @@ -6582,18 +6623,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6588: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6629: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6592: \$? = $ac_status" >&5 + echo "$as_me:6633: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi @@ -6614,7 +6657,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -6624,6 +6667,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then @@ -6642,23 +6727,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6648: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6733: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6652: \$? = $ac_status" >&5 + echo "$as_me:6737: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -6734,6 +6821,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -6744,6 +6841,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -6754,6 +6855,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -6807,7 +6929,7 @@ EOF export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -6816,7 +6938,53 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi else ld_shlibs=no fi @@ -6832,7 +7000,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 @@ -6853,6 +7021,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -6860,41 +7055,6 @@ EOF hardcode_shlibpath_var=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $CC,$host_cpu in - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - tmp_addflag=' -fpic' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds=$archive_cmds - fi - else - ld_shlibs=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -6905,16 +7065,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -6926,7 +7081,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -6960,6 +7115,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -6997,6 +7153,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then @@ -7009,11 +7166,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -7078,12 +7235,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -7143,13 +7300,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' + whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -7188,7 +7343,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; @@ -7217,16 +7372,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -7290,47 +7445,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' @@ -7424,7 +7594,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -7432,21 +7602,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator=: ;; - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -7455,8 +7619,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs=yes ;; @@ -7513,36 +7687,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ;; - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -7561,11 +7744,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -7598,6 +7776,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= @@ -7758,7 +7937,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -7811,7 +7991,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -7849,7 +8029,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -7871,10 +8058,15 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -7894,7 +8086,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -7934,6 +8126,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -7993,7 +8197,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -8055,8 +8259,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -8094,13 +8303,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -8126,7 +8328,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -8159,6 +8361,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -8174,6 +8399,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= @@ -8829,7 +9059,7 @@ fi test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -8845,7 +9075,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed @@ -8931,7 +9163,7 @@ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then @@ -8943,7 +9175,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed @@ -9047,7 +9281,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi -# Report which librarie types wil actually be built +# Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 @@ -9059,7 +9293,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -9097,7 +9331,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -9201,7 +9435,7 @@ echo "$as_me: creating $ofile" >&6;} # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -9212,7 +9446,7 @@ echo "$as_me: creating $ofile" >&6;} SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -9263,6 +9497,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler @@ -9328,7 +9565,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -9593,6 +9830,9 @@ echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -9645,6 +9885,7 @@ hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= @@ -9662,7 +9903,7 @@ postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -9672,17 +9913,34 @@ objext_CXX=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -9693,18 +9951,27 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -9775,7 +10042,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 conftest.$ac_ext <<_ACEOF @@ -10084,16 +10353,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' + whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) case $cc_basename in *) @@ -10103,7 +10382,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. @@ -10113,7 +10391,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -10122,13 +10400,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; @@ -10166,7 +10444,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -10174,12 +10452,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -10192,11 +10470,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -10231,11 +10509,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) + aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -10259,33 +10537,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: - ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - ia64*) + case $host_cpu in + hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. ;; *) hardcode_direct_CXX=yes @@ -10296,14 +10563,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -10322,9 +10592,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -10338,11 +10611,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -10353,7 +10640,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -10366,7 +10653,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; linux*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -10391,7 +10678,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -10416,15 +10703,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC) + pgCC*) # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; - cxx) + cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -10455,7 +10743,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; @@ -10494,7 +10782,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -10510,14 +10798,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -10535,7 +10823,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -10554,7 +10842,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -10569,17 +10857,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -10598,7 +10886,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -10619,27 +10907,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -10652,12 +10927,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -10666,22 +10942,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -10689,7 +10961,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -10727,12 +10999,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -10785,7 +11108,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -10861,6 +11184,29 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -10908,6 +11254,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic @@ -10916,7 +11266,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -10941,7 +11291,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; @@ -10950,7 +11300,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' @@ -10959,10 +11309,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; dgux*) case $cc_basename in - ec++) + ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; @@ -10975,17 +11325,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; - aCC) + aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -10998,9 +11348,13 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. @@ -11011,7 +11365,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' @@ -11022,13 +11376,13 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - pgCC) + pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-static' + lt_prog_compiler_static_CXX='-Bstatic' ;; - cxx) + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -11045,7 +11399,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; mvs*) case $cc_basename in - cxx) + cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) @@ -11056,14 +11410,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -11077,24 +11431,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; psos*) ;; - sco*) - case $cc_basename in - CC) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; @@ -11104,12 +11449,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; - lcc) + lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; @@ -11119,7 +11464,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; @@ -11127,7 +11472,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -11160,18 +11512,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11166: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11518: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11170: \$? = $ac_status" >&5 + echo "$as_me:11522: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi @@ -11192,7 +11546,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -11202,6 +11556,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then @@ -11220,23 +11616,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11226: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11622: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11230: \$? = $ac_status" >&5 + echo "$as_me:11626: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -11302,11 +11700,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -11339,6 +11732,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= @@ -11499,7 +11893,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -11552,7 +11947,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -11590,7 +11985,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -11612,10 +12014,15 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -11635,7 +12042,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -11675,6 +12082,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -11734,7 +12153,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -11796,8 +12215,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -11835,13 +12259,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -11867,7 +12284,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -11900,6 +12317,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11915,6 +12355,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= @@ -11952,3431 +12397,2798 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; + esac - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +cfgfile="$ofile" - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +# Whether or not to build static libraries. +build_old_libs=$enable_static -fi +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX - ;; +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -#ifdef __STDC__ -# include -#else -# include -#endif +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -#undef shl_load +# An echo program that does not interpret backslashes. +echo=$lt_echo -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A C compiler. +LTCC=$lt_LTCC -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A language-specific compiler. +CC=$lt_compiler_CXX -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# An ERE matcher. +EGREP=$lt_EGREP -#ifdef __STDC__ -# include -#else -# include -#endif +# The linker used to build libraries. +LD=$lt_LD_CXX -#undef dlopen +# Whether we need hard or soft links. +LN_S=$lt_LN_S -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif +# A BSD-compatible nm program. +NM=$lt_NM -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A symbol stripping program +STRIP=$lt_STRIP -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Used on cygwin: assembler. +AS="$AS" -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# The name of the directory that contains temporary libtool files. +objdir=$objdir -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX +# Object file suffix (normally "o"). +objext="$ac_objext" -fi +# Old archive suffix (normally "a"). +libext="$libext" +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -fi +# Executable file suffix (normally ""). +exeext="$exeext" +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode -fi +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -fi +# Must we lock files when doing compilation? +need_locks=$lt_need_locks +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix -fi +# Do we need a version for libraries? +need_version=$need_version - ;; - esac +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -#include +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# Library versioning type. +version_type=$version_type -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +# Format of library name prefix. +libname_spec=$lt_libname_spec -#ifdef __cplusplus -extern "C" void exit (int); -#endif +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -#include +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX -#ifdef __cplusplus -extern "C" void exit (int); -#endif +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done +# This is the shared library runtime path variable. +runpath_var=$runpath_var - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +# This is the shared library path variable. +shlibpath_var=$shlibpath_var -cfgfile="$ofile" +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -# Whether or not to build static libraries. -build_old_libs=$enable_static +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" -# An echo program that does not interpret backslashes. -echo=$lt_echo +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# A C compiler. -LTCC=$lt_LTCC +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# A language-specific compiler. -CC=$lt_compiler_CXX +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX -# An ERE matcher. -EGREP=$lt_EGREP +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX -# The linker used to build libraries. -LD=$lt_LD_CXX +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -# Whether we need hard or soft links. -LN_S=$lt_LN_S +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX -# A BSD-compatible nm program. -NM=$lt_NM +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX -# A symbol stripping program -STRIP=$lt_STRIP +# ### END LIBTOOL TAG CONFIG: $tagname -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD +__EOF__ -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi -# Used on cygwin: assembler. -AS="$AS" -# The name of the directory that contains temporary libtool files. -objdir=$objdir +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX + else + tagname="" + fi + ;; -# Object file suffix (normally "o"). -objext="$ac_objext" + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then -# Old archive suffix (normally "a"). -libext="$libext" +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode +# Source file extension for f77 test sources. +ac_ext=f -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# Do we need a version for libraries? -need_version=$need_version +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -# Whether dlopen is supported. -dlopen_support=$enable_dlopen +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +# Allow CC to be a program name with arguments. +compiler=$CC -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -# Library versioning type. -version_type=$version_type +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -# Format of library name prefix. -libname_spec=$lt_libname_spec -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX +GCC_F77="$G77" +LD_F77="$LD" -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# This is the shared library runtime path variable. -runpath_var=$runpath_var + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13192: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13196: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext -# ### END LIBTOOL TAG CONFIG: $tagname + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13296: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13300: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* -__EOF__ +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn fi +else + need_locks=no fi +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" - -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no - ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 - -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -test "$ld_shlibs_F77" = no && can_build_shared=no + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac -GCC_F77="$G77" -LD_F77="$LD" + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' +EOF fi ;; amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no fi ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + ld_shlibs_F77=no fi ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF ;; - *) - lt_prog_compiler_pic_F77='+Z' + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi ;; esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi ;; + esac - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc | pgf77 | pgf90) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-static' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - esac + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' - ;; + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac - solaris*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi fi - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13542: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13546: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main -fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13602: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13606: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no - ;; - esac + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. + freebsd1*) + ld_shlibs_F77=no + ;; -EOF - fi + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - ld_shlibs_F77=no + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi - ;; + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else - ld_shlibs_F77=no + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes fi ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac fi - ;; + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - ld_shlibs_F77=no + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes ;; - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $CC,$host_cpu in - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - tmp_addflag=' -fpic' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_F77=$archive_cmds_F77 - fi - else - ld_shlibs_F77=no - fi - ;; + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' else - ld_shlibs_F77=no + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac fi ;; - esac - if test "$ld_shlibs_F77" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - whole_archive_flag_spec_F77= + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' fi + hardcode_libdir_separator_F77=: ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes fi + ;; - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' - archive_cmds_F77='' - hardcode_direct_F77=yes + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_F77=yes - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi + ;; - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + *) + ld_shlibs_F77=no + ;; + esac + fi -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +need_lib_prefix=unknown +hardcode_into_libs=no - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case "$cc_basename" in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; - freebsd1*) - ld_shlibs_F77=no - ;; +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; +freebsd1*) + dynamic_linker=no + ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no ;; - - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; - esac - link_all_deplibs_F77=yes - ;; +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes ;; esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; + else + shlibpath_overrides_runpath=yes + fi + ;; - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; - - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no + siemens) + need_lib_prefix=no ;; - - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; + esac + ;; - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; - *) - ld_shlibs_F77=no - ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; esac fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 - ;; - esac - fi - ;; -esac - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate fi else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported fi -need_lib_prefix=unknown -hardcode_into_libs=no +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; + done -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; +cfgfile="$ofile" -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +# Whether or not to build static libraries. +build_old_libs=$enable_static -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 -freebsd1*) - dynamic_linker=no - ;; +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; +# An echo program that does not interpret backslashes. +echo=$lt_echo -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +# A C compiler. +LTCC=$lt_LTCC -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +# A language-specific compiler. +CC=$lt_compiler_F77 - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +# An ERE matcher. +EGREP=$lt_EGREP -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# The linker used to build libraries. +LD=$lt_LD_F77 -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +# Whether we need hard or soft links. +LN_S=$lt_LN_S -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# A BSD-compatible nm program. +NM=$lt_NM -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# A symbol stripping program +STRIP=$lt_STRIP -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Used on cygwin: assembler. +AS="$AS" -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +# The name of the directory that contains temporary libtool files. +objdir=$objdir -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +# Object file suffix (normally "o"). +objext="$ac_objext" -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Old archive suffix (normally "a"). +libext="$libext" -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then +# Executable file suffix (normally ""). +exeext="$exeext" - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version @@ -15617,19 +15429,48 @@ lt_simple_link_test_code='public class conftest { public static void main(String # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no +old_archive_cmds_GCJ=$old_archive_cmds + lt_prog_compiler_no_builtin_flag_GCJ= @@ -15652,18 +15493,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15658: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15499: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15662: \$? = $ac_status" >&5 + echo "$as_me:15503: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -15724,6 +15567,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_GCJ='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -15740,7 +15588,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -15769,7 +15617,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' @@ -15787,7 +15635,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -15817,12 +15665,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; - pgcc | pgf77 | pgf90) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-static' + lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' @@ -15838,15 +15686,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; - solaris*) - lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac ;; sunos4*) @@ -15855,7 +15703,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -15868,6 +15716,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no @@ -15907,18 +15761,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15913: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15767: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15917: \$? = $ac_status" >&5 + echo "$as_me:15771: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi @@ -15939,7 +15795,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -15949,6 +15805,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then @@ -15967,23 +15865,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15973: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15871: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15977: \$? = $ac_status" >&5 + echo "$as_me:15875: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -16059,6 +15959,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -16069,6 +15979,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -16079,9 +15993,30 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no @@ -16132,7 +16067,7 @@ EOF export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -16141,7 +16076,53 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi else ld_shlibs_GCJ=no fi @@ -16157,7 +16138,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 @@ -16178,6 +16159,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -16185,41 +16193,6 @@ EOF hardcode_shlibpath_var_GCJ=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $CC,$host_cpu in - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - tmp_addflag=' -fpic' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_GCJ=$archive_cmds_GCJ - fi - else - ld_shlibs_GCJ=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -16230,16 +16203,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs_GCJ" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -16251,7 +16219,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported @@ -16285,6 +16253,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -16322,6 +16291,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi + ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then @@ -16334,11 +16304,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -16403,12 +16373,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -16468,13 +16438,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ=' ' + whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -16513,7 +16481,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; @@ -16542,16 +16510,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -16615,47 +16583,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_GCJ='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes ;; *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' @@ -16749,7 +16732,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' @@ -16757,21 +16740,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_GCJ=: ;; - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -16780,8 +16757,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_GCJ=yes ;; @@ -16838,36 +16825,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no ;; - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -16886,11 +16882,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -16923,6 +16914,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= @@ -17032,1343 +17024,559 @@ aix4* | aix5*) # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -fi + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; -fi + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -fi +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; +freebsd1*) + dynamic_linker=no + ;; -fi +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -fi +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -#include +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -#ifdef __cplusplus -extern "C" void exit (int); -#endif + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -#include +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -#ifdef __cplusplus -extern "C" void exit (int); -#endif +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; esac - else : - # compilation failed - lt_cv_dlopen_self_static=no fi -fi -rm -fr conftest* + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless fi @@ -18385,7 +17593,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -18503,6 +17711,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_GCJ @@ -18568,7 +17779,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -18812,15 +18023,42 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the @@ -18836,7 +18074,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -18954,6 +18192,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_RC @@ -19019,7 +18260,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? diff --git a/configure.in b/configure.in index 21ac798..31f856f 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.6.0) +AM_INIT_AUTOMAKE(jrtplib,3.7.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/Makefile.in b/doc/Makefile.in index 70a744b..c75cbb4 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/examples/Makefile.in b/examples/Makefile.in index fe5f57d..e41d1b2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) $(example4_SOURCES) $(example5_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index df3bcc9..cbc10e0 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, diff --git a/src/Makefile.am b/src/Makefile.am index 20f362f..517d854 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.6.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 2190d52..3532b5c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,8 +15,6 @@ @SET_MAKE@ -SOURCES = $(libjrtp_la_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -231,7 +229,7 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release 3.6.0 @RTP_LINKLIBS@ +libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index f3c179c..d7a3904 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 21d395d..4e5f9b7 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index 4d323d3..794a3b8 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 5a72331..027b856 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index 01024f6..c284fa4 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index 0b77bdc..0b7fa66 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index 18fb61a..8172007 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index 70dfc96..4537105 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index f952a10..76f55ba 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 500fd03..1062574 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index b1007f2..7e07d8f 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index 5bd0e53..cf043f0 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index f4cbbf9..42cf969 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 1737746..6e48f16 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index dd4bc56..fa8510f 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index 19a72ee..e5736a3 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index 331497d..c2611c4 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index b719395..f96915a 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 8b60710..798f83c 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 3623024..8b68a59 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index 53fcff2..2ccc395 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 81269f4..03a8442 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 265ffb5..4745be7 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpaddress.h b/src/rtpaddress.h index da985ce..92e29b1 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index 54f7671..4338a33 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index f28b0ee..c710c42 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig.h b/src/rtpconfig.h index c93e442..23539b8 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index 1436466..b4f17bd 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index dd31255..f5bfc0d 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index 616c7ab..e8d0f6f 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.h b/src/rtpdebug.h index 54e1a5d..d15bd85 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdefines.h b/src/rtpdefines.h index 1315174..85eb9d1 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 943c5ab..a6a16c9 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.h b/src/rtperrors.h index 01ea49a..51a33d7 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 652c740..aa482c0 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index 9484f23..d023f7d 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index fc348be..7b01016 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index f95bf30..de5fcb9 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index f14941c..08845fd 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index a09027f..a31243a 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index f42ba9b..a2a685b 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index a96fce7..ef434c9 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 075ea0f..4716b08 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -65,9 +65,9 @@ class RTPIPv6Destination rtpaddr.sin6_family = AF_INET6; rtpaddr.sin6_port = htons(portbase); rtpaddr.sin6_addr = ip; - rtpaddr.sin6_family = AF_INET6; - rtpaddr.sin6_port = htons(portbase+1); - rtpaddr.sin6_addr = ip; + rtcpaddr.sin6_family = AF_INET6; + rtcpaddr.sin6_port = htons(portbase+1); + rtcpaddr.sin6_addr = ip; } in6_addr GetIP() const { return rtpaddr.sin6_addr; } bool operator==(const RTPIPv6Destination &src) const diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 9c8df0d..2ea138f 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index b2a4969..97caadc 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -35,7 +35,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,6,0); + return RTPLibraryVersion(3,7,0); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 6800e31..927bcf8 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index 8cb1bea..bfc50fa 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index 7a7b636..c30e5bd 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 0f5ed84..b6d5fda 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -65,7 +65,7 @@ void RTPPacket::Clear() externalbuffer = false; } -RTPPacket::RTPPacket(RTPRawPacket &rawpack,RTPMemoryManager *mgr) : receivetime(rawpack.GetReceiveTime()),RTPMemoryObject(mgr) +RTPPacket::RTPPacket(RTPRawPacket &rawpack,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),receivetime(rawpack.GetReceiveTime()) { Clear(); error = ParseRawPacket(rawpack); @@ -74,7 +74,7 @@ RTPPacket::RTPPacket(RTPRawPacket &rawpack,RTPMemoryManager *mgr) : receivetime( RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - size_t maxpacksize, RTPMemoryManager *mgr) : receivetime(0,0),RTPMemoryObject(mgr) + size_t maxpacksize, RTPMemoryManager *mgr) : RTPMemoryObject(mgr),receivetime(0,0) { Clear(); error = BuildPacket(payloadtype,payloaddata,payloadlen,seqnr,timestamp,ssrc,gotmarker,numcsrcs, @@ -84,7 +84,7 @@ RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadl RTPPacket::RTPPacket(uint8_t payloadtype,const void *payloaddata,size_t payloadlen,uint16_t seqnr, uint32_t timestamp,uint32_t ssrc,bool gotmarker,uint8_t numcsrcs,const uint32_t *csrcs, bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,const void *extensiondata, - void *buffer,size_t buffersize, RTPMemoryManager *mgr) : receivetime(0,0),RTPMemoryObject(mgr) + void *buffer,size_t buffersize, RTPMemoryManager *mgr) : RTPMemoryObject(mgr),receivetime(0,0) { Clear(); if (buffer == 0) diff --git a/src/rtppacket.h b/src/rtppacket.h index 855347b..9046ec2 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index 6e47386..76dca01 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -42,7 +42,7 @@ #include "rtpdebug.h" -RTPPacketBuilder::RTPPacketBuilder(RTPMemoryManager *mgr) : lastwallclocktime(0,0),RTPMemoryObject(mgr) +RTPPacketBuilder::RTPPacketBuilder(RTPMemoryManager *mgr) : RTPMemoryObject(mgr),lastwallclocktime(0,0) { init = false; #if (defined(WIN32) || defined(_WIN32_WCE)) diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index c4cd31b..bb34164 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index a4996ba..cb7405d 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 9db258e..37350ec 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 0f5dcf7..310c65a 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.h b/src/rtprandom.h index 1e81698..8a487b1 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 83ab202..1b4029a 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -89,7 +89,7 @@ class RTPRawPacket : public RTPMemoryObject bool isrtp; }; -inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp,RTPMemoryManager *mgr):receivetime(recvtime),RTPMemoryObject(mgr) +inline RTPRawPacket::RTPRawPacket(uint8_t *data,size_t datalen,RTPAddress *address,RTPTime &recvtime,bool rtp,RTPMemoryManager *mgr):RTPMemoryObject(mgr),receivetime(recvtime) { packetdata = data; packetdatalength = datalen; diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 3e8a604..cce6195 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -78,8 +78,8 @@ #endif // RTP_SUPPORT_THREAD RTPSession::RTPSession(RTPMemoryManager *mgr) - : sources(*this,mgr),rtcpsched(sources),rtcpbuilder(sources,packetbuilder,mgr),RTPMemoryObject(mgr), - packetbuilder(mgr),collisionlist(mgr) + : RTPMemoryObject(mgr),sources(*this,mgr),packetbuilder(mgr),rtcpsched(sources),rtcpbuilder(sources,packetbuilder,mgr), + collisionlist(mgr) { created = false; #if (defined(WIN32) || defined(_WIN32_WCE)) diff --git a/src/rtpsession.h b/src/rtpsession.h index b7d8183..c962b2f 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index 2539017..b6ffab5 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index dc28eea..1e65bda 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index e30069b..6a6e5f6 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index 7429d97..ad5a52b 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -46,7 +46,7 @@ class RTPSession; class RTPSessionSources : public RTPSources { public: - RTPSessionSources(RTPSession &sess,RTPMemoryManager *mgr) : rtpsession(sess),RTPSources(RTPSources::ProbationStore,mgr) + RTPSessionSources(RTPSession &sess,RTPMemoryManager *mgr) : RTPSources(RTPSources::ProbationStore,mgr),rtpsession(sess) { owncollision = false; } ~RTPSessionSources() { } void ClearOwnCollisionFlag() { owncollision = false; } diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index 3ffc32e..3ed5ad3 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -207,7 +207,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do } } -RTPSourceData::RTPSourceData(uint32_t s, RTPMemoryManager *mgr) : byetime(0,0),RTPMemoryObject(mgr),SDESinf(mgr) +RTPSourceData::RTPSourceData(uint32_t s, RTPMemoryManager *mgr) : RTPMemoryObject(mgr),SDESinf(mgr),byetime(0,0) { ssrc = s; issender = false; diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index c4de452..e2c925c 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 82ff71d..7318bc6 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsources.h b/src/rtpsources.h index 7183948..9c4807a 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 62f331b..3c0fa2d 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index 0471f5b..f8f0dd3 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 94b62e5..a7fe8eb 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index aacac30..bd2f3ea 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptypes.h b/src/rtptypes.h index dbbadd7..e5377dd 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 20c00b2..66e20b2 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index 0f7036b..d421885 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -80,21 +80,8 @@ #include -#ifndef _WIN32_WCE - #define RTPUDPV4TRANS_RTPRECEIVEBUFFER 32768 - #define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 32768 - #define RTPUDPV4TRANS_RTPTRANSMITBUFFER 32768 - #define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 32768 - #define RTPUDPV4TRANS_MAXPACKSIZE 65535 - #define RTPUDPV4TRANS_IFREQBUFSIZE 8192 -#else - #define RTPUDPV4TRANS_RTPRECEIVEBUFFER 2048 - #define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 2048 - #define RTPUDPV4TRANS_RTPTRANSMITBUFFER 2048 - #define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 2048 - #define RTPUDPV4TRANS_MAXPACKSIZE 2048 - #define RTPUDPV4TRANS_IFREQBUFSIZE 2048 -#endif // _WIN32_WCE +#define RTPUDPV4TRANS_MAXPACKSIZE 65535 +#define RTPUDPV4TRANS_IFREQBUFSIZE 8192 #define RTPUDPV4TRANS_IS_MCASTADDR(x) (((x)&0xF0000000) == 0xE0000000) @@ -216,7 +203,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa // set socket buffer sizes - size = RTPUDPV4TRANS_RTPRECEIVEBUFFER; + size = params->GetRTPReceiveBuffer(); if (setsockopt(rtpsock,SOL_SOCKET,SO_RCVBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -224,7 +211,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV4TRANS_CANTSETRTPRECEIVEBUF; } - size = RTPUDPV4TRANS_RTPTRANSMITBUFFER; + size = params->GetRTPSendBuffer(); if (setsockopt(rtpsock,SOL_SOCKET,SO_SNDBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -232,7 +219,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV4TRANS_CANTSETRTPTRANSMITBUF; } - size = RTPUDPV4TRANS_RTCPRECEIVEBUFFER; + size = params->GetRTCPReceiveBuffer(); if (setsockopt(rtcpsock,SOL_SOCKET,SO_RCVBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -240,7 +227,7 @@ int RTPUDPv4Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV4TRANS_CANTSETRTCPRECEIVEBUF; } - size = RTPUDPV4TRANS_RTCPTRANSMITBUFFER; + size = params->GetRTCPSendBuffer(); if (setsockopt(rtcpsock,SOL_SOCKET,SO_SNDBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -1283,7 +1270,7 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) if (receivemode == RTPTransmitter::AcceptAll) acceptdata = true; else - acceptdata = ShouldAcceptData(ntohl(srcaddr.sin_addr.s_addr),htons(srcaddr.sin_port)); + acceptdata = ShouldAcceptData(ntohl(srcaddr.sin_addr.s_addr),ntohs(srcaddr.sin_port)); if (acceptdata) { diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 8ca8339..d96d6ea 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -52,11 +52,16 @@ #define RTPUDPV4TRANS_HASHSIZE 8317 #define RTPUDPV4TRANS_DEFAULTPORTBASE 5000 +#define RTPUDPV4TRANS_RTPRECEIVEBUFFER 32768 +#define RTPUDPV4TRANS_RTCPRECEIVEBUFFER 32768 +#define RTPUDPV4TRANS_RTPTRANSMITBUFFER 32768 +#define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 32768 + /** Parameters for the UDP over IPv4 transmitter. */ class RTPUDPv4TransmissionParams : public RTPTransmissionParams { public: - RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; mcastifaceIP = 0; } + RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; mcastifaceIP = 0; rtpsendbuf = RTPUDPV4TRANS_RTPTRANSMITBUFFER; rtprecvbuf= RTPUDPV4TRANS_RTPRECEIVEBUFFER; rtcpsendbuf = RTPUDPV4TRANS_RTCPTRANSMITBUFFER; rtcprecvbuf = RTPUDPV4TRANS_RTCPRECEIVEBUFFER; } /** Sets the IP address which is used to bind the sockets to \c ip. */ void SetBindIP(uint32_t ip) { bindIP = ip; } @@ -93,11 +98,37 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams /** Returns the list of local IP addresses. */ const std::list &GetLocalIPList() const { return localIPs; } + + /** Sets the RTP socket's send buffer size. */ + void SetRTPSendBuffer(int s) { rtpsendbuf = s; } + + /** Sets the RTP socket's receive buffer size. */ + void SetRTPReceiveBuffer(int s) { rtprecvbuf = s; } + + /** Sets the RTCP socket's send buffer size. */ + void SetRTCPSendBuffer(int s) { rtcpsendbuf = s; } + + /** Sets the RTCP socket's receive buffer size. */ + void SetRTCPReceiveBuffer(int s) { rtcprecvbuf = s; } + + /** Returns the RTP socket's send buffer size. */ + int GetRTPSendBuffer() const { return rtpsendbuf; } + + /** Returns the RTP socket's receive buffer size. */ + int GetRTPReceiveBuffer() const { return rtprecvbuf; } + + /** Returns the RTCP socket's send buffer size. */ + int GetRTCPSendBuffer() const { return rtcpsendbuf; } + + /** Returns the RTCP socket's receive buffer size. */ + int GetRTCPReceiveBuffer() const { return rtcprecvbuf; } private: uint16_t portbase; uint32_t bindIP, mcastifaceIP; std::list localIPs; uint8_t multicastTTL; + int rtpsendbuf, rtprecvbuf; + int rtcpsendbuf, rtcprecvbuf; }; /** Additional information about the UDP over IPv4 transmitter. */ diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index bb97720..6bf04d4 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -79,21 +79,8 @@ #include "rtpdebug.h" -#ifndef _WIN32_WCE - #define RTPUDPV6TRANS_RTPRECEIVEBUFFER 32768 - #define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 32768 - #define RTPUDPV6TRANS_RTPTRANSMITBUFFER 32768 - #define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 32768 - #define RTPUDPV6TRANS_MAXPACKSIZE 65535 - #define RTPUDPV6TRANS_IFREQBUFSIZE 8192 -#else - #define RTPUDPV6TRANS_RTPRECEIVEBUFFER 2048 - #define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 2048 - #define RTPUDPV6TRANS_RTPTRANSMITBUFFER 2048 - #define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 2048 - #define RTPUDPV6TRANS_MAXPACKSIZE 2048 - #define RTPUDPV6TRANS_IFREQBUFSIZE 2048 -#endif // _WIN32_WCE +#define RTPUDPV6TRANS_MAXPACKSIZE 65535 +#define RTPUDPV6TRANS_IFREQBUFSIZE 8192 #define RTPUDPV6TRANS_IS_MCASTADDR(x) (x.s6_addr[0] == 0xFF) @@ -123,8 +110,9 @@ inline bool operator==(const in6_addr &ip1,const in6_addr &ip2) return false; } -RTPUDPv6Transmitter::RTPUDPv6Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr),multicastgroups(GetMemoryManager(),RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), +RTPUDPv6Transmitter::RTPUDPv6Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr), destinations(GetMemoryManager(),RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT), + multicastgroups(GetMemoryManager(),RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), acceptignoreinfo(GetMemoryManager(),RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; @@ -223,7 +211,7 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa // set socket buffer sizes - size = RTPUDPV6TRANS_RTPRECEIVEBUFFER; + size = params->GetRTPReceiveBuffer(); if (setsockopt(rtpsock,SOL_SOCKET,SO_RCVBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -231,7 +219,7 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV6TRANS_CANTSETRTPRECEIVEBUF; } - size = RTPUDPV6TRANS_RTPTRANSMITBUFFER; + size = params->GetRTPSendBuffer(); if (setsockopt(rtpsock,SOL_SOCKET,SO_SNDBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -239,7 +227,7 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV6TRANS_CANTSETRTPTRANSMITBUF; } - size = RTPUDPV6TRANS_RTCPRECEIVEBUFFER; + size = params->GetRTCPReceiveBuffer(); if (setsockopt(rtcpsock,SOL_SOCKET,SO_RCVBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -247,7 +235,7 @@ int RTPUDPv6Transmitter::Create(size_t maximumpacketsize,const RTPTransmissionPa MAINMUTEX_UNLOCK return ERR_RTP_UDPV6TRANS_CANTSETRTCPRECEIVEBUF; } - size = RTPUDPV6TRANS_RTCPTRANSMITBUFFER; + size = params->GetRTCPSendBuffer(); if (setsockopt(rtcpsock,SOL_SOCKET,SO_SNDBUF,(const char *)&size,sizeof(int)) != 0) { RTPCLOSE(rtpsock); @@ -1298,7 +1286,7 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) if (receivemode == RTPTransmitter::AcceptAll) acceptdata = true; else - acceptdata = ShouldAcceptData(srcaddr.sin6_addr,htons(srcaddr.sin6_port)); + acceptdata = ShouldAcceptData(srcaddr.sin6_addr,ntohs(srcaddr.sin6_port)); if (acceptdata) { diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 9911c8e..41f6335 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2006 Jori Liesenborgs + Copyright (c) 1999-2007 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -59,11 +59,16 @@ #define RTPUDPV6TRANS_HASHSIZE 8317 #define RTPUDPV6TRANS_DEFAULTPORTBASE 5000 +#define RTPUDPV6TRANS_RTPRECEIVEBUFFER 32768 +#define RTPUDPV6TRANS_RTCPRECEIVEBUFFER 32768 +#define RTPUDPV6TRANS_RTPTRANSMITBUFFER 32768 +#define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 32768 + /** Parameters for the UDP over IPv6 transmitter. */ class RTPUDPv6TransmissionParams : public RTPTransmissionParams { public: - RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; } + RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; rtpsendbuf = RTPUDPV6TRANS_RTPTRANSMITBUFFER; rtprecvbuf= RTPUDPV6TRANS_RTPRECEIVEBUFFER; rtcpsendbuf = RTPUDPV6TRANS_RTCPTRANSMITBUFFER; rtcprecvbuf = RTPUDPV6TRANS_RTCPRECEIVEBUFFER; } /** Sets the IP address which is used to bind the sockets to \c ip. */ void SetBindIP(in6_addr ip) { bindIP = ip; } @@ -100,12 +105,38 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams /** Returns the list of local IP addresses. */ const std::list &GetLocalIPList() const { return localIPs; } + + /** Sets the RTP socket's send buffer size. */ + void SetRTPSendBuffer(int s) { rtpsendbuf = s; } + + /** Sets the RTP socket's receive buffer size. */ + void SetRTPReceiveBuffer(int s) { rtprecvbuf = s; } + + /** Sets the RTCP socket's send buffer size. */ + void SetRTCPSendBuffer(int s) { rtcpsendbuf = s; } + + /** Sets the RTCP socket's receive buffer size. */ + void SetRTCPReceiveBuffer(int s) { rtcprecvbuf = s; } + + /** Returns the RTP socket's send buffer size. */ + int GetRTPSendBuffer() const { return rtpsendbuf; } + + /** Returns the RTP socket's receive buffer size. */ + int GetRTPReceiveBuffer() const { return rtprecvbuf; } + + /** Returns the RTCP socket's send buffer size. */ + int GetRTCPSendBuffer() const { return rtcpsendbuf; } + + /** Returns the RTCP socket's receive buffer size. */ + int GetRTCPReceiveBuffer() const { return rtcprecvbuf; } private: uint16_t portbase; in6_addr bindIP; unsigned int mcastifidx; std::list localIPs; uint8_t multicastTTL; + int rtpsendbuf, rtprecvbuf; + int rtcpsendbuf, rtcprecvbuf; }; /** Additional information about the UDP over IPv6 transmitter. */ diff --git a/tools/Makefile.in b/tools/Makefile.in index 4daa85a..d4cf49a 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, From 5d75c3268fc4ee801c4901de1021e10b8361b8c5 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 013/136] Import of version 3.7.1 --- ChangeLog | 8 +- Doxyfile | 2 +- Makefile.in | 11 +- README.TXT | 4 +- config.guess | 548 +-- config.sub | 85 +- configure | 7367 ++++++++++++++++++++++--------------- configure.in | 2 +- doc/Makefile.in | 11 +- examples/Makefile.in | 11 +- ltmain.sh | 895 +++-- pkgconfig/Makefile.in | 11 +- src/Makefile.in | 11 +- src/rtplibraryversion.cpp | 2 +- src/rtptimeutilities.h | 18 +- tools/Makefile.in | 11 +- 16 files changed, 5506 insertions(+), 3491 deletions(-) diff --git a/ChangeLog b/ChangeLog index b91b99d..1867f2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ - January 31, 2007 + May 23, 2007 JRTPLIB ChangeLog ----------- + + 3.7.1 (May 2007) + * Fixed bug in the CurrentTime implementation (Win32/WinCE version). + Thanks to Dani Baeyens (dani@warp.es) and Eric Johnson + (EJohnson@pelco.com) for helping me solve this problem. + 3.7.0 (January 2007) * Send and receive socket buffer sizes can now be set in the transmission parameters. Thanks to Dmitry Shandyba diff --git a/Doxyfile b/Doxyfile index b2bcbb6..1cecca1 100644 --- a/Doxyfile +++ b/Doxyfile @@ -23,7 +23,7 @@ PROJECT_NAME = jrtplib # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.7.0 +PROJECT_NUMBER = 3.7.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/Makefile.in b/Makefile.in index 75f7fbc..f905e31 100644 --- a/Makefile.in +++ b/Makefile.in @@ -99,6 +99,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -143,12 +144,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -165,23 +163,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/README.TXT b/README.TXT index d7bf086..0be4326 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - January 31, 2007 + May 23, 2007 - JRTPLIB (v3.7.0) + JRTPLIB (v3.7.1) Developed at the The Expertise Centre for diff --git a/config.guess b/config.guess index 892833f..e3ef63f 100755 --- a/config.guess +++ b/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-02-10' +timestamp='2005-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +17,15 @@ timestamp='2005-02-10' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -66,11 +68,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -123,7 +125,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,55 +198,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +264,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +308,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +342,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +357,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +371,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +428,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +470,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +500,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,14 +515,18 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -565,28 +540,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +623,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -658,11 +643,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,161 +675,166 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) + exit ;; + x86:Interix*:[345]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - amd64:CYGWIN*:*:*) + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin - exit 0 ;; + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -861,8 +851,8 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -880,15 +870,18 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -902,7 +895,7 @@ EOF objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -910,25 +903,28 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -946,15 +942,15 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -971,7 +967,7 @@ EOF LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout @@ -981,16 +977,19 @@ EOF LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -998,27 +997,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1026,15 +1025,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1126,69 +1126,72 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1196,25 +1199,25 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1225,41 +1228,47 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1291,7 +1300,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1380,11 +1389,12 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1393,22 +1403,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1419,7 +1429,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/config.sub index d8fd2f8..2851647 100755 --- a/config.sub +++ b/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-02-10' +timestamp='2005-12-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +21,15 @@ timestamp='2005-02-10' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -83,11 +84,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +100,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,8 +119,9 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -170,6 +172,10 @@ case $os in -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -186,6 +192,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -231,6 +241,7 @@ case $basic_machine in | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ @@ -246,6 +257,7 @@ case $basic_machine in | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,15 +266,17 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ @@ -271,6 +285,9 @@ case $basic_machine in | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -278,6 +295,9 @@ case $basic_machine in ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -298,7 +318,7 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ @@ -319,6 +339,7 @@ case $basic_machine in | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,6 +348,7 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ @@ -334,9 +356,10 @@ case $basic_machine in | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ @@ -348,6 +371,8 @@ case $basic_machine in | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -683,6 +708,9 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -758,9 +786,8 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -847,6 +874,10 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -1086,12 +1117,9 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; @@ -1172,13 +1200,15 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1196,7 +1226,7 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1385,6 +1415,9 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1556,7 +1589,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/configure b/configure index e107910..6124649 100755 --- a/configure +++ b/configure @@ -1,8 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.60. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -16,11 +17,35 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -29,8 +54,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +104,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +124,386 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. fi +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +512,19 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,15 +533,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - # Check that we are running under the correct shell. @@ -395,29 +688,26 @@ tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 +exec 7<&0 &1 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -454,17 +744,152 @@ ac_includes_default="\ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif +#endif +#if HAVE_STDINT_H +# include #endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RTP_FILIO RTP_SOCKIO RTP_ENDIAN RTP_SOCKLENTYPE_UINT RTP_JTHREADINCLUDES RTP_HAVE_SOCKADDR_LEN RTP_SUPPORT_IPV4MULTICAST RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION RTP_SUPPORT_GNUDRAND RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_SUPPORT_SENDAPP RTP_SUPPORT_MEMORYMANAGEMENT RTP_LINKLIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +GREP +EGREP +LN_S +ECHO +AR +RANLIB +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +RTP_FILIO +RTP_SOCKIO +RTP_ENDIAN +RTP_SOCKLENTYPE_UINT +RTP_JTHREADINCLUDES +RTP_HAVE_SOCKADDR_LEN +RTP_SUPPORT_IPV4MULTICAST +RTP_SUPPORT_THREAD +RTP_SUPPORT_SDESPRIV +RTP_SUPPORT_INLINETEMPLATEPARAM +RTP_SUPPORT_PROBATION +RTP_SUPPORT_GNUDRAND +RTP_SUPPORT_RANDR +RTP_SUPPORT_GETLOGINR +RTP_SUPPORT_IPV6 +RTP_SUPPORT_IPV6MULTICAST +RTP_SUPPORT_IFADDRS +RTP_SUPPORT_SENDAPP +RTP_SUPPORT_MEMORYMANAGEMENT +RTP_LINKLIBS +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS' + # Initialize some variables set by options. ac_init_help= @@ -491,34 +916,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -540,12 +979,18 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. @@ -553,7 +998,17 @@ do { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` @@ -562,11 +1017,7 @@ do { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -593,6 +1044,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -617,13 +1074,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -688,6 +1148,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -744,11 +1214,7 @@ do { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` @@ -757,7 +1223,7 @@ do { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -788,8 +1254,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -809,27 +1274,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -856,96 +1313,78 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_CXXCPP_set=${CXXCPP+set} -ac_env_CXXCPP_value=$CXXCPP -ac_cv_env_CXXCPP_set=${CXXCPP+set} -ac_cv_env_CXXCPP_value=$CXXCPP -ac_env_F77_set=${F77+set} -ac_env_F77_value=$F77 -ac_cv_env_F77_set=${F77+set} -ac_cv_env_F77_value=$F77 -ac_env_FFLAGS_set=${FFLAGS+set} -ac_env_FFLAGS_value=$FFLAGS -ac_cv_env_FFLAGS_set=${FFLAGS+set} -ac_cv_env_FFLAGS_value=$FFLAGS - -# + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# # Report the --help message. # if test "$ac_init_help" = "long"; then @@ -972,9 +1411,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -992,15 +1428,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1023,10 +1466,8 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] - build shared libraries [default=yes] - --enable-static[=PKGS] - build static libraries [default=yes] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build @@ -1045,8 +1486,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] - --with-tags[=TAGS] - include additional configurations [automatic] + --with-tags[=TAGS] include additional configurations [automatic] --with-jthread-includes Directory where JThread include files are located Some influential environment variables: @@ -1054,8 +1494,8 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1067,118 +1507,86 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.60 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1197,7 +1605,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1211,6 +1619,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1232,7 +1641,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1243,7 +1651,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1265,9 +1673,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1278,8 +1684,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1292,20 +1698,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1316,22 +1736,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1343,26 +1769,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1393,14 +1817,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1416,8 +1843,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1429,12 +1856,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1459,8 +1885,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1477,12 +1902,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1499,33 +1918,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1540,8 +1970,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1563,7 +1993,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1582,21 +2012,22 @@ case $as_dir/ in ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1606,8 +2037,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -1649,20 +2080,20 @@ echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" + program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1714,8 +2145,8 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1728,54 +2159,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1808,7 +2242,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.7.0 + VERSION=3.7.1 cat >>confdefs.h <<_ACEOF @@ -1846,8 +2280,8 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1860,32 +2294,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1898,27 +2334,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -1965,17 +2415,16 @@ if test "BLA$CXXFLAGS" = "BLA" ; then fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# Check whether --enable-shared or --disable-shared was given. +# Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} + enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; @@ -1994,12 +2443,12 @@ if test "${enable_shared+set}" = set; then esac else enable_shared=yes -fi; +fi -# Check whether --enable-static or --disable-static was given. + +# Check whether --enable-static was given. if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} + enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; @@ -2018,12 +2467,12 @@ if test "${enable_static+set}" = set; then esac else enable_static=yes -fi; +fi -# Check whether --enable-fast-install or --disable-fast-install was given. + +# Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} + enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; @@ -2042,65 +2491,95 @@ if test "${enable_fast_install+set}" = set; then esac else enable_fast_install=yes -fi; +fi + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" - ac_config_commands="$ac_config_commands depfiles" +ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} @@ -2110,8 +2589,8 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none @@ -2138,15 +2617,15 @@ if test "$am__include" = "#"; then fi -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +# Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" + enableval=$enable_dependency_tracking; +fi -fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -2171,8 +2650,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2185,32 +2664,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2223,36 +2704,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2265,74 +2761,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2346,7 +2802,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2357,6 +2813,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2374,22 +2831,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2402,36 +2860,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2444,29 +2904,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2479,21 +2955,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2518,46 +3008,70 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2570,19 +3084,23 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2601,22 +3119,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2627,9 +3150,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2643,14 +3165,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2670,14 +3192,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2695,12 +3223,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2723,24 +3251,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2749,24 +3289,28 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2782,24 +3326,147 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2808,12 +3475,20 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2829,12 +3504,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2868,12 +3543,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2888,206 +3568,75 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3095,8 +3644,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3185,8 +3734,8 @@ else fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3202,8 +3751,8 @@ else fi -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3256,37 +3805,184 @@ done fi SED=$lt_cv_path_SED -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -3315,11 +4011,11 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3352,17 +4048,17 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3376,20 +4072,20 @@ case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -3406,8 +4102,8 @@ case $host_os in ;; esac -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3455,23 +4151,23 @@ else test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi -echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3646,8 +4342,8 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) esac fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3665,11 +4361,11 @@ LTCFLAGS=${LTCFLAGS-"$CFLAGS"} compiler=$CC -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +# Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -3696,7 +4392,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3699 "configure"' > conftest.$ac_ext + echo '#line 4395 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -3781,8 +4477,8 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3808,24 +4504,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3834,9 +4542,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3845,8 +4554,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" @@ -3883,8 +4592,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3918,8 +4627,13 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3944,9 +4658,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3956,8 +4671,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3984,6 +4704,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4001,8 +4722,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4025,8 +4746,13 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4051,9 +4777,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4063,8 +4790,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4091,6 +4823,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4113,8 +4846,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4138,24 +4871,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4164,9 +4909,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -4222,6 +4968,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -4241,18 +4988,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4265,12 +5021,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -4293,9 +5051,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4309,24 +5067,36 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4335,12 +5105,14 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -4355,18 +5127,19 @@ done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4377,24 +5150,36 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4403,15 +5188,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4420,8 +5206,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4445,9 +5236,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4471,25 +5263,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4501,18 +5287,22 @@ fi done -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4525,36 +5315,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4567,55 +5359,85 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4638,24 +5460,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4664,24 +5498,28 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4697,24 +5535,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4723,70 +5573,53 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4795,62 +5628,92 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - break + ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_ext=cc +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4858,8 +5721,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4948,8 +5811,8 @@ else fi fi -echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type @@ -4970,13 +5833,13 @@ fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5006,8 +5869,13 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5032,9 +5900,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5044,8 +5913,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5072,6 +5946,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -5089,8 +5964,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -5113,8 +5988,13 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5139,9 +6019,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5151,8 +6032,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5179,6 +6065,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -5194,7 +6081,7 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5208,12 +6095,12 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5226,36 +6113,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5268,48 +6157,78 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_F77" && break done - F77=$ac_ct_F77 + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi fi # Provide some information about the compiler. -echo "$as_me:5298:" \ - "checking for Fortran 77 compiler version" >&5 +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -5319,8 +6238,8 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5333,24 +6252,36 @@ else end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5359,20 +6290,21 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5383,24 +6315,36 @@ cat >conftest.$ac_ext <<_ACEOF end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5409,13 +6353,14 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_f77_g=no + ac_cv_prog_f77_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -5433,7 +6378,7 @@ else fi G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5444,8 +6389,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5553,19 +6498,19 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5769,15 +6714,15 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } fi -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5791,8 +6736,8 @@ else fi rmdir .libs 2>/dev/null fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -5843,8 +6788,8 @@ with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5857,32 +6802,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5895,27 +6842,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - AR=$ac_ct_AR + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi else AR="$ac_cv_prog_AR" fi @@ -5923,8 +6884,8 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5937,32 +6898,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5975,27 +6938,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6003,8 +6980,8 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6017,32 +6994,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6055,27 +7034,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -6134,8 +7127,8 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6187,17 +7180,17 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6249,11 +7242,11 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi else @@ -6268,21 +7261,21 @@ esac enable_dlopen=no enable_win32_dll=no -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +# Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Check whether --with-pic or --without-pic was given. +# Check whether --with-pic was given. if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" + withval=$with_pic; pic_mode="$withval" else pic_mode=default -fi; +fi + test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script @@ -6340,8 +7333,8 @@ if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6358,11 +7351,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6361: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7354: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6365: \$? = $ac_status" >&5 + echo "$as_me:7358: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6375,8 +7368,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -6390,8 +7383,8 @@ lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -6600,16 +7593,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6626,11 +7619,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6629: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7622: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6633: \$? = $ac_status" >&5 + echo "$as_me:7626: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6643,8 +7636,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in @@ -6671,8 +7664,8 @@ esac # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6699,8 +7692,8 @@ else LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : @@ -6709,8 +7702,8 @@ else fi -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6730,11 +7723,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6733: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7726: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6737: \$? = $ac_status" >&5 + echo "$as_me:7730: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -6756,23 +7749,23 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -6782,8 +7775,8 @@ else need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= @@ -7198,24 +8191,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7229,8 +8234,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -7259,24 +8266,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7290,8 +8309,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -7740,8 +8761,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # @@ -7761,8 +8782,8 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -7799,16 +8820,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -8395,8 +9416,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -8404,8 +9425,8 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ @@ -8429,8 +9450,8 @@ else # directories. hardcode_action=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported @@ -8443,29 +9464,29 @@ fi striplib= old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi ;; *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; esac fi @@ -8497,8 +9518,8 @@ else darwin*) # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8511,40 +9532,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8553,14 +9586,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -8574,8 +9608,8 @@ fi ;; *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8602,53 +9636,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef shl_load -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) +#if defined __stub_shl_load || defined __stub___shl_load choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != shl_load; +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8657,18 +9697,19 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shl_load=no + ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8681,40 +9722,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8723,19 +9776,20 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8762,53 +9816,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef dlopen -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) +#if defined __stub_dlopen || defined __stub___dlopen choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != dlopen; +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8817,18 +9877,19 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_dlopen=no + ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8841,40 +9902,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8883,19 +9956,20 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8908,40 +9982,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8950,19 +10036,20 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8975,40 +10062,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dld_link (); int main () { -dld_link (); +return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9017,14 +10116,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi @@ -9064,8 +10164,8 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9075,7 +10175,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9175,7 +10275,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" @@ -9282,13 +10382,13 @@ fi # Report which library types will actually be built -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -9308,15 +10408,15 @@ aix4* | aix5*) fi ;; esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -9799,7 +10899,7 @@ else fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -9808,11 +10908,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" -# Check whether --with-tags or --without-tags was given. +# Check whether --with-tags was given. if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" -fi; + withval=$with_tags; tagnames="$withval" +fi + if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then @@ -9866,7 +10966,7 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -9985,18 +11085,18 @@ if test "$GXX" = yes; then # Set up default GNU C++ configuration -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -10025,11 +11125,11 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10062,17 +11162,17 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10086,8 +11186,8 @@ case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -10137,8 +11237,8 @@ else fi # PORTME: fill in a description of your system's C++ link characteristics -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -10250,24 +11350,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10281,8 +11393,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -10312,24 +11426,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10343,8 +11469,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -11075,8 +12203,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no ;; esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" @@ -11215,8 +12343,8 @@ lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -11489,16 +12617,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11515,11 +12643,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11518: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12646: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11522: \$? = $ac_status" >&5 + echo "$as_me:12650: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11532,8 +12660,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in @@ -11560,8 +12688,8 @@ esac # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11588,8 +12716,8 @@ else LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : @@ -11598,8 +12726,8 @@ else fi -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11619,11 +12747,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11622: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12750: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11626: \$? = $ac_status" >&5 + echo "$as_me:12754: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11645,23 +12773,23 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -11671,8 +12799,8 @@ else need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -11696,8 +12824,8 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar ;; esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # @@ -11717,8 +12845,8 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -11755,16 +12883,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -12351,8 +13479,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12360,8 +13488,8 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ @@ -12385,8 +13513,8 @@ else # directories. hardcode_action_CXX=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6 +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported @@ -12806,7 +13934,7 @@ else fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -12911,13 +14039,13 @@ done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -12936,15 +14064,15 @@ aix4* | aix5*) fi ;; esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" @@ -12953,8 +14081,8 @@ lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -13163,16 +14291,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13189,11 +14317,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13192: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14320: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13196: \$? = $ac_status" >&5 + echo "$as_me:14324: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13206,8 +14334,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in @@ -13234,8 +14362,8 @@ esac # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13262,8 +14390,8 @@ else LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } if test x"$lt_prog_compiler_static_works_F77" = xyes; then : @@ -13272,8 +14400,8 @@ else fi -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13293,11 +14421,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13296: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14424: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13300: \$? = $ac_status" >&5 + echo "$as_me:14428: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13319,23 +14447,23 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -13345,8 +14473,8 @@ else need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= @@ -13751,24 +14879,36 @@ _LT_EOF end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13782,8 +14922,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -13802,24 +14944,36 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13833,8 +14987,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -14283,8 +15439,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # @@ -14304,8 +15460,8 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -14342,16 +15498,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -14938,8 +16094,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -14947,8 +16103,8 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ @@ -14972,8 +16128,8 @@ else # directories. hardcode_action_F77=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported @@ -15393,7 +16549,7 @@ else fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -15410,7 +16566,6 @@ CC="$lt_save_CC" if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - # Source file extension for Java test sources. ac_ext=java @@ -15478,8 +16633,8 @@ if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15496,11 +16651,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15499: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16654: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15503: \$? = $ac_status" >&5 + echo "$as_me:16658: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15513,8 +16668,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" @@ -15528,8 +16683,8 @@ lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' @@ -15738,16 +16893,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15764,11 +16919,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15767: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16922: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15771: \$? = $ac_status" >&5 + echo "$as_me:16926: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15781,8 +16936,8 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in @@ -15809,8 +16964,8 @@ esac # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15837,8 +16992,8 @@ else LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : @@ -15847,8 +17002,8 @@ else fi -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15868,11 +17023,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15871: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17026: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15875: \$? = $ac_status" >&5 + echo "$as_me:17030: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15894,23 +17049,23 @@ else $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -15920,8 +17075,8 @@ else need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= @@ -16336,24 +17491,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16367,8 +17534,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -16397,24 +17566,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16428,8 +17609,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -16878,8 +18061,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi -echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # @@ -16899,8 +18082,8 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -16937,16 +18120,16 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -17533,8 +18716,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -17542,8 +18725,8 @@ if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ @@ -17567,8 +18750,8 @@ else # directories. hardcode_action_GCJ=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported @@ -17988,7 +19171,7 @@ else fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -18004,7 +19187,6 @@ CC="$lt_save_CC" RC) - # Source file extension for RC test sources. ac_ext=rc @@ -18469,7 +19651,7 @@ else fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -18537,10 +19719,9 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -# Check whether --enable-sdespriv or --disable-sdespriv was given. +# Check whether --enable-sdespriv was given. if test "${enable_sdespriv+set}" = set; then - enableval="$enable_sdespriv" - + enableval=$enable_sdespriv; if test "$enableval" = yes ; then privsupport="yes" else @@ -18550,17 +19731,17 @@ else privsupport="yes" -fi; +fi + if test "$privsupport" = "yes" ; then RTP_SUPPORT_SDESPRIV="#define RTP_SUPPORT_SDESPRIV" fi -# Check whether --enable-probation or --disable-probation was given. +# Check whether --enable-probation was given. if test "${enable_probation+set}" = set; then - enableval="$enable_probation" - + enableval=$enable_probation; if test "$enableval" = yes ; then probsupport="yes" else @@ -18570,17 +19751,17 @@ else probsupport="yes" -fi; +fi + if test "$probsupport" = "yes" ; then RTP_SUPPORT_PROBATION="#define RTP_SUPPORT_PROBATION" fi -# Check whether --enable-sendapp or --disable-sendapp was given. +# Check whether --enable-sendapp was given. if test "${enable_sendapp+set}" = set; then - enableval="$enable_sendapp" - + enableval=$enable_sendapp; if test "$enableval" = yes ; then sendappupport="yes" else @@ -18590,17 +19771,17 @@ else sendappsupport="yes" -fi; +fi + if test "$sendappsupport" = "yes" ; then RTP_SUPPORT_SENDAPP="#define RTP_SUPPORT_SENDAPP" fi -# Check whether --enable-memory or --disable-memory was given. +# Check whether --enable-memory was given. if test "${enable_memory+set}" = set; then - enableval="$enable_memory" - + enableval=$enable_memory; if test "$enableval" = yes ; then memsupport="yes" else @@ -18610,17 +19791,17 @@ else memsupport="yes" -fi; +fi + if test "$memsupport" = "yes" ; then RTP_SUPPORT_MEMORYMANAGEMENT="#define RTP_SUPPORT_MEMORYMANAGEMENT" fi -# Check whether --enable-jthread or --disable-jthread was given. +# Check whether --enable-jthread was given. if test "${enable_jthread+set}" = set; then - enableval="$enable_jthread" - + enableval=$enable_jthread; if test "$enableval" = yes ; then checkjthread="yes" else @@ -18630,23 +19811,23 @@ else checkjthread="yes" -fi; +fi + if test "$checkjthread" = "yes" ; then searchdirs="/usr/include/jthread /usr/local/include/jthread" - echo "$as_me:$LINENO: checking for JThread include files" >&5 -echo $ECHO_N "checking for JThread include files... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for JThread include files" >&5 +echo $ECHO_N "checking for JThread include files... $ECHO_C" >&6; } -# Check whether --with-jthread-includes or --without-jthread-includes was given. +# Check whether --with-jthread-includes was given. if test "${with_jthread_includes+set}" = set; then - withval="$with_jthread_includes" - + withval=$with_jthread_includes; if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then - echo "$as_me:$LINENO: result: in \"$withval\"" >&5 -echo "${ECHO_T}in \"$withval\"" >&6 - echo "$as_me:$LINENO: checking JThread version" >&5 -echo $ECHO_N "checking JThread version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: in \"$withval\"" >&5 +echo "${ECHO_T}in \"$withval\"" >&6; } + { echo "$as_me:$LINENO: checking JThread version" >&5 +echo $ECHO_N "checking JThread version... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include "$withval/jthread.h" @@ -18657,24 +19838,36 @@ echo $ECHO_N "checking JThread version... $ECHO_C" >&6 }; _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -18682,22 +19875,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" RTP_CHECK_JTHREADLINK="yes" - echo "$as_me:$LINENO: result: >= 1.1.0" >&5 -echo "${ECHO_T}>= 1.1.0" >&6 + { echo "$as_me:$LINENO: result: >= 1.1.0" >&5 +echo "${ECHO_T}>= 1.1.0" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: < 1.1.0" >&5 -echo "${ECHO_T}< 1.1.0" >&6 + { echo "$as_me:$LINENO: result: < 1.1.0" >&5 +echo "${ECHO_T}< 1.1.0" >&6; } { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } { echo "$as_me:$LINENO: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&5 echo "$as_me: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&2;} fi @@ -18707,19 +19901,19 @@ else for i in $searchdirs ; do if test -e $i/jthread.h && test -e $i/jmutex.h ; then RTP_JTHREADINCLUDEDIR="$i" - echo "$as_me:$LINENO: result: $i" >&5 -echo "${ECHO_T}$i" >&6 + { echo "$as_me:$LINENO: result: $i" >&5 +echo "${ECHO_T}$i" >&6; } break fi done if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } { echo "$as_me:$LINENO: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&5 echo "$as_me: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&2;} else - echo "$as_me:$LINENO: checking JThread version" >&5 -echo $ECHO_N "checking JThread version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking JThread version" >&5 +echo $ECHO_N "checking JThread version... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include "$RTP_JTHREADINCLUDEDIR/jthread.h" @@ -18730,24 +19924,36 @@ echo $ECHO_N "checking JThread version... $ECHO_C" >&6 }; _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -18755,65 +19961,80 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" RTP_CHECK_JTHREADLINK="yes" - echo "$as_me:$LINENO: result: >= 1.1.0" >&5 -echo "${ECHO_T}>= 1.1.0" >&6 + { echo "$as_me:$LINENO: result: >= 1.1.0" >&5 +echo "${ECHO_T}>= 1.1.0" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: < 1.1.0" >&5 -echo "${ECHO_T}< 1.1.0" >&6 + { echo "$as_me:$LINENO: result: < 1.1.0" >&5 +echo "${ECHO_T}< 1.1.0" >&6; } { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -fi; +fi + fi if test "$RTP_CHECK_JTHREADLINK" = "yes" ; then - echo "$as_me:$LINENO: checking if we can link against jthread and pthread" >&5 -echo $ECHO_N "checking if we can link against jthread and pthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can link against jthread and pthread" >&5 +echo $ECHO_N "checking if we can link against jthread and pthread... $ECHO_C" >&6; } oldldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -ljthread -lpthread" cat >conftest.$ac_ext <<_ACEOF int main(void) { } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$oldldflags" fi @@ -18821,17 +20042,17 @@ fi if test "${ac_cv_header_sys_filio_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/filio.h" >&5 -echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/filio.h" >&5 +echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_filio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/filio.h usability" >&5 -echo $ECHO_N "checking sys/filio.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/filio.h usability" >&5 +echo $ECHO_N "checking sys/filio.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18842,24 +20063,36 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -18868,15 +20101,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/filio.h presence" >&5 -echo $ECHO_N "checking sys/filio.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/filio.h presence" >&5 +echo $ECHO_N "checking sys/filio.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18885,8 +20119,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -18910,9 +20149,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in @@ -18936,25 +20176,18 @@ echo "$as_me: WARNING: sys/filio.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: sys/filio.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/filio.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/filio.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/filio.h" >&5 -echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/filio.h" >&5 +echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_filio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_filio_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6; } fi if test $ac_cv_header_sys_filio_h = yes; then @@ -18965,17 +20198,17 @@ fi if test "${ac_cv_header_sys_sockio_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 -echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 +echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sockio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sockio.h usability" >&5 -echo $ECHO_N "checking sys/sockio.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sockio.h usability" >&5 +echo $ECHO_N "checking sys/sockio.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18986,24 +20219,36 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -19012,15 +20257,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sockio.h presence" >&5 -echo $ECHO_N "checking sys/sockio.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sockio.h presence" >&5 +echo $ECHO_N "checking sys/sockio.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19029,8 +20275,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -19054,9 +20305,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in @@ -19080,25 +20332,18 @@ echo "$as_me: WARNING: sys/sockio.h: section \"Present But Cannot Be Compile echo "$as_me: WARNING: sys/sockio.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 -echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 +echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sockio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sockio_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6; } fi if test $ac_cv_header_sys_sockio_h = yes; then @@ -19126,8 +20371,8 @@ ASSUMING TARGET IS BIG ENDIAN: EOF RTP_ENDIAN="#define RTP_BIG_ENDIAN // comment this if the target is a little endian system" else - echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -19153,24 +20398,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -19196,24 +20453,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -19222,14 +20491,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -19239,11 +20509,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -19254,24 +20524,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -19290,8 +20572,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19299,27 +20583,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -19332,13 +20630,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -19363,8 +20664,8 @@ fi oldcxxflags="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror -Wall" -echo "$as_me:$LINENO: checking if compiler supports -Werror -Wall" >&5 -echo $ECHO_N "checking if compiler supports -Werror -Wall... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if compiler supports -Werror -Wall" >&5 +echo $ECHO_N "checking if compiler supports -Werror -Wall... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19383,43 +20684,56 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } CXXFLAGS="$oldcxxflags" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking last argument of getsockname" >&5 -echo $ECHO_N "checking last argument of getsockname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking last argument of getsockname" >&5 +echo $ECHO_N "checking last argument of getsockname... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19440,46 +20754,59 @@ int param; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: int" >&5 -echo "${ECHO_T}int" >&6 + { echo "$as_me:$LINENO: result: int" >&5 +echo "${ECHO_T}int" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: unsigned int" >&5 -echo "${ECHO_T}unsigned int" >&6 + { echo "$as_me:$LINENO: result: unsigned int" >&5 +echo "${ECHO_T}unsigned int" >&6; } RTP_SOCKLENTYPE_UINT="#define RTP_SOCKLENTYPE_UINT" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$oldcxxflags" -echo "$as_me:$LINENO: checking if necessary options for IPv4 multicasting are available" >&5 -echo $ECHO_N "checking if necessary options for IPv4 multicasting are available... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if necessary options for IPv4 multicasting are available" >&5 +echo $ECHO_N "checking if necessary options for IPv4 multicasting are available... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19505,43 +20832,56 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_IPV4MULTICAST="#define RTP_SUPPORT_IPV4MULTICAST" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking if struct sockaddr has sa_len member" >&5 -echo $ECHO_N "checking if struct sockaddr has sa_len member... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if struct sockaddr has sa_len member" >&5 +echo $ECHO_N "checking if struct sockaddr has sa_len member... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19562,43 +20902,56 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_HAVE_SOCKADDR_LEN="#define RTP_HAVE_SOCKADDR_LEN" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking if compiler can compile programs with STL" >&5 -echo $ECHO_N "checking if compiler can compile programs with STL... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if compiler can compile programs with STL" >&5 +echo $ECHO_N "checking if compiler can compile programs with STL... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19617,37 +20970,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - echo "$as_me:$LINENO: checking if compiler can compile STL programs with option -LANG:std" >&5 -echo $ECHO_N "checking if compiler can compile STL programs with option -LANG:std... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { echo "$as_me:$LINENO: checking if compiler can compile STL programs with option -LANG:std" >&5 +echo $ECHO_N "checking if compiler can compile STL programs with option -LANG:std... $ECHO_C" >&6; } CXXFLAGS="$CXXFLAGS -LANG:std" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19667,49 +21032,63 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: Unable to compile a trivial STL program" >&5 echo "$as_me: error: Unable to compile a trivial STL program" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking if types like uint32_t exist" >&5 -echo $ECHO_N "checking if types like uint32_t exist... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if types like uint32_t exist" >&5 +echo $ECHO_N "checking if types like uint32_t exist... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19729,29 +21108,41 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } echo -e "#include \n#include " >src/rtptypes_unix.h else @@ -19759,8 +21150,8 @@ else sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } echo "Generating src/rtptypes.h ..." if ! ( $CXX $CFLAGS -o tools/gettypes tools/gettypes.cpp >/dev/null 2>/dev/null ) ; then { { echo "$as_me:$LINENO: error: Unable to create src/rtptypes_unix.h" >&5 @@ -19774,11 +21165,12 @@ echo "$as_me: error: Unable to create src/rtptypes_unix.h" >&2;} fi fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for drand48_r and srand48_r" >&5 -echo $ECHO_N "checking for drand48_r and srand48_r... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking for drand48_r and srand48_r" >&5 +echo $ECHO_N "checking for drand48_r and srand48_r... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -19793,39 +21185,51 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_GNUDRAND="#define RTP_SUPPORT_GNUDRAND" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - echo "$as_me:$LINENO: checking for rand_r" >&5 -echo $ECHO_N "checking for rand_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { echo "$as_me:$LINENO: checking for rand_r" >&5 +echo $ECHO_N "checking for rand_r... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -19839,45 +21243,59 @@ echo $ECHO_N "checking for rand_r... $ECHO_C" >&6 _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_RANDR="#define RTP_SUPPORT_RANDR" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for getlogin_r" >&5 -echo $ECHO_N "checking for getlogin_r... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getlogin_r" >&5 +echo $ECHO_N "checking for getlogin_r... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -19890,46 +21308,58 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_GETLOGINR="#define RTP_SUPPORT_GETLOGINR" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Check whether --enable-IPv6 or --disable-IPv6 was given. -if test "${enable_IPv6+set}" = set; then - enableval="$enable_IPv6" +# Check whether --enable-IPv6 was given. +if test "${enable_IPv6+set}" = set; then + enableval=$enable_IPv6; if test "$enableval" = yes ; then ipv6support="yes" else @@ -19939,7 +21369,8 @@ else ipv6support="yes" -fi; +fi + if test "$ipv6support" = "yes" ; then @@ -19955,8 +21386,8 @@ ABOUT IPv6 SUPPORT: EOF else - echo "$as_me:$LINENO: checking IPv6 support" >&5 -echo $ECHO_N "checking IPv6 support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking IPv6 support" >&5 +echo $ECHO_N "checking IPv6 support... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -19980,23 +21411,32 @@ else _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6 + { echo "$as_me:$LINENO: result: enabled" >&5 +echo "${ECHO_T}enabled" >&6; } RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 -echo $ECHO_N "checking if necessary options for IPv6 multicasting are available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 +echo $ECHO_N "checking if necessary options for IPv6 multicasting are available... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -20016,39 +21456,52 @@ echo $ECHO_N "checking if necessary options for IPv6 multicasting are available. _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -20056,28 +21509,30 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi if test "${ac_cv_header_ifaddrs_h+set}" = set; then - echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 -echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 +echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6; } if test "${ac_cv_header_ifaddrs_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking ifaddrs.h usability" >&5 -echo $ECHO_N "checking ifaddrs.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking ifaddrs.h usability" >&5 +echo $ECHO_N "checking ifaddrs.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20088,24 +21543,36 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -20114,15 +21581,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking ifaddrs.h presence" >&5 -echo $ECHO_N "checking ifaddrs.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking ifaddrs.h presence" >&5 +echo $ECHO_N "checking ifaddrs.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20131,8 +21599,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -20156,9 +21629,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in @@ -20182,25 +21656,18 @@ echo "$as_me: WARNING: ifaddrs.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 -echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 +echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6; } if test "${ac_cv_header_ifaddrs_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_ifaddrs_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6; } fi if test $ac_cv_header_ifaddrs_h = yes; then @@ -20230,7 +21697,8 @@ fi - ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc" +ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -20249,39 +21717,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -20290,63 +21777,48 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -20405,11 +21877,35 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -20418,8 +21914,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -20433,18 +21964,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -20452,159 +21984,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -20613,7 +22106,19 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -20622,31 +22127,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20654,30 +22142,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -20699,19 +22176,21 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -20722,60 +22201,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -20791,44 +22252,56 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/rtpconfig_unix.h" ) CONFIG_FILES="$CONFIG_FILES src/rtpconfig_unix.h" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "pkgconfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;; - "pkgconfig/jrtplib.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib.pc" ;; - "pkgconfig/jrtplib-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib-uninstalled.pc" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/rtpconfig_unix.h") CONFIG_FILES="$CONFIG_FILES src/rtpconfig_unix.h" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "pkgconfig/Makefile") CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;; + "pkgconfig/jrtplib.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib.pc" ;; + "pkgconfig/jrtplib-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib-uninstalled.pc" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -20839,371 +22312,477 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@EGREP@,$EGREP,;t t -s,@LN_S@,$LN_S,;t t -s,@ECHO@,$ECHO,;t t -s,@AR@,$AR,;t t -s,@ac_ct_AR@,$ac_ct_AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@CXXDEPMODE@,$CXXDEPMODE,;t t -s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t -s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t -s,@CXXCPP@,$CXXCPP,;t t -s,@F77@,$F77,;t t -s,@FFLAGS@,$FFLAGS,;t t -s,@ac_ct_F77@,$ac_ct_F77,;t t -s,@LIBTOOL@,$LIBTOOL,;t t -s,@RTP_FILIO@,$RTP_FILIO,;t t -s,@RTP_SOCKIO@,$RTP_SOCKIO,;t t -s,@RTP_ENDIAN@,$RTP_ENDIAN,;t t -s,@RTP_SOCKLENTYPE_UINT@,$RTP_SOCKLENTYPE_UINT,;t t -s,@RTP_JTHREADINCLUDES@,$RTP_JTHREADINCLUDES,;t t -s,@RTP_HAVE_SOCKADDR_LEN@,$RTP_HAVE_SOCKADDR_LEN,;t t -s,@RTP_SUPPORT_IPV4MULTICAST@,$RTP_SUPPORT_IPV4MULTICAST,;t t -s,@RTP_SUPPORT_THREAD@,$RTP_SUPPORT_THREAD,;t t -s,@RTP_SUPPORT_SDESPRIV@,$RTP_SUPPORT_SDESPRIV,;t t -s,@RTP_SUPPORT_INLINETEMPLATEPARAM@,$RTP_SUPPORT_INLINETEMPLATEPARAM,;t t -s,@RTP_SUPPORT_PROBATION@,$RTP_SUPPORT_PROBATION,;t t -s,@RTP_SUPPORT_GNUDRAND@,$RTP_SUPPORT_GNUDRAND,;t t -s,@RTP_SUPPORT_RANDR@,$RTP_SUPPORT_RANDR,;t t -s,@RTP_SUPPORT_GETLOGINR@,$RTP_SUPPORT_GETLOGINR,;t t -s,@RTP_SUPPORT_IPV6@,$RTP_SUPPORT_IPV6,;t t -s,@RTP_SUPPORT_IPV6MULTICAST@,$RTP_SUPPORT_IPV6MULTICAST,;t t -s,@RTP_SUPPORT_IFADDRS@,$RTP_SUPPORT_IFADDRS,;t t -s,@RTP_SUPPORT_SENDAPP@,$RTP_SUPPORT_SENDAPP,;t t -s,@RTP_SUPPORT_MEMORYMANAGEMENT@,$RTP_SUPPORT_MEMORYMANAGEMENT,;t t -s,@RTP_LINKLIBS@,$RTP_LINKLIBS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +RTP_FILIO!$RTP_FILIO$ac_delim +RTP_SOCKIO!$RTP_SOCKIO$ac_delim +RTP_ENDIAN!$RTP_ENDIAN$ac_delim +RTP_SOCKLENTYPE_UINT!$RTP_SOCKLENTYPE_UINT$ac_delim +RTP_JTHREADINCLUDES!$RTP_JTHREADINCLUDES$ac_delim +RTP_HAVE_SOCKADDR_LEN!$RTP_HAVE_SOCKADDR_LEN$ac_delim +RTP_SUPPORT_IPV4MULTICAST!$RTP_SUPPORT_IPV4MULTICAST$ac_delim +RTP_SUPPORT_THREAD!$RTP_SUPPORT_THREAD$ac_delim +RTP_SUPPORT_SDESPRIV!$RTP_SUPPORT_SDESPRIV$ac_delim +RTP_SUPPORT_INLINETEMPLATEPARAM!$RTP_SUPPORT_INLINETEMPLATEPARAM$ac_delim +RTP_SUPPORT_PROBATION!$RTP_SUPPORT_PROBATION$ac_delim +RTP_SUPPORT_GNUDRAND!$RTP_SUPPORT_GNUDRAND$ac_delim +RTP_SUPPORT_RANDR!$RTP_SUPPORT_RANDR$ac_delim +RTP_SUPPORT_GETLOGINR!$RTP_SUPPORT_GETLOGINR$ac_delim +RTP_SUPPORT_IPV6!$RTP_SUPPORT_IPV6$ac_delim +RTP_SUPPORT_IPV6MULTICAST!$RTP_SUPPORT_IPV6MULTICAST$ac_delim +RTP_SUPPORT_IFADDRS!$RTP_SUPPORT_IFADDRS$ac_delim +RTP_SUPPORT_SENDAPP!$RTP_SUPPORT_SENDAPP$ac_delim +RTP_SUPPORT_MEMORYMANAGEMENT!$RTP_SUPPORT_MEMORYMANAGEMENT$ac_delim +RTP_LINKLIBS!$RTP_LINKLIBS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -21211,142 +22790,43 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -21356,18 +22836,29 @@ echo "$as_me: executing $ac_dest commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` else continue fi @@ -21389,53 +22880,79 @@ echo X"$mf" | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/configure.in b/configure.in index 31f856f..cb3710d 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.7.0) +AM_INIT_AUTOMAKE(jrtplib,3.7.1) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/doc/Makefile.in b/doc/Makefile.in index c75cbb4..5dd87a7 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -75,6 +75,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -119,12 +120,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -141,23 +139,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/examples/Makefile.in b/examples/Makefile.in index e41d1b2..799dcca 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -114,6 +114,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -158,12 +159,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -180,23 +178,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/ltmain.sh b/ltmain.sh index 0b54f84..06823e0 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -17,7 +17,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -43,8 +43,8 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.14 -TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)" +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. @@ -88,14 +88,15 @@ rm="rm -f" Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' # test EBCDIC or ASCII -case `echo A|tr A '\301'` in - A) # EBCDIC based system - SP2NL="tr '\100' '\n'" - NL2SP="tr '\r\n' '\100\100'" +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' ;; - *) # Assume ASCII based system - SP2NL="tr '\040' '\012'" - NL2SP="tr '\015\012' '\040\040'" + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' ;; esac @@ -112,8 +113,9 @@ if test "${LANG+set}" = set; then fi # Make sure IFS has a sensible default -: ${IFS=" -"} +lt_nl=' +' +IFS=" $lt_nl" if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then $echo "$modename: not configured to build any kind of library" 1>&2 @@ -130,14 +132,52 @@ run= show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -quote_scanset='[[~#^*{};<>?'"'"' ]' ##################################### # Shell function definitions: # This seems to be the best place for them +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + # func_win32_libid arg # return the library type of file 'arg' # @@ -156,12 +196,11 @@ func_win32_libid () if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` - if test "X$win32_nmres" = "Ximport" ; then - win32_libid_type="x86 archive import" - else - win32_libid_type="x86 archive static" - fi + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac fi ;; *DLL*) @@ -191,7 +230,7 @@ func_infer_tag () CC_quoted= for arg in $CC; do case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -212,7 +251,7 @@ func_infer_tag () for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -250,37 +289,14 @@ func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'` $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib" - $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib" - $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \ - | $EGREP -v '^[ ]*1[ ]' | while read count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $? - i=`expr $i + 1` - done - done - $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib" - $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib" + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE fi } @@ -317,9 +333,9 @@ func_extract_archives () $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$my_xdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status fi case $host in *-darwin*) @@ -359,7 +375,7 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run - ;; + ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; @@ -374,6 +390,8 @@ func_extract_archives () # Darwin sucks eval std_shrext=\"$shrext_cmds\" +disable_libs=no + # Parse our command line options once, thoroughly. while test "$#" -gt 0 do @@ -490,7 +508,11 @@ do preserve_args="$preserve_args $arg" ;; - --tag) prevopt="--tag" prev=tag ;; + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; --tag=*) set tag "$optarg" ${1+"$@"} shift @@ -522,6 +544,18 @@ if test -n "$prevopt"; then exit $EXIT_FAILURE fi +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. @@ -598,7 +632,7 @@ if test -z "$show_help"; then for arg do - case "$arg_mode" in + case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" @@ -649,7 +683,7 @@ if test -z "$show_help"; then # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -684,7 +718,7 @@ if test -z "$show_help"; then # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac @@ -757,6 +791,14 @@ if test -z "$show_help"; then esac done + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then @@ -829,12 +871,17 @@ compiler." $run $rm $removelist exit $EXIT_FAILURE fi - $echo $srcfile > "$lockfile" + $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac $run $rm "$libobj" "${libobj}T" @@ -856,18 +903,18 @@ EOF fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then - command="$base_compile $srcfile $pic_flag" + command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code - command="$base_compile $srcfile" + command="$base_compile $qsrcfile" fi if test ! -d "${xdir}$objdir"; then $show "$mkdir ${xdir}$objdir" $run $mkdir ${xdir}$objdir - status=$? - if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then + exit $exit_status fi fi @@ -939,9 +986,9 @@ EOF if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code - command="$base_compile $srcfile" + command="$base_compile $qsrcfile" else - command="$base_compile $srcfile $pic_flag" + command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" @@ -1070,6 +1117,7 @@ EOF no_install=no objs= non_pic_objects= + notinst_path= # paths that contain not-installed libtool libraries precious_files_regex= prefer_static_libs=no preload=no @@ -1098,14 +1146,15 @@ EOF if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=yes else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=built fi build_libtool_libs=no build_old_libs=yes - prefer_static_libs=yes break ;; esac @@ -1119,7 +1168,7 @@ EOF arg="$1" shift case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; @@ -1280,6 +1329,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1363,8 +1417,10 @@ EOF prev= continue ;; - darwin_framework) - compiler_flags="$compiler_flags $arg" + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" prev= continue ;; @@ -1426,11 +1482,17 @@ EOF continue ;; - -framework) - prev=darwin_framework - compiler_flags="$compiler_flags $arg" - continue - ;; + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; -inst-prefix-dir) prev=inst_prefix @@ -1458,7 +1520,8 @@ EOF absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit $EXIT_FAILURE + absdir="$dir" + notinst_path="$notinst_path $dir" fi dir="$absdir" ;; @@ -1472,10 +1535,15 @@ EOF esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac continue @@ -1484,11 +1552,11 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; - *-*-mingw* | *-*-os2*) + *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; @@ -1500,6 +1568,15 @@ EOF # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; esac elif test "X$arg" = "X-lc_r"; then case $host in @@ -1541,21 +1618,24 @@ EOF # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" - if test "$with_gcc" = "yes" ; then - compiler_flags="$compiler_flags $arg" - fi + compiler_flags="$compiler_flags $arg" continue ;; @@ -1663,7 +1743,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1681,7 +1761,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1714,7 +1794,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1793,6 +1873,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1848,7 +1933,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1898,9 +1983,9 @@ EOF if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir - status=$? - if test "$status" -ne 0 && test ! -d "$output_objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status fi fi @@ -1963,7 +2048,6 @@ EOF newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" @@ -2199,7 +2283,7 @@ EOF esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib'" 1>&2 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi @@ -2413,7 +2497,7 @@ EOF case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; + *) temp_rpath="$temp_rpath $absdir" ;; esac fi @@ -2450,8 +2534,12 @@ EOF fi link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes @@ -2564,11 +2652,15 @@ EOF if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in - *-*-sco3.2v5* ) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo @@ -2599,7 +2691,7 @@ EOF add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2672,7 +2764,7 @@ EOF add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2733,8 +2825,6 @@ EOF fi fi else - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi @@ -2852,12 +2942,12 @@ EOF *) continue ;; esac case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; esac case " $deplibs " in - *" $path "*) ;; - *) deplibs="$deplibs $path" ;; + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no @@ -3124,7 +3214,7 @@ EOF case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -3133,7 +3223,7 @@ EOF case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -3142,7 +3232,7 @@ EOF case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -3321,9 +3411,9 @@ EOF # Eliminate all temporary directories. for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` - deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` done if test -n "$xrpath"; then @@ -3376,7 +3466,12 @@ EOF ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. @@ -3420,11 +3515,11 @@ EOF int main() { return 0; } EOF $rm conftest - $LTCC -o conftest conftest.c $deplibs + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3461,11 +3556,11 @@ EOF # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC -o conftest conftest.c $i + $LTCC $LTCFLAGS -o conftest conftest.c $i # Did it work? if test "$?" -eq 0 ; then ldd_output=`ldd conftest` @@ -3513,7 +3608,7 @@ EOF set dummy $deplibs_check_method file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3582,7 +3677,7 @@ EOF set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3712,6 +3807,35 @@ EOF deplibs=$newdeplibs fi + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -3795,6 +3919,7 @@ EOF fi lib="$output_objdir/$realname" + linknames= for link do linknames="$linknames $link" @@ -3823,6 +3948,9 @@ EOF # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break fi done IFS="$save_ifs" @@ -3892,7 +4020,8 @@ EOF fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -3927,7 +4056,7 @@ EOF do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*"` && + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else @@ -4017,13 +4146,30 @@ EOF IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + exit $EXIT_SUCCESS fi @@ -4205,6 +4351,35 @@ EOF ;; esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" @@ -4249,10 +4424,15 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac done @@ -4368,11 +4548,23 @@ extern \"C\" { if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac else - $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac fi fi @@ -4489,16 +4681,29 @@ static const void *lt_preloaded_setup() { esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 @@ -4523,7 +4728,7 @@ static const void *lt_preloaded_setup() { # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" - status=$? + exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then @@ -4531,7 +4736,7 @@ static const void *lt_preloaded_setup() { $run $rm "$output_objdir/${outputname}S.${objext}" fi - exit $status + exit $exit_status fi if test -n "$shlibpath_var"; then @@ -4671,10 +4876,12 @@ static const void *lt_preloaded_setup() { esac case $host in *cygwin* | *mingw* ) - cwrappersource=`$echo ${objdir}/lt-${outputname}.c` - cwrapper=`$echo ${output}.exe` - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource < #include #include +#include +#include +#include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX @@ -4709,15 +4919,19 @@ EOF #endif #ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) -#define HAVE_DOS_BASED_FILE_SYSTEM -#ifndef DIR_SEPARATOR_2 -#define DIR_SEPARATOR_2 '\\' -#endif +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif #endif #ifndef DIR_SEPARATOR_2 @@ -4727,17 +4941,32 @@ EOF (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); -char * basename (const char *name); -char * fnqualify(const char *path); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); @@ -4747,29 +4976,51 @@ main (int argc, char *argv[]) char **newargz; int i; - program_name = (char *) xstrdup ((char *) basename (argv[0])); + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF - cat >> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = fnqualify(argv[0]); + cat >> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + cat >> $cwrappersource <<"EOF" + return 127; } void * @@ -4789,48 +5040,148 @@ xstrdup (const char *string) ; } -char * -basename (const char *name) +const char * +base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha (name[0]) && name[1] == ':') + if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; - return (char *) base; + return base; } +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ char * -fnqualify(const char *path) +find_executable (const char* wrapper) { - size_t size; - char *p; + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; - assert(path != NULL); + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - /* Is it qualified already? */ + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha (path[0]) && path[1] == ':') - return xstrdup (path); + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } #endif - if (IS_DIR_SEPARATOR (path[0])) - return xstrdup (path); - /* prepend the current directory */ - /* doesn't handle '~' */ + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); - size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ - p = XMALLOC(char, size); - sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); - return p; + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; } char * @@ -4874,16 +5225,16 @@ lt_fatal (const char *message, ...) va_end (ap); } EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL @@ -5033,13 +5384,13 @@ else # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} + exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac @@ -5049,7 +5400,7 @@ else fi else # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE @@ -5091,6 +5442,63 @@ fi\ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && @@ -5104,20 +5512,7 @@ fi\ objlist= concat_cmds= save_oldobjs=$oldobjs - # GNU ar 2.10+ was changed to match POSIX; thus no paths are - # encoded into archives. This makes 'ar r' malfunction in - # this piecewise linking case whenever conflicting object - # names appear in distinct ar calls; check, warn and compensate. - if (for obj in $save_oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 - $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 - AR_FLAGS=cq - fi + # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do @@ -5128,7 +5523,7 @@ fi\ oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*"` && + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else @@ -5325,11 +5720,11 @@ relink_command=\"$relink_command\"" # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5338,14 +5733,14 @@ relink_command=\"$relink_command\"" shift else install_prog= - arg="$nonopt" + arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5363,28 +5758,31 @@ relink_command=\"$relink_command\"" do if test -n "$dest"; then files="$files $dest" - dest="$arg" + dest=$arg continue fi case $arg in -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; - -*) ;; - + -*) + ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else - dest="$arg" + dest=$arg continue fi ;; @@ -5393,7 +5791,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5562,11 +5960,14 @@ relink_command=\"$relink_command\"" if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi @@ -5579,7 +5980,16 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" fi @@ -5673,17 +6083,15 @@ relink_command=\"$relink_command\"" notinst_deplibs= relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac # Check the variables that should have been set. @@ -5711,34 +6119,21 @@ relink_command=\"$relink_command\"" done relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - save_umask=`umask` - umask 0077 - if $mkdir "$tmpdir"; then - umask $save_umask - else - umask $save_umask - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi + tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. @@ -5762,7 +6157,7 @@ relink_command=\"$relink_command\"" fi # remove .exe since cygwin /usr/bin/install will append another - # one anyways + # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in @@ -5862,7 +6257,7 @@ relink_command=\"$relink_command\"" # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" @@ -5895,7 +6290,7 @@ relink_command=\"$relink_command\"" $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; @@ -6112,9 +6507,17 @@ relink_command=\"$relink_command\"" rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - if test "$mode" = uninstall; then + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds @@ -6147,7 +6550,8 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; @@ -6446,12 +6850,11 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes +disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index cbc10e0..ff565a6 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -86,6 +86,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -130,12 +131,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -152,23 +150,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/src/Makefile.in b/src/Makefile.in index 3532b5c..cc8ca9f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -124,6 +124,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -168,12 +169,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -190,23 +188,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 97caadc..a1b15d3 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -35,7 +35,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,7,0); + return RTPLibraryVersion(3,7,1); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index a7fe8eb..527ef87 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -118,6 +118,10 @@ class RTPTime bool operator<=(const RTPTime &t) const; bool operator>=(const RTPTime &t) const; private: +#if (defined(WIN32) || defined(_WIN32_WCE)) + static inline unsigned __int64 CalculateMicroseconds(unsigned __int64 performancecount,unsigned __int64 performancefrequency); +#endif // WIN32 || _WIN32_WCE + uint32_t sec,microsec; }; @@ -150,6 +154,16 @@ inline RTPTime::RTPTime(RTPNTPTime ntptime) #if (defined(WIN32) || defined(_WIN32_WCE)) +inline unsigned __int64 RTPTime::CalculateMicroseconds(unsigned __int64 performancecount,unsigned __int64 performancefrequency) +{ + unsigned __int64 f = performancefrequency; + unsigned __int64 a = performancecount; + unsigned __int64 b = a/f; + unsigned __int64 c = a%f; // a = b*f+c => (a*1000000)/f = b*1000000+(c*1000000)/f + + return b*1000000ui64+(c*1000000ui64)/f; +} + inline RTPTime RTPTime::CurrentTime() { static int inited = 0; @@ -171,10 +185,10 @@ inline RTPTime RTPTime::CurrentTime() SystemTimeToFileTime(&systemtime,&filetime); microseconds = ( ((unsigned __int64)(filetime.dwHighDateTime) << 32) + (unsigned __int64)(filetime.dwLowDateTime) ) / 10ui64; microseconds-= 11644473600000000ui64; // EPOCH - initmicroseconds = ( ( performancecount.QuadPart * 1000000ui64 ) / performancefrequency.QuadPart ); + initmicroseconds = CalculateMicroseconds(performancecount.QuadPart, performancefrequency.QuadPart); } - emulate_microseconds = ( ( performancecount.QuadPart * 1000000ui64 ) / performancefrequency.QuadPart ); + emulate_microseconds = CalculateMicroseconds(performancecount.QuadPart, performancefrequency.QuadPart); microdiff = emulate_microseconds - initmicroseconds; diff --git a/tools/Makefile.in b/tools/Makefile.in index d4cf49a..0212120 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -75,6 +75,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -119,12 +120,9 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -141,23 +139,30 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ From e77dcc77c04841ad844c82942370ff3616bc18d7 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 014/136] Import of version 3.8.0 --- ChangeLog | 33 +- Doxyfile | 260 ++- Makefile.in | 4 +- README.TXT | 33 +- aclocal.m4 | 544 ++++-- config.guess | 73 +- config.sub | 83 +- configure | 2938 +++++++++++------------------ configure.in | 66 +- doc/Makefile.in | 4 +- doc/jrtplib.css | 228 ++- doc/jrtplib.h | 13 +- examples/Makefile.in | 4 +- examples/example1.cpp | 1 - examples/example5.cpp | 2 +- jrtplib.dsp | 40 +- jrtplib.vcproj | 82 +- jrtplib_wce.vcproj | 40 +- jrtplib_wce5.vcproj | 44 +- ltmain.sh | 239 ++- pkgconfig/Makefile.in | 4 +- src/Makefile.am | 6 +- src/Makefile.in | 14 +- src/rtcpapppacket.cpp | 4 +- src/rtcpapppacket.h | 4 +- src/rtcpbyepacket.cpp | 5 +- src/rtcpbyepacket.h | 4 +- src/rtcpcompoundpacket.cpp | 4 +- src/rtcpcompoundpacket.h | 4 +- src/rtcpcompoundpacketbuilder.cpp | 137 +- src/rtcpcompoundpacketbuilder.h | 16 +- src/rtcppacket.cpp | 4 +- src/rtcppacket.h | 4 +- src/rtcppacketbuilder.cpp | 4 +- src/rtcppacketbuilder.h | 4 +- src/rtcprrpacket.cpp | 4 +- src/rtcprrpacket.h | 4 +- src/rtcpscheduler.cpp | 8 +- src/rtcpscheduler.h | 11 +- src/rtcpsdesinfo.cpp | 4 +- src/rtcpsdesinfo.h | 4 +- src/rtcpsdespacket.cpp | 5 +- src/rtcpsdespacket.h | 4 +- src/rtcpsrpacket.cpp | 4 +- src/rtcpsrpacket.h | 4 +- src/rtcpunknownpacket.h | 4 +- src/rtpaddress.h | 4 +- src/rtpcollisionlist.cpp | 4 +- src/rtpcollisionlist.h | 4 +- src/rtpconfig.h | 4 +- src/rtpconfig_unix.h.in | 10 +- src/rtpconfig_win.h | 6 +- src/rtpdebug.cpp | 4 +- src/rtpdebug.h | 4 +- src/rtpdefines.h | 4 +- src/rtperrors.cpp | 10 +- src/rtperrors.h | 9 +- src/rtphashtable.h | 4 +- src/rtpinternalsourcedata.cpp | 4 +- src/rtpinternalsourcedata.h | 4 +- src/rtpipv4address.cpp | 4 +- src/rtpipv4address.h | 4 +- src/rtpipv4destination.h | 8 +- src/rtpipv6address.cpp | 4 +- src/rtpipv6address.h | 4 +- src/rtpipv6destination.h | 12 +- src/rtpkeyhashtable.h | 4 +- src/rtplibraryversion.cpp | 7 +- src/rtplibraryversion.h | 4 +- src/rtpmemorymanager.h | 4 +- src/rtpmemoryobject.h | 4 +- src/rtppacket.cpp | 5 +- src/rtppacket.h | 4 +- src/rtppacketbuilder.cpp | 8 +- src/rtppacketbuilder.h | 18 +- src/rtppollthread.cpp | 10 +- src/rtppollthread.h | 4 +- src/rtprandom.cpp | 294 +-- src/rtprandom.h | 29 +- src/rtprandomrand48.cpp | 120 ++ src/rtprandomrand48.h | 70 + src/rtprandomrands.cpp | 199 ++ src/rtprandomrands.h | 65 + src/rtprandomurandom.cpp | 117 ++ src/rtprandomurandom.h | 63 + src/rtprawpacket.h | 4 +- src/rtpsession.cpp | 194 +- src/rtpsession.h | 43 +- src/rtpsessionparams.cpp | 7 +- src/rtpsessionparams.h | 27 +- src/rtpsessionsources.cpp | 4 +- src/rtpsessionsources.h | 4 +- src/rtpsourcedata.cpp | 54 +- src/rtpsourcedata.h | 4 +- src/rtpsources.cpp | 6 +- src/rtpsources.h | 4 +- src/rtpstructs.h | 4 +- src/rtptimeutilities.cpp | 4 +- src/rtptimeutilities.h | 6 +- src/rtptransmitter.h | 4 +- src/rtptypes.h | 4 +- src/rtptypes_win.h | 4 +- src/rtpudpv4transmitter.cpp | 14 +- src/rtpudpv4transmitter.h | 4 +- src/rtpudpv6transmitter.cpp | 16 +- src/rtpudpv6transmitter.h | 4 +- tools/Makefile.in | 4 +- tools/gettypes.cpp | 25 +- 108 files changed, 3682 insertions(+), 2907 deletions(-) create mode 100644 src/rtprandomrand48.cpp create mode 100644 src/rtprandomrand48.h create mode 100644 src/rtprandomrands.cpp create mode 100644 src/rtprandomrands.h create mode 100644 src/rtprandomurandom.cpp create mode 100644 src/rtprandomurandom.h diff --git a/ChangeLog b/ChangeLog index 1867f2c..bc260c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,33 @@ - May 23, 2007 + September 30, 2010 JRTPLIB ChangeLog ----------- + 3.8.0 (September 2010) + * Fixed bug in RTPSources implementation. An incorrect + 'GotoNextElement' call was replaced by a 'GotoPreviousElement' + call. + * Added functionality to send unknown RTCP packets. Patch + was supplied by Tom Harper (d.thomas.harper@gmail.com) + * Fixed bug in INF_GetEstimatedTimestampUnit (possibility of + division by zero). Thanks to Gilson Yi (gilson.yi@gmail.com) + for bringing this to my attention. + * Added some code to allow a specific SSRC to be used. + * Fixed bug in jitter calculation code. Thanks to Uwe Andersen + (uandersen@mayah.com) for bringing this to my attention. + * Added OnPollThreadStart and OnPollThreadStop to RTPSession. + Thanks to Daniele Barzotti (daniele.barzotti@eurocomtel.com) + for suggesting this. + * Added method to RTPSessionParams to force a specific CNAME. + Thanks to Lars Rohwedder (L.Rohwedder@mocotec.de) for the + suggestion. + * Removed old RTPRandom code and made RTPRandom an abstract + interface. Added a /dev/urandom implementation, a rand_s + implementation and a rand48 implementation. By default, + /dev/urandom and rand_s are tried, and rand48 is used as a + fall-back mechanism. 3.7.1 (May 2007) * Fixed bug in the CurrentTime implementation (Win32/WinCE version). @@ -224,7 +247,7 @@ * Added the possibility to set the timestamp unit for a particular source. Previously, it was assumed that their timestamp unit was the same as that of the local session. - + 2.4 (July 2000) * Fixed a bug which caused all CSRS's except one to be incorrect. * Added RTP header extension support (for both sending and receiving). @@ -248,7 +271,7 @@ and much more understandable :) * Added better support for RTCP 'APP' packets. You can now both send and receive APP packets. - + 2.3 (April 2000) * The routine which creates and sends RTCP packets is now a bit faster. * Added a sample that demonstrates the round-trip time function. @@ -275,7 +298,7 @@ * Added multicasting support. * A bug in rtpsourcedata.cpp was pointed out and fixed by Ramon Clout (ramonc@win.tue.nl). Many thanks for this, Ramon. - + 2.2 (February 2000) * Extra support for Sun and HP. Thanks to Henry Lau (hlau@nuera.com) and Justin Matthews (jmatthews@nuera.com) for this information. @@ -296,7 +319,7 @@ 2.0 (August 1999) * First decent implementation of RTP. Entirely rewritten since 1.0. - + 1.0 (August 1999) * First implementation of RTP. There were a lot of things that weren't quite right and the organisation of the classes was quite nasty. diff --git a/Doxyfile b/Doxyfile index 1cecca1..3fe8770 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.4.4 +# Doxyfile 1.5.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,6 +14,14 @@ # Project related configuration options #--------------------------------------------------------------------------- +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. @@ -23,7 +31,7 @@ PROJECT_NAME = jrtplib # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.7.1 +PROJECT_NUMBER = 3.8.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -45,24 +53,15 @@ CREATE_SUBDIRS = NO # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# and Ukrainian. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). @@ -135,11 +134,19 @@ SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. @@ -161,13 +168,6 @@ DETAILS_AT_TOP = NO INHERIT_DOCS = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. @@ -195,13 +195,52 @@ ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to @@ -210,6 +249,16 @@ OPTIMIZE_OUTPUT_JAVA = NO SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -244,6 +293,14 @@ EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the @@ -319,6 +376,12 @@ SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, @@ -376,16 +439,16 @@ SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is YES. +# in the documentation. The default is NO. SHOW_DIRECTORIES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = @@ -452,12 +515,20 @@ WARN_LOGFILE = INPUT = src/ doc/ +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.h @@ -487,6 +558,14 @@ EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). @@ -572,6 +651,13 @@ REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source @@ -659,11 +745,44 @@ HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be @@ -966,7 +1085,7 @@ MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. +# PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO @@ -1003,7 +1122,9 @@ PREDEFINED = RTP_SUPPORT_IPV4MULTICAST \ RTP_SUPPORT_IPV6 \ RTP_SUPPORT_IPV6MULTICAST \ RTP_SUPPORT_SENDAPP \ - RTP_SUPPORT_MEMORYMANAGEMENT + RTP_SUPPORT_MEMORYMANAGEMENT \ + RTP_SUPPORT_RTCPUNKNOWN + # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. @@ -1076,6 +1197,15 @@ PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. @@ -1133,14 +1263,22 @@ INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. @@ -1170,39 +1308,31 @@ DOT_PATH = DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -MAX_DOT_GRAPH_HEIGHT = 1024 +DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). +# background. This is enabled by default, which results in a transparent +# background. Warning: Depending on the platform used, enabling this option +# may lead to badly anti-aliased labels on the edges of a graph (i.e. they +# become hard to read). DOT_TRANSPARENT = NO diff --git a/Makefile.in b/Makefile.in index f905e31..ca1b0c5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -128,7 +128,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -136,10 +135,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/README.TXT b/README.TXT index 0be4326..7fca21b 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - May 23, 2007 + September 30, 2010 - JRTPLIB (v3.7.1) + JRTPLIB (v3.8.0) Developed at the The Expertise Centre for @@ -24,9 +24,8 @@ If you have questions about the library, you can mail me at: jori.liesenborgs@gmail.com There is also a mailing list for the library. To subscribe to the list, -send an e-mail with the text 'subscribe jrtplib' as the message body (not -the subject) to majordomo@edm.uhasselt.be and you'll receive further -instructions. +just send an e-mail to jrtplib-subscribe@edm.uhasselt.be and you'll +receive further instructions. ACKNOWLEDGMENT ============== @@ -64,17 +63,15 @@ INSTALLATION NOTES * To compile the library on an MS-Windows platfrom: Visual Studio workspace files are included. The project will search - for JThread files in ..\jthread-1.1.2 + for JThread files in ..\jthread-1.2.1 To compile the library without using JThread, comment the line with RTP_SUPPORT_THREAD in rtpconfig_win.h Note that for Visual Studio 6, you must have service pack 6 for installed to be able to compile the library. -* For a manual about the library, please refer to doc/ subdirectory. - Using 'make doc', a PDF version of the documentation will be built. - Note that you'll need to have the pdflatex LaTeX compiler installed. - Alternatively, you can download the documentation from the homepage: - http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.pdf +* The library documentation can be generated using Doxygen. An on-line + version can be found at + http://research.edm.uhasselt.be/jori/jrtplib/documentation/index.html * For systems with low memory or for applications which will involve only a few participants at a time: @@ -95,7 +92,7 @@ INSTALLATION NOTES If set, assume big-endian byte ordering. - RTP_SOCKLENTYPE_UINT: Indicates that getsockname used an unsigned int as its - third parameter. + third parameter. - RTP_HAVE_SOCKADDR_LEN: Indicates that struct sockaddr has an sa_len field. - RTP_SUPPORT_IPV4MULTICAST: @@ -106,12 +103,7 @@ INSTALLATION NOTES Enables support for RTCP SDES private items. - RTP_SUPPORT_PROBATION: If set, a few consecutive RTP packets are needed to validate - a member. - - RTP_SUPPORT_GNUDRAND: - If set, the RTPRandom class will use drand48_r and srand48_r - - RTP_SUPPORT_RANDR: - If set and RTP_SUPPORT_GNUDRAND is not set, the RTPRandom - class will use rand_r. + a member. - RTP_SUPPORT_GETLOGINR: If set, the library will use getlogin_r instead of getlogin. - RTP_SUPPORT_IPV6: @@ -122,8 +114,11 @@ INSTALLATION NOTES If set, sending of RTCP app packets is enabled. - RTP_SUPPORT_MEMORYMANAGEMENT: If set, the memory management system is enabled. + - RTP_SUPPORT_RTCPUNKNOWN: + If set, sending of unknown RTCP packets is enabled. - RTPDEBUG: - Enables some memory tracking functions and some debug routines. + Enables some memory tracking functions and some debug + routines. ------------------------------------------------------------------------------ diff --git a/aclocal.m4 b/aclocal.m4 index 4723f85..3ff4c2b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,7 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 48 AC_PROG_LIBTOOL +# serial 51 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -176,7 +176,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -263,8 +263,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -276,8 +277,9 @@ $rm conftest* # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -293,12 +295,20 @@ $rm conftest* # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -529,13 +539,17 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -552,6 +566,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *64-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -623,7 +640,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -664,11 +681,12 @@ fi # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -782,24 +800,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac ]) @@ -1026,7 +1047,8 @@ fi # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1034,7 +1056,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1174,6 +1196,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1191,7 +1214,8 @@ fi # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1205,20 +1229,58 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -1375,12 +1437,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1397,18 +1455,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -1446,7 +1492,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1509,7 +1555,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1564,7 +1610,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -1580,7 +1626,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1593,18 +1639,6 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -1686,6 +1720,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -1791,7 +1829,8 @@ fi # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2052,7 +2091,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognise shared library +# find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2115,7 +2154,7 @@ fi # AC_PATH_MAGIC # ------------- -# find a file program which can recognise a shared library +# find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2262,7 +2301,7 @@ esac # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +[AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2301,16 +2340,22 @@ cygwin*) mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -2348,7 +2393,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; @@ -2364,7 +2409,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -2398,6 +2443,10 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2450,7 +2499,7 @@ AC_DEFUN([AC_PROG_NM], lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do @@ -2666,10 +2715,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -2771,10 +2820,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2920,7 +2969,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3079,10 +3128,10 @@ case $host_os in case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3116,7 +3165,7 @@ case $host_os in freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -3165,9 +3214,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3235,7 +3282,7 @@ case $host_os in ;; esac ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3275,7 +3322,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -3355,6 +3402,29 @@ case $host_os in # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -3393,16 +3463,20 @@ case $host_os in _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -3564,15 +3638,10 @@ case $host_os in case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3619,6 +3688,12 @@ case $host_os in fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -3862,7 +3937,7 @@ $rm -f confest.$objext # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix3*) +interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_AC_TAGVAR(predep_objects,$1)= @@ -3870,13 +3945,46 @@ interix3*) _LT_AC_TAGVAR(postdeps,$1)= ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;; @@ -3925,10 +4033,17 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4007,10 +4122,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4063,7 +4178,7 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4152,6 +4267,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4198,7 +4314,7 @@ ifelse([$1], [], # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4523,7 +4639,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4606,6 +4722,7 @@ fi # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -4642,7 +4759,7 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -4832,12 +4949,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -4849,7 +4968,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -4915,7 +5034,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4958,7 +5077,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4985,6 +5104,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac ;; esac ;; @@ -5105,13 +5232,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; @@ -5121,7 +5250,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5179,7 +5308,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -5212,7 +5341,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5231,6 +5360,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; esac ;; @@ -5240,6 +5385,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5334,7 +5483,8 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -5351,7 +5501,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5490,7 +5640,7 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -5508,7 +5658,7 @@ EOF fi ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -5523,7 +5673,7 @@ EOF _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5541,13 +5691,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5587,7 +5746,7 @@ EOF sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5706,7 +5865,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5799,7 +5958,7 @@ _LT_EOF # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -5841,10 +6000,10 @@ _LT_EOF case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -5884,7 +6043,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -6006,24 +6165,28 @@ _LT_EOF ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -6082,17 +6245,16 @@ _LT_EOF case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6149,7 +6311,7 @@ _LT_EOF fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6224,7 +6386,7 @@ x|xyes) # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6327,6 +6489,30 @@ AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # @@ -6347,12 +6533,13 @@ do test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6385,6 +6572,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) diff --git a/config.guess b/config.guess index e3ef63f..951383e 100755 --- a/config.guess +++ b/config.guess @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-13' +timestamp='2007-05-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -106,7 +107,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -764,12 +769,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -779,9 +791,15 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -817,6 +835,9 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -851,7 +872,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -870,7 +895,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -925,6 +954,9 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -967,7 +999,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -977,7 +1009,11 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1179,6 +1215,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff --git a/config.sub b/config.sub index 2851647..c060f44 100755 --- a/config.sub +++ b/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-11' +timestamp='2007-04-29' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -240,15 +241,16 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,26 +270,25 @@ case $basic_machine in | mn10200 | mn10300 \ | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -317,18 +318,18 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -350,29 +351,28 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - m32c-*) - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -683,6 +683,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -818,6 +822,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -904,6 +914,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -915,6 +929,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1120,7 +1137,7 @@ case $basic_machine in sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1193,7 +1210,8 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1208,7 +1226,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1360,6 +1378,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1369,9 +1393,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1397,6 +1421,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/configure b/configure index 6124649..b9cc286 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60. +# Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -10,7 +10,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -19,10 +20,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -215,7 +219,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -233,7 +237,6 @@ IFS=$as_save_IFS # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -242,10 +245,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -253,7 +258,6 @@ _ASEOF CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -262,10 +266,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -512,19 +518,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -719,36 +734,36 @@ ac_unique_file="configure.in" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" @@ -834,6 +849,7 @@ AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE +SED GREP EGREP LN_S @@ -863,14 +879,13 @@ RTP_SUPPORT_THREAD RTP_SUPPORT_SDESPRIV RTP_SUPPORT_INLINETEMPLATEPARAM RTP_SUPPORT_PROBATION -RTP_SUPPORT_GNUDRAND -RTP_SUPPORT_RANDR RTP_SUPPORT_GETLOGINR RTP_SUPPORT_IPV6 RTP_SUPPORT_IPV6MULTICAST RTP_SUPPORT_IFADDRS RTP_SUPPORT_SENDAPP RTP_SUPPORT_MEMORYMANAGEMENT +RTP_SUPPORT_RTCPUNKNOWN RTP_LINKLIBS LIBOBJS LTLIBOBJS' @@ -881,6 +896,7 @@ target_alias CC CFLAGS LDFLAGS +LIBS CPPFLAGS CPP CXX @@ -994,10 +1010,10 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -1013,10 +1029,10 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1210,19 +1226,19 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1476,6 +1492,7 @@ Optional Features: --disable-sdespriv Disable support for SDES PRIV items --disable-probation Disable support for probation of a new source --disable-sendapp Disable support for sending RTCP APP packets + --enable-rtcpunknown Disable support for sending unknown RTCP packets --disable-memory Disable support for memory management --disable-jthread Disable support for JThread --disable-IPv6 Disable support for IPv6 @@ -1494,6 +1511,7 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1567,7 +1585,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.60 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1581,7 +1599,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1993,7 +2011,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2159,7 +2177,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2242,7 +2260,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.7.1 + VERSION=3.8.0 cat >>confdefs.h <<_ACEOF @@ -2294,7 +2312,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2334,7 +2352,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2399,13 +2417,12 @@ RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" RTP_SUPPORT_THREAD="// No support for jthread" RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" -RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" -RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" +RTP_SUPPORT_RTCPUNKNOWN="// No support for sending unknown RTCP packets" RTP_LINKLIBS="" RTP_CHECK_JTHREADLINK="no" @@ -2664,7 +2681,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2704,7 +2721,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2761,7 +2778,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2802,7 +2819,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2860,7 +2877,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2904,7 +2921,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3045,7 +3062,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -3073,6 +3090,12 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3084,8 +3107,6 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -3263,27 +3284,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -3338,27 +3342,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3393,27 +3380,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -3449,27 +3419,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3585,27 +3538,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -3765,12 +3701,13 @@ do test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3805,6 +3742,7 @@ done fi SED=$lt_cv_path_SED + { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } @@ -3829,7 +3767,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3911,7 +3849,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4166,8 +4104,8 @@ else echo "${ECHO_T}no, using $LN_S" >&6; } fi -{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4208,16 +4146,22 @@ cygwin*) mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -4255,7 +4199,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; @@ -4271,7 +4215,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -4305,6 +4249,10 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -4392,7 +4340,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4395 "configure"' > conftest.$ac_ext + echo '#line 4343 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4427,7 +4375,8 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4438,6 +4387,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -4454,6 +4406,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *64-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -4516,27 +4471,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 @@ -4545,7 +4484,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4639,17 +4578,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -4683,17 +4615,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -4758,17 +4683,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -4802,17 +4720,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -4883,27 +4794,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -5079,27 +4973,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -5162,27 +5039,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5218,17 +5078,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5315,7 +5168,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5359,7 +5212,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5472,27 +5325,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -5547,27 +5383,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -5602,27 +5421,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -5658,27 +5460,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -5881,17 +5666,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -5925,17 +5703,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6000,17 +5771,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -6044,17 +5808,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6095,7 +5852,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -6113,7 +5870,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6139,7 +5896,7 @@ fi fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -6157,7 +5914,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6264,27 +6021,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -6327,27 +6067,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 @@ -6474,24 +6197,27 @@ else fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac @@ -6508,6 +6234,7 @@ fi + # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } @@ -6545,7 +6272,7 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -6802,7 +6529,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6842,7 +6569,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6898,7 +6625,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6938,7 +6665,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6994,7 +6721,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7034,7 +6761,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7096,7 +6823,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -7296,10 +7023,10 @@ objext=o objext=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. @@ -7314,13 +7041,13 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -7340,7 +7067,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -7351,11 +7078,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7354: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7081: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7358: \$? = $ac_status" >&5 + echo "$as_me:7085: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7406,13 +7133,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; @@ -7422,7 +7151,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -7480,7 +7209,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -7513,7 +7242,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' @@ -7532,6 +7261,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; esac ;; @@ -7541,6 +7286,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-non_shared' ;; + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -7608,7 +7357,7 @@ if test "${lt_prog_compiler_pic_works+set}" = set; then else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -7619,11 +7368,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7622: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7371: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7626: \$? = $ac_status" >&5 + echo "$as_me:7375: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7672,7 +7421,7 @@ else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -7712,7 +7461,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -7723,11 +7472,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7726: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7475: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7730: \$? = $ac_status" >&5 + echo "$as_me:7479: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7919,7 +7668,7 @@ EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -7937,7 +7686,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' @@ -7952,7 +7701,7 @@ EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -7970,13 +7719,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no @@ -8135,7 +7893,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct=yes + : else # We have old collect2 hardcode_direct=unsupported @@ -8203,33 +7961,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8237,7 +7986,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -8278,33 +8027,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8312,7 +8052,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -8358,7 +8098,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; @@ -8400,10 +8140,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -8443,7 +8183,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -8565,24 +8305,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs=no fi ;; @@ -8641,17 +8385,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs=yes ;; @@ -8708,7 +8451,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no @@ -8785,7 +8528,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -8843,17 +8586,55 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -9013,12 +8794,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -9035,18 +8812,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9084,7 +8849,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -9147,7 +8912,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -9202,7 +8967,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -9218,7 +8983,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -9231,18 +8996,6 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -9324,6 +9077,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -9477,6 +9234,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -9560,27 +9318,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9589,7 +9331,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9671,27 +9413,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9700,7 +9426,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 @@ -9750,27 +9476,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9779,7 +9489,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9851,27 +9561,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9880,7 +9574,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 @@ -9930,27 +9624,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9959,7 +9637,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10010,27 +9688,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -10039,7 +9701,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10090,27 +9752,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 @@ -10119,7 +9765,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10175,7 +9821,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6;} # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -10841,7 +10488,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols @@ -11010,10 +10657,10 @@ objext=o objext_CXX=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -11029,13 +10676,13 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -11294,7 +10941,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_CXX=yes + : else # We have old collect2 hardcode_direct_CXX=unsupported @@ -11362,33 +11009,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11396,7 +11034,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -11438,33 +11076,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11472,7 +11101,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -11583,10 +11212,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -11620,7 +11249,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -11669,9 +11298,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_CXX=: case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; @@ -11739,7 +11366,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - interix3*) + interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' @@ -11779,7 +11406,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -11859,6 +11486,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -11897,16 +11547,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no ;; openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -12068,15 +11722,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes @@ -12123,6 +11772,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -12314,7 +11969,7 @@ $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in -interix3*) +interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= @@ -12322,13 +11977,46 @@ interix3*) postdeps_CXX= ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi ;; esac ;; @@ -12365,12 +12053,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -12382,7 +12072,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -12448,7 +12138,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ;; esac ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -12491,7 +12181,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -12518,6 +12208,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_CXX='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac ;; esac ;; @@ -12632,7 +12330,7 @@ if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -12643,11 +12341,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12646: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12344: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12650: \$? = $ac_status" >&5 + echo "$as_me:12348: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12696,7 +12394,7 @@ else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12736,7 +12434,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -12747,11 +12445,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12750: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12448: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12754: \$? = $ac_status" >&5 + echo "$as_me:12452: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12817,7 +12515,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -12848,7 +12546,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -12906,20 +12604,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -13076,12 +12761,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -13098,18 +12778,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -13147,7 +12815,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -13210,7 +12878,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -13265,7 +12933,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -13281,7 +12949,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -13294,18 +12962,6 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -13387,6 +13043,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -13581,6 +13241,7 @@ if test -f "$ltmain"; then module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do @@ -13901,7 +13562,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -13992,10 +13653,17 @@ objext=o objext_F77=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -14011,13 +13679,13 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -14104,13 +13772,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; @@ -14120,7 +13790,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -14178,7 +13848,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' @@ -14211,7 +13881,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_F77='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' @@ -14230,6 +13900,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; esac ;; @@ -14239,6 +13925,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_F77='-non_shared' ;; + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -14306,7 +13996,7 @@ if test "${lt_prog_compiler_pic_works_F77+set}" = set; then else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -14317,11 +14007,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14320: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14010: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14324: \$? = $ac_status" >&5 + echo "$as_me:14014: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14370,7 +14060,7 @@ else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14410,7 +14100,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -14421,11 +14111,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14424: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14114: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14428: \$? = $ac_status" >&5 + echo "$as_me:14118: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14617,7 +14307,7 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -14635,7 +14325,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' @@ -14650,7 +14340,7 @@ EOF archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -14668,13 +14358,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no @@ -14833,7 +14532,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_F77=yes + : else # We have old collect2 hardcode_direct_F77=unsupported @@ -14891,33 +14590,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14925,7 +14615,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -14956,33 +14646,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14990,7 +14671,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -15036,7 +14717,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; @@ -15078,10 +14759,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -15121,7 +14802,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes @@ -15243,24 +14924,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_F77=no fi ;; @@ -15319,17 +15004,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_F77=yes ;; @@ -15386,7 +15070,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no @@ -15463,7 +15147,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -15521,20 +15205,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -15691,12 +15362,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -15713,18 +15379,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -15762,7 +15416,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -15825,7 +15479,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -15880,7 +15534,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -15896,7 +15550,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -15909,18 +15563,6 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -16002,6 +15644,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -16196,6 +15842,7 @@ if test -f "$ltmain"; then module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do @@ -16516,7 +16163,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -16574,10 +16221,10 @@ objext=o objext_GCJ=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -16593,13 +16240,13 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -16640,7 +16287,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -16651,11 +16298,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16654: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16301: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16658: \$? = $ac_status" >&5 + echo "$as_me:16305: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16706,13 +16353,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; @@ -16722,7 +16371,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -16780,7 +16429,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' @@ -16813,7 +16462,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_GCJ='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' @@ -16832,6 +16481,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; esac ;; @@ -16841,6 +16506,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_GCJ='-non_shared' ;; + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -16908,7 +16577,7 @@ if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -16919,11 +16588,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16922: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16591: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16926: \$? = $ac_status" >&5 + echo "$as_me:16595: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16972,7 +16641,7 @@ else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -17012,7 +16681,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -17023,11 +16692,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17026: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16695: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17030: \$? = $ac_status" >&5 + echo "$as_me:16699: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17219,7 +16888,7 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -17237,7 +16906,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' @@ -17252,7 +16921,7 @@ EOF archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -17270,13 +16939,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no @@ -17435,7 +17113,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_GCJ=yes + : else # We have old collect2 hardcode_direct_GCJ=unsupported @@ -17503,33 +17181,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17537,7 +17206,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -17578,33 +17247,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17612,7 +17272,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -17658,7 +17318,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; @@ -17700,10 +17360,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -17743,7 +17403,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes @@ -17865,24 +17525,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_GCJ=no fi ;; @@ -17941,17 +17605,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_GCJ=yes ;; @@ -18008,7 +17671,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no @@ -18085,7 +17748,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -18143,20 +17806,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -18313,12 +17963,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -18335,18 +17980,6 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -18384,7 +18017,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -18447,7 +18080,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -18502,7 +18135,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -18518,7 +18151,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -18531,18 +18164,6 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -18624,6 +18245,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -18818,6 +18443,7 @@ if test -f "$ltmain"; then module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do @@ -19138,7 +18764,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ @@ -19195,7 +18821,7 @@ objext=o objext_RC=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -19214,13 +18840,13 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -19298,6 +18924,7 @@ if test -f "$ltmain"; then module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do @@ -19618,7 +19245,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC @@ -19763,7 +19390,7 @@ fi if test "${enable_sendapp+set}" = set; then enableval=$enable_sendapp; if test "$enableval" = yes ; then - sendappupport="yes" + sendappsupport="yes" else sendappsupport="no" fi @@ -19779,6 +19406,26 @@ if test "$sendappsupport" = "yes" ; then fi +# Check whether --enable-rtcpunknown was given. +if test "${enable_rtcpunknown+set}" = set; then + enableval=$enable_rtcpunknown; + if test "$enableval" = yes ; then + rtcpunknownsupport="yes" + else + rtcpunknownsupport="no" + fi +else + + rtcpunknownsupport="no" + +fi + + +if test "$rtcpunknownsupport" = "yes" ; then + RTP_SUPPORT_RTCPUNKNOWN="#define RTP_SUPPORT_RTCPUNKNOWN" +fi + + # Check whether --enable-memory was given. if test "${enable_memory+set}" = set; then enableval=$enable_memory; @@ -19850,27 +19497,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then RTP_JTHREADINCLUDES="-I $withval" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" @@ -19936,27 +19566,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" @@ -20002,27 +19615,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -20034,7 +19631,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 echo "${ECHO_T}no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$oldldflags" fi @@ -20075,27 +19672,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -20131,17 +19711,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -20231,27 +19804,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -20287,17 +19843,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -20389,7 +19938,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -20410,27 +19960,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20465,27 +19998,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 @@ -20536,27 +20052,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -20696,27 +20195,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -20766,27 +20248,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6; } else @@ -20844,27 +20309,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -20914,27 +20362,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -20982,27 +20413,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -21044,27 +20458,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -21120,30 +20517,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - echo -e "#include \n#include " >src/rtptypes_unix.h + echo "#include " >src/rtptypes_unix.h + echo "#include " >>src/rtptypes_unix.h else echo "$as_me: failed program was:" >&5 @@ -21169,131 +20550,6 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for drand48_r and srand48_r" >&5 -echo $ECHO_N "checking for drand48_r and srand48_r... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF - - #include - int main(void) - { - struct drand48_data drandbuffer; - double x; - srand48_r(12345,&drandbuffer); - drand48_r(&drandbuffer,&x); - return 0; - } - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_SUPPORT_GNUDRAND="#define RTP_SUPPORT_GNUDRAND" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: checking for rand_r" >&5 -echo $ECHO_N "checking for rand_r... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - - #include - int main(void) - { - unsigned int x; - x = 12345; - rand_r(&x); - return 0; - } - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_SUPPORT_RANDR="#define RTP_SUPPORT_RANDR" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for getlogin_r" >&5 echo $ECHO_N "checking for getlogin_r... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF @@ -21320,27 +20576,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } RTP_SUPPORT_GETLOGINR="#define RTP_SUPPORT_GETLOGINR" @@ -21468,27 +20707,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -21555,27 +20777,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -21611,17 +20816,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -21694,7 +20892,6 @@ fi - ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc" @@ -21870,7 +21067,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21879,10 +21077,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -22106,19 +21307,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -22134,7 +21344,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22162,7 +21372,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -22181,7 +21391,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.60, +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -22437,6 +21647,7 @@ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim @@ -22451,7 +21662,6 @@ CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -22493,6 +21703,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim @@ -22507,14 +21718,13 @@ RTP_SUPPORT_THREAD!$RTP_SUPPORT_THREAD$ac_delim RTP_SUPPORT_SDESPRIV!$RTP_SUPPORT_SDESPRIV$ac_delim RTP_SUPPORT_INLINETEMPLATEPARAM!$RTP_SUPPORT_INLINETEMPLATEPARAM$ac_delim RTP_SUPPORT_PROBATION!$RTP_SUPPORT_PROBATION$ac_delim -RTP_SUPPORT_GNUDRAND!$RTP_SUPPORT_GNUDRAND$ac_delim -RTP_SUPPORT_RANDR!$RTP_SUPPORT_RANDR$ac_delim RTP_SUPPORT_GETLOGINR!$RTP_SUPPORT_GETLOGINR$ac_delim RTP_SUPPORT_IPV6!$RTP_SUPPORT_IPV6$ac_delim RTP_SUPPORT_IPV6MULTICAST!$RTP_SUPPORT_IPV6MULTICAST$ac_delim RTP_SUPPORT_IFADDRS!$RTP_SUPPORT_IFADDRS$ac_delim RTP_SUPPORT_SENDAPP!$RTP_SUPPORT_SENDAPP$ac_delim RTP_SUPPORT_MEMORYMANAGEMENT!$RTP_SUPPORT_MEMORYMANAGEMENT$ac_delim +RTP_SUPPORT_RTCPUNKNOWN!$RTP_SUPPORT_RTCPUNKNOWN$ac_delim RTP_LINKLIBS!$RTP_LINKLIBS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim diff --git a/configure.in b/configure.in index cb3710d..e0f4827 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.7.1) +AM_INIT_AUTOMAKE(jrtplib,3.8.0) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " @@ -11,13 +11,12 @@ RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" RTP_SUPPORT_THREAD="// No support for jthread" RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" -RTP_SUPPORT_GNUDRAND="// Not using drand48_r and srand48_r" -RTP_SUPPORT_RANDR="// Not using rand_r" RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" RTP_SUPPORT_IPV6="// No IPv6 support" RTP_SUPPORT_IFADDRS="// No ifaddrs support" RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" +RTP_SUPPORT_RTCPUNKNOWN="// No support for sending unknown RTCP packets" RTP_LINKLIBS="" RTP_CHECK_JTHREADLINK="no" @@ -75,7 +74,7 @@ dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(sendapp,[ --disable-sendapp Disable support for sending RTCP APP packets],[ if test "$enableval" = yes ; then - sendappupport="yes" + sendappsupport="yes" else sendappsupport="no" fi],[ @@ -86,6 +85,23 @@ if test "$sendappsupport" = "yes" ; then RTP_SUPPORT_SENDAPP="#define RTP_SUPPORT_SENDAPP" fi +dnl --------------------------------------------------------------------------- +dnl Check for RTCP unknown sending support +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(rtcpunknown,[ --enable-rtcpunknown Disable support for sending unknown RTCP packets],[ + if test "$enableval" = yes ; then + rtcpunknownsupport="yes" + else + rtcpunknownsupport="no" + fi],[ + rtcpunknownsupport="no" + ]) + +if test "$rtcpunknownsupport" = "yes" ; then + RTP_SUPPORT_RTCPUNKNOWN="#define RTP_SUPPORT_RTCPUNKNOWN" +fi + dnl --------------------------------------------------------------------------- dnl Check for memory management support dnl --------------------------------------------------------------------------- @@ -323,7 +339,8 @@ AC_TRY_COMPILE([ uint32_t x; x = 0;], [AC_MSG_RESULT(yes) - echo -e "#include \n#include " >src/rtptypes_unix.h + echo "#include " >src/rtptypes_unix.h + echo "#include " >>src/rtptypes_unix.h ],[ AC_MSG_RESULT(no) echo "Generating src/rtptypes.h ..." @@ -335,42 +352,6 @@ AC_TRY_COMPILE([ fi ]) -dnl --------------------------------------------------------------------------- -dnl Check random functions -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(for drand48_r and srand48_r) -AC_COMPILE_IFELSE([ - #include - int main(void) - { - struct drand48_data drandbuffer; - double x; - srand48_r(12345,&drandbuffer); - drand48_r(&drandbuffer,&x); - return 0; - } - ], - [AC_MSG_RESULT(yes) - RTP_SUPPORT_GNUDRAND="#define RTP_SUPPORT_GNUDRAND"], - [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for rand_r) - AC_COMPILE_IFELSE([ - #include - int main(void) - { - unsigned int x; - x = 12345; - rand_r(&x); - return 0; - } - ], - [ AC_MSG_RESULT(yes) - RTP_SUPPORT_RANDR="#define RTP_SUPPORT_RANDR"], - [ AC_MSG_RESULT(no)]) - ]) - dnl --------------------------------------------------------------------------- dnl Check getlogin_r functions dnl --------------------------------------------------------------------------- @@ -486,14 +467,13 @@ AC_SUBST(RTP_SUPPORT_THREAD) AC_SUBST(RTP_SUPPORT_SDESPRIV) AC_SUBST(RTP_SUPPORT_INLINETEMPLATEPARAM) AC_SUBST(RTP_SUPPORT_PROBATION) -AC_SUBST(RTP_SUPPORT_GNUDRAND) -AC_SUBST(RTP_SUPPORT_RANDR) AC_SUBST(RTP_SUPPORT_GETLOGINR) AC_SUBST(RTP_SUPPORT_IPV6) AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) AC_SUBST(RTP_SUPPORT_IFADDRS) AC_SUBST(RTP_SUPPORT_SENDAPP) AC_SUBST(RTP_SUPPORT_MEMORYMANAGEMENT) +AC_SUBST(RTP_SUPPORT_RTCPUNKNOWN) AC_SUBST(RTP_LINKLIBS) AC_OUTPUT(Makefile \ src/Makefile \ diff --git a/doc/Makefile.in b/doc/Makefile.in index 5dd87a7..0b8da2c 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -104,7 +104,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -112,10 +111,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/doc/jrtplib.css b/doc/jrtplib.css index 87d29e7..ea2a087 100644 --- a/doc/jrtplib.css +++ b/doc/jrtplib.css @@ -19,7 +19,10 @@ H3 { H4 { font-size: 100%; } -CAPTION { font-weight: bold } + +CAPTION { + font-weight: bold +} DIV.qindex { width: 100%; background-color: #e8eef2; @@ -29,7 +32,7 @@ DIV.qindex { padding: 2px; line-height: 140%; } -DIV.nav { +DIV.navpath { width: 100%; background-color: #e8eef2; border: 1px solid #84b0c7; @@ -75,17 +78,45 @@ A.qindexHL:hover { background-color: #6666cc; color: #ffffff; } -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} -A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} -A.codeRef:link { font-weight: normal; color: #0000FF} -A.codeRef:visited { font-weight: normal; color: #0000FF} -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } +A.qindexHL:visited { + text-decoration: none; + background-color: #6666cc; + color: #ffffff +} +A.el { + text-decoration: none; + font-weight: bold +} +A.elRef { + font-weight: bold +} +A.code:link { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.code:visited { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.codeRef:link { + font-weight: normal; + color: #0000FF +} +A.codeRef:visited { + font-weight: normal; + color: #0000FF +} +A:hover { + text-decoration: none; + background-color: #f2f2ff +} +DL.el { + margin-left: -1cm +} .fragment { - font-family: Fixed, monospace; + font-family: monospace, fixed; font-size: 95%; } PRE.fragment { @@ -100,22 +131,25 @@ PRE.fragment { padding-top: 4px; padding-bottom: 4px; } -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: #F4F4FB; font-weight: bold; } -TD.mdPrefix { - background-color: #F4F4FB; - color: #606060; - font-size: 80%; +DIV.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px } -TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } -TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } + DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold; } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: 90% +} BODY { background: white; color: black; @@ -149,11 +183,16 @@ TD.indexvalue { border: 1px solid #CCCCCC; } TR.memlist { - background-color: #f0f0f0; + background-color: #f0f0f0; +} +P.formulaDsp { + text-align: center; +} +IMG.formulaDsp { +} +IMG.formulaInl { + vertical-align: middle; } -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } SPAN.keyword { color: #008000 } SPAN.keywordtype { color: #604020 } SPAN.keywordflow { color: #e08000 } @@ -161,15 +200,13 @@ SPAN.comment { color: #800000 } SPAN.preprocessor { color: #806020 } SPAN.stringliteral { color: #002080 } SPAN.charliteral { color: #008080 } -.mdTable { - border: 1px solid #868686; - background-color: #F4F4FB; -} -.mdRow { - padding: 8px 10px; -} +SPAN.vhdldigit { color: #ff00ff } +SPAN.vhdlchar { color: #000000 } +SPAN.vhdlkeyword { color: #700070 } +SPAN.vhdllogic { color: #ff0000 } + .mdescLeft { - padding: 0px 8px 4px 8px; + padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; @@ -180,7 +217,7 @@ SPAN.charliteral { color: #008080 } margin: 0px; } .mdescRight { - padding: 0px 8px 4px 8px; + padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; @@ -277,23 +314,26 @@ SPAN.charliteral { color: #008080 } border-right-style: none; border-bottom-style: none; border-left-style: none; - color: #606060; + color: #606060; background-color: #FAFAFA; font-size: 80%; } -.search { color: #003399; - font-weight: bold; +.search { + color: #003399; + font-weight: bold; } FORM.search { - margin-bottom: 0px; - margin-top: 0px; + margin-bottom: 0px; + margin-top: 0px; } -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; +INPUT.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; } -TD.tiny { font-size: 75%; +TD.tiny { + font-size: 75%; } a { color: #1A41A8; @@ -301,15 +341,99 @@ a { a:visited { color: #2A3798; } -.dirtab { padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { + background: #e8eef2; + font-weight: bold; +} +HR { + height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { + font-size: 9pt; + font-weight: bold; +} +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} +.directory > h3 { + margin-top: 0; +} +.directory p { + margin: 0px; + white-space: nowrap; } -TH.dirtab { background: #e8eef2; - font-weight: bold; +.directory div { + display: none; + margin: 0px; } -HR { height: 1px; - border: none; - border-top: 1px solid black; +.directory img { + vertical-align: -30%; } diff --git a/doc/jrtplib.h b/doc/jrtplib.h index ebce471..8ccad38 100644 --- a/doc/jrtplib.h +++ b/doc/jrtplib.h @@ -24,7 +24,7 @@ * \subsection idea Design idea * * The library provides several classes which can be helpful in - * creating RTP applications. Most users will probably need just the + * creating RTP applications. Most users will probably only need the * RTPSession class for building an application. This class * provides the necessary functions for sending RTP data and handles * the RTCP part internally. @@ -90,9 +90,9 @@ * \section starting Getting started with the RTPSession class * * To use RTP, you'll have to create an RTPSession object. The constructor - * accepts one parameter, an instance of RTPMemoryManager. By default, no - * memory manager will be used. For now, we'll keep it simple, so this is - * our code so far: + * accepts two parameter, an instance of an RTPRandom object, and an instance + * of an RTPMemoryManager object. For now, we'll keep it simple and use the + * default settings, so this is our code so far: * * \code * RTPSession session; @@ -315,7 +315,7 @@ * * \code * MyMemoryManager mgr; - * RTPSession session(&mgr); + * RTPSession session(0, &mgr); * \endcode * * Now, all memory allocation and deallocation will be done using the AllocateBuffer @@ -340,8 +340,7 @@ * http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html * * There is also a mailing list for the library. To subscribe to the list, - * send an e-mail with the text \c subscribe \c jrtplib as the message body - * (not the subject) to \c majordomo(\c at)\c edm(\c dot)\c uhasselt(\c dot)\c be + * send an e-mail to \c jrtplib-subscribe(\c at)\c edm(\c dot)\c uhasselt(\c dot)\c be * and you'll receive further instructions. */ diff --git a/examples/Makefile.in b/examples/Makefile.in index 799dcca..2903436 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -143,7 +143,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -151,10 +150,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/examples/example1.cpp b/examples/example1.cpp index f90df9f..124da9f 100644 --- a/examples/example1.cpp +++ b/examples/example1.cpp @@ -4,7 +4,6 @@ */ #include "rtpsession.h" -#include "rtppacket.h" #include "rtpudpv4transmitter.h" #include "rtpipv4address.h" #include "rtpsessionparams.h" diff --git a/examples/example5.cpp b/examples/example5.cpp index 63ed042..573fead 100644 --- a/examples/example5.cpp +++ b/examples/example5.cpp @@ -119,7 +119,7 @@ int main(void) #endif // WIN32 MyMemoryManager mgr; - RTPSession sess(&mgr); + RTPSession sess(0, &mgr); uint16_t portbase,destport; uint32_t destip; std::string ipstr; diff --git a/jrtplib.dsp b/jrtplib.dsp index 793c76d..92b3392 100644 --- a/jrtplib.dsp +++ b/jrtplib.dsp @@ -173,6 +173,18 @@ SOURCE=.\src\rtprandom.cpp # End Source File # Begin Source File +SOURCE=.\src\rtprandomrand48.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\rtprandomrands.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\rtprandomurandom.cpp +# End Source File +# Begin Source File + SOURCE=.\src\rtpsession.cpp # End Source File # Begin Source File @@ -321,6 +333,14 @@ SOURCE=.\src\rtplibraryversion.h # End Source File # Begin Source File +SOURCE=.\src\rtpmemorymanager.h +# End Source File +# Begin Source File + +SOURCE=.\src\rtpmemoryobject.h +# End Source File +# Begin Source File + SOURCE=.\src\rtppacket.h # End Source File # Begin Source File @@ -337,6 +357,18 @@ SOURCE=.\src\rtprandom.h # End Source File # Begin Source File +SOURCE=.\src\rtprandomrand48.h +# End Source File +# Begin Source File + +SOURCE=.\src\rtprandomrands.h +# End Source File +# Begin Source File + +SOURCE=.\src\rtprandomurandom.h +# End Source File +# Begin Source File + SOURCE=.\src\rtprawpacket.h # End Source File # Begin Source File @@ -387,14 +419,6 @@ SOURCE=.\src\rtpudpv4transmitter.h SOURCE=.\src\rtpudpv6transmitter.h # End Source File -# Begin Source File - -SOURCE=.\src\rtpmemorymanager.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpmemoryobject.h -# End Source File # End Group # End Target # End Project diff --git a/jrtplib.vcproj b/jrtplib.vcproj index bec8bb8..d4b3d15 100644 --- a/jrtplib.vcproj +++ b/jrtplib.vcproj @@ -720,6 +720,60 @@ /> + + + + + + + + + + + + + + + + + + @@ -1037,6 +1091,14 @@ RelativePath="src\rtplibraryversion.h" > + + + + @@ -1053,6 +1115,18 @@ RelativePath="src\rtprandom.h" > + + + + + + @@ -1105,14 +1179,6 @@ RelativePath="src\rtpudpv6transmitter.h" > - - - - diff --git a/jrtplib_wce.vcproj b/jrtplib_wce.vcproj index e07dc17..1878645 100644 --- a/jrtplib_wce.vcproj +++ b/jrtplib_wce.vcproj @@ -260,6 +260,18 @@ RelativePath=".\src\rtprandom.cpp" > + + + + + + @@ -406,6 +418,14 @@ RelativePath=".\src\rtplibraryversion.h" > + + + + @@ -422,6 +442,18 @@ RelativePath=".\src\rtprandom.h" > + + + + + + @@ -474,14 +506,6 @@ RelativePath=".\src\rtpudpv6transmitter.h" > - - - - diff --git a/jrtplib_wce5.vcproj b/jrtplib_wce5.vcproj index 3263626..97b6612 100644 --- a/jrtplib_wce5.vcproj +++ b/jrtplib_wce5.vcproj @@ -260,6 +260,18 @@ RelativePath=".\src\rtprandom.cpp" > + + + + + + @@ -406,6 +418,18 @@ RelativePath=".\src\rtplibraryversion.h" > + + + + + + @@ -422,6 +446,18 @@ RelativePath=".\src\rtprandom.h" > + + + + + + @@ -474,14 +510,6 @@ RelativePath=".\src\rtpudpv6transmitter.h" > - - - - diff --git a/ltmain.sh b/ltmain.sh index 06823e0..b4583e7 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,14 +43,22 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -105,12 +113,14 @@ esac # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +146,8 @@ duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -196,7 +208,13 @@ func_win32_libid () if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -327,7 +345,17 @@ func_extract_archives () *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -454,11 +482,12 @@ do ;; --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -755,9 +784,10 @@ if test -z "$show_help"; then *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; + *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1168,9 @@ EOF for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1178,20 @@ EOF dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1600,7 +1639,7 @@ EOF continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1620,10 +1659,11 @@ EOF # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -pg pass through profiling flag for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1651,9 +1691,9 @@ EOF -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. + # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1712,7 +1752,7 @@ EOF continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2094,7 +2134,7 @@ EOF lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2490,7 +2530,9 @@ EOF if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -2892,9 +2934,9 @@ EOF $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi + #if test "$absdir" != "$libdir"; then + # $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + #fi path="$absdir" fi depdepl= @@ -3186,7 +3228,7 @@ EOF # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3197,9 +3239,10 @@ EOF age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; @@ -3258,7 +3301,8 @@ EOF versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) @@ -3272,8 +3316,11 @@ EOF ;; irix | nonstopux) - major=`expr $current - $age + 1` - + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3410,11 +3457,11 @@ EOF fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3562,12 @@ EOF int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3606,7 @@ EOF # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3638,7 @@ EOF droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3880,7 +3924,10 @@ EOF test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4239,12 +4286,14 @@ EOF reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4741,16 @@ static const void *lt_preloaded_setup() { case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4765,13 @@ static const void *lt_preloaded_setup() { # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4858,7 @@ static const void *lt_preloaded_setup() { if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4895,7 @@ static const void *lt_preloaded_setup() { fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5302,20 @@ EOF Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5458,7 @@ else ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5644,7 @@ fi\ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5989,9 @@ relink_command=\"$relink_command\"" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6200,7 @@ relink_command=\"$relink_command\"" file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6348,8 +6411,10 @@ relink_command=\"$relink_command\"" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi fi ;; @@ -6413,12 +6478,12 @@ relink_command=\"$relink_command\"" fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6840,9 @@ The following components of LINK-COMMAND are treated specially: -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6856,11 @@ The following components of LINK-COMMAND are treated specially: -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index ff565a6..0261e39 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -115,7 +115,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -123,10 +122,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/src/Makefile.am b/src/Makefile.am index 517d854..c95096f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,9 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - extratransmitters/rtpfaketransmitter.cpp + rtprandomrand48.cpp rtprandomurandom.cpp \ + rtprandomrands.cpp \ + extratransmitters/rtpfaketransmitter.cpp libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ @@ -30,6 +32,8 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ rtpmemorymanager.h rtpmemoryobject.h \ + rtprandomrand48.h rtprandomurandom.h \ + rtprandomrands.h \ extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in libjrtpincludedir = ${includedir}/jrtplib3 diff --git a/src/Makefile.in b/src/Makefile.in index cc8ca9f..ad14b0b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -67,6 +67,7 @@ am_libjrtp_la_OBJECTS = rtpdebug.lo rtpsession.lo rtperrors.lo \ rtcpcompoundpacketbuilder.lo rtprandom.lo rtcpscheduler.lo \ rtcppacketbuilder.lo rtpsessionsources.lo rtpcollisionlist.lo \ rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo \ + rtprandomrand48.lo rtprandomurandom.lo rtprandomrands.lo \ rtpfaketransmitter.lo libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) @@ -153,7 +154,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -161,10 +161,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -232,7 +233,9 @@ libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ rtcppacketbuilder.cpp rtpsessionsources.cpp \ rtpcollisionlist.cpp rtpipv6address.cpp \ rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - extratransmitters/rtpfaketransmitter.cpp + rtprandomrand48.cpp rtprandomurandom.cpp \ + rtprandomrands.cpp \ + extratransmitters/rtpfaketransmitter.cpp libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ @@ -249,6 +252,8 @@ libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ rtpmemorymanager.h rtpmemoryobject.h \ + rtprandomrand48.h rtprandomurandom.h \ + rtprandomrands.h \ extratransmitters/rtpfaketransmitter.h EXTRA_DIST = rtpconfig_unix.h.in @@ -348,6 +353,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtppacketbuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtppollthread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomrand48.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomrands.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomurandom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsession.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsessionparams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsessionsources.Plo@am__quote@ diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index d7a3904..7dfe4a6 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 4e5f9b7..16c3351 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index 794a3b8..eb46cf7 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -33,6 +33,7 @@ #include "rtcpbyepacket.h" #ifdef RTPDEBUG #include + #include #endif // RTPDEBUG #include "rtpdebug.h" diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 027b856..5817854 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index c284fa4..3b80d53 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index 0b7fa66..fdcd9d5 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index 8172007..99fffd3 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -36,8 +36,12 @@ #include "rtcpsdespacket.h" #include "rtcpbyepacket.h" #include "rtcpapppacket.h" +#ifdef RTP_SUPPORT_RTCPUNKNOWN + #include "rtcpunknownpacket.h" +#endif // RTP_SUPPORT_RTCPUNKNOWN #if ! (defined(WIN32) || defined(_WIN32_WCE)) #include + #include #endif // WIN32 #include "rtpdebug.h" @@ -46,6 +50,9 @@ RTCPCompoundPacketBuilder::RTCPCompoundPacketBuilder(RTPMemoryManager *mgr) : RT { byesize = 0; appsize = 0; +#ifdef RTP_SUPPORT_RTCPUNKNOWN + unknownsize = 0; +#endif // RTP_SUPPORT_RTCPUNKNOWN maximumpacketsize = 0; buffer = 0; external = false; @@ -75,11 +82,24 @@ void RTCPCompoundPacketBuilder::ClearBuildBuffers() if ((*it).packetdata) RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); } +#ifdef RTP_SUPPORT_RTCPUNKNOWN + for (it = unknownpackets.begin() ; it != unknownpackets.end() ; it++) + { + if ((*it).packetdata) + RTPDeleteByteArray((*it).packetdata,GetMemoryManager()); + } +#endif // RTP_SUPPORT_RTCPUNKNOWN byepackets.clear(); apppackets.clear(); +#ifdef RTP_SUPPORT_RTCPUNKNOWN + unknownpackets.clear(); +#endif // RTP_SUPPORT_RTCPUNKNOWN byesize = 0; appsize = 0; +#ifdef RTP_SUPPORT_RTCPUNKNOWN + unknownsize = 0; +#endif // RTP_SUPPORT_RTCPUNKNOWN } int RTCPCompoundPacketBuilder::InitBuild(size_t maxpacketsize) @@ -97,6 +117,9 @@ int RTCPCompoundPacketBuilder::InitBuild(size_t maxpacketsize) external = false; byesize = 0; appsize = 0; +#ifdef RTP_SUPPORT_RTCPUNKNOWN + unknownsize = 0; +#endif // RTP_SUPPORT_RTCPUNKNOWN arebuilding = true; return 0; @@ -117,6 +140,9 @@ int RTCPCompoundPacketBuilder::InitBuild(void *externalbuffer,size_t buffersize) external = true; byesize = 0; appsize = 0; +#ifdef RTP_SUPPORT_RTCPUNKNOWN + unknownsize = 0; +#endif // RTP_SUPPORT_RTCPUNKNOWN arebuilding = true; return 0; @@ -131,7 +157,11 @@ int RTCPCompoundPacketBuilder::StartSenderReport(uint32_t senderssrc,const RTPNT if (report.headerlength != 0) return ERR_RTP_RTCPCOMPPACKBUILDER_ALREADYGOTREPORT; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalsize = byesize+appsize+sdes.NeededBytes(); +#else + size_t totalsize = byesize+appsize+unknownsize+sdes.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t sizeleft = maximumpacketsize-totalsize; size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)+sizeof(RTCPSenderReport); @@ -163,7 +193,11 @@ int RTCPCompoundPacketBuilder::StartReceiverReport(uint32_t senderssrc) if (report.headerlength != 0) return ERR_RTP_RTCPCOMPPACKBUILDER_ALREADYGOTREPORT; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalsize = byesize+appsize+sdes.NeededBytes(); +#else + size_t totalsize = byesize+appsize+unknownsize+sdes.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t sizeleft = maximumpacketsize-totalsize; size_t neededsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t); @@ -189,7 +223,11 @@ int RTCPCompoundPacketBuilder::AddReportBlock(uint32_t ssrc,uint8_t fractionlost if (report.headerlength == 0) return ERR_RTP_RTCPCOMPPACKBUILDER_REPORTNOTSTARTED; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalothersize = byesize+appsize+sdes.NeededBytes(); +#else + size_t totalothersize = byesize+appsize+unknownsize+sdes.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t reportsizewithextrablock = report.NeededBytesWithExtraReportBlock(); if ((totalothersize+reportsizewithextrablock) > maximumpacketsize) @@ -222,7 +260,11 @@ int RTCPCompoundPacketBuilder::AddSDESSource(uint32_t ssrc) if (!arebuilding) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalotherbytes = byesize+appsize+report.NeededBytes(); +#else + size_t totalotherbytes = byesize+appsize+unknownsize+report.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t sdessizewithextrasource = sdes.NeededBytesWithExtraSource(); if ((totalotherbytes + sdessizewithextrasource) > maximumpacketsize) @@ -271,7 +313,11 @@ int RTCPCompoundPacketBuilder::AddSDESNormalItem(RTCPSDESPacket::ItemType t,cons return ERR_RTP_RTCPCOMPPACKBUILDER_INVALIDITEMTYPE; } +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalotherbytes = byesize+appsize+report.NeededBytes(); +#else + size_t totalotherbytes = byesize+appsize+unknownsize+report.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t sdessizewithextraitem = sdes.NeededBytesWithExtraItem(itemlength); if ((sdessizewithextraitem+totalotherbytes) > maximumpacketsize) @@ -309,7 +355,11 @@ int RTCPCompoundPacketBuilder::AddSDESPrivateItem(const void *prefixdata,uint8_t if (itemlength > 255) return ERR_RTP_RTCPCOMPPACKBUILDER_TOTALITEMLENGTHTOOBIG; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalotherbytes = byesize+appsize+report.NeededBytes(); +#else + size_t totalotherbytes = byesize+appsize+unknownsize+report.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN size_t sdessizewithextraitem = sdes.NeededBytesWithExtraItem(itemlength); if ((sdessizewithextraitem+totalotherbytes) > maximumpacketsize) @@ -363,7 +413,11 @@ int RTCPCompoundPacketBuilder::AddBYEPacket(uint32_t *ssrcs,uint8_t numssrcs,con } } +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalotherbytes = appsize+byesize+sdes.NeededBytes()+report.NeededBytes(); +#else + size_t totalotherbytes = appsize+unknownsize+byesize+sdes.NeededBytes()+report.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN if ((totalotherbytes + packsize) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; @@ -422,7 +476,11 @@ int RTCPCompoundPacketBuilder::AddAPPPacket(uint8_t subtype,uint32_t ssrc,const return ERR_RTP_RTCPCOMPPACKBUILDER_APPDATALENTOOBIG; size_t packsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)*2+appdatalen; +#ifndef RTP_SUPPORT_RTCPUNKNOWN size_t totalotherbytes = appsize+byesize+sdes.NeededBytes()+report.NeededBytes(); +#else + size_t totalotherbytes = appsize+unknownsize+byesize+sdes.NeededBytes()+report.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN if ((totalotherbytes + packsize) > maximumpacketsize) return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; @@ -459,6 +517,50 @@ int RTCPCompoundPacketBuilder::AddAPPPacket(uint8_t subtype,uint32_t ssrc,const return 0; } +#ifdef RTP_SUPPORT_RTCPUNKNOWN + +int RTCPCompoundPacketBuilder::AddUnknownPacket(uint8_t payload_type, uint8_t subtype, uint32_t ssrc, const void *data, size_t len) +{ + if (!arebuilding) + return ERR_RTP_RTCPCOMPPACKBUILDER_NOTBUILDING; + + size_t datawords = len/4; + + if ((datawords+2) > 65535) + return ERR_RTP_RTCPCOMPPACKBUILDER_APPDATALENTOOBIG; + + size_t packsize = sizeof(RTCPCommonHeader)+sizeof(uint32_t)+len; + size_t totalotherbytes = appsize+unknownsize+byesize+sdes.NeededBytes()+report.NeededBytes(); + + if ((totalotherbytes + packsize) > maximumpacketsize) + return ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT; + + uint8_t *buf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPUNKNOWNPACKET) uint8_t[packsize]; + if (buf == 0) + return ERR_RTP_OUTOFMEM; + + RTCPCommonHeader *hdr = (RTCPCommonHeader *)buf; + + hdr->version = 2; + hdr->padding = 0; + hdr->count = subtype; + hdr->length = htons((uint16_t)(datawords+1)); + hdr->packettype = payload_type; + + uint32_t *source = (uint32_t *)(buf+sizeof(RTCPCommonHeader)); + *source = htonl(ssrc); + + if (len > 0) + memcpy((buf+sizeof(RTCPCommonHeader)+sizeof(uint32_t)),data,len); + + unknownpackets.push_back(Buffer(buf,packsize)); + unknownsize += packsize; + + return 0; +} + +#endif // RTP_SUPPORT_RTCPUNKNOWN + int RTCPCompoundPacketBuilder::EndBuild() { if (!arebuilding) @@ -469,7 +571,11 @@ int RTCPCompoundPacketBuilder::EndBuild() uint8_t *buf; size_t len; +#ifndef RTP_SUPPORT_RTCPUNKNOWN len = appsize+byesize+report.NeededBytes()+sdes.NeededBytes(); +#else + len = appsize+unknownsize+byesize+report.NeededBytes()+sdes.NeededBytes(); +#endif // RTP_SUPPORT_RTCPUNKNOWN if (!external) { @@ -642,7 +748,34 @@ int RTCPCompoundPacketBuilder::EndBuild() curbuf += (*it).packetlength; } } + +#ifdef RTP_SUPPORT_RTCPUNKNOWN + + // adding the unknown data + + { + std::list::const_iterator it; + + for (it = unknownpackets.begin() ; it != unknownpackets.end() ; it++) + { + memcpy(curbuf,(*it).packetdata,(*it).packetlength); + + p = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPUNKNOWNPACKET) RTCPUnknownPacket(curbuf,(*it).packetlength); + if (p == 0) + { + if (!external) + RTPDeleteByteArray(buf,GetMemoryManager()); + ClearPacketList(); + return ERR_RTP_OUTOFMEM; + } + rtcppacklist.push_back(p); + curbuf += (*it).packetlength; + } + } + +#endif // RTP_SUPPORT_RTCPUNKNOWN + // adding bye packets { diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index 4537105..b7a8716 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -126,6 +126,13 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket * can be used to access the RTCP packet data. */ int EndBuild(); + +#ifdef RTP_SUPPORT_RTCPUNKNOWN + /** Adds the RTCP packet specified by the arguments to the compound packet. + * Adds the RTCP packet specified by the arguments to the compound packet. + */ + int AddUnknownPacket(uint8_t payload_type, uint8_t subtype, uint32_t ssrc, const void *data, size_t len); +#endif // RTP_SUPPORT_RTCPUNKNOWN private: class Buffer { @@ -375,6 +382,11 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket std::list apppackets; size_t appsize; + +#ifdef RTP_SUPPORT_RTCPUNKNOWN + std::list unknownpackets; + size_t unknownsize; +#endif // RTP_SUPPORT_RTCPUNKNOWN void ClearBuildBuffers(); }; diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 76f55ba..2312467 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 1062574..66e142b 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index 7e07d8f..52af1e4 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index cf043f0..4af3ec6 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index 42cf969..e510bf5 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 6e48f16..1d965c2 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index fa8510f..3571ae4 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -84,9 +84,11 @@ int RTCPSchedulerParams::SetMinimumTransmissionInterval(const RTPTime &t) return 0; } -RTCPScheduler::RTCPScheduler(RTPSources &s) : sources(s),nextrtcptime(0,0),prevrtcptime(0,0) +RTCPScheduler::RTCPScheduler(RTPSources &s, RTPRandom &r) : rtprand(r),sources(s),nextrtcptime(0,0),prevrtcptime(0,0) { Reset(); + + //std::cout << (void *)(&rtprand) << std::endl; } RTCPScheduler::~RTCPScheduler() diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index e5736a3..1f3ea9a 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -102,9 +102,10 @@ class RTCPScheduler * packets should be scheduled. * Creates an instance which will use the source table RTPSources to determine when RTCP compound * packets should be scheduled. Note that for correct operation the \c sources instance should have information - * about the own SSRC (added by RTPSources::CreateOwnSSRC). + * about the own SSRC (added by RTPSources::CreateOwnSSRC). You must also supply a random number + * generator \c rtprand which will be used for adding randomness to the RTCP intervals. */ - RTCPScheduler(RTPSources &sources); + RTCPScheduler(RTPSources &sources, RTPRandom &rtprand); ~RTCPScheduler(); /** Resets the scheduler. */ @@ -176,7 +177,7 @@ class RTCPScheduler size_t avgbyepacketsize; bool sendbyenow; - RTPRandom rtprand; + RTPRandom &rtprand; }; #endif // RTCPSCHEDULER_H diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index c2611c4..78d0453 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index f96915a..d6c6f61 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 798f83c..566cd66 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -33,6 +33,7 @@ #include "rtcpsdespacket.h" #ifdef RTPDEBUG #include + #include #endif // RTPDEBUG #include "rtpdebug.h" diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 8b68a59..282cdb7 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index 2ccc395..4925249 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 03a8442..3a48ffb 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 4745be7..1051a3c 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 92e29b1..88f80d1 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index 4338a33..b974789 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index c710c42..65aa99d 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpconfig.h b/src/rtpconfig.h index 23539b8..1f16a5c 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index b4f17bd..48462a5 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -52,10 +52,6 @@ @RTP_SUPPORT_PROBATION@ -@RTP_SUPPORT_GNUDRAND@ - -@RTP_SUPPORT_RANDR@ - @RTP_SUPPORT_GETLOGINR@ @RTP_SUPPORT_IPV6@ @@ -68,5 +64,7 @@ @RTP_SUPPORT_MEMORYMANAGEMENT@ +@RTP_SUPPORT_RTCPUNKNOWN@ + #endif // RTPCONFIG_UNIX_H diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index f5bfc0d..2489555 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -50,5 +50,7 @@ #define RTP_SUPPORT_MEMORYMANAGEMENT +// #define RTP_SUPPORT_RTCPUNKNOWN + #endif // RTPCONFIG_WIN_H diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index e8d0f6f..c094350 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpdebug.h b/src/rtpdebug.h index d15bd85..238e419 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpdefines.h b/src/rtpdefines.h index 85eb9d1..dc3687a 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index a6a16c9..f8e0fbd 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -32,13 +32,14 @@ #include "rtperrors.h" #include "rtpdefines.h" +#include #include "rtpdebug.h" struct RTPErrorInfo { int code; - char *description; + const char *description; }; static RTPErrorInfo ErrorDescriptions[]= @@ -202,6 +203,9 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_FAKETRANS_SRCADDRNOTSET, "Got packet but src address information was not set, returning"}, { ERR_RTP_FAKETRANS_NOTNETBUFFER, "Received buffer is not a GstNetBuffer"}, { ERR_RTP_FAKETRANS_WAITNOTIMPLEMENTED, "The WaitForIncomingData is not implemented in the Gst transmitter"}, + { ERR_RTP_RTPRANDOMURANDOM_CANTOPEN, "Unable to open /dev/urandom for reading"}, + { ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN, "The device /dev/urandom was already opened"}, + { ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED, "The rand_s call is not supported on this platform"}, { 0,0 } }; diff --git a/src/rtperrors.h b/src/rtperrors.h index 51a33d7..8922a07 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -202,8 +202,9 @@ std::string RTPGetErrorString(int errcode); #define ERR_RTP_FAKETRANS_SRCADDRNOTSET -157 #define ERR_RTP_FAKETRANS_NOTNETBUFFER -158 #define ERR_RTP_FAKETRANS_WAITNOTIMPLEMENTED -159 - - +#define ERR_RTP_RTPRANDOMURANDOM_CANTOPEN -160 +#define ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN -161 +#define ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED -162 #endif // RTPERRORS_H diff --git a/src/rtphashtable.h b/src/rtphashtable.h index aa482c0..3ac438e 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index d023f7d..2f60b3e 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index 7b01016..f592c83 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index de5fcb9..759a9ea 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index 08845fd..f523975 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index a31243a..a0ae534 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -96,8 +96,8 @@ class RTPIPv4Destination inline std::string RTPIPv4Destination::GetDestinationString() const { char str[24]; - uint32_t ip = ipaddr_hbo; - uint16_t portbase = ntohs(rtpport_nbo); + uint32_t ip = GetIP(); + uint16_t portbase = ntohs(GetRTPPort_NBO()); RTP_SNPRINTF(str,24,"%d.%d.%d.%d:%d",(int)((ip>>24)&0xFF),(int)((ip>>16)&0xFF),(int)((ip>>8)&0xFF),(int)(ip&0xFF),(int)(portbase)); return std::string(str); diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index a2a685b..0ee7d4b 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index ef434c9..c665e5c 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 4716b08..5208387 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -91,9 +91,13 @@ inline std::string RTPIPv6Destination::GetDestinationString() const { uint16_t ip16[8]; char str[48]; - uint16_t portbase = ntohs(rtpport_nbo); + uint16_t portbase = ntohs(rtpaddr.sin6_port); int i,j; - for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } + for (i = 0,j = 0 ; j < 8 ; j++,i += 2) + { + ip16[j] = (((uint16_t)rtpaddr.sin6_addr.s6_addr[i])<<8); + ip16[j] |= ((uint16_t)rtpaddr.sin6_addr.s6_addr[i+1]); + } RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X/%d",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7],(int)portbase); return std::string(str); } diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 2ea138f..042607e 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index a1b15d3..7cd568e 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -32,10 +32,11 @@ #include "rtplibraryversion.h" #include "rtpdefines.h" +#include RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,7,1); + return RTPLibraryVersion(3,8,0); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 927bcf8..bebd414 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index bfc50fa..278337b 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index c30e5bd..0da86b1 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index b6d5fda..46f3f9d 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -37,6 +37,7 @@ #include "rtprawpacket.h" #if ! (defined(WIN32) || defined(_WIN32_WCE)) #include + #include #endif // WIN32 #ifdef RTPDEBUG diff --git a/src/rtppacket.h b/src/rtppacket.h index 9046ec2..a51e17f 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index 76dca01..a835e03 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -42,12 +42,14 @@ #include "rtpdebug.h" -RTPPacketBuilder::RTPPacketBuilder(RTPMemoryManager *mgr) : RTPMemoryObject(mgr),lastwallclocktime(0,0) +RTPPacketBuilder::RTPPacketBuilder(RTPRandom &r,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),rtprnd(r),lastwallclocktime(0,0) { init = false; #if (defined(WIN32) || defined(_WIN32_WCE)) timeinit.Dummy(); #endif // WIN32 || _WIN32_WCE + + //std::cout << (void *)(&rtprnd) << std::endl; } RTPPacketBuilder::~RTPPacketBuilder() diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index bb34164..c209664 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -54,8 +54,10 @@ class RTPSources; class RTPPacketBuilder : public RTPMemoryObject { public: - /** Constructs an instance, optionally installing a memory manager. */ - RTPPacketBuilder(RTPMemoryManager *mgr = 0); + /** Constructs an instance which will use \c rtprand for generating random numbers + * (used to initialize the SSRC value and sequence number), optionally installing a memory manager. + **/ + RTPPacketBuilder(RTPRandom &rtprand, RTPMemoryManager *mgr = 0); ~RTPPacketBuilder(); /** Initializes the builder to only allow packets with a size below \c maxpacksize. */ @@ -180,12 +182,18 @@ class RTPPacketBuilder : public RTPMemoryObject /** Returns the RTP timestamp which corresponds to the time returned by the previous function. */ uint32_t GetPacketTimestamp() const { if (!init) return 0; return lastrtptimestamp; } + + /** Sets a specific SSRC to be used. + * Sets a specific SSRC to be used. Does not create a new timestamp offset or sequence number + * offset. Does not reset the packet count or byte count. Think twice before using this! + */ + void AdjustSSRC(uint32_t s) { ssrc = s; } private: int PrivateBuildPacket(const void *data,size_t len, uint8_t pt,bool mark,uint32_t timestampinc,bool gotextension, uint16_t hdrextID = 0,const void *hdrextdata = 0,size_t numhdrextwords = 0); - RTPRandom rtprnd; + RTPRandom &rtprnd; size_t maxpacksize; uint8_t *buffer; size_t packetlength; diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index cb7405d..4f6ffce 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -121,6 +121,9 @@ void *RTPPollThread::Thread() stopmutex.Lock(); stopthread = stop; stopmutex.Unlock(); + + rtpsession.OnPollThreadStart(stopthread); + while (!stopthread) { int status; @@ -162,6 +165,9 @@ void *RTPPollThread::Thread() } } } + + rtpsession.OnPollThreadStop(); + return 0; } diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 37350ec..90fd1cd 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 310c65a..810f8fb 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -50,74 +50,14 @@ #include "rtpdebug.h" -#if (defined(WIN32) && !defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) - // If compiling on VC 8 or later for full Windows, we'll attempt to use rand_s, - // which generates better random numbers. However, its only supported on Windows XP, - // Windows Server 2003, and later, so we'll do a run-time check to see if we can - // use it (it won't work on Windows 2000 SP4 for example). - #define RTP_SUPPORT_RANDS - #define QUOTEPROCNAME(x) #x - #ifndef RtlGenRandom - #define RtlGenRandom SystemFunction036 - #endif - - static bool checked_rand_s = false; - static bool use_rand_s = false; -#endif - -uint8_t GetRandom8_Default(); -uint16_t GetRandom16_Default(); -uint32_t GetRandom32_Default(); -double GetRandomDouble_Default(); - -RTPRandom::RTPRandom() +uint32_t RTPRandom::PickSeed() { - -#if defined(RTP_SUPPORT_GNUDRAND) || defined(RTP_SUPPORT_RANDR) - uint32_t x; - - x = (uint32_t)getpid(); - x += (uint32_t)time(0); - x -= (uint32_t)clock(); - x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); - -#ifdef RTP_SUPPORT_GNUDRAND - srand48_r(x,&drandbuffer); -#else - state = (unsigned int)x; -#endif // RTP_SUPPORT_GNUDRAND - -#else // use simple rand and srand functions (or maybe rand_s) - -#ifdef RTP_SUPPORT_RANDS - if(checked_rand_s == false) - { - checked_rand_s = true; - use_rand_s = false; - - HMODULE hAdvApi32 = LoadLibrary("ADVAPI32.DLL"); - if(hAdvApi32 != NULL) - { - if(NULL != GetProcAddress( hAdvApi32, QUOTEPROCNAME( RtlGenRandom ) )) - { - use_rand_s = true; - } - FreeLibrary(hAdvApi32); - hAdvApi32 = NULL; - } - } - - // Note: If we use the rand_s function, it does not require initialization of a seed. - if(!use_rand_s) - { -#endif - uint32_t x; - +#if defined(WIN32) || defined(_WIN32_WINCE) #ifndef _WIN32_WCE x = (uint32_t)_getpid(); x += (uint32_t)time(0); - x -= (uint32_t)clock(); + x += (uint32_t)clock(); #else x = (uint32_t)GetCurrentProcessId(); @@ -130,226 +70,12 @@ RTPRandom::RTPRandom() x += ft.dwLowDateTime; #endif // _WIN32_WCE x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); - srand((unsigned int)x); - -#ifdef RTP_SUPPORT_RANDS - } // !support_rand_s +#else + x = (uint32_t)getpid(); + x += (uint32_t)time(0); + x += (uint32_t)clock(); + x ^= (uint32_t)((uint8_t *)this - (uint8_t *)0); #endif - -#endif // RTP_SUPPORT_GNUDRAND || RTP_SUPPORT_RANDR - -} - -RTPRandom::~RTPRandom() -{ -} - -#if defined(RTP_SUPPORT_GNUDRAND) - -uint8_t RTPRandom::GetRandom8() -{ - double x; - drand48_r(&drandbuffer,&x); - uint8_t y = (uint8_t)(x*256.0); - return y; -} - -uint16_t RTPRandom::GetRandom16() -{ - double x; - drand48_r(&drandbuffer,&x); - uint16_t y = (uint16_t)(x*65536.0); - return y; -} - -uint32_t RTPRandom::GetRandom32() -{ - uint32_t a = GetRandom16(); - uint32_t b = GetRandom16(); - uint32_t y = (a << 16)|b; - return y; -} - -double RTPRandom::GetRandomDouble() -{ - double x; - drand48_r(&drandbuffer,&x); - return x; -} - -#elif defined(RTP_SUPPORT_RANDR) - -uint8_t RTPRandom::GetRandom8() -{ - uint8_t x; - - x = (uint8_t)(256.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); - return x; -} - -uint16_t RTPRandom::GetRandom16() -{ - uint16_t x; - - x = (uint16_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); - return x; -} - -uint32_t RTPRandom::GetRandom32() -{ - uint32_t x,y; - - x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); - y = x; - x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); - y ^= (x<<8); - x = (uint32_t)(65536.0*((double)rand_r(&state))/((double)RAND_MAX+1.0)); - y ^= (x<<16); - - return y; -} - -double RTPRandom::GetRandomDouble() -{ - double x = ((double)rand_r(&state))/((double)RAND_MAX+1.0); - return x; -} - -#elif defined(RTP_SUPPORT_RANDS) - -uint8_t RTPRandom::GetRandom8() -{ - if(use_rand_s) - { - uint8_t x; - unsigned int r; - - rand_s(&r); - x = (uint8_t)(256.0*((double)r)/((double)UINT_MAX+1.0)); - return x; - } - else - { - return GetRandom8_Default(); - } -} - -uint16_t RTPRandom::GetRandom16() -{ - if(use_rand_s) - { - uint16_t x; - unsigned int r; - - rand_s(&r); - x = (uint16_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - return x; - } - else - { - return GetRandom16_Default(); - } -} - -uint32_t RTPRandom::GetRandom32() -{ - if(use_rand_s) - { - uint32_t x,y; - unsigned int r; - - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y = x; - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y ^= (x<<8); - rand_s(&r); - x = (uint32_t)(65536.0*((double)r)/((double)UINT_MAX+1.0)); - y ^= (x<<16); - - return y; - } - else - { - return GetRandom32_Default(); - } -} - -double RTPRandom::GetRandomDouble() -{ - if(use_rand_s) - { - unsigned int r; - - rand_s(&r); - double x = ((double)r)/((double)UINT_MAX+1.0); - return x; - } - else - { - return GetRandomDouble_Default(); - } -} - -#else // use rand() - -uint8_t RTPRandom::GetRandom8() -{ - return GetRandom8_Default(); -} - -uint16_t RTPRandom::GetRandom16() -{ - return GetRandom16_Default(); -} - -uint32_t RTPRandom::GetRandom32() -{ - return GetRandom32_Default(); -} - -double RTPRandom::GetRandomDouble() -{ - return GetRandomDouble_Default(); -} - -#endif // RTP_SUPPORT_GNUDRAND - - -uint8_t GetRandom8_Default() -{ - uint8_t x; - - x = (uint8_t)(256.0*((double)rand())/((double)RAND_MAX+1.0)); - return x; -} - -uint16_t GetRandom16_Default() -{ - uint16_t x; - - x = (uint16_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); - return x; -} - -uint32_t GetRandom32_Default() -{ - uint32_t x,y; - - x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); - y = x; - x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); - y ^= (x<<8); - x = (uint32_t)(65536.0*((double)rand())/((double)RAND_MAX+1.0)); - y ^= (x<<16); - - return y; -} - -double GetRandomDouble_Default() -{ - double x = ((double)rand())/((double)RAND_MAX+1.0); return x; } diff --git a/src/rtprandom.h b/src/rtprandom.h index 8a487b1..4e2b36a 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -42,30 +42,29 @@ #include "rtptypes.h" #include -/** The RTPRandom class can be used to generate random numbers. */ +#define RTPRANDOM_2POWMIN63 1.08420217248550443400745280086994171142578125e-19 + +/** Interface for generating random numbers. */ class RTPRandom { public: - RTPRandom(); - ~RTPRandom(); + RTPRandom() { } + virtual ~RTPRandom() { } /** Returns a random eight bit value. */ - uint8_t GetRandom8(); + virtual uint8_t GetRandom8() = 0; /** Returns a random sixteen bit value. */ - uint16_t GetRandom16(); + virtual uint16_t GetRandom16() = 0; /** Returns a random thirty-two bit value. */ - uint32_t GetRandom32(); + virtual uint32_t GetRandom32() = 0; /** Returns a random number between $0.0$ and $1.0$. */ - double GetRandomDouble(); -private: -#if defined(RTP_SUPPORT_GNUDRAND) - struct drand48_data drandbuffer; -#elif defined(RTP_SUPPORT_RANDR) - unsigned int state; -#endif // RTP_SUPPORT_GNUDRAND + virtual double GetRandomDouble() = 0; + + /** Can be used by subclasses to generate a seed for a random number generator. */ + uint32_t PickSeed(); }; #endif // RTPRANDOM_H diff --git a/src/rtprandomrand48.cpp b/src/rtprandomrand48.cpp new file mode 100644 index 0000000..cbdcebf --- /dev/null +++ b/src/rtprandomrand48.cpp @@ -0,0 +1,120 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#include "rtprandomrand48.h" + +RTPRandomRand48::RTPRandomRand48() +{ + SetSeed(PickSeed()); +} + +RTPRandomRand48::RTPRandomRand48(uint32_t seed) +{ + SetSeed(seed); +} + +RTPRandomRand48::~RTPRandomRand48() +{ +} + +void RTPRandomRand48::SetSeed(uint32_t seed) +{ +#ifdef RTP_SUPPORT_THREAD + mutex.Init(); // TODO: check error! +#endif // RTP_SUPPORT_THREAD + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + state = ((uint64_t)seed) << 16 | 0x330Eui64; +#else + state = ((uint64_t)seed) << 16 | 0x330EULL; +#endif +} + +uint8_t RTPRandomRand48::GetRandom8() +{ + uint32_t x = ((GetRandom32() >> 24)&0xff); + + return (uint8_t)x; +} + +uint16_t RTPRandomRand48::GetRandom16() +{ + uint32_t x = ((GetRandom32() >> 16)&0xff); + + return (uint16_t)x; +} + +uint32_t RTPRandomRand48::GetRandom32() +{ +#ifdef RTP_SUPPORT_THREAD + mutex.Lock(); +#endif // RTP_SUPPORT_THREAD + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + state = ((0x5DEECE66Dui64*state) + 0xBui64)&0x0000ffffffffffffui64; + + uint32_t x = (uint32_t)((state>>16)&0xffffffffui64); +#else + state = ((0x5DEECE66DULL*state) + 0xBULL)&0x0000ffffffffffffULL; + + uint32_t x = (uint32_t)((state>>16)&0xffffffffULL); +#endif + +#ifdef RTP_SUPPORT_THREAD + mutex.Unlock(); +#endif // RTP_SUPPORT_THREAD + return x; +} + +double RTPRandomRand48::GetRandomDouble() +{ +#ifdef RTP_SUPPORT_THREAD + mutex.Lock(); +#endif // RTP_SUPPORT_THREAD + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + state = ((0x5DEECE66Dui64*state) + 0xBui64)&0x0000ffffffffffffui64; + + int64_t x = (int64_t)state; +#else + state = ((0x5DEECE66DULL*state) + 0xBULL)&0x0000ffffffffffffULL; + + int64_t x = (int64_t)state; +#endif + +#ifdef RTP_SUPPORT_THREAD + mutex.Unlock(); +#endif // RTP_SUPPORT_THREAD + double y = 3.552713678800500929355621337890625e-15 * (double)x; + return y; +} + diff --git a/src/rtprandomrand48.h b/src/rtprandomrand48.h new file mode 100644 index 0000000..4ed4e55 --- /dev/null +++ b/src/rtprandomrand48.h @@ -0,0 +1,70 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtprandomrand48.h + */ + +#ifndef RTPRANDOMRAND48_H + +#define RTPRANDOMRAND48_H + +#include "rtpconfig.h" +#include "rtprandom.h" +#ifdef RTP_SUPPORT_THREAD + #include +#endif // RTP_SUPPORT_THREAD +#include + +/** A random number generator using the algorithm of the rand48 set of functions. */ +class RTPRandomRand48 : public RTPRandom +{ +public: + RTPRandomRand48(); + RTPRandomRand48(uint32_t seed); + ~RTPRandomRand48(); + + uint8_t GetRandom8(); + uint16_t GetRandom16(); + uint32_t GetRandom32(); + double GetRandomDouble(); +private: + void SetSeed(uint32_t seed); + +#ifdef RTP_SUPPORT_THREAD + JMutex mutex; +#endif // RTP_SUPPORT_THREAD + uint64_t state; +}; + +#endif // RTPRANDOMRAND48_H + diff --git a/src/rtprandomrands.cpp b/src/rtprandomrands.cpp new file mode 100644 index 0000000..767b01d --- /dev/null +++ b/src/rtprandomrands.cpp @@ -0,0 +1,199 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#if defined(WIN32) && !defined(_WIN32_WCE) + #define _CRT_RAND_S +#endif // WIN32 || _WIN32_WCE + +#include "rtprandomrands.h" +#include "rtperrors.h" + +#if (defined(WIN32) && !defined(_WIN32_WCE)) && (defined(_MSC_VER) && _MSC_VER >= 1400 ) + #include + #include + // If compiling on VC 8 or later for full Windows, we'll attempt to use rand_s, + // which generates better random numbers. However, its only supported on Windows XP, + // Windows Server 2003, and later, so we'll do a run-time check to see if we can + // use it (it won't work on Windows 2000 SP4 for example). + #define RTP_SUPPORT_RANDS + #define QUOTEPROCNAME(x) #x + #ifndef RtlGenRandom + #define RtlGenRandom SystemFunction036 + #endif +#endif + +#include "rtpdebug.h" + +#ifndef RTP_SUPPORT_RANDS + +RTPRandomRandS::RTPRandomRandS() +{ + initialized = false; +} + +RTPRandomRandS::~RTPRandomRandS() +{ +} + +int RTPRandomRandS::Init() +{ + return ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED; +} + +uint8_t RTPRandomRandS::GetRandom8() +{ + return 0; +} + +uint16_t RTPRandomRandS::GetRandom16() +{ + return 0; +} + +uint32_t RTPRandomRandS::GetRandom32() +{ + return 0; +} + +double RTPRandomRandS::GetRandomDouble() +{ + return 0; +} + +#else + +RTPRandomRandS::RTPRandomRandS() +{ + initialized = false; +} + +RTPRandomRandS::~RTPRandomRandS() +{ +} + +int RTPRandomRandS::Init() +{ + if (initialized) // doesn't matter then + return 0; + + HMODULE hAdvApi32 = LoadLibrary("ADVAPI32.DLL"); + if(hAdvApi32 != NULL) + { + if(NULL != GetProcAddress( hAdvApi32, QUOTEPROCNAME( RtlGenRandom ) )) + { + initialized = true; + } + FreeLibrary(hAdvApi32); + hAdvApi32 = NULL; + } + + if (!initialized) + return ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED; + return 0; +} + +// rand_s gives a number between 0 and UINT_MAX. We'll assume that UINT_MAX is at least 8 bits + +uint8_t RTPRandomRandS::GetRandom8() +{ + if (!initialized) + return 0; + + unsigned int r; + + rand_s(&r); + + return (uint8_t)(r&0xff); +} + +uint16_t RTPRandomRandS::GetRandom16() +{ + if (!initialized) + return 0; + + unsigned int r; + int shift = 0; + uint16_t x = 0; + + for (int i = 0 ; i < 2 ; i++, shift += 8) + { + rand_s(&r); + + x ^= ((uint16_t)r << shift); + } + + return x; +} + +uint32_t RTPRandomRandS::GetRandom32() +{ + if (!initialized) + return 0; + + unsigned int r; + int shift = 0; + uint32_t x = 0; + + for (int i = 0 ; i < 4 ; i++, shift += 8) + { + rand_s(&r); + + x ^= ((uint32_t)r << shift); + } + + return x; +} + +double RTPRandomRandS::GetRandomDouble() +{ + if (!initialized) + return 0; + + unsigned int r; + int shift = 0; + uint64_t x = 0; + + for (int i = 0 ; i < 8 ; i++, shift += 8) + { + rand_s(&r); + + x ^= ((uint64_t)r << shift); + } + + x &= 0x7fffffffffffffffULL; + + int64_t x2 = (int64_t)x; + return RTPRANDOM_2POWMIN63*(double)x2; +} + +#endif // RTP_SUPPORT_RANDS + diff --git a/src/rtprandomrands.h b/src/rtprandomrands.h new file mode 100644 index 0000000..865b927 --- /dev/null +++ b/src/rtprandomrands.h @@ -0,0 +1,65 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtprandomrands.h + */ + +#ifndef RTPRANDOMRANDS_H + +#define RTPRANDOMRANDS_H + +#include "rtpconfig.h" +#include "rtprandom.h" + +/** A random number generator which tries to use the \c rand_s function on the + * Win32 platform. + */ +class RTPRandomRandS : public RTPRandom +{ +public: + RTPRandomRandS(); + ~RTPRandomRandS(); + + /** Initialize the random number generator. */ + int Init(); + + uint8_t GetRandom8(); + uint16_t GetRandom16(); + uint32_t GetRandom32(); + double GetRandomDouble(); +private: + bool initialized; +}; + +#endif // RTPRANDOMRANDS_H + diff --git a/src/rtprandomurandom.cpp b/src/rtprandomurandom.cpp new file mode 100644 index 0000000..8b28445 --- /dev/null +++ b/src/rtprandomurandom.cpp @@ -0,0 +1,117 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#include "rtprandomurandom.h" +#include "rtperrors.h" + +#include "rtpdebug.h" + +RTPRandomURandom::RTPRandomURandom() +{ + device = 0; +} + +RTPRandomURandom::~RTPRandomURandom() +{ + if (device) + fclose(device); +} + +int RTPRandomURandom::Init() +{ + if (device) + return ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN; + + device = fopen("/dev/urandom","rb"); + if (device == 0) + return ERR_RTP_RTPRANDOMURANDOM_CANTOPEN; + + return 0; +} + +uint8_t RTPRandomURandom::GetRandom8() +{ + if (!device) + return 0; + + uint8_t value; + + fread(&value, sizeof(uint8_t), 1, device); + + return value; +} + +uint16_t RTPRandomURandom::GetRandom16() +{ + if (!device) + return 0; + + uint16_t value; + + fread(&value, sizeof(uint16_t), 1, device); + + return value; +} + +uint32_t RTPRandomURandom::GetRandom32() +{ + if (!device) + return 0; + + uint32_t value; + + fread(&value, sizeof(uint32_t), 1, device); + + return value; +} + +double RTPRandomURandom::GetRandomDouble() +{ + if (!device) + return 0; + + uint64_t value; + + fread(&value, sizeof(uint64_t), 1, device); + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + value &= 0x7fffffffffffffffui64; +#else + value &= 0x7fffffffffffffffULL; +#endif + + int64_t value2 = (int64_t)value; + double x = RTPRANDOM_2POWMIN63*(double)value2; + + return x; + +} diff --git a/src/rtprandomurandom.h b/src/rtprandomurandom.h new file mode 100644 index 0000000..fa0a1d5 --- /dev/null +++ b/src/rtprandomurandom.h @@ -0,0 +1,63 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2010 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtprandomurandom.h + */ + +#ifndef RTPRANDOMURANDOM_H + +#define RTPRANDOMURANDOM_H + +#include "rtpconfig.h" +#include "rtprandom.h" +#include + +/** A random number generator which uses bytes delivered by the /dev/urandom device. */ +class RTPRandomURandom : public RTPRandom +{ +public: + RTPRandomURandom(); + ~RTPRandomURandom(); + + /** Initialize the random number generator. */ + int Init(); + + uint8_t GetRandom8(); + uint16_t GetRandom16(); + uint32_t GetRandom32(); + double GetRandomDouble(); +private: + FILE *device; +}; + +#endif // RTPRANDOMURANDOM_H diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 1b4029a..71112df 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index cce6195..4a628ae 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -41,6 +41,9 @@ #include "rtppacket.h" #include "rtptimeutilities.h" #include "rtpmemorymanager.h" +#include "rtprandomrand48.h" +#include "rtprandomrands.h" +#include "rtprandomurandom.h" #ifdef RTP_SUPPORT_SENDAPP #include "rtcpcompoundpacket.h" #endif // RTP_SUPPORT_SENDAPP @@ -77,19 +80,24 @@ #define PACKSENT_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPSession::RTPSession(RTPMemoryManager *mgr) - : RTPMemoryObject(mgr),sources(*this,mgr),packetbuilder(mgr),rtcpsched(sources),rtcpbuilder(sources,packetbuilder,mgr), - collisionlist(mgr) +RTPSession::RTPSession(RTPRandom *r,RTPMemoryManager *mgr) + : RTPMemoryObject(mgr),sources(*this,mgr),rtprnd(GetRandomNumberGenerator(r)),packetbuilder(*rtprnd,mgr),rtcpsched(sources,*rtprnd), + rtcpbuilder(sources,packetbuilder,mgr),collisionlist(mgr) { created = false; #if (defined(WIN32) || defined(_WIN32_WCE)) timeinit.Dummy(); #endif // WIN32 || _WIN32_WCE + + //std::cout << (void *)(rtprnd) << std::endl; } RTPSession::~RTPSession() { Destroy(); + + if (deletertprnd) + delete rtprnd; } int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionParams *transparams /* = 0 */, @@ -186,6 +194,9 @@ int RTPSession::InternalCreate(const RTPSessionParams &sessparams) return status; } + if (sessparams.GetUsePredefinedSSRC()) + packetbuilder.AdjustSSRC(sessparams.GetPredefinedSSRC()); + #ifdef RTP_SUPPORT_PROBATION // Set probation type @@ -219,14 +230,24 @@ int RTPSession::InternalCreate(const RTPSessionParams &sessparams) double timestampunit = sessparams.GetOwnTimestampUnit(); uint8_t buf[1024]; size_t buflen = 1024; - - if ((status = CreateCNAME(buf,&buflen,sessparams.GetResolveLocalHostname())) < 0) + std::string forcedcname = sessparams.GetCNAME(); + + if (forcedcname.length() == 0) { - packetbuilder.Destroy(); - sources.Clear(); - if (deletetransmitter) - RTPDelete(rtptrans,GetMemoryManager()); - return status; + if ((status = CreateCNAME(buf,&buflen,sessparams.GetResolveLocalHostname())) < 0) + { + packetbuilder.Destroy(); + sources.Clear(); + if (deletetransmitter) + RTPDelete(rtptrans,GetMemoryManager()); + return status; + } + } + else + { + strncpy((char *)buf, forcedcname.c_str(), buflen); + buf[buflen-1] = 0; + buflen = strlen((char *)buf); } if ((status = rtcpbuilder.Init(maxpacksize,timestampunit,buf,buflen)) < 0) @@ -729,6 +750,124 @@ int RTPSession::SendRTCPAPPPacket(uint8_t subtype, const uint8_t name[4], const #endif // RTP_SUPPORT_SENDAPP +#ifdef RTP_SUPPORT_RTCPUNKNOWN + +int RTPSession::SendUnknownPacket(bool sr, uint8_t payload_type, uint8_t subtype, const void *data, size_t len) +{ + int status; + + if (!created) + return ERR_RTP_SESSION_NOTCREATED; + + BUILDER_LOCK + uint32_t ssrc = packetbuilder.GetSSRC(); + BUILDER_UNLOCK + + RTCPCompoundPacketBuilder* rtcpcomppack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTCPCOMPOUNDPACKETBUILDER) RTCPCompoundPacketBuilder(GetMemoryManager()); + if (rtcpcomppack == 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return ERR_RTP_OUTOFMEM; + } + + status = rtcpcomppack->InitBuild(maxpacksize); + if(status < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + if (sr) + { + // setup for the rtcp + RTPTime rtppacktime = packetbuilder.GetPacketTime(); + uint32_t rtppacktimestamp = packetbuilder.GetPacketTimestamp(); + uint32_t packcount = packetbuilder.GetPacketCount(); + uint32_t octetcount = packetbuilder.GetPayloadOctetCount(); + RTPTime curtime = RTPTime::CurrentTime(); + RTPTime diff = curtime; + diff -= rtppacktime; + diff += 1; // add transmission delay or RTPTime(0,0); + + double timestampunit = 90000; + + uint32_t tsdiff = (uint32_t)((diff.GetDouble()/timestampunit)+0.5); + uint32_t rtptimestamp = rtppacktimestamp+tsdiff; + RTPNTPTime ntptimestamp = curtime.GetNTPTime(); + + //first packet in an rtcp compound packet should always be SR or RR + if((status = rtcpcomppack->StartSenderReport(ssrc,ntptimestamp,rtptimestamp,packcount,octetcount)) < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + } + else + { + //first packet in an rtcp compound packet should always be SR or RR + if((status = rtcpcomppack->StartReceiverReport(ssrc)) < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + } + + //add SDES packet with CNAME item + if ((status = rtcpcomppack->AddSDESSource(ssrc)) < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + BUILDER_LOCK + size_t owncnamelen = 0; + uint8_t *owncname = rtcpbuilder.GetLocalCNAME(&owncnamelen); + + if ((status = rtcpcomppack->AddSDESNormalItem(RTCPSDESPacket::CNAME,owncname,owncnamelen)) < 0) + { + BUILDER_UNLOCK + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + BUILDER_UNLOCK + + //add our packet + if((status = rtcpcomppack->AddUnknownPacket(payload_type, subtype, ssrc, data, len)) < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + if((status = rtcpcomppack->EndBuild()) < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + //send packet + status = rtptrans->SendRTCPData(rtcpcomppack->GetCompoundPacketData(), + rtcpcomppack->GetCompoundPacketLength()); + if(status < 0) + { + RTPDelete(rtcpcomppack,GetMemoryManager()); + return status; + } + + PACKSENT_LOCK + sentpackets = true; + PACKSENT_UNLOCK + + OnSendRTCPCompoundPacket(rtcpcomppack); // we'll place this after the actual send to avoid tampering + + int retlen = rtcpcomppack->GetCompoundPacketLength(); + + RTPDelete(rtcpcomppack,GetMemoryManager()); + return retlen; +} + +#endif // RTP_SUPPORT_RTCPUNKNOWN + int RTPSession::SetDefaultPayloadType(uint8_t pt) { if (!created) @@ -1459,6 +1598,37 @@ int RTPSession::CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve) return 0; } +RTPRandom *RTPSession::GetRandomNumberGenerator(RTPRandom *r) +{ + RTPRandom *rnew = 0; + + if (r == 0) + { +#if defined(WIN32) || defined(_WIN32_WCE) + RTPRandomRandS *rnew2 = new RTPRandomRandS(); +#else + RTPRandomURandom *rnew2 = new RTPRandomURandom(); +#endif // WIN32 || _WIN32_WCE + + if (rnew2->Init() < 0) // fall back to rand48 + { + delete rnew2; + rnew = new RTPRandomRand48(); + } + else + rnew = rnew2; + + deletertprnd = true; + } + else + { + rnew = r; + deletertprnd = false; + } + + return rnew; +} + #ifdef RTPDEBUG void RTPSession::DumpSources() { diff --git a/src/rtpsession.h b/src/rtpsession.h index c962b2f..8a4721c 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -76,8 +76,16 @@ class RTCPAPPPacket; class RTPSession : public RTPMemoryObject { public: - /** Constructs an RTPSession instance, optionally installing a memory manager. */ - RTPSession(RTPMemoryManager *mgr = 0); + /** Constructs an RTPSession instance, optionally using a specific instance of a random + * number generator, and optionally installing a memory manager. + * Constructs an RTPSession instance, optionally using a specific instance of a random + * number generator, and optionally installing a memory manager. If no random number generator + * is specified, the RTPSession object will try to use either a RTPRandomURandom or + * RTPRandomRandS instance. If neither is available on the current platform, a RTPRandomRand48 + * instance will be used instead. By specifying a random number generator yourself, it is + * possible to use the same generator in several RTPSession instances. + */ + RTPSession(RTPRandom *rnd = 0, RTPMemoryManager *mgr = 0); virtual ~RTPSession(); /** Creates an RTP session. @@ -177,6 +185,14 @@ class RTPSession : public RTPMemoryObject int SendRTCPAPPPacket(uint8_t subtype, const uint8_t name[4], const void *appdata, size_t appdatalen); #endif // RTP_SUPPORT_SENDAPP +#ifdef RTP_SUPPORT_RTCPUNKNOWN + /** Tries to send an Unknown packet immediately. + * Tries to send an Unknown packet immediately. If successful, the function returns the number + * of bytes in the RTCP compound packet. Note that this immediate sending is not compliant with the RTP + * specification, so use with care. Can send message along with a receiver report or a sender report + */ + int SendUnknownPacket(bool sr, uint8_t payload_type, uint8_t subtype, const void *data, size_t len); +#endif // RTP_SUPPORT_RTCPUNKNOWN /** Sets the default payload type for RTP packets to \c pt. */ int SetDefaultPayloadType(uint8_t pt); @@ -435,7 +451,7 @@ class RTPSession : public RTPMemoryObject */ virtual RTPTransmitter *NewUserDefinedTransmitter() { return 0; } - /** Is called when an incoming RTCP packet is about to be processed. */ + /** Is called when an incoming RTP packet is about to be processed. */ virtual void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, const RTPAddress *senderaddress) { } @@ -497,13 +513,30 @@ class RTPSession : public RTPMemoryObject * detected or when it's time to send an RTCP compound packet. */ virtual void OnPollThreadStep() { } + + /** Is called when the poll thread is started. + * Is called when the poll thread is started. This happens just before entering the + * thread main loop. + * \param stop This can be used to stop the thread immediately without entering the loop. + */ + virtual void OnPollThreadStart(bool &stop) { } + + /** Is called when the poll thread is going to stop. + * Is called when the poll thread is going to stop. This happens just before termitating the thread. + */ + virtual void OnPollThreadStop() { } + #endif // RTP_SUPPORT_THREAD private: int InternalCreate(const RTPSessionParams &sessparams); int CreateCNAME(uint8_t *buffer,size_t *bufferlength,bool resolve); int ProcessPolledData(); int ProcessRTCPCompoundPacket(RTCPCompoundPacket &rtcpcomppack,RTPRawPacket *pack); + RTPRandom *GetRandomNumberGenerator(RTPRandom *r); + RTPRandom *rtprnd; + bool deletertprnd; + RTPTransmitter *rtptrans; bool created; bool deletetransmitter; diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index b6ffab5..3453ce6 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -66,6 +66,9 @@ RTPSessionParams::RTPSessionParams() : mininterval(0,0) byetimeoutmultiplier = RTP_BYETIMEOUTMULTIPLIER; collisionmultiplier = RTP_COLLISIONTIMEOUTMULTIPLIER; notemultiplier = RTP_NOTETTIMEOUTMULTIPLIER; + + usepredefinedssrc = false; + predefinedssrc = 0; } int RTPSessionParams::SetUsePollThread(bool usethread) diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 1e65bda..1475bf3 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -190,6 +190,24 @@ class RTPSessionParams /** Returns the multiplier to be used when timing out SDES NOTE information (default is 25). */ double GetNoteTimeoutMultiplier() const { return notemultiplier; } + + /** Sets a flag which indicates if a predefined SSRC identifier should be used. */ + void SetUsePredefinedSSRC(bool f) { usepredefinedssrc = f; } + + /** Returns a flag indicating if a predefined SSRC should be used. */ + bool GetUsePredefinedSSRC() const { return usepredefinedssrc; } + + /** Sets the SSRC which will be used if RTPSessionParams::GetUsePredefinedSSRC returns true. */ + void SetPredefinedSSRC(uint32_t ssrc) { predefinedssrc = ssrc; } + + /** Returns the SSRC which will be used if RTPSessionParams::GetUsePredefinedSSRC returns true. */ + uint32_t GetPredefinedSSRC() const { return predefinedssrc; } + + /** Forces this string to be used as the CNAME identifier. */ + void SetCNAME(const std::string &s) { cname = s; } + + /** Returns the currently set CNAME, is blank when this will be generated automatically (the default). */ + std::string GetCNAME() const { return cname; } private: bool acceptown; bool usepollthread; @@ -214,6 +232,11 @@ class RTPSessionParams double byetimeoutmultiplier; double collisionmultiplier; double notemultiplier; + + bool usepredefinedssrc; + uint32_t predefinedssrc; + + std::string cname; }; #endif // RTPSESSIONPARAMS_H diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index 6a6e5f6..578e461 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index ad5a52b..ba68dcb 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index 3ed5ad3..6e9d344 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -179,6 +179,7 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do if (tsunit > 0) { +#if 0 RTPTime curtime = receivetime; double diffts1,diffts2,diff; @@ -192,6 +193,53 @@ void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,do diff /= 16.0; djitter += diff; jitter = (uint32_t)djitter; +#else +RTPTime curtime = receivetime; +double diffts1,diffts2,diff; +uint32_t curts = pack->GetTimestamp(); + +curtime -= prevpacktime; +diffts1 = curtime.GetDouble()/tsunit; + +if (curts > prevtimestamp) +{ + uint32_t unsigneddiff = curts - prevtimestamp; + + if (unsigneddiff < 0x10000000) // okay, curts realy is larger than prevtimestamp + diffts2 = (double)unsigneddiff; + else + { + // wraparound occurred and curts is actually smaller than prevtimestamp + + unsigneddiff = -unsigneddiff; // to get the actual difference (in absolute value) + diffts2 = -((double)unsigneddiff); + } +} +else if (curts < prevtimestamp) +{ + uint32_t unsigneddiff = prevtimestamp - curts; + + if (unsigneddiff < 0x10000000) // okay, curts really is smaller than prevtimestamp + diffts2 = -((double)unsigneddiff); // negative since we actually need curts-prevtimestamp + else + { + // wraparound occurred and curts is actually larger than prevtimestamp + + unsigneddiff = -unsigneddiff; // to get the actual difference (in absolute value) + diffts2 = (double)unsigneddiff; + } +} +else + diffts2 = 0; + +diff = diffts1 - diffts2; +if (diff < 0) + diff = -diff; +diff -= djitter; +diff /= 16.0; +djitter += diff; +jitter = (uint32_t)djitter; +#endif } else { @@ -247,7 +295,7 @@ double RTPSourceData::INF_GetEstimatedTimestampUnit() const (t2.GetSeconds() == 0 && t2.GetMicroSeconds() == 0)) // one of the times couldn't be calculated return -1.0; - if (t1 < t2) + if (t1 <= t2) return -1.0; t1 -= t2; // get the time difference diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index e2c925c..227337d 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 7318bc6..d0097fb 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -600,7 +600,7 @@ bool RTPSources::GotoPreviousSourceWithData() if (srcdat->HasData()) found = true; else - sourcelist.GotoNextElement(); + sourcelist.GotoPreviousElement(); } return found; diff --git a/src/rtpsources.h b/src/rtpsources.h index 9c4807a..9851017 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 3c0fa2d..e925006 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index f8f0dd3..53be6da 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 527ef87..eb4f7a7 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -97,7 +97,7 @@ class RTPTime RTPTime(RTPNTPTime ntptime); /** Creates an instance corresponding to \c seconds and \c microseconds. */ - RTPTime(uint32_t seconds,uint32_t microseconds) { sec = seconds; microsec = microseconds; } + RTPTime(uint32_t seconds, uint32_t microseconds) { sec = seconds; microsec = microseconds; } /** Returns the number of seconds stored in this instance. */ uint32_t GetSeconds() const { return sec; } diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index bd2f3ea..8f7ecde 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtptypes.h b/src/rtptypes.h index e5377dd..7c4d496 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 66e20b2..0061cb1 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index d421885..f5415dc 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -649,7 +649,10 @@ int RTPUDPv4Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavai #else unsigned char buf[1]; - read(abortdesc[0],buf,1); + if (read(abortdesc[0],buf,1)) + { + // To get rid of __wur related compiler warnings + } #endif // WIN32 } @@ -1778,7 +1781,10 @@ void RTPUDPv4Transmitter::AbortWaitInternal() #if (defined(WIN32) || defined(_WIN32_WCE)) send(abortdesc[1],"*",1,0); #else - write(abortdesc[1],"*",1); + if (write(abortdesc[1],"*",1)) + { + // To get rid of __wur related compiler warnings + } #endif // WIN32 } diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index d96d6ea..ff6d593 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 6bf04d4..ad16211 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). @@ -663,7 +663,10 @@ int RTPUDPv6Transmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavai #else unsigned char buf[1]; - read(abortdesc[0],buf,1); + if (read(abortdesc[0],buf,1)) + { + // To get rid of __wur related compiler warnings + } #endif // WIN32 } @@ -1735,7 +1738,10 @@ void RTPUDPv6Transmitter::AbortWaitInternal() #if (defined(WIN32) || defined(_WIN32_WCE)) send(abortdesc[1],"*",1,0); #else - write(abortdesc[1],"*",1); + if (write(abortdesc[1],"*",1)) + { + // To get rid of __wur related compiler warnings + } #endif // WIN32 } @@ -1781,7 +1787,7 @@ void RTPUDPv6Transmitter::Dump() for (i = 0,j = 0 ; j < 8 ; j++,i += 2) { ip16[j] = (((uint16_t)ip.s6_addr[i])<<8); ip16[j] |= ((uint16_t)ip.s6_addr[i+1]); } RTP_SNPRINTF(str,48,"%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",(int)ip16[0],(int)ip16[1],(int)ip16[2],(int)ip16[3],(int)ip16[4],(int)ip16[5],(int)ip16[6],(int)ip16[7]); std::cout << "Bind IP address: " << str << std::endl; - std::Cout << "Multicast interface index: " << mcastifidx << std::endl; + std::cout << "Multicast interface index: " << mcastifidx << std::endl; std::cout << "Local IP addresses:" << std::endl; for (it = localIPs.begin() ; it != localIPs.end() ; it++) { diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 41f6335..eb8e7c0 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,11 +1,11 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2007 Jori Liesenborgs + Copyright (c) 1999-2010 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com - This library was developed at the "Expertisecentrum Digitale Media" + This library was developed at the Expertise Centre for Digital Media (http://www.edm.uhasselt.be), a research center of the Hasselt University (http://www.uhasselt.be). The library is based upon work done for my thesis at the School for Knowledge Technology (Belgium/The Netherlands). diff --git a/tools/Makefile.in b/tools/Makefile.in index 0212120..f32f58c 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -104,7 +104,6 @@ RTP_LINKLIBS = @RTP_LINKLIBS@ RTP_SOCKIO = @RTP_SOCKIO@ RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@ RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ @@ -112,10 +111,11 @@ RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/tools/gettypes.cpp b/tools/gettypes.cpp index 5786203..971f903 100644 --- a/tools/gettypes.cpp +++ b/tools/gettypes.cpp @@ -9,7 +9,7 @@ int main(void) if (sizeof(char) == 1) { printf("typedef char int8_t;\n"); - printf("typedef unsigned char uint8_t;\n"); + printf("typedef unsigned char uint8_t;\n\n"); } else return -1; @@ -17,7 +17,7 @@ int main(void) if (sizeof(short) == 2) { printf("typedef short int16_t;\n"); - printf("typedef unsigned short uint16_t;\n"); + printf("typedef unsigned short uint16_t;\n\n"); } else return -1; @@ -26,16 +26,25 @@ int main(void) { printf("typedef int int32_t;\n"); printf("typedef unsigned int uint32_t;\n\n"); - printf("#endif // RTPTYPES_H\n"); - return 0; } - if (sizeof(long) == 4) + else if (sizeof(long) == 4) { printf("typedef long int32_t;\n"); printf("typedef unsigned long uint32_t;\n\n"); - printf("#endif // RTPTYPES_H\n"); - return 0; } - return -1; + else + return -1; + + if (sizeof(long long) == 8) + { + printf("typedef long long int64_t;\n"); + printf("typedef unsigned long long uint64_t;\n\n"); + } + else + return -1; + + printf("#endif // RTPTYPES_H\n"); + + return 0; } From 5a0df19b80a4f460ec25f2f381a32e6e4d3540de Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 015/136] Import of version 3.8.1 --- ChangeLog | 7 ++++++- Doxyfile | 2 +- README.TXT | 4 ++-- configure | 2 +- configure.in | 2 +- src/rtplibraryversion.cpp | 2 +- src/rtprandomrands.cpp | 6 +----- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc260c7..37bf462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ - September 30, 2010 + October 8, 2010 JRTPLIB ChangeLog ----------- + 3.8.1 (October 2010) + * Initialization of the RTPRandomRandS class didn't work as + intended, causing the fall-back class RTPRandomRand48 always + being used on the Win32 platform. + 3.8.0 (September 2010) * Fixed bug in RTPSources implementation. An incorrect 'GotoNextElement' call was replaced by a 'GotoPreviousElement' diff --git a/Doxyfile b/Doxyfile index 3fe8770..c564c99 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = jrtplib # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.8.0 +PROJECT_NUMBER = 3.8.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/README.TXT b/README.TXT index 7fca21b..c033494 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - September 30, 2010 + October 8, 2010 - JRTPLIB (v3.8.0) + JRTPLIB (v3.8.1) Developed at the The Expertise Centre for diff --git a/configure b/configure index b9cc286..c5441fd 100755 --- a/configure +++ b/configure @@ -2260,7 +2260,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.8.0 + VERSION=3.8.1 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index e0f4827..16b2030 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.8.0) +AM_INIT_AUTOMAKE(jrtplib,3.8.1) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 7cd568e..0d38d8b 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -36,7 +36,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,8,0); + return RTPLibraryVersion(3,8,1); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtprandomrands.cpp b/src/rtprandomrands.cpp index 767b01d..5fccbbe 100644 --- a/src/rtprandomrands.cpp +++ b/src/rtprandomrands.cpp @@ -45,10 +45,6 @@ // Windows Server 2003, and later, so we'll do a run-time check to see if we can // use it (it won't work on Windows 2000 SP4 for example). #define RTP_SUPPORT_RANDS - #define QUOTEPROCNAME(x) #x - #ifndef RtlGenRandom - #define RtlGenRandom SystemFunction036 - #endif #endif #include "rtpdebug.h" @@ -108,7 +104,7 @@ int RTPRandomRandS::Init() HMODULE hAdvApi32 = LoadLibrary("ADVAPI32.DLL"); if(hAdvApi32 != NULL) { - if(NULL != GetProcAddress( hAdvApi32, QUOTEPROCNAME( RtlGenRandom ) )) + if(NULL != GetProcAddress( hAdvApi32, "SystemFunction036" )) // RtlGenRandom { initialized = true; } From 99e884d310436641b3339360a29c5c6fc34165c0 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 016/136] Import of version 3.8.2 --- ChangeLog | 7 ++++++- Doxyfile | 2 +- README.TXT | 4 ++-- configure | 2 +- configure.in | 2 +- src/rtcpapppacket.cpp | 2 +- src/rtcpapppacket.h | 2 +- src/rtcpbyepacket.cpp | 2 +- src/rtcpbyepacket.h | 2 +- src/rtcpcompoundpacket.cpp | 2 +- src/rtcpcompoundpacket.h | 2 +- src/rtcpcompoundpacketbuilder.cpp | 2 +- src/rtcpcompoundpacketbuilder.h | 2 +- src/rtcppacket.cpp | 2 +- src/rtcppacket.h | 2 +- src/rtcppacketbuilder.cpp | 2 +- src/rtcppacketbuilder.h | 2 +- src/rtcprrpacket.cpp | 2 +- src/rtcprrpacket.h | 2 +- src/rtcpscheduler.cpp | 2 +- src/rtcpscheduler.h | 2 +- src/rtcpsdesinfo.cpp | 2 +- src/rtcpsdesinfo.h | 2 +- src/rtcpsdespacket.cpp | 2 +- src/rtcpsdespacket.h | 2 +- src/rtcpsrpacket.cpp | 2 +- src/rtcpsrpacket.h | 2 +- src/rtcpunknownpacket.h | 2 +- src/rtpaddress.h | 2 +- src/rtpcollisionlist.cpp | 2 +- src/rtpcollisionlist.h | 2 +- src/rtpconfig.h | 2 +- src/rtpconfig_unix.h.in | 2 +- src/rtpconfig_win.h | 2 +- src/rtpdebug.cpp | 2 +- src/rtpdebug.h | 2 +- src/rtpdefines.h | 2 +- src/rtperrors.cpp | 2 +- src/rtperrors.h | 2 +- src/rtphashtable.h | 2 +- src/rtpinternalsourcedata.cpp | 2 +- src/rtpinternalsourcedata.h | 2 +- src/rtpipv4address.cpp | 2 +- src/rtpipv4address.h | 2 +- src/rtpipv4destination.h | 2 +- src/rtpipv6address.cpp | 2 +- src/rtpipv6address.h | 2 +- src/rtpipv6destination.h | 2 +- src/rtpkeyhashtable.h | 2 +- src/rtplibraryversion.cpp | 4 ++-- src/rtplibraryversion.h | 2 +- src/rtpmemorymanager.h | 2 +- src/rtpmemoryobject.h | 2 +- src/rtppacket.cpp | 2 +- src/rtppacket.h | 2 +- src/rtppacketbuilder.cpp | 2 +- src/rtppacketbuilder.h | 2 +- src/rtppollthread.cpp | 2 +- src/rtppollthread.h | 2 +- src/rtprandom.cpp | 2 +- src/rtprandom.h | 2 +- src/rtprandomrand48.cpp | 4 ++-- src/rtprandomrand48.h | 2 +- src/rtprandomrands.cpp | 2 +- src/rtprandomrands.h | 2 +- src/rtprandomurandom.cpp | 2 +- src/rtprandomurandom.h | 2 +- src/rtprawpacket.h | 2 +- src/rtpsession.cpp | 2 +- src/rtpsession.h | 2 +- src/rtpsessionparams.cpp | 2 +- src/rtpsessionparams.h | 2 +- src/rtpsessionsources.cpp | 2 +- src/rtpsessionsources.h | 2 +- src/rtpsourcedata.cpp | 2 +- src/rtpsourcedata.h | 2 +- src/rtpsources.cpp | 2 +- src/rtpsources.h | 2 +- src/rtpstructs.h | 2 +- src/rtptimeutilities.cpp | 2 +- src/rtptimeutilities.h | 2 +- src/rtptransmitter.h | 2 +- src/rtptypes.h | 2 +- src/rtptypes_win.h | 2 +- src/rtpudpv4transmitter.cpp | 2 +- src/rtpudpv4transmitter.h | 2 +- src/rtpudpv6transmitter.cpp | 2 +- src/rtpudpv6transmitter.h | 2 +- 88 files changed, 96 insertions(+), 91 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37bf462..ebff9e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ - October 8, 2010 + February 2, 2011 JRTPLIB ChangeLog ----------- + 3.8.2 (February 2011) + * Fixed bug in RTPRandomRand48. The uint16_t version used a + & 0xff instead of & 0xffff. Thanks to Alexey Kumkov + (crazykum@ukr.net) for bringing this to my attention. + 3.8.1 (October 2010) * Initialization of the RTPRandomRandS class didn't work as intended, causing the fall-back class RTPRandomRand48 always diff --git a/Doxyfile b/Doxyfile index c564c99..ea3e323 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = jrtplib # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.8.1 +PROJECT_NUMBER = 3.8.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/README.TXT b/README.TXT index c033494..65444a3 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - October 8, 2010 + February 2, 2011 - JRTPLIB (v3.8.1) + JRTPLIB (v3.8.2) Developed at the The Expertise Centre for diff --git a/configure b/configure index c5441fd..38e5038 100755 --- a/configure +++ b/configure @@ -2260,7 +2260,7 @@ fi # Define the identity of the package. PACKAGE=jrtplib - VERSION=3.8.1 + VERSION=3.8.2 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index 16b2030..1f2a561 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.8.1) +AM_INIT_AUTOMAKE(jrtplib,3.8.2) RTP_FILIO="// Don't have " RTP_SOCKIO="// Don't have " diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index 7dfe4a6..68c8dda 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 16c3351..3d76880 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index eb46cf7..d68246e 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 5817854..79b097e 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index 3b80d53..addba84 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index fdcd9d5..b2326d5 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index 99fffd3..bb503f1 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index b7a8716..6b3fdb7 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 2312467..2c77b13 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 66e142b..f19e041 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index 52af1e4..bfde452 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index 4af3ec6..df33aac 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index e510bf5..7be1866 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 1d965c2..627bb1e 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index 3571ae4..5c3f9b1 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index 1f3ea9a..a4290dc 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index 78d0453..9bb1f3f 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index d6c6f61..9a71b6d 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 566cd66..3d3743f 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 282cdb7..fb547de 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index 4925249..e5ae130 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 3a48ffb..d89c97e 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 1051a3c..379bc6a 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 88f80d1..cd11a20 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index b974789..dc5f793 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index 65aa99d..f93ce95 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig.h b/src/rtpconfig.h index 1f16a5c..f3811c8 100644 --- a/src/rtpconfig.h +++ b/src/rtpconfig.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig_unix.h.in index 48462a5..60dcd52 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig_unix.h.in @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h index 2489555..129a4e7 100644 --- a/src/rtpconfig_win.h +++ b/src/rtpconfig_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index c094350..3496df6 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.h b/src/rtpdebug.h index 238e419..a0c7078 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdefines.h b/src/rtpdefines.h index dc3687a..826311b 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index f8e0fbd..889e4bf 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.h b/src/rtperrors.h index 8922a07..47cf32f 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 3ac438e..3469292 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index 2f60b3e..a8608c3 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index f592c83..c854b0d 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 759a9ea..4138553 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index f523975..5337500 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index a0ae534..9d8d94d 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 0ee7d4b..712bd88 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index c665e5c..9651ad3 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 5208387..b0ec10c 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 042607e..488f94e 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 0d38d8b..1fe6fe0 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -36,7 +36,7 @@ RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,8,1); + return RTPLibraryVersion(3,8,2); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index bebd414..34e50f8 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index 278337b..25e2934 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index 0da86b1..efef1ed 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 46f3f9d..da96d7d 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacket.h b/src/rtppacket.h index a51e17f..372ed69 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index a835e03..acd1558 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index c209664..8ff2ed2 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index 4f6ffce..1c0ea66 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 90fd1cd..49c49ab 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 810f8fb..ed1680b 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.h b/src/rtprandom.h index 4e2b36a..1079760 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrand48.cpp b/src/rtprandomrand48.cpp index cbdcebf..b8ac92a 100644 --- a/src/rtprandomrand48.cpp +++ b/src/rtprandomrand48.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -68,7 +68,7 @@ uint8_t RTPRandomRand48::GetRandom8() uint16_t RTPRandomRand48::GetRandom16() { - uint32_t x = ((GetRandom32() >> 16)&0xff); + uint32_t x = ((GetRandom32() >> 16)&0xffff); return (uint16_t)x; } diff --git a/src/rtprandomrand48.h b/src/rtprandomrand48.h index 4ed4e55..5538035 100644 --- a/src/rtprandomrand48.h +++ b/src/rtprandomrand48.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrands.cpp b/src/rtprandomrands.cpp index 5fccbbe..b0efa06 100644 --- a/src/rtprandomrands.cpp +++ b/src/rtprandomrands.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrands.h b/src/rtprandomrands.h index 865b927..291fe20 100644 --- a/src/rtprandomrands.h +++ b/src/rtprandomrands.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomurandom.cpp b/src/rtprandomurandom.cpp index 8b28445..a90cd4b 100644 --- a/src/rtprandomurandom.cpp +++ b/src/rtprandomurandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomurandom.h b/src/rtprandomurandom.h index fa0a1d5..c0d2b09 100644 --- a/src/rtprandomurandom.h +++ b/src/rtprandomurandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 71112df..58c8b1b 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 4a628ae..d5364fe 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsession.h b/src/rtpsession.h index 8a4721c..b75cf6a 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index 3453ce6..f3c6ef1 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 1475bf3..0314643 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index 578e461..f9657f0 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index ba68dcb..da88559 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index 6e9d344..c113d3b 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index 227337d..f827eb8 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index d0097fb..220bfc5 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsources.h b/src/rtpsources.h index 9851017..8077a84 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpstructs.h b/src/rtpstructs.h index e925006..360930b 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index 53be6da..5306f5f 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index eb4f7a7..8e099fc 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 8f7ecde..08287b3 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptypes.h b/src/rtptypes.h index 7c4d496..7d77f7b 100644 --- a/src/rtptypes.h +++ b/src/rtptypes.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 0061cb1..9732acc 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index f5415dc..da562ab 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index ff6d593..4d38469 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index ad16211..1dcca50 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index eb8e7c0..dcfa067 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2010 Jori Liesenborgs + Copyright (c) 1999-2011 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com From 3526e2f539ce00a7c5ce2c7892c78135b65cb93c Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:18 +0100 Subject: [PATCH 017/136] Import of version 3.9.0 --- CMakeLists.txt | 152 + ChangeLog | 11 +- Doxyfile | 1519 +- Makefile.am | 20 - Makefile.in | 637 - README.TXT | 19 +- TODO | 1 - aboutrfc3550 | 177 + aclocal.m4 | 7415 ------ cmake/FindJThread.cmake | 37 + cmake/JRTPLIBConfig.cmake.in | 7 + cmake/Macros.cmake | 104 + config.guess | 1516 -- config.sub | 1626 -- configure | 22194 ----------------- configure.in | 488 - depcomp | 526 - doc/Makefile.am | 2 - doc/Makefile.in | 333 - doc/jrtplib.css | 439 - doc/jrtplib.h | 5 + examples/.dummy | 0 examples/CMakeLists.txt | 8 + examples/Makefile.am | 11 - examples/Makefile.in | 483 - examples/example1.cpp | 2 + examples/example2.cpp | 2 + examples/example3.cpp | 2 + examples/example4.cpp | 2 + examples/example5.cpp | 4 + install-sh | 325 - jrtplib.dsp | 424 - jrtplib.dsw | 29 - jrtplib.sln | 19 - jrtplib.vcproj | 1186 - jrtplib_wce.sln | 22 - jrtplib_wce.vcproj | 513 - jrtplib_wce5.sln | 22 - jrtplib_wce5.vcproj | 517 - ltmain.sh | 6930 ----- missing | 360 - mkinstalldirs | 150 - pkgconfig/Makefile.am | 17 - pkgconfig/Makefile.in | 386 - pkgconfig/jrtplib-uninstalled.pc.in | 12 - pkgconfig/jrtplib.pc.in | 13 +- src/CMakeLists.txt | 121 + src/Makefile.am | 41 - src/Makefile.in | 598 - src/errcodecommand | 2 + src/extratransmitters/rtpfaketransmitter.cpp | 13 + src/extratransmitters/rtpfaketransmitter.h | 12 +- src/rtcpapppacket.cpp | 6 + src/rtcpapppacket.h | 5 + src/rtcpbyepacket.cpp | 5 + src/rtcpbyepacket.h | 5 + src/rtcpcompoundpacket.cpp | 6 + src/rtcpcompoundpacket.h | 5 + src/rtcpcompoundpacketbuilder.cpp | 5 + src/rtcpcompoundpacketbuilder.h | 5 + src/rtcppacket.cpp | 5 + src/rtcppacket.h | 5 + src/rtcppacketbuilder.cpp | 5 + src/rtcppacketbuilder.h | 5 + src/rtcprrpacket.cpp | 6 + src/rtcprrpacket.h | 5 + src/rtcpscheduler.cpp | 5 + src/rtcpscheduler.h | 5 + src/rtcpsdesinfo.cpp | 5 + src/rtcpsdesinfo.h | 5 + src/rtcpsdespacket.cpp | 5 + src/rtcpsdespacket.h | 7 +- src/rtcpsrpacket.cpp | 5 + src/rtcpsrpacket.h | 5 + src/rtcpunknownpacket.h | 5 + src/rtpaddress.h | 6 + src/rtpbyteaddress.cpp | 105 + src/rtpbyteaddress.h | 93 + src/rtpcollisionlist.cpp | 5 + src/rtpcollisionlist.h | 5 + src/rtpconfig.h | 45 - src/{rtpconfig_unix.h.in => rtpconfig.h.in} | 32 +- src/rtpconfig_win.h | 56 - src/rtperrors.cpp | 24 + src/rtperrors.h | 25 + src/rtpexternaltransmitter.cpp | 925 + src/rtpexternaltransmitter.h | 240 + src/rtphashtable.h | 5 + src/rtpinternalsourcedata.cpp | 5 + src/rtpinternalsourcedata.h | 5 + src/rtpipv4address.cpp | 6 + src/rtpipv4address.h | 5 + src/rtpipv4destination.h | 5 + src/rtpipv6address.cpp | 5 + src/rtpipv6address.h | 5 + src/rtpipv6destination.h | 5 + src/rtpkeyhashtable.h | 5 + src/rtplibraryversion.cpp | 6 +- src/rtplibraryversion.h | 5 + src/rtpmemorymanager.h | 22 +- src/rtpmemoryobject.h | 5 + src/rtppacket.cpp | 5 + src/rtppacket.h | 5 + src/rtppacketbuilder.cpp | 4 + src/rtppacketbuilder.h | 5 + src/rtppollthread.cpp | 7 +- src/rtppollthread.h | 13 +- src/rtprandom.cpp | 5 + src/rtprandom.h | 5 + src/rtprandomrand48.cpp | 45 +- src/rtprandomrand48.h | 9 +- src/rtprandomrands.cpp | 7 +- src/rtprandomrands.h | 5 + src/rtprandomurandom.cpp | 22 +- src/rtprandomurandom.h | 5 + src/rtprawpacket.h | 5 + src/rtpsession.cpp | 13 +- src/rtpsession.h | 9 +- src/rtpsessionparams.cpp | 5 + src/rtpsessionparams.h | 5 + src/rtpsessionsources.cpp | 5 + src/rtpsessionsources.h | 5 + src/rtpsourcedata.cpp | 6 + src/rtpsourcedata.h | 6 + src/rtpsources.cpp | 6 + src/rtpsources.h | 5 + src/rtpstructs.h | 5 + src/rtptimeutilities.cpp | 5 + src/rtptimeutilities.h | 6 + src/rtptransmitter.h | 18 +- src/rtptypes.h | 37 - src/rtptypes.h.in | 2 + src/rtptypes_win.h | 15 +- src/rtpudpv4transmitter.cpp | 18 +- src/rtpudpv4transmitter.h | 10 +- src/rtpudpv6transmitter.cpp | 13 + src/rtpudpv6transmitter.h | 10 +- tools/Makefile.am | 2 - tools/Makefile.in | 333 - tools/getloginrtest.cpp | 9 + tools/ipv4mcasttest.cpp | 21 + tools/ipv6mcasttest.cpp | 23 + tools/ipv6test.cpp | 21 + tools/salentest.cpp | 20 + tools/socklentest.cpp | 22 + 145 files changed, 3604 insertions(+), 48422 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile.am delete mode 100644 Makefile.in create mode 100644 aboutrfc3550 delete mode 100644 aclocal.m4 create mode 100644 cmake/FindJThread.cmake create mode 100644 cmake/JRTPLIBConfig.cmake.in create mode 100644 cmake/Macros.cmake delete mode 100755 config.guess delete mode 100755 config.sub delete mode 100755 configure delete mode 100644 configure.in delete mode 100755 depcomp delete mode 100644 doc/Makefile.am delete mode 100644 doc/Makefile.in delete mode 100644 doc/jrtplib.css create mode 100644 examples/.dummy create mode 100644 examples/CMakeLists.txt delete mode 100644 examples/Makefile.am delete mode 100644 examples/Makefile.in delete mode 100755 install-sh delete mode 100644 jrtplib.dsp delete mode 100644 jrtplib.dsw delete mode 100644 jrtplib.sln delete mode 100644 jrtplib.vcproj delete mode 100644 jrtplib_wce.sln delete mode 100644 jrtplib_wce.vcproj delete mode 100644 jrtplib_wce5.sln delete mode 100644 jrtplib_wce5.vcproj delete mode 100644 ltmain.sh delete mode 100755 missing delete mode 100755 mkinstalldirs delete mode 100644 pkgconfig/Makefile.am delete mode 100644 pkgconfig/Makefile.in delete mode 100644 pkgconfig/jrtplib-uninstalled.pc.in create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile.am delete mode 100644 src/Makefile.in create mode 100755 src/errcodecommand create mode 100644 src/rtpbyteaddress.cpp create mode 100644 src/rtpbyteaddress.h delete mode 100644 src/rtpconfig.h rename src/{rtpconfig_unix.h.in => rtpconfig.h.in} (80%) delete mode 100644 src/rtpconfig_win.h create mode 100644 src/rtpexternaltransmitter.cpp create mode 100644 src/rtpexternaltransmitter.h delete mode 100644 src/rtptypes.h create mode 100644 src/rtptypes.h.in delete mode 100644 tools/Makefile.am delete mode 100644 tools/Makefile.in create mode 100644 tools/getloginrtest.cpp create mode 100644 tools/ipv4mcasttest.cpp create mode 100644 tools/ipv6mcasttest.cpp create mode 100644 tools/ipv6test.cpp create mode 100644 tools/salentest.cpp create mode 100644 tools/socklentest.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a0b70e6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,152 @@ +cmake_minimum_required(VERSION 2.6) + +project(jrtplib) +set(VERSION 3.9.0) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") + +set (_DEFAULT_LIBRARY_INSTALL_DIR lib) +if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4) + set (_DEFAULT_LIBRARY_INSTALL_DIR lib32) +elseif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8) + set (_DEFAULT_LIBRARY_INSTALL_DIR lib64) +endif () + +set(LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}" CACHE PATH "Library installation directory") +if(NOT IS_ABSOLUTE "${LIBRARY_INSTALL_DIR}") + set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}") +endif() + +include(CheckCXXCompilerFlag) +include(CheckIncludeFile) +include(CheckIncludeFileCXX) +include(CheckCXXSourceCompiles) +include(TestBigEndian) +include(${PROJECT_SOURCE_DIR}/cmake/Macros.cmake) + +find_package(JThread) + +set(JRTPLIB_LINK_LIBS "") +set(JRTPLIB_INTERNAL_INCLUDES "") +set(JRTPLIB_EXTERNAL_INCLUDES "") + +add_additional_stuff(JRTPLIB_EXTERNAL_INCLUDES JRTPLIB_LINK_LIBS) + +jrtplib_support_option("Support SDES PRIV items" JRTPLIB_SUPPORT_SDESPRIV RTP_SUPPORT_SDESPRIV ON "// No support for SDES PRIV items") +jrtplib_support_option("Support the probation mechanism for a new source" JRTPLIB_SUPPORT_PROBATION RTP_SUPPORT_PROBATION ON "// Do not wait for a number of consecutive packets to validate source") +jrtplib_support_option("Support sending RTCP APP packets" JRTPLIB_SUPPORT_SENDAPP RTP_SUPPORT_SENDAPP ON "// No direct support for sending RTCP APP packets") +jrtplib_support_option("Support sending unknown RTCP packets" JRTPLIB_SUPPORT_RTCPUNKNOWN RTP_SUPPORT_RTCPUNKNOWN OFF "// No support for sending unknown RTCP packets") +jrtplib_support_option("Support memory management mechanism" JRTPLIB_SUPPORT_MEMORYMGMT RTP_SUPPORT_MEMORYMANAGEMENT ON "// No memory management support") + +jrtplib_include_test(sys/filio.h RTP_HAVE_SYS_FILIO "// Don't have ") +jrtplib_include_test(sys/sockio.h RTP_HAVE_SYS_SOCKIO "// Don't have ") +jrtplib_include_test(ifaddrs.h RTP_SUPPORT_IFADDRS "// No ifaddrs support") + +if (JTHREAD_FOUND) + set(V "ON") +else (JTHREAD_FOUND) + set(V "OFF") +endif (JTHREAD_FOUND) + +option(JTHREAD_ENABLED "Thread support" ${V}) +if (JTHREAD_ENABLED) + set (RTP_SUPPORT_THREAD "#define RTP_SUPPORT_THREAD") + if (JTHREAD_FOUND) + save_paths(JRTPLIB_EXTERNAL_INCLUDES "${JTHREAD_INCLUDE_DIRS}") + save_paths(JRTPLIB_LINK_LIBS "${JTHREAD_LIBRARIES}") + endif(JTHREAD_FOUND) +else (JTHREAD_ENABLED) + set (RTP_SUPPORT_THREAD "// No support for JThread was enabled") +endif (JTHREAD_ENABLED) + +if (CMAKE_CROSSCOMPILING) + option (JRTPLIB_USE_BIGENDIAN "Target platform is big endian" ON) + if (JRTPLIB_USE_BIGENDIAN) + set(RTP_ENDIAN "#define RTP_BIG_ENDIAN") + else (JRTPLIB_USE_BIGENDIAN) + set(RTP_ENDIAN "// Little endian system") + endif (JRTPLIB_USE_BIGENDIAN) +else (CMAKE_CROSSCOMPILING) + test_big_endian(JRTPLIB_BIGENDIAN) + if (JRTPLIB_BIGENDIAN) + set(RTP_ENDIAN "#define RTP_BIG_ENDIAN") + else (JRTPLIB_BIGENDIAN) + set(RTP_ENDIAN "// Little endian system") + endif (JRTPLIB_BIGENDIAN) +endif (CMAKE_CROSSCOMPILING) + +jrtplib_test_feature(socklentest RTP_SOCKLENTYPE_UINT TRUE "// socklen_t is 'int'") +jrtplib_test_feature(ipv4mcasttest RTP_SUPPORT_IPV4MULTICAST FALSE "// No IPv4 multicasting support") +jrtplib_test_feature(salentest RTP_HAVE_SOCKADDR_LEN FALSE "// No sa_len member in struct sockaddr") +jrtplib_test_feature(getloginrtest RTP_SUPPORT_GETLOGINR FALSE "// Not using getlogin_r") +jrtplib_test_feature(ipv6test RTP_SUPPORT_IPV6 FALSE "// No IPv6 support") +jrtplib_test_feature(ipv6mcasttest RTP_SUPPORT_IPV6MULTICAST FALSE "// No IPv6 multicasting support") + +check_cxx_source_compiles("#include \n#include \nint main(void) { size_t a = 0 ; size_t b = a; uint32_t x = 0; uint32_t y = x; return 0; }" JRTPLIB_STDINT) +if (JRTPLIB_STDINT) + set(RTP_INTTYPE_HEADERS "#include \n#include ") +else (JRTPLIB_STDINT) + check_cxx_source_compiles("#include \n#include \nint main(void) { uint32_t x = 0; uint32_t y = x; return 0; }" JRTPLIB_INTTYPES) + if (JRTPLIB_INTTYPES) + set(RTP_INTTYPE_HEADERS "#include \n#include \n") + else (JRTPLIB_INTTYPES) + if (NOT UNIX AND WIN32) + set(RTP_INTTYPE_HEADERS "#include \"rtptypes_win.h\"") + else (NOT UNIX AND WIN32) + set(RTP_INTTYPE_HEADERS "#error Could not find header files that define types like 'uint32_t'. Please edit the file ${PROJECT_BINARY_DIR}/src/rtptypes_unix.h and make sure that the following types are defined: int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t") + message("\n\nError: Could not find header files that define types like 'uint32_t'.\nPlease edit the file ${PROJECT_BINARY_DIR}/src/rtptypes_unix.h\nand make sure that the following types are defined: \nint8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t\n\n") + endif (NOT UNIX AND WIN32) + endif (JRTPLIB_INTTYPES) +endif (JRTPLIB_STDINT) + +if (NOT UNIX AND WIN32) + set(RTP_WINSOCK_HEADERS "#if defined(WIN32) || defined(_WIN32_WCE)\n #include \n #include \n#ifndef _WIN32_WCE\n #include \n#endif // _WIN32_WCE\n#endif // WIN32 || _WIN32_WCE\n") +endif (NOT UNIX AND WIN32) + +configure_file("${PROJECT_SOURCE_DIR}/src/rtptypes.h.in" "${PROJECT_BINARY_DIR}/src/rtptypes.h") +configure_file("${PROJECT_SOURCE_DIR}/src/rtpconfig.h.in" "${PROJECT_BINARY_DIR}/src/rtpconfig.h") + +if (NOT UNIX) + list(APPEND JRTPLIB_LINK_LIBS "ws2_32") +endif (NOT UNIX) + +save_paths(JRTPLIB_INTERNAL_INCLUDES "${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/src") + +add_subdirectory(src) +add_subdirectory(examples) + +if (UNIX) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-shared LOCATION) + get_filename_component(JRTPLIB_LIBNAME "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) + set(JRTPLIB_LIBS "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME}") +else (UNIX) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static RELEASE_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_RELEASE "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static DEBUG_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_DEBUG "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) + set(JRTPLIB_LIBS optimized "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_RELEASE}" + debug "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_DEBUG}") +endif (UNIX) + +set(JRTPLIB_INCDIRS ${JRTPLIB_EXTERNAL_INCLUDES} ${CMAKE_INSTALL_PREFIX}/include) +set(JRTPLIB_LIBS ${JRTPLIB_LIBS} ${JRTPLIB_LINK_LIBS}) +remove_empty(JRTPLIB_INCDIRS) +list(REMOVE_DUPLICATES JRTPLIB_INCDIRS) +remove_empty(JRTPLIB_LIBS) + +configure_file("${PROJECT_SOURCE_DIR}/cmake/JRTPLIBConfig.cmake.in" "${PROJECT_BINARY_DIR}/cmake/JRTPLIBConfig.cmake") +install(FILES "${PROJECT_BINARY_DIR}/cmake/JRTPLIBConfig.cmake" DESTINATION ${LIBRARY_INSTALL_DIR}/cmake/JRTPLIB) + +if (UNIX) + foreach(ARG ${JRTPLIB_LIBS}) + set(JRTPLIB_LIBS_PKGCONFIG "${JRTPLIB_LIBS_PKGCONFIG} ${ARG}") + endforeach() + foreach(ARG ${JRTPLIB_INCDIRS}) + set(JRTPLIB_INCDIRS_PKGCONFIG "${JRTPLIB_INCDIRS_PKGCONFIG} -I${ARG}") + endforeach() + + configure_file(${PROJECT_SOURCE_DIR}/pkgconfig/jrtplib.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/jrtplib.pc) + install(FILES ${PROJECT_BINARY_DIR}/pkgconfig/jrtplib.pc DESTINATION ${LIBRARY_INSTALL_DIR}/pkgconfig) +endif (UNIX) + + diff --git a/ChangeLog b/ChangeLog index ebff9e2..7f11bfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,19 @@ - February 2, 2011 + July 25, 2011 JRTPLIB ChangeLog ----------- + 3.9.0 (July 2011) + * Switched to CMake build system. + * Added the RTPByteAddress class, which can be used to describe + a host/port combination in a very general way. + * Added the RTPExternalTransmitter class which can be used if + one would like to use a transmission mechanism other than + the UDP based transmitters. + * Placed everything in namespace 'jrtplib'. + 3.8.2 (February 2011) * Fixed bug in RTPRandomRand48. The uint16_t version used a & 0xff instead of & 0xffff. Thanks to Alexey Kumkov diff --git a/Doxyfile b/Doxyfile index ea3e323..3f3164b 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,652 +1,749 @@ -# Doxyfile 1.5.5 +# Doxyfile 1.7.3 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project +# doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored +# All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") +# Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = jrtplib +PROJECT_NAME = JRTPLIB -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.8.2 +PROJECT_NUMBER = 3.9.0 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = NO -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = NO -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = YES -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src/ doc/ -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.h -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = doc/ -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -654,20 +751,21 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -676,312 +774,508 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = documentation -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = doc/jrtplib.css +#HTML_STYLESHEET = doc/jrtplib.css + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. -HTML_DYNAMIC_SECTIONS = NO +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [0,1..20]) # that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. -PAPER_TYPE = a4wide +PAPER_TYPE = a4 -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -990,33 +1284,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -1025,10 +1319,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1037,82 +1331,84 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = RTP_SUPPORT_IPV4MULTICAST \ @@ -1126,240 +1422,267 @@ PREDEFINED = RTP_SUPPORT_IPV4MULTICAST \ RTP_SUPPORT_RTCPUNKNOWN -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 97ecaf4..0000000 --- a/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -SUBDIRS = src tools doc examples pkgconfig -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ - jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln jrtplib_wce5.sln \ - jrtplib_wce5.vcproj Doxyfile - -dist-hook: distclean - rm -f $(distdir)/src/rtpconfig_unix.h - rm -f $(distdir)/src/rtptypes_unix.h - mv $(distdir)/jrtplib.dsw $(distdir)/jrtplib.dsw.tmp - mv $(distdir)/jrtplib.dsp $(distdir)/jrtplib.dsp.tmp - todos < $(distdir)/jrtplib.dsw.tmp > $(distdir)/jrtplib.dsw - todos < $(distdir)/jrtplib.dsp.tmp > $(distdir)/jrtplib.dsp - rm $(distdir)/jrtplib.dsw.tmp - rm $(distdir)/jrtplib.dsp.tmp - chmod a-x $(distdir)/jrtplib.vcproj - chmod a-x $(distdir)/jrtplib.sln - chmod a-x $(distdir)/jrtplib_wce.vcproj - chmod a-x $(distdir)/jrtplib_wce.sln - chmod a-x $(distdir)/jrtplib_wce5.vcproj - chmod a-x $(distdir)/jrtplib_wce5.sln diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index ca1b0c5..0000000 --- a/Makefile.in +++ /dev/null @@ -1,637 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog TODO \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - mkinstalldirs -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = src tools doc examples pkgconfig -EXTRA_DIST = LICENSE.MIT ChangeLog README.TXT jrtplib.dsw jrtplib.dsp jrtplib.vcproj \ - jrtplib.sln jrtplib_wce.vcproj jrtplib_wce.sln jrtplib_wce5.sln \ - jrtplib_wce5.vcproj Doxyfile - -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/pkgconfig $(distdir)/src - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am - - -dist-hook: distclean - rm -f $(distdir)/src/rtpconfig_unix.h - rm -f $(distdir)/src/rtptypes_unix.h - mv $(distdir)/jrtplib.dsw $(distdir)/jrtplib.dsw.tmp - mv $(distdir)/jrtplib.dsp $(distdir)/jrtplib.dsp.tmp - todos < $(distdir)/jrtplib.dsw.tmp > $(distdir)/jrtplib.dsw - todos < $(distdir)/jrtplib.dsp.tmp > $(distdir)/jrtplib.dsp - rm $(distdir)/jrtplib.dsw.tmp - rm $(distdir)/jrtplib.dsp.tmp - chmod a-x $(distdir)/jrtplib.vcproj - chmod a-x $(distdir)/jrtplib.sln - chmod a-x $(distdir)/jrtplib_wce.vcproj - chmod a-x $(distdir)/jrtplib_wce.sln - chmod a-x $(distdir)/jrtplib_wce5.vcproj - chmod a-x $(distdir)/jrtplib_wce5.sln -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/README.TXT b/README.TXT index 65444a3..c717b40 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - February 2, 2011 + July 25, 2011 - JRTPLIB (v3.8.2) + JRTPLIB (v3.9.0) Developed at the The Expertise Centre for @@ -57,17 +57,10 @@ IN THE SOFTWARE. INSTALLATION NOTES ================== -* To compile the library on a unix-like platform, just start the configure - script. This should generate a makefile which you can use to start - building the library using 'make'. - -* To compile the library on an MS-Windows platfrom: Visual Studio - workspace files are included. The project will search - for JThread files in ..\jthread-1.2.1 - To compile the library without using JThread, comment the line - with RTP_SUPPORT_THREAD in rtpconfig_win.h - Note that for Visual Studio 6, you must have service pack 6 for - installed to be able to compile the library. +* Use the CMake build system to compile the library. In case extra + include directories or libraries are needed, you can use the 'ADDITIONAL_' + CMake variables to specify these. They will be stored in both the resulting + JRTPLIB CMake configuration file and the pkg-config file. * The library documentation can be generated using Doxygen. An on-line version can be found at diff --git a/TODO b/TODO index 546c940..e69de29 100644 --- a/TODO +++ b/TODO @@ -1 +0,0 @@ -Adjust the transmitters in 'extratransmitters/' to support memory management diff --git a/aboutrfc3550 b/aboutrfc3550 new file mode 100644 index 0000000..a12e815 --- /dev/null +++ b/aboutrfc3550 @@ -0,0 +1,177 @@ + * p 9 (bottom): + In the unicast case, a participant may + receive from all other participants in the session using the same + pair of ports, or may use a distinct pair of ports for each. + + COMMENT: + By default, a RTPSession instance will use only one pair + of ports. + + * p 14 (top): + A profile MAY define additional + marker bits or specify that there is no marker bit by changing the + number of bits in the payload type field (see Section 5.3). + + COMMENT: + At the moment, no support for additional marker bits is present + + * About payload data and payload types: + The library doesn't inspect payload data or payload types. It is + left to the application using the library to decide if a packet should + be ignored or accepted + + * p 18 (middle): + o If a particular class of applications needs additional + functionality independent of payload format, the profile under + which those applications operate SHOULD define additional fixed + fields to follow immediately after the SSRC field of the existing + fixed header. Those applications will be able to quickly and + directly access the additional fields while profile-independent + monitors or recorders can still process the RTP packets by + interpreting only the first twelve octets. + + COMMENT: + No direct support for such extensions are provided + + * p 20 (bottom): + 4. A fourth, OPTIONAL function is to convey minimal session control + information, for example participant identification to be + displayed in the user interface. + + COMMENT: SDES info is supported by the library + + * p 21 (top): + The + recommendations here accommodate SSM only through Section 6.2's + option of turning off receivers' RTCP entirely. + + COMMENT: + For now, the RTCP (sending) will only be disabled entirely + if no destinations are present. + + * p 25 (middle): + The profile MAY further specify that the control traffic bandwidth + may be divided into two separate session parameters for those + participants which are active data senders and those which are not; + + COMMENT: this will not be implemented + + * p 26 (top): + This delay MAY be set to half the + minimum interval to allow quicker notification that the new + participant is present. + + COMMENT: is supplied as an option which is enabled by default + + * p 26 (middle): + An implementation MAY scale the minimum RTCP interval to a smaller + value inversely proportional to the session bandwidth parameter with + the following limitations: + + COMMENT: not supported + + * p 28 (middle): + SSRC sampling -> not supported + + * p 28 (bottom): + An implementation which is constrained to two-party + unicast operation SHOULD still use randomization of the RTCP + transmission interval to avoid unintended synchronization of multiple + instances operating in the same environment, but MAY omit the "timer + reconsideration" and "reverse reconsideration" algorithms in Sections + 6.3.3, 6.3.6 and 6.3.7. + + COMMENT: randomization and reconsideration will always be used. omitting + them is not implemented. + + * p 28 (top): + New entries MAY be considered + not valid until multiple packets carrying the new SSRC have been + received (see Appendix A.1), or until an SDES RTCP packet containing + a CNAME for that SSRC has been received. + + COMMENT: Currently, probation is optional. A source is considered + valid when either a number (depending on probation) of RTP + packets are received or when a CNAME has been received + + * p 42 (bottom): + 6.4.3 Extending the Sender and Receiver Reports + + COMMENT: Extensions of SR and RR are not supported + + * p 68 (middle): + RTP relies on the underlying protocol(s) to provide demultiplexing of + RTP data and RTCP control streams. For UDP and similar protocols, + RTP SHOULD use an even destination port number and the corresponding + RTCP stream SHOULD use the next higher (odd) destination port number. + For applications that take a single port number as a parameter and + derive the RTP and RTCP port pair from that number, if an odd number + is supplied then the application SHOULD replace that number with the + next lower (even) number to use as the base of the port pair. For + applications in which the RTP and RTCP destination port numbers are + specified via explicit, separate parameters (using a signaling + protocol or other means), the application MAY disregard the + restrictions that the port numbers be even/odd and consecutive + although the use of an even/odd port pair is still encouraged. The + RTP and RTCP port numbers MUST NOT be the same since RTP relies on + the port numbers to demultiplex the RTP data and RTCP control + streams. + + COMMENT: Currently, the transporter only accepts an even portbase. + + * p 68-69: + It is RECOMMENDED that layered encoding applications (see Section + 2.4) use a set of contiguous port numbers. + + COMMENT: No direct support for this using RTPSession, but it can be + constructed in principle using several RTPTransmitter + instances. + + * p 69: + A profile MAY specify a framing method to be used even when RTP is + carried in protocols that do provide framing in order to allow + carrying several RTP packets in one lower-layer protocol data unit, + such as a UDP packet. + + COMMENT: For UDP, such a framing mechanism will not be implemented + + + + +QUESTIONS: + * p 28: after BYE packet, ssrc should be removed after an appropriate delay. + what delay is considered appropriate? + * p 57: why do CNAMEs have to be forwarded to allow SSRC identifier collisions + to work? + -> If the CSRC sources are not senders, their identifiers wont be + seen in the CSRC list of an RTP packet. By forwarding SDES CNAMEs, + their identifiers will be present in the SDES chunk and collisions + can be detected. + * p 64: Section 8.3 + * What MTU should be used? Should it be the same for all session members? + Is it the MTU of the protocol just below RTP or of the link layer? + * p 33 (BYE scheduling): Should members be increased for each BYE packet or + for each SSRC in a BYE packet? + + * p 35: + RTP receivers provide reception quality feedback using RTCP report + packets which may take one of two forms depending upon whether or not + the receiver is also a sender. The only difference between the + sender report (SR) and receiver report (RR) forms, besides the packet + type code, is that the sender report includes a 20-byte sender + information section for use by active senders. The SR is issued if a + site has sent any data packets during the interval since issuing the + last report or the previous one, otherwise the RR is issued. + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + -> Is this also true when the sender timeout multiplier differs + from 2 ?? + + * About report blocks: should an entry be made for each SSRC_n in the + list of report blocks if the RR or SR originates from a valid SSRC? + -> probably not, since then we don't have the right transport + address of the SSRC_n + -> Indeed: see p 61 at bottom + + * Is it a valid tactic to use a timestamp unit estimation (from + two SRs) for jitter calculation if no exact info is available? + diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 3ff4c2b..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,7415 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 51 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 7 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/cmake/FindJThread.cmake b/cmake/FindJThread.cmake new file mode 100644 index 0000000..466f06a --- /dev/null +++ b/cmake/FindJThread.cmake @@ -0,0 +1,37 @@ + +find_package(JThread QUIET NO_MODULE) + +if (NOT JTHREAD_FOUND) # Config file could not be found + find_path(JTHREAD_INCLUDE_DIR jthread/jthread.h) + + set(JTHREAD_INCLUDE_DIRS ${JTHREAD_INCLUDE_DIR}) + + if (UNIX) + find_library(JTHREAD_LIBRARY jthread) + if (JTHREAD_LIBRARY) + set(JTHREAD_LIBRARIES ${JTHREAD_LIBRARY}) + find_library(JTHREAD_PTHREAD_LIB pthread) + if (JTHREAD_PTHREAD_LIB) + set(JTHREAD_LIBRARIES ${JTHREAD_LIBRARY} ${JTHREAD_PTHREAD_LIB}) + endif(JTHREAD_PTHREAD_LIB) + endif (JTHREAD_LIBRARY) + else (UNIX) + find_library(JTHREAD_LIB_RELEASE jthread) + find_library(JTHREAD_LIB_DEBUG jthread_d) + + if (JTHREAD_LIB_RELEASE OR JTHREAD_LIB_DEBUG) + set(JTHREAD_LIBRARIES "") + if (JTHREAD_LIB_RELEASE) + set(JTHREAD_LIBRARIES ${JTHREAD_LIBRARIES} optimized ${JTHREAD_LIB_RELEASE}) + endif (JTHREAD_LIB_RELEASE) + if (JTHREAD_LIB_DEBUG) + set(JTHREAD_LIBRARIES ${JTHREAD_LIBRARIES} debug ${JTHREAD_LIB_DEBUG}) + endif (JTHREAD_LIB_DEBUG) + endif (JTHREAD_LIB_RELEASE OR JTHREAD_LIB_DEBUG) + endif(UNIX) +endif (NOT JTHREAD_FOUND) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(JThread DEFAULT_MSG JTHREAD_INCLUDE_DIRS JTHREAD_LIBRARIES) + diff --git a/cmake/JRTPLIBConfig.cmake.in b/cmake/JRTPLIBConfig.cmake.in new file mode 100644 index 0000000..4877c56 --- /dev/null +++ b/cmake/JRTPLIBConfig.cmake.in @@ -0,0 +1,7 @@ + +set(JRTPLIB_FOUND 1) + +set(JRTPLIB_INCLUDE_DIRS ${JRTPLIB_INCDIRS}) + +set(JRTPLIB_LIBRARIES ${JRTPLIB_LIBS}) + diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake new file mode 100644 index 0000000..3307a61 --- /dev/null +++ b/cmake/Macros.cmake @@ -0,0 +1,104 @@ +macro(jrtplib_support_option DESCRIPTION OPTIONNAME DEFINENAME DEFAULTVALUE EMPTYVALUE) + option(${OPTIONNAME} ${DESCRIPTION} ${DEFAULTVALUE}) + if (${OPTIONNAME}) + set(${DEFINENAME} "#define ${DEFINENAME}") + else (${OPTIONNAME}) + set(${DEFINENAME} "${EMPTYVALUE}") + endif (${OPTIONNAME}) +endmacro(jrtplib_support_option) + +macro(jrtplib_include_test INCFILE DEFINENAME EMPTYVALUE) + check_include_file_cxx(${INCFILE} jrtplib_include_test_${DEFINENAME}) + if (jrtplib_include_test_${DEFINENAME}) + set(${DEFINENAME} "#define ${DEFINENAME}") + else (jrtplib_include_test_${DEFINENAME}) + set(${DEFINENAME} "${EMPTYVALUE}") + endif (jrtplib_include_test_${DEFINENAME}) +endmacro(jrtplib_include_test) + +macro (jrtplib_test_feature FILENAME DEFINENAME INVERT EMPTYVALUE) + if (NOT DEFINED ${FILENAME}_RESULT) + try_compile(${FILENAME}_RESULT "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/tools/${FILENAME}.cpp" + OUTPUT_VARIABLE OUTVAR) + message(STATUS "Compiling ${FILENAME}.cpp") + set(BLA ${INVERT}) + if (NOT BLA) + if (${FILENAME}_RESULT) + set(${DEFINENAME} "#define ${DEFINENAME}" CACHE INTERNAL "setting ${DEFINENAME} in rtpconfig.h") + message(STATUS "Compiling ${FILENAME}.cpp worked - setting ${DEFINENAME} in rtpconfig.h") + else (${FILENAME}_RESULT) + set(${DEFINENAME} "${EMPTYVALUE}" CACHE INTERNAL "") + message(STATUS "Compiling ${FILENAME}.cpp failed - no action necessary") + endif (${FILENAME}_RESULT) + else (NOT BLA) + if (NOT ${FILENAME}_RESULT) + set(${DEFINENAME} "#define ${DEFINENAME}" CACHE INTERNAL "setting ${DEFINENAME} in rtpconfig.h") + message(STATUS "Compiling ${FILENAME}.cpp failed - setting ${DEFINENAME} in rtpconfig.h") + else (NOT ${FILENAME}_RESULT) + set(${DEFINENAME} "${EMPTYVALUE}" CACHE INTERNAL "") + message(STATUS "Compiling ${FILENAME}.cpp worked - no action necessary") + endif (NOT ${FILENAME}_RESULT) + endif (NOT BLA) + endif (NOT DEFINED ${FILENAME}_RESULT) +endmacro (jrtplib_test_feature) + +macro(save_paths VARNAME) + set (BLA "${ARGN}") + foreach(i IN LISTS BLA) + set (BLA2 "${i}") + if (BLA2) + list(APPEND ${VARNAME} "${i}") + endif (BLA2) + endforeach(i) + list(LENGTH ${VARNAME} BLA) + if (BLA GREATER 0) + list(REMOVE_DUPLICATES ${VARNAME}) + endif (BLA GREATER 0) +endmacro(save_paths) + +macro(remove_empty VARNAME) + set (remove_empty_NEWLIST "") + foreach(i IN LISTS ${VARNAME}) + set (BLA2 "${i}") + if (BLA2) + list(APPEND remove_empty_NEWLIST "${i}") + endif (BLA2) + endforeach(i) + set(${VARNAME} "${remove_empty_NEWLIST}") +endmacro(remove_empty) + +macro(apply_include_paths VARNAME) + set (BLA "${VARNAME}") + foreach(i IN LISTS BLA) + set (BLA2 "${i}") + if (BLA2) + include_directories("${i}") + endif (BLA2) + endforeach(i) +endmacro(apply_include_paths) + +macro(add_additional_stuff INCVAR LIBVAR) + set(ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional include directories") + if (UNIX AND NOT WIN32) + set(ADDITIONAL_LIBRARIES "" CACHE STRING "Additional libraries to link against") + else (UNIX AND NOT WIN32) + set(ADDITIONAL_GENERAL_LIBRARIES "" CACHE STRING "Additional libraries to link against in both debug and release modes") + set(ADDITIONAL_RELEASE_LIBRARIES "" CACHE STRING "Additional libraries to link against in release mode") + set(ADDITIONAL_DEBUG_LIBRARIES "" CACHE STRING "Additional libraries to link against in debug mode") + + set(ADDITIONAL_LIBRARIES "${ADDITIONAL_GENERAL_LIBRARIES}") + + foreach(l IN LISTS ADDITIONAL_RELEASE_LIBRARIES) + list(APPEND ADDITIONAL_LIBRARIES optimized) + list(APPEND ADDITIONAL_LIBRARIES "${l}") + endforeach(l) + foreach(l IN LISTS ADDITIONAL_DEBUG_LIBRARIES) + list(APPEND ADDITIONAL_LIBRARIES debug) + list(APPEND ADDITIONAL_LIBRARIES "${l}") + endforeach(l) + endif (UNIX AND NOT WIN32) + + save_paths(${INCVAR} "${ADDITIONAL_INCLUDE_DIRS}") + save_paths(${LIBVAR} "${ADDITIONAL_LIBRARIES}") +endmacro(add_additional_stuff) + diff --git a/config.guess b/config.guess deleted file mode 100755 index 951383e..0000000 --- a/config.guess +++ /dev/null @@ -1,1516 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-05-17' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.sub b/config.sub deleted file mode 100755 index c060f44..0000000 --- a/config.sub +++ /dev/null @@ -1,1626 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-04-29' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure b/configure deleted file mode 100755 index 38e5038..0000000 --- a/configure +++ /dev/null @@ -1,22194 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="configure.in" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -SED -GREP -EGREP -LN_S -ECHO -AR -RANLIB -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -RTP_FILIO -RTP_SOCKIO -RTP_ENDIAN -RTP_SOCKLENTYPE_UINT -RTP_JTHREADINCLUDES -RTP_HAVE_SOCKADDR_LEN -RTP_SUPPORT_IPV4MULTICAST -RTP_SUPPORT_THREAD -RTP_SUPPORT_SDESPRIV -RTP_SUPPORT_INLINETEMPLATEPARAM -RTP_SUPPORT_PROBATION -RTP_SUPPORT_GETLOGINR -RTP_SUPPORT_IPV6 -RTP_SUPPORT_IPV6MULTICAST -RTP_SUPPORT_IFADDRS -RTP_SUPPORT_SENDAPP -RTP_SUPPORT_MEMORYMANAGEMENT -RTP_SUPPORT_RTCPUNKNOWN -RTP_LINKLIBS -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-sdespriv Disable support for SDES PRIV items - --disable-probation Disable support for probation of a new source - --disable-sendapp Disable support for sending RTCP APP packets - --enable-rtcpunknown Disable support for sending unknown RTCP packets - --disable-memory Disable support for memory management - --disable-jthread Disable support for JThread - --disable-IPv6 Disable support for IPv6 - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] include additional configurations [automatic] - --with-jthread-includes Directory where JThread include files are located - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -am__api_version="1.9" -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=jrtplib - VERSION=3.8.2 - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -RTP_FILIO="// Don't have " -RTP_SOCKIO="// Don't have " -RTP_ENDIAN="// Little endian system" -RTP_SOCKLENTYPE_UINT="// socklen_t is int'" -RTP_HAVE_SOCKADDR_LEN="// No sa_len member in struct sockaddr" -RTP_SUPPORT_IPV4MULTICAST="// No IPv4 multicasting support" -RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" -RTP_SUPPORT_THREAD="// No support for jthread" -RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" -RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" -RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" -RTP_SUPPORT_IPV6="// No IPv6 support" -RTP_SUPPORT_IFADDRS="// No ifaddrs support" -RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" -RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" -RTP_SUPPORT_RTCPUNKNOWN="// No support for sending unknown RTCP packets" -RTP_LINKLIBS="" - -RTP_CHECK_JTHREADLINK="no" - -if test "BLA$CXXFLAGS" = "BLA" ; then - CXXFLAGS="-O2 " -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - - -if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 4343 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_f77_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi - - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -enable_dlopen=no -enable_win32_dll=no - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7081: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7085: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7371: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7375: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } - -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7475: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7479: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12344: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12348: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12448: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:12452: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14010: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14014: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14114: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14118: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16301: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16305: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16591: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16595: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16695: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:16699: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-sdespriv was given. -if test "${enable_sdespriv+set}" = set; then - enableval=$enable_sdespriv; - if test "$enableval" = yes ; then - privsupport="yes" - else - privsupport="no" - fi -else - - privsupport="yes" - -fi - - -if test "$privsupport" = "yes" ; then - RTP_SUPPORT_SDESPRIV="#define RTP_SUPPORT_SDESPRIV" -fi - - -# Check whether --enable-probation was given. -if test "${enable_probation+set}" = set; then - enableval=$enable_probation; - if test "$enableval" = yes ; then - probsupport="yes" - else - probsupport="no" - fi -else - - probsupport="yes" - -fi - - -if test "$probsupport" = "yes" ; then - RTP_SUPPORT_PROBATION="#define RTP_SUPPORT_PROBATION" -fi - - -# Check whether --enable-sendapp was given. -if test "${enable_sendapp+set}" = set; then - enableval=$enable_sendapp; - if test "$enableval" = yes ; then - sendappsupport="yes" - else - sendappsupport="no" - fi -else - - sendappsupport="yes" - -fi - - -if test "$sendappsupport" = "yes" ; then - RTP_SUPPORT_SENDAPP="#define RTP_SUPPORT_SENDAPP" -fi - - -# Check whether --enable-rtcpunknown was given. -if test "${enable_rtcpunknown+set}" = set; then - enableval=$enable_rtcpunknown; - if test "$enableval" = yes ; then - rtcpunknownsupport="yes" - else - rtcpunknownsupport="no" - fi -else - - rtcpunknownsupport="no" - -fi - - -if test "$rtcpunknownsupport" = "yes" ; then - RTP_SUPPORT_RTCPUNKNOWN="#define RTP_SUPPORT_RTCPUNKNOWN" -fi - - -# Check whether --enable-memory was given. -if test "${enable_memory+set}" = set; then - enableval=$enable_memory; - if test "$enableval" = yes ; then - memsupport="yes" - else - memsupport="no" - fi -else - - memsupport="yes" - -fi - - -if test "$memsupport" = "yes" ; then - RTP_SUPPORT_MEMORYMANAGEMENT="#define RTP_SUPPORT_MEMORYMANAGEMENT" -fi - - -# Check whether --enable-jthread was given. -if test "${enable_jthread+set}" = set; then - enableval=$enable_jthread; - if test "$enableval" = yes ; then - checkjthread="yes" - else - checkjthread="no" - fi -else - - checkjthread="yes" - -fi - - -if test "$checkjthread" = "yes" ; then - searchdirs="/usr/include/jthread /usr/local/include/jthread" - - { echo "$as_me:$LINENO: checking for JThread include files" >&5 -echo $ECHO_N "checking for JThread include files... $ECHO_C" >&6; } - -# Check whether --with-jthread-includes was given. -if test "${with_jthread_includes+set}" = set; then - withval=$with_jthread_includes; - if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then - { echo "$as_me:$LINENO: result: in \"$withval\"" >&5 -echo "${ECHO_T}in \"$withval\"" >&6; } - { echo "$as_me:$LINENO: checking JThread version" >&5 -echo $ECHO_N "checking JThread version... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - - #include "$withval/jthread.h" - class MyThread : public JThread - { - public: - void *Thread() { JThread::ThreadStarted(); return 0; } - }; -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - RTP_JTHREADINCLUDES="-I $withval" - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_CHECK_JTHREADLINK="yes" - { echo "$as_me:$LINENO: result: >= 1.1.0" >&5 -echo "${ECHO_T}>= 1.1.0" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: < 1.1.0" >&5 -echo "${ECHO_T}< 1.1.0" >&6; } - { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 -echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } - { echo "$as_me:$LINENO: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&5 -echo "$as_me: WARNING: The JThread include files were not found in $withval. Support for JThread has been disabled" >&2;} - fi - -else - - for i in $searchdirs ; do - if test -e $i/jthread.h && test -e $i/jmutex.h ; then - RTP_JTHREADINCLUDEDIR="$i" - { echo "$as_me:$LINENO: result: $i" >&5 -echo "${ECHO_T}$i" >&6; } - break - fi - done - if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } - { echo "$as_me:$LINENO: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&5 -echo "$as_me: WARNING: Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled" >&2;} - else - { echo "$as_me:$LINENO: checking JThread version" >&5 -echo $ECHO_N "checking JThread version... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - - #include "$RTP_JTHREADINCLUDEDIR/jthread.h" - class MyThread : public JThread - { - public: - void *Thread() { JThread::ThreadStarted(); return 0; } - }; -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_CHECK_JTHREADLINK="yes" - { echo "$as_me:$LINENO: result: >= 1.1.0" >&5 -echo "${ECHO_T}>= 1.1.0" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: < 1.1.0" >&5 -echo "${ECHO_T}< 1.1.0" >&6; } - { echo "$as_me:$LINENO: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&5 -echo "$as_me: WARNING: You need at least JThread version 1.1.0. Support for JThread has been disabled" >&2;} -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - -fi - -fi - -if test "$RTP_CHECK_JTHREADLINK" = "yes" ; then - { echo "$as_me:$LINENO: checking if we can link against jthread and pthread" >&5 -echo $ECHO_N "checking if we can link against jthread and pthread... $ECHO_C" >&6; } - oldldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS -ljthread -lpthread" - cat >conftest.$ac_ext <<_ACEOF - int main(void) { } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$oldldflags" -fi - - - -if test "${ac_cv_header_sys_filio_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/filio.h" >&5 -echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_filio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/filio.h usability" >&5 -echo $ECHO_N "checking sys/filio.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/filio.h presence" >&5 -echo $ECHO_N "checking sys/filio.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/filio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/filio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/filio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/filio.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/filio.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/filio.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/filio.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/filio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/filio.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/filio.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/filio.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/filio.h" >&5 -echo $ECHO_N "checking for sys/filio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_filio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_filio_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_filio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_filio_h" >&6; } - -fi -if test $ac_cv_header_sys_filio_h = yes; then - RTP_FILIO="#define RTP_HAVE_SYS_FILIO" -fi - - - - -if test "${ac_cv_header_sys_sockio_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 -echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_sockio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sockio.h usability" >&5 -echo $ECHO_N "checking sys/sockio.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/sockio.h presence" >&5 -echo $ECHO_N "checking sys/sockio.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sockio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sockio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sockio.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sockio.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sockio.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sockio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/sockio.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 -echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_sockio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_sockio_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6; } - -fi -if test $ac_cv_header_sys_sockio_h = yes; then - RTP_SOCKIO="#define RTP_HAVE_SYS_SOCKIO" -fi - - - - -if test "$cross_compiling" = yes ; then - cat << EOF - -ASSUMING TARGET IS BIG ENDIAN: - - The script detected a cross-compiler on your system. This can mean that - there really is a cross-compiler installed, or that for some other reason, - a simple program could not be run. You should check the config.log file - to verify this. - Since we are assuming a cross-compiler, we won't be able to actually test - any program. More important, we cannot test if the system is big or little - endian. - For now, big endian is assumed. If this assumption should be wrong, you will - have to comment the appropriate line in 'rtpconfig_unix.h' - -EOF - RTP_ENDIAN="#define RTP_BIG_ENDIAN // comment this if the target is a little endian system" -else - { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_bigendian=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -int -main () -{ - _ascii (); _ebcdic (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - - if test "$ac_cv_c_bigendian" = yes; then - RTP_ENDIAN="#define RTP_BIG_ENDIAN" - fi -fi - -oldcxxflags="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -Werror -Wall" -{ echo "$as_me:$LINENO: checking if compiler supports -Werror -Wall" >&5 -echo $ECHO_N "checking if compiler supports -Werror -Wall... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include -int -main () -{ - - printf("Hello world\n"); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - CXXFLAGS="$oldcxxflags" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking last argument of getsockname" >&5 -echo $ECHO_N "checking last argument of getsockname... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include -int -main () -{ -int param; - int sock = 0; - struct sockaddr addr; - getsockname(sock,&addr,¶m); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: int" >&5 -echo "${ECHO_T}int" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: unsigned int" >&5 -echo "${ECHO_T}unsigned int" >&6; } - RTP_SOCKLENTYPE_UINT="#define RTP_SOCKLENTYPE_UINT" - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -CXXFLAGS="$oldcxxflags" - - -{ echo "$as_me:$LINENO: checking if necessary options for IPv4 multicasting are available" >&5 -echo $ECHO_N "checking if necessary options for IPv4 multicasting are available... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - #include -int -main () -{ - - int testval; - struct ip_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IP_MULTICAST_TTL; - testval = IP_ADD_MEMBERSHIP; - testval = IP_DROP_MEMBERSHIP; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_SUPPORT_IPV4MULTICAST="#define RTP_SUPPORT_IPV4MULTICAST" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking if struct sockaddr has sa_len member" >&5 -echo $ECHO_N "checking if struct sockaddr has sa_len member... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include -int -main () -{ - - struct sockaddr sa; - sa.sa_len = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_HAVE_SOCKADDR_LEN="#define RTP_HAVE_SOCKADDR_LEN" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking if compiler can compile programs with STL" >&5 -echo $ECHO_N "checking if compiler can compile programs with STL... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include -int -main () -{ - - std::cout << "Bla" << std::endl; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: checking if compiler can compile STL programs with option -LANG:std" >&5 -echo $ECHO_N "checking if compiler can compile STL programs with option -LANG:std... $ECHO_C" >&6; } - CXXFLAGS="$CXXFLAGS -LANG:std" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include -int -main () -{ - - std::cout << "Bla" << std::endl; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { { echo "$as_me:$LINENO: error: Unable to compile a trivial STL program" >&5 -echo "$as_me: error: Unable to compile a trivial STL program" >&2;} - { (exit 1); exit 1; }; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking if types like uint32_t exist" >&5 -echo $ECHO_N "checking if types like uint32_t exist... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include -int -main () -{ - - uint32_t x; - x = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - echo "#include " >src/rtptypes_unix.h - echo "#include " >>src/rtptypes_unix.h - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - echo "Generating src/rtptypes.h ..." - if ! ( $CXX $CFLAGS -o tools/gettypes tools/gettypes.cpp >/dev/null 2>/dev/null ) ; then - { { echo "$as_me:$LINENO: error: Unable to create src/rtptypes_unix.h" >&5 -echo "$as_me: error: Unable to create src/rtptypes_unix.h" >&2;} - { (exit 1); exit 1; }; } - fi - if ! ( tools/gettypes >src/rtptypes_unix.h ) ; then - { { echo "$as_me:$LINENO: error: Unable to create src/rtptypes_unix.h" >&5 -echo "$as_me: error: Unable to create src/rtptypes_unix.h" >&2;} - { (exit 1); exit 1; }; } - fi - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking for getlogin_r" >&5 -echo $ECHO_N "checking for getlogin_r... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF - - #include - int main(void) - { - char buf[256]; - getlogin_r(buf,256); - return 0; - } - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_SUPPORT_GETLOGINR="#define RTP_SUPPORT_GETLOGINR" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# Check whether --enable-IPv6 was given. -if test "${enable_IPv6+set}" = set; then - enableval=$enable_IPv6; - if test "$enableval" = yes ; then - ipv6support="yes" - else - ipv6support="no" - fi -else - - ipv6support="yes" - -fi - - -if test "$ipv6support" = "yes" ; then - - if test "$cross_compiling" = yes ; then - cat << EOF - -ABOUT IPv6 SUPPORT: - - Can't check if IPv6 support is possible when cross-compiling. For now, lets - assume that you want IPv6 support enabled. To disable it, comment the two - appropriate lines in src/rtpconfig_unix.h before running make. - -EOF - else - - { echo "$as_me:$LINENO: checking IPv6 support" >&5 -echo $ECHO_N "checking IPv6 support... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF - - #include - #include - int main(void) - { - int s; - - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - - - { echo "$as_me:$LINENO: checking if necessary options for IPv6 multicasting are available" >&5 -echo $ECHO_N "checking if necessary options for IPv6 multicasting are available... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - - #include - #include - #include - - int main(void) - { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; - } - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) - - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi -fi - - -if test "${ac_cv_header_ifaddrs_h+set}" = set; then - { echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 -echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ifaddrs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ifaddrs.h usability" >&5 -echo $ECHO_N "checking ifaddrs.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ifaddrs.h presence" >&5 -echo $ECHO_N "checking ifaddrs.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ifaddrs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ifaddrs.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ifaddrs.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ifaddrs.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ifaddrs.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ifaddrs.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ifaddrs.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ifaddrs.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for ifaddrs.h" >&5 -echo $ECHO_N "checking for ifaddrs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ifaddrs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_ifaddrs_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ifaddrs_h" >&5 -echo "${ECHO_T}$ac_cv_header_ifaddrs_h" >&6; } - -fi -if test $ac_cv_header_ifaddrs_h = yes; then - RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS" -fi - - - - - - - - - - - - - - - - - - - - - - - -ac_config_files="$ac_config_files Makefile src/Makefile src/rtpconfig_unix.h doc/Makefile tools/Makefile examples/Makefile pkgconfig/Makefile pkgconfig/jrtplib.pc pkgconfig/jrtplib-uninstalled.pc" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/rtpconfig_unix.h") CONFIG_FILES="$CONFIG_FILES src/rtpconfig_unix.h" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "pkgconfig/Makefile") CONFIG_FILES="$CONFIG_FILES pkgconfig/Makefile" ;; - "pkgconfig/jrtplib.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib.pc" ;; - "pkgconfig/jrtplib-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/jrtplib-uninstalled.pc" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -SED!$SED$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -RTP_FILIO!$RTP_FILIO$ac_delim -RTP_SOCKIO!$RTP_SOCKIO$ac_delim -RTP_ENDIAN!$RTP_ENDIAN$ac_delim -RTP_SOCKLENTYPE_UINT!$RTP_SOCKLENTYPE_UINT$ac_delim -RTP_JTHREADINCLUDES!$RTP_JTHREADINCLUDES$ac_delim -RTP_HAVE_SOCKADDR_LEN!$RTP_HAVE_SOCKADDR_LEN$ac_delim -RTP_SUPPORT_IPV4MULTICAST!$RTP_SUPPORT_IPV4MULTICAST$ac_delim -RTP_SUPPORT_THREAD!$RTP_SUPPORT_THREAD$ac_delim -RTP_SUPPORT_SDESPRIV!$RTP_SUPPORT_SDESPRIV$ac_delim -RTP_SUPPORT_INLINETEMPLATEPARAM!$RTP_SUPPORT_INLINETEMPLATEPARAM$ac_delim -RTP_SUPPORT_PROBATION!$RTP_SUPPORT_PROBATION$ac_delim -RTP_SUPPORT_GETLOGINR!$RTP_SUPPORT_GETLOGINR$ac_delim -RTP_SUPPORT_IPV6!$RTP_SUPPORT_IPV6$ac_delim -RTP_SUPPORT_IPV6MULTICAST!$RTP_SUPPORT_IPV6MULTICAST$ac_delim -RTP_SUPPORT_IFADDRS!$RTP_SUPPORT_IFADDRS$ac_delim -RTP_SUPPORT_SENDAPP!$RTP_SUPPORT_SENDAPP$ac_delim -RTP_SUPPORT_MEMORYMANAGEMENT!$RTP_SUPPORT_MEMORYMANAGEMENT$ac_delim -RTP_SUPPORT_RTCPUNKNOWN!$RTP_SUPPORT_RTCPUNKNOWN$ac_delim -RTP_LINKLIBS!$RTP_LINKLIBS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - diff --git a/configure.in b/configure.in deleted file mode 100644 index 1f2a561..0000000 --- a/configure.in +++ /dev/null @@ -1,488 +0,0 @@ -AC_INIT(configure.in) -AM_INIT_AUTOMAKE(jrtplib,3.8.2) - -RTP_FILIO="// Don't have " -RTP_SOCKIO="// Don't have " -RTP_ENDIAN="// Little endian system" -RTP_SOCKLENTYPE_UINT="// socklen_t is int'" -RTP_HAVE_SOCKADDR_LEN="// No sa_len member in struct sockaddr" -RTP_SUPPORT_IPV4MULTICAST="// No IPv4 multicasting support" -RTP_SUPPORT_IPV6MULTICAST="// No IPv6 multicasting support" -RTP_SUPPORT_THREAD="// No support for jthread" -RTP_SUPPORT_SDESPRIV="// No support for SDES PRIV items" -RTP_SUPPORT_PROBATION="// Do not wait for a number of consecutive packets to validate source" -RTP_SUPPORT_GETLOGINR="// Not using getlogin_r" -RTP_SUPPORT_IPV6="// No IPv6 support" -RTP_SUPPORT_IFADDRS="// No ifaddrs support" -RTP_SUPPORT_SENDAPP="// No direct support for sending RTCP APP packets" -RTP_SUPPORT_MEMORYMANAGEMENT="// No memory management support" -RTP_SUPPORT_RTCPUNKNOWN="// No support for sending unknown RTCP packets" -RTP_LINKLIBS="" - -RTP_CHECK_JTHREADLINK="no" - -if test "BLA$CXXFLAGS" = "BLA" ; then - dnl CXXFLAGS="-g -Werror -Wall" - CXXFLAGS="-O2 " -fi - -dnl --------------------------------------------------------------------------- -dnl Set language to C++ and do libtool stuff -dnl --------------------------------------------------------------------------- - -AC_LANG(C++) - -AM_PROG_LIBTOOL - -dnl --------------------------------------------------------------------------- -dnl Check for the SDES PRIV support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(sdespriv,[ --disable-sdespriv Disable support for SDES PRIV items],[ - if test "$enableval" = yes ; then - privsupport="yes" - else - privsupport="no" - fi],[ - privsupport="yes" - ]) - -if test "$privsupport" = "yes" ; then - RTP_SUPPORT_SDESPRIV="#define RTP_SUPPORT_SDESPRIV" -fi - -dnl --------------------------------------------------------------------------- -dnl Check for the probation support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(probation,[ --disable-probation Disable support for probation of a new source],[ - if test "$enableval" = yes ; then - probsupport="yes" - else - probsupport="no" - fi],[ - probsupport="yes" - ]) - -if test "$probsupport" = "yes" ; then - RTP_SUPPORT_PROBATION="#define RTP_SUPPORT_PROBATION" -fi - -dnl --------------------------------------------------------------------------- -dnl Check for RTCP APP sending support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(sendapp,[ --disable-sendapp Disable support for sending RTCP APP packets],[ - if test "$enableval" = yes ; then - sendappsupport="yes" - else - sendappsupport="no" - fi],[ - sendappsupport="yes" - ]) - -if test "$sendappsupport" = "yes" ; then - RTP_SUPPORT_SENDAPP="#define RTP_SUPPORT_SENDAPP" -fi - -dnl --------------------------------------------------------------------------- -dnl Check for RTCP unknown sending support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(rtcpunknown,[ --enable-rtcpunknown Disable support for sending unknown RTCP packets],[ - if test "$enableval" = yes ; then - rtcpunknownsupport="yes" - else - rtcpunknownsupport="no" - fi],[ - rtcpunknownsupport="no" - ]) - -if test "$rtcpunknownsupport" = "yes" ; then - RTP_SUPPORT_RTCPUNKNOWN="#define RTP_SUPPORT_RTCPUNKNOWN" -fi - -dnl --------------------------------------------------------------------------- -dnl Check for memory management support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(memory,[ --disable-memory Disable support for memory management],[ - if test "$enableval" = yes ; then - memsupport="yes" - else - memsupport="no" - fi],[ - memsupport="yes" - ]) - -if test "$memsupport" = "yes" ; then - RTP_SUPPORT_MEMORYMANAGEMENT="#define RTP_SUPPORT_MEMORYMANAGEMENT" -fi - -dnl --------------------------------------------------------------------------- -dnl Check for the jthread headers -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(jthread,[ --disable-jthread Disable support for JThread],[ - if test "$enableval" = yes ; then - checkjthread="yes" - else - checkjthread="no" - fi],[ - checkjthread="yes" - ]) - -if test "$checkjthread" = "yes" ; then - searchdirs="/usr/include/jthread /usr/local/include/jthread" - - AC_MSG_CHECKING(for JThread include files) - AC_ARG_WITH(jthread-includes,[ --with-jthread-includes Directory where JThread include files are located], - [ - if test -e "$withval"/jthread.h && test -e "$withval"/jmutex.h ; then - AC_MSG_RESULT(in "$withval") - AC_MSG_CHECKING(JThread version) - AC_COMPILE_IFELSE([ - #include "$withval/jthread.h" - class MyThread : public JThread - { - public: - void *Thread() { JThread::ThreadStarted(); return 0; } - };],[ - RTP_JTHREADINCLUDES="-I $withval" - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_CHECK_JTHREADLINK="yes" -dnl RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" - AC_MSG_RESULT(>= 1.1.0) ],[ - AC_MSG_RESULT(< 1.1.0) - AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) - else - AC_MSG_RESULT(not found) - AC_MSG_WARN(The JThread include files were not found in $withval. Support for JThread has been disabled) - fi - ], - [ - for i in $searchdirs ; do - if test -e $i/jthread.h && test -e $i/jmutex.h ; then - RTP_JTHREADINCLUDEDIR="$i" - AC_MSG_RESULT($i) - break - fi - done - if test "BLAAI$RTP_JTHREADINCLUDEDIR" = "BLAAI" ; then - AC_MSG_RESULT(not found) - AC_MSG_WARN(Unable to locate the JThread include files. Please specify the include path with --with-jthread-includes if they exist on your system. JThread support has been disabled) - else - AC_MSG_CHECKING(JThread version) - AC_COMPILE_IFELSE([ - #include "$RTP_JTHREADINCLUDEDIR/jthread.h" - class MyThread : public JThread - { - public: - void *Thread() { JThread::ThreadStarted(); return 0; } - };],[ - RTP_JTHREADINCLUDES="-I $RTP_JTHREADINCLUDEDIR" - RTP_SUPPORT_THREAD="#define RTP_SUPPORT_THREAD" - RTP_CHECK_JTHREADLINK="yes" -dnl RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" - AC_MSG_RESULT(>= 1.1.0) ],[ - AC_MSG_RESULT(< 1.1.0) - AC_MSG_WARN(You need at least JThread version 1.1.0. Support for JThread has been disabled)]) - fi - ]) -fi - -if test "$RTP_CHECK_JTHREADLINK" = "yes" ; then - AC_MSG_CHECKING(if we can link against jthread and pthread) - oldldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS -ljthread -lpthread" - AC_LINK_IFELSE( [ int main(void) { } ] , - [ RTP_LINKLIBS="$RTP_LINKLIBS -ljthread -lpthread" - AC_MSG_RESULT(yes) ] , - [ AC_MSG_RESULT(no) ] ) - LDFLAGS="$oldldflags" -fi - -dnl --------------------------------------------------------------------------- -dnl Check if sys/filio.h exists (used on solaris) -dnl --------------------------------------------------------------------------- - -AC_CHECK_HEADER(sys/filio.h,[RTP_FILIO="#define RTP_HAVE_SYS_FILIO"]) - -dnl --------------------------------------------------------------------------- -dnl Check if sys/sockio.h exists (used on solaris) -dnl --------------------------------------------------------------------------- - -AC_CHECK_HEADER(sys/sockio.h,[RTP_SOCKIO="#define RTP_HAVE_SYS_SOCKIO"]) - -dnl --------------------------------------------------------------------------- -dnl Check if it's a big endian or little endian system -dnl Note that we must be careful when a cross-compiler is being used... -dnl --------------------------------------------------------------------------- - -if test "$cross_compiling" = yes ; then - cat << EOF - -ASSUMING TARGET IS BIG ENDIAN: - - The script detected a cross-compiler on your system. This can mean that - there really is a cross-compiler installed, or that for some other reason, - a simple program could not be run. You should check the config.log file - to verify this. - Since we are assuming a cross-compiler, we won't be able to actually test - any program. More important, we cannot test if the system is big or little - endian. - For now, big endian is assumed. If this assumption should be wrong, you will - have to comment the appropriate line in 'rtpconfig_unix.h' - -EOF - RTP_ENDIAN="#define RTP_BIG_ENDIAN // comment this if the target is a little endian system" -else - AC_C_BIGENDIAN - if test "$ac_cv_c_bigendian" = yes; then - RTP_ENDIAN="#define RTP_BIG_ENDIAN" - fi -fi - -dnl --------------------------------------------------------------------------- -dnl Check if compiler supports -Werror -Wall -dnl --------------------------------------------------------------------------- -oldcxxflags="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -Werror -Wall" -AC_MSG_CHECKING(if compiler supports -Werror -Wall) -AC_TRY_COMPILE([ - #include ],[ - printf("Hello world\n");], - AC_MSG_RESULT(yes),[ - AC_MSG_RESULT(no) - CXXFLAGS="$oldcxxflags"]) - -dnl --------------------------------------------------------------------------- -dnl Check what the last argument for getsockname is -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(last argument of getsockname) -AC_TRY_COMPILE([#include - #include ], - [int param; - int sock = 0; - struct sockaddr addr; - getsockname(sock,&addr,¶m);], - AC_MSG_RESULT(int), - [ - AC_MSG_RESULT(unsigned int) - RTP_SOCKLENTYPE_UINT="#define RTP_SOCKLENTYPE_UINT" - ]) - -CXXFLAGS="$oldcxxflags" - -dnl --------------------------------------------------------------------------- -dnl Check if multicast options are known -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(if necessary options for IPv4 multicasting are available) -AC_TRY_COMPILE([ - #include - #include - #include ],[ - int testval; - struct ip_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IP_MULTICAST_TTL; - testval = IP_ADD_MEMBERSHIP; - testval = IP_DROP_MEMBERSHIP;],[ - AC_MSG_RESULT(yes) - RTP_SUPPORT_IPV4MULTICAST="#define RTP_SUPPORT_IPV4MULTICAST"], - AC_MSG_RESULT(no)) - -dnl --------------------------------------------------------------------------- -dnl Check if sockaddr has a length field (sa_len) -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(if struct sockaddr has sa_len member) -AC_TRY_COMPILE([ - #include - #include ],[ - struct sockaddr sa; - sa.sa_len = 0;],[ - AC_MSG_RESULT(yes) - RTP_HAVE_SOCKADDR_LEN="#define RTP_HAVE_SOCKADDR_LEN"], - AC_MSG_RESULT(no)) - -dnl --------------------------------------------------------------------------- -dnl Check if compiler needs -LANG:std (needed on Irix) -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(if compiler can compile programs with STL) -AC_TRY_COMPILE([ - #include ],[ - std::cout << "Bla" << std::endl; ], - AC_MSG_RESULT(yes), - [AC_MSG_RESULT(no) - AC_MSG_CHECKING(if compiler can compile STL programs with option -LANG:std) - CXXFLAGS="$CXXFLAGS -LANG:std" - AC_TRY_COMPILE([ - #include ],[ - std::cout << "Bla" << std::endl; ], - AC_MSG_RESULT(yes),[ - AC_MSG_RESULT(no) - AC_MSG_ERROR(Unable to compile a trivial STL program)] - ) - ]) - -dnl --------------------------------------------------------------------------- -dnl Check for uint32_t etc -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(if types like uint32_t exist) -AC_TRY_COMPILE([ - #include ],[ - uint32_t x; - x = 0;], - [AC_MSG_RESULT(yes) - echo "#include " >src/rtptypes_unix.h - echo "#include " >>src/rtptypes_unix.h - ],[ - AC_MSG_RESULT(no) - echo "Generating src/rtptypes.h ..." - if ! ( $CXX $CFLAGS -o tools/gettypes tools/gettypes.cpp >/dev/null 2>/dev/null ) ; then - AC_MSG_ERROR(Unable to create src/rtptypes_unix.h) - fi - if ! ( tools/gettypes >src/rtptypes_unix.h ) ; then - AC_MSG_ERROR(Unable to create src/rtptypes_unix.h) - fi - ]) - -dnl --------------------------------------------------------------------------- -dnl Check getlogin_r functions -dnl --------------------------------------------------------------------------- - -AC_MSG_CHECKING(for getlogin_r) -AC_COMPILE_IFELSE([ - #include - int main(void) - { - char buf[[256]]; - getlogin_r(buf,256); - return 0; - } - ], - [AC_MSG_RESULT(yes) - RTP_SUPPORT_GETLOGINR="#define RTP_SUPPORT_GETLOGINR"], - [ - AC_MSG_RESULT(no) - ]) - -dnl --------------------------------------------------------------------------- -dnl Check IPv6 support -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(IPv6,[ --disable-IPv6 Disable support for IPv6],[ - if test "$enableval" = yes ; then - ipv6support="yes" - else - ipv6support="no" - fi],[ - ipv6support="yes" - ]) - -if test "$ipv6support" = "yes" ; then - - if test "$cross_compiling" = yes ; then - cat << EOF - -ABOUT IPv6 SUPPORT: - - Can't check if IPv6 support is possible when cross-compiling. For now, lets - assume that you want IPv6 support enabled. To disable it, comment the two - appropriate lines in src/rtpconfig_unix.h before running make. - -EOF - else - - AC_MSG_CHECKING(IPv6 support) - AC_RUN_IFELSE([ - #include - #include - int main(void) - { - int s; - - s = socket(PF_INET6,SOCK_DGRAM,0); - if (s < 0) - return -1; - return 0; - } - ], - [AC_MSG_RESULT(enabled) - RTP_SUPPORT_IPV6="#define RTP_SUPPORT_IPV6" - - dnl --------------------------------------------------------------------------- - dnl Check if multicast options are known - dnl --------------------------------------------------------------------------- - - AC_MSG_CHECKING(if necessary options for IPv6 multicasting are available) - AC_COMPILE_IFELSE([ - #include - #include - #include - - int main(void) - { - int testval; - struct ipv6_mreq mreq,mreq2; - mreq = mreq2; // avoid 'unused variable' - testval = IPV6_MULTICAST_HOPS; - testval = IPV6_JOIN_GROUP; - testval = IPV6_LEAVE_GROUP; - return 0; - } - ],[ - AC_MSG_RESULT(yes) - RTP_SUPPORT_IPV6MULTICAST="#define RTP_SUPPORT_IPV6MULTICAST"], - AC_MSG_RESULT(no))], - [ - AC_MSG_RESULT(disabled) - ]) - fi -fi - -dnl --------------------------------------------------------------------------- -dnl Check if ifaddrs.h exists so we can use getifaddrs -dnl --------------------------------------------------------------------------- - -AC_CHECK_HEADER(ifaddrs.h,[RTP_SUPPORT_IFADDRS="#define RTP_SUPPORT_IFADDRS"]) - -dnl --------------------------------------------------------------------------- -dnl Finish up... -dnl --------------------------------------------------------------------------- - -AC_SUBST(RTP_FILIO) -AC_SUBST(RTP_SOCKIO) -AC_SUBST(RTP_ENDIAN) -AC_SUBST(RTP_SOCKLENTYPE_UINT) -AC_SUBST(RTP_JTHREADINCLUDES) -AC_SUBST(RTP_HAVE_SOCKADDR_LEN) -AC_SUBST(RTP_SUPPORT_IPV4MULTICAST) -AC_SUBST(RTP_SUPPORT_THREAD) -AC_SUBST(RTP_SUPPORT_SDESPRIV) -AC_SUBST(RTP_SUPPORT_INLINETEMPLATEPARAM) -AC_SUBST(RTP_SUPPORT_PROBATION) -AC_SUBST(RTP_SUPPORT_GETLOGINR) -AC_SUBST(RTP_SUPPORT_IPV6) -AC_SUBST(RTP_SUPPORT_IPV6MULTICAST) -AC_SUBST(RTP_SUPPORT_IFADDRS) -AC_SUBST(RTP_SUPPORT_SENDAPP) -AC_SUBST(RTP_SUPPORT_MEMORYMANAGEMENT) -AC_SUBST(RTP_SUPPORT_RTCPUNKNOWN) -AC_SUBST(RTP_LINKLIBS) -AC_OUTPUT(Makefile \ - src/Makefile \ - src/rtpconfig_unix.h \ - doc/Makefile \ - tools/Makefile \ - examples/Makefile \ - pkgconfig/Makefile \ - pkgconfig/jrtplib.pc \ - pkgconfig/jrtplib-uninstalled.pc \ - ) - diff --git a/depcomp b/depcomp deleted file mode 100755 index 25bdb18..0000000 --- a/depcomp +++ /dev/null @@ -1,526 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2004-04-25.13 - -# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit 0 - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit 0 - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi -# `libtool' can also be set to `yes' or `no'. - -if test -z "$depfile"; then - base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` - dir=`echo "$object" | sed 's,/.*$,/,'` - if test "$dir" = "$object"; then - dir= - fi - # FIXME: should be _deps on DOS. - depfile="$dir.deps/$base" -fi - -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # Dependencies are output in .lo.d with libtool 1.4. - # They are output in .o.d with libtool 1.5. - tmpdepfile1="$dir.libs/$base.lo.d" - tmpdepfile2="$dir.libs/$base.o.d" - tmpdepfile3="$dir.libs/$base.d" - "$@" -Wc,-MD - else - tmpdepfile1="$dir$base.o.d" - tmpdepfile2="$dir$base.d" - tmpdepfile3="$dir$base.d" - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - if test -f "$tmpdepfile1"; then - tmpdepfile="$tmpdepfile1" - elif test -f "$tmpdepfile2"; then - tmpdepfile="$tmpdepfile2" - else - tmpdepfile="$tmpdepfile3" - fi - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index d14421e..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = jrtplib.h jrtplib.css - diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 0b8da2c..0000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,333 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = jrtplib.h jrtplib.css -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/doc/jrtplib.css b/doc/jrtplib.css deleted file mode 100644 index ea2a087..0000000 --- a/doc/jrtplib.css +++ /dev/null @@ -1,439 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; - text-align: justify; -} - -H1 { - text-align: center; - font-size: 240%; -} -H2 { - font-size: 180%; -} -H3 { - font-size: 120%; -} -H4 { - font-size: 100%; -} - -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} - diff --git a/doc/jrtplib.h b/doc/jrtplib.h index 8ccad38..2b60c91 100644 --- a/doc/jrtplib.h +++ b/doc/jrtplib.h @@ -89,6 +89,11 @@ * * \section starting Getting started with the RTPSession class * + * All classes and functions are part of the \c jrtplib namespace, so to + * simplify the code a bit, we'll declare that we're using this namespace: + * \code + * using namespace jrtplib; + * \endcode * To use RTP, you'll have to create an RTPSession object. The constructor * accepts two parameter, an instance of an RTPRandom object, and an instance * of an RTPMemoryManager object. For now, we'll keep it simple and use the diff --git a/examples/.dummy b/examples/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..b9380cd --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,8 @@ +apply_include_paths("${JRTPLIB_INTERNAL_INCLUDES}") +apply_include_paths("${JRTPLIB_EXTERNAL_INCLUDES}") + +foreach(IDX 1 2 3 4 5) + add_executable(example${IDX} example${IDX}.cpp) + target_link_libraries(example${IDX} jrtplib-static) +endforeach(IDX) + diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index d62a796..0000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -noinst_PROGRAMS = example1 example2 example3 example4 example5 - -example1_SOURCES = example1.cpp -example2_SOURCES = example2.cpp -example3_SOURCES = example3.cpp -example4_SOURCES = example4.cpp -example5_SOURCES = example5.cpp - -INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ -LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ - diff --git a/examples/Makefile.in b/examples/Makefile.in deleted file mode 100644 index 2903436..0000000 --- a/examples/Makefile.in +++ /dev/null @@ -1,483 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \ - example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) -subdir = examples -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_example1_OBJECTS = example1.$(OBJEXT) -example1_OBJECTS = $(am_example1_OBJECTS) -example1_LDADD = $(LDADD) -example1_DEPENDENCIES = ../src/.libs/libjrtp.a -am_example2_OBJECTS = example2.$(OBJEXT) -example2_OBJECTS = $(am_example2_OBJECTS) -example2_LDADD = $(LDADD) -example2_DEPENDENCIES = ../src/.libs/libjrtp.a -am_example3_OBJECTS = example3.$(OBJEXT) -example3_OBJECTS = $(am_example3_OBJECTS) -example3_LDADD = $(LDADD) -example3_DEPENDENCIES = ../src/.libs/libjrtp.a -am_example4_OBJECTS = example4.$(OBJEXT) -example4_OBJECTS = $(am_example4_OBJECTS) -example4_LDADD = $(LDADD) -example4_DEPENDENCIES = ../src/.libs/libjrtp.a -am_example5_OBJECTS = example5.$(OBJEXT) -example5_OBJECTS = $(am_example5_OBJECTS) -example5_LDADD = $(LDADD) -example5_DEPENDENCIES = ../src/.libs/libjrtp.a -DEFAULT_INCLUDES = -I. -I$(srcdir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \ - $(example4_SOURCES) $(example5_SOURCES) -DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \ - $(example3_SOURCES) $(example4_SOURCES) $(example5_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -example1_SOURCES = example1.cpp -example2_SOURCES = example2.cpp -example3_SOURCES = example3.cpp -example4_SOURCES = example4.cpp -example5_SOURCES = example5.cpp -INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/ -LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES) - @rm -f example1$(EXEEXT) - $(CXXLINK) $(example1_LDFLAGS) $(example1_OBJECTS) $(example1_LDADD) $(LIBS) -example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES) - @rm -f example2$(EXEEXT) - $(CXXLINK) $(example2_LDFLAGS) $(example2_OBJECTS) $(example2_LDADD) $(LIBS) -example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES) - @rm -f example3$(EXEEXT) - $(CXXLINK) $(example3_LDFLAGS) $(example3_OBJECTS) $(example3_LDADD) $(LIBS) -example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES) - @rm -f example4$(EXEEXT) - $(CXXLINK) $(example4_LDFLAGS) $(example4_OBJECTS) $(example4_LDADD) $(LIBS) -example5$(EXEEXT): $(example5_OBJECTS) $(example5_DEPENDENCIES) - @rm -f example5$(EXEEXT) - $(CXXLINK) $(example5_LDFLAGS) $(example5_OBJECTS) $(example5_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example4.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example5.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/examples/example1.cpp b/examples/example1.cpp index 124da9f..b1a0eeb 100644 --- a/examples/example1.cpp +++ b/examples/example1.cpp @@ -19,6 +19,8 @@ #include #include +using namespace jrtplib; + // // This function checks if there was a RTP error. If so, it displays an error // message and exists. diff --git a/examples/example2.cpp b/examples/example2.cpp index 30b8471..b8a7fbb 100644 --- a/examples/example2.cpp +++ b/examples/example2.cpp @@ -7,6 +7,8 @@ #include #include +using namespace jrtplib; + int main(void) { #ifdef WIN32 diff --git a/examples/example3.cpp b/examples/example3.cpp index ee852bc..b5061ed 100644 --- a/examples/example3.cpp +++ b/examples/example3.cpp @@ -21,6 +21,8 @@ #include #include +using namespace jrtplib; + // // This function checks if there was a RTP error. If so, it displays an error // message and exists. diff --git a/examples/example4.cpp b/examples/example4.cpp index 56d03f5..a078270 100644 --- a/examples/example4.cpp +++ b/examples/example4.cpp @@ -22,6 +22,8 @@ #include #include +using namespace jrtplib; + #ifdef RTP_SUPPORT_THREAD // diff --git a/examples/example5.cpp b/examples/example5.cpp index 573fead..d009772 100644 --- a/examples/example5.cpp +++ b/examples/example5.cpp @@ -21,6 +21,8 @@ #include #include +using namespace jrtplib; + // // This function checks if there was a RTP error. If so, it displays an error // message and exists. @@ -41,6 +43,8 @@ void checkerror(int rtperr) #ifdef RTP_SUPPORT_THREAD +using namespace jthread; + class MyMemoryManager : public RTPMemoryManager { public: diff --git a/install-sh b/install-sh deleted file mode 100755 index e4160c9..0000000 --- a/install-sh +++ /dev/null @@ -1,325 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2004-04-01.17 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename= -transform_arg= -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= - -usage="Usage: $0 [OPTION]... SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 -d DIRECTORIES... - -In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. -In the second, create the directory path DIR. - -Options: --b=TRANSFORMBASENAME --c copy source (using $cpprog) instead of moving (using $mvprog). --d create directories instead of installing files. --g GROUP $chgrp installed files to GROUP. --m MODE $chmod installed files to MODE. --o USER $chown installed files to USER. --s strip installed files (using $stripprog). --t=TRANSFORM ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - -c) instcmd=$cpprog - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit 0;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - --version) echo "$0 $scriptversion"; exit 0;; - - *) # When -d is used, all remaining arguments are directories to create. - test -n "$dir_arg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac -done - -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - instcmd=: - chmodcmd= - else - instcmd=$mkdirprog - fi - else - # Waiting for this to be detected by the "$instcmd $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" || lasterr=$? - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $instcmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - # If we're going to rename the final executable, determine the name now. - if test -z "$transformarg"; then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename \ - | sed $transformarg`$transformbasename - fi - - # don't allow the sed command to completely eliminate the filename. - test -z "$dstfile" && dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Move or copy the file name to the temp name - $doit $instcmd "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $instcmd $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit; } -done - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/jrtplib.dsp b/jrtplib.dsp deleted file mode 100644 index 92b3392..0000000 --- a/jrtplib.dsp +++ /dev/null @@ -1,424 +0,0 @@ -# Microsoft Developer Studio Project File - Name="jrtplib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=jrtplib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "jrtplib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "jrtplib.mak" CFG="jrtplib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "jrtplib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "jrtplib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "jrtplib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jthread-1.2.1\src" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x813 /d "NDEBUG" -# ADD RSC /l 0x813 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "jrtplib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\jthread-1.2.1\src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x813 /d "_DEBUG" -# ADD RSC /l 0x813 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "jrtplib - Win32 Release" -# Name "jrtplib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\src\rtcpapppacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpbyepacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpcompoundpacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpcompoundpacketbuilder.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcppacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcppacketbuilder.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcprrpacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpscheduler.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsdesinfo.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsdespacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsrpacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpcollisionlist.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpdebug.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtperrors.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpinternalsourcedata.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv4address.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv6address.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtplibraryversion.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtppacket.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtppacketbuilder.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtppollthread.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandom.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomrand48.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomrands.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomurandom.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsession.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsessionparams.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsessionsources.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsourcedata.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsources.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtptimeutilities.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpudpv4transmitter.cpp -# End Source File -# Begin Source File - -SOURCE=.\src\rtpudpv6transmitter.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\src\rtcpapppacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpbyepacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpcompoundpacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpcompoundpacketbuilder.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcppacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcppacketbuilder.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcprrpacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpscheduler.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsdesinfo.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsdespacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpsrpacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtcpunknownpacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpaddress.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpcollisionlist.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpconfig.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpconfig_win.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpdebug.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpdefines.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtperrors.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpeventhandler.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtphashtable.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpinternalsourcedata.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv4address.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv4destination.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv6address.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpipv6destination.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpkeyhashtable.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtplibraryversion.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpmemorymanager.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpmemoryobject.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtppacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtppacketbuilder.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtppollthread.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandom.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomrand48.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomrands.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtprandomurandom.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtprawpacket.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsession.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsessionparams.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsessionsources.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsourcedata.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpsources.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpstructs.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtptimeutilities.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtptransmitter.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtptypes.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtptypes_win.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpudpv4transmitter.h -# End Source File -# Begin Source File - -SOURCE=.\src\rtpudpv6transmitter.h -# End Source File -# End Group -# End Target -# End Project diff --git a/jrtplib.dsw b/jrtplib.dsw deleted file mode 100644 index 76af14e..0000000 --- a/jrtplib.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "jrtplib"=.\jrtplib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/jrtplib.sln b/jrtplib.sln deleted file mode 100644 index 7e4d9c9..0000000 --- a/jrtplib.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "jrtplib.vcproj", "{B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Debug|Win32.Build.0 = Debug|Win32 - {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Release|Win32.ActiveCfg = Release|Win32 - {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/jrtplib.vcproj b/jrtplib.vcproj deleted file mode 100644 index d4b3d15..0000000 --- a/jrtplib.vcproj +++ /dev/null @@ -1,1186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jrtplib_wce.sln b/jrtplib_wce.sln deleted file mode 100644 index 7baaab2..0000000 --- a/jrtplib_wce.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib_wce", "jrtplib_wce.vcproj", "{93374307-119F-404E-9B09-3642C6FC96C1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) - Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {93374307-119F-404E-9B09-3642C6FC96C1}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {93374307-119F-404E-9B09-3642C6FC96C1}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/jrtplib_wce.vcproj b/jrtplib_wce.vcproj deleted file mode 100644 index 1878645..0000000 --- a/jrtplib_wce.vcproj +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jrtplib_wce5.sln b/jrtplib_wce5.sln deleted file mode 100644 index 9aa97af..0000000 --- a/jrtplib_wce5.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib_wce5", "jrtplib_wce5.vcproj", "{EE7B2B39-F807-4BD2-8744-152F5C1C6951}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {EE7B2B39-F807-4BD2-8744-152F5C1C6951}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/jrtplib_wce5.vcproj b/jrtplib_wce5.vcproj deleted file mode 100644 index 97b6612..0000000 --- a/jrtplib_wce5.vcproj +++ /dev/null @@ -1,517 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ltmain.sh b/ltmain.sh deleted file mode 100644 index b4583e7..0000000 --- a/ltmain.sh +++ /dev/null @@ -1,6930 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - #if test "$absdir" != "$libdir"; then - # $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - #fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/missing b/missing deleted file mode 100755 index e7ef83a..0000000 --- a/missing +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2003-09-02.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 6fbe5e1..0000000 --- a/mkinstalldirs +++ /dev/null @@ -1,150 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2004-02-15.20 - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -errstatus=0 -dirmode="" - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit 0 - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit 0 - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am deleted file mode 100644 index 469b06d..0000000 --- a/pkgconfig/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -### all of the standard pc files we need to generate -pcfiles = \ - jrtplib.pc - -pcfiles_uninstalled = \ - jrtplib-uninstalled.pc - -all-local: $(pcfiles) $(pcfiles_uninstalled) - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = $(pcfiles) - -EXTRA_DIST = \ - jrtplib.pc.in \ - jrtplib-uninstalled.pc.in - -CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in deleted file mode 100644 index 0261e39..0000000 --- a/pkgconfig/Makefile.in +++ /dev/null @@ -1,386 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = pkgconfig -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/jrtplib-uninstalled.pc.in $(srcdir)/jrtplib.pc.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = jrtplib.pc jrtplib-uninstalled.pc -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(pkgconfigdir)" -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ - -### all of the standard pc files we need to generate -pcfiles = \ - jrtplib.pc - -pcfiles_uninstalled = \ - jrtplib-uninstalled.pc - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = $(pcfiles) -EXTRA_DIST = \ - jrtplib.pc.in \ - jrtplib-uninstalled.pc.in - -CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pkgconfig/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign pkgconfig/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -jrtplib.pc: $(top_builddir)/config.status $(srcdir)/jrtplib.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -jrtplib-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/jrtplib-uninstalled.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) all-local -installdirs: - for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pkgconfigDATA - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-pkgconfigDATA - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-pkgconfigDATA install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am uninstall-pkgconfigDATA - - -all-local: $(pcfiles) $(pcfiles_uninstalled) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/pkgconfig/jrtplib-uninstalled.pc.in b/pkgconfig/jrtplib-uninstalled.pc.in deleted file mode 100644 index aead1c9..0000000 --- a/pkgconfig/jrtplib-uninstalled.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=${pcfiledir}/.. -includedir=${pcfiledir}/.. - -Name: Jrtplib Uninstalled -Description: Full featured RTP library, Not Installed -Version: @VERSION@ -Requires: -Libs: ${libdir}/src/libjrtp.la -Cflags: -I${includedir} -I${includedir}/src diff --git a/pkgconfig/jrtplib.pc.in b/pkgconfig/jrtplib.pc.in index cdb5744..8f2d6ce 100644 --- a/pkgconfig/jrtplib.pc.in +++ b/pkgconfig/jrtplib.pc.in @@ -1,11 +1,6 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/jrtplib3 - Name: Jrtplib -Description: An full featured RTP library +Description: A full featured RTP library Requires: -Version: @VERSION@ -Libs: -L${libdir} -ljrtp -Cflags: -I${includedir} +Version: ${VERSION} +Libs: ${JRTPLIB_LIBS_PKGCONFIG} +Cflags: ${JRTPLIB_INCDIRS_PKGCONFIG} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..3379568 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,121 @@ +set (HEADERS + rtcpapppacket.h + rtcpbyepacket.h + rtcpcompoundpacket.h + rtcpcompoundpacketbuilder.h + rtcppacket.h + rtcppacketbuilder.h + rtcprrpacket.h + rtcpscheduler.h + rtcpsdesinfo.h + rtcpsdespacket.h + rtcpsrpacket.h + rtcpunknownpacket.h + rtpaddress.h + rtpcollisionlist.h + ${PROJECT_BINARY_DIR}/src/rtpconfig.h + rtpdebug.h + rtpdefines.h + rtperrors.h + rtphashtable.h + rtpinternalsourcedata.h + rtpipv4address.h + rtpipv4destination.h + rtpipv6address.h + rtpipv6destination.h + rtpkeyhashtable.h + rtplibraryversion.h + rtpmemorymanager.h + rtpmemoryobject.h + rtppacket.h + rtppacketbuilder.h + rtppollthread.h + rtprandom.h + rtprandomrand48.h + rtprandomrands.h + rtprandomurandom.h + rtprawpacket.h + rtpsession.h + rtpsessionparams.h + rtpsessionsources.h + rtpsourcedata.h + rtpsources.h + rtpstructs.h + rtptimeutilities.h + rtptransmitter.h + rtptypes_win.h + ${PROJECT_BINARY_DIR}/src/rtptypes.h + rtpudpv4transmitter.h + rtpudpv6transmitter.h + rtpbyteaddress.h + rtpexternaltransmitter.h) + +set(SOURCES + rtcpapppacket.cpp + rtcpbyepacket.cpp + rtcpcompoundpacket.cpp + rtcpcompoundpacketbuilder.cpp + rtcppacket.cpp + rtcppacketbuilder.cpp + rtcprrpacket.cpp + rtcpscheduler.cpp + rtcpsdesinfo.cpp + rtcpsdespacket.cpp + rtcpsrpacket.cpp + rtpcollisionlist.cpp + rtpdebug.cpp + rtperrors.cpp + rtpinternalsourcedata.cpp + rtpipv4address.cpp + rtpipv6address.cpp + rtplibraryversion.cpp + rtppacket.cpp + rtppacketbuilder.cpp + rtppollthread.cpp + rtprandom.cpp + rtprandomrand48.cpp + rtprandomrands.cpp + rtprandomurandom.cpp + rtpsession.cpp + rtpsessionparams.cpp + rtpsessionsources.cpp + rtpsourcedata.cpp + rtpsources.cpp + rtptimeutilities.cpp + rtpudpv4transmitter.cpp + rtpudpv6transmitter.cpp + rtpbyteaddress.cpp + rtpexternaltransmitter.cpp) + +if (UNIX) + set (SOURCES ${SOURCES} extratransmitters/rtpfaketransmitter.cpp ) + set (HEADERS ${HEADERS} extratransmitters/rtpfaketransmitter.h ) +else (UNIX) + set(CMAKE_DEBUG_POSTFIX _d) +endif (UNIX) + +add_library(jrtplib-static STATIC ${SOURCES} ${HEADERS}) +if (UNIX) + set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtp) +else (UNIX) + set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtplib) +endif(UNIX) +set_target_properties(jrtplib-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) +set(JRTPLIB_INSTALLTARGETS jrtplib-static) +target_link_libraries(jrtplib-static ${JRTPLIB_LINK_LIBS}) + +if (UNIX) + add_library(jrtplib-shared SHARED ${SOURCES} ${HEADERS}) + set_target_properties(jrtplib-shared PROPERTIES VERSION ${VERSION}) + set_target_properties(jrtplib-shared PROPERTIES OUTPUT_NAME jrtp) + set_target_properties(jrtplib-shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) + set(JRTPLIB_INSTALLTARGETS ${JRTPLIB_INSTALLTARGETS} jrtplib-shared) + target_link_libraries(jrtplib-shared ${JRTPLIB_LINK_LIBS}) +endif (UNIX) + +apply_include_paths("${JRTPLIB_INTERNAL_INCLUDES}") +apply_include_paths("${JRTPLIB_EXTERNAL_INCLUDES}") + +install(FILES ${HEADERS} DESTINATION include/jrtplib3) +install(TARGETS ${JRTPLIB_INSTALLTARGETS} DESTINATION ${LIBRARY_INSTALL_DIR}) + diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index c95096f..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -lib_LTLIBRARIES = libjrtp.la -libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ - rtperrors.cpp rtpudpv4transmitter.cpp \ - rtcpsdesinfo.cpp rtppollthread.cpp rtppacket.cpp \ - rtppacketbuilder.cpp rtpsessionparams.cpp \ - rtpsources.cpp rtpinternalsourcedata.cpp \ - rtpsourcedata.cpp rtpipv4address.cpp \ - rtcpcompoundpacket.cpp \ - rtcpapppacket.cpp rtcpbyepacket.cpp \ - rtcprrpacket.cpp rtcpsdespacket.cpp \ - rtcpsrpacket.cpp rtplibraryversion.cpp \ - rtcppacket.cpp rtcpcompoundpacketbuilder.cpp \ - rtprandom.cpp rtcpscheduler.cpp \ - rtcppacketbuilder.cpp rtpsessionsources.cpp \ - rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - rtprandomrand48.cpp rtprandomurandom.cpp \ - rtprandomrands.cpp \ - extratransmitters/rtpfaketransmitter.cpp -libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ -libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ - rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ - rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ - rtcpsrpacket.h rtcpunknownpacket.h rtpaddress.h rtpconfig.h \ - rtpconfig_win.h rtpdebug.h rtpdefines.h rtperrors.h rtphashtable.h \ - rtpconfig_unix.h rtpinternalsourcedata.h rtpipv4address.h \ - rtpipv4destination.h rtpkeyhashtable.h rtplibraryversion.h rtppacket.h \ - rtppacketbuilder.h rtppollthread.h rtprandom.h rtprawpacket.h \ - rtpsession.h rtpsessionparams.h rtpsourcedata.h rtpsources.h \ - rtpstructs.h rtptimeutilities.h rtptransmitter.h \ - rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ - rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ - rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ - rtpmemorymanager.h rtpmemoryobject.h \ - rtprandomrand48.h rtprandomurandom.h \ - rtprandomrands.h \ - extratransmitters/rtpfaketransmitter.h -EXTRA_DIST = rtpconfig_unix.h.in -libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ - diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index ad14b0b..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,598 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src -DIST_COMMON = $(libjrtpinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/rtpconfig_unix.h.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = rtpconfig_unix.h -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libjrtpincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libjrtp_la_LIBADD = -am_libjrtp_la_OBJECTS = rtpdebug.lo rtpsession.lo rtperrors.lo \ - rtpudpv4transmitter.lo rtcpsdesinfo.lo rtppollthread.lo \ - rtppacket.lo rtppacketbuilder.lo rtpsessionparams.lo \ - rtpsources.lo rtpinternalsourcedata.lo rtpsourcedata.lo \ - rtpipv4address.lo rtcpcompoundpacket.lo rtcpapppacket.lo \ - rtcpbyepacket.lo rtcprrpacket.lo rtcpsdespacket.lo \ - rtcpsrpacket.lo rtplibraryversion.lo rtcppacket.lo \ - rtcpcompoundpacketbuilder.lo rtprandom.lo rtcpscheduler.lo \ - rtcppacketbuilder.lo rtpsessionsources.lo rtpcollisionlist.lo \ - rtpipv6address.lo rtpudpv6transmitter.lo rtptimeutilities.lo \ - rtprandomrand48.lo rtprandomurandom.lo rtprandomrands.lo \ - rtpfaketransmitter.lo -libjrtp_la_OBJECTS = $(am_libjrtp_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libjrtp_la_SOURCES) -DIST_SOURCES = $(libjrtp_la_SOURCES) -libjrtpincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libjrtpinclude_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -lib_LTLIBRARIES = libjrtp.la -libjrtp_la_SOURCES = rtpdebug.cpp rtpsession.cpp rtpconfig_win.h \ - rtperrors.cpp rtpudpv4transmitter.cpp \ - rtcpsdesinfo.cpp rtppollthread.cpp rtppacket.cpp \ - rtppacketbuilder.cpp rtpsessionparams.cpp \ - rtpsources.cpp rtpinternalsourcedata.cpp \ - rtpsourcedata.cpp rtpipv4address.cpp \ - rtcpcompoundpacket.cpp \ - rtcpapppacket.cpp rtcpbyepacket.cpp \ - rtcprrpacket.cpp rtcpsdespacket.cpp \ - rtcpsrpacket.cpp rtplibraryversion.cpp \ - rtcppacket.cpp rtcpcompoundpacketbuilder.cpp \ - rtprandom.cpp rtcpscheduler.cpp \ - rtcppacketbuilder.cpp rtpsessionsources.cpp \ - rtpcollisionlist.cpp rtpipv6address.cpp \ - rtpudpv6transmitter.cpp rtptimeutilities.cpp \ - rtprandomrand48.cpp rtprandomurandom.cpp \ - rtprandomrands.cpp \ - extratransmitters/rtpfaketransmitter.cpp - -libjrtp_la_LDFLAGS = -release @VERSION@ @RTP_LINKLIBS@ -libjrtpinclude_HEADERS = rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h \ - rtcpcompoundpacketbuilder.h rtcppacket.h rtcppacketbuilder.h \ - rtcprrpacket.h rtcpscheduler.h rtcpsdesinfo.h rtcpsdespacket.h \ - rtcpsrpacket.h rtcpunknownpacket.h rtpaddress.h rtpconfig.h \ - rtpconfig_win.h rtpdebug.h rtpdefines.h rtperrors.h rtphashtable.h \ - rtpconfig_unix.h rtpinternalsourcedata.h rtpipv4address.h \ - rtpipv4destination.h rtpkeyhashtable.h rtplibraryversion.h rtppacket.h \ - rtppacketbuilder.h rtppollthread.h rtprandom.h rtprawpacket.h \ - rtpsession.h rtpsessionparams.h rtpsourcedata.h rtpsources.h \ - rtpstructs.h rtptimeutilities.h rtptransmitter.h \ - rtptypes_win.h rtpudpv4transmitter.h rtpsessionsources.h \ - rtpcollisionlist.h rtpipv6address.h rtpipv6destination.h \ - rtpudpv6transmitter.h rtptypes.h rtptypes_unix.h \ - rtpmemorymanager.h rtpmemoryobject.h \ - rtprandomrand48.h rtprandomurandom.h \ - rtprandomrands.h \ - extratransmitters/rtpfaketransmitter.h - -EXTRA_DIST = rtpconfig_unix.h.in -libjrtpincludedir = ${includedir}/jrtplib3 -INCLUDES = @RTP_JTHREADINCLUDES@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -rtpconfig_unix.h: $(top_builddir)/config.status $(srcdir)/rtpconfig_unix.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libjrtp.la: $(libjrtp_la_OBJECTS) $(libjrtp_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libjrtp_la_LDFLAGS) $(libjrtp_la_OBJECTS) $(libjrtp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpapppacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpbyepacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpcompoundpacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpcompoundpacketbuilder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcppacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcppacketbuilder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcprrpacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpscheduler.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpsdesinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpsdespacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtcpsrpacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpcollisionlist.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpdebug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtperrors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpfaketransmitter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpinternalsourcedata.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv4address.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpipv6address.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtplibraryversion.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtppacket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtppacketbuilder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtppollthread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomrand48.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomrands.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtprandomurandom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsession.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsessionparams.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsessionsources.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsourcedata.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpsources.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtptimeutilities.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpudpv4transmitter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpudpv6transmitter.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -rtpfaketransmitter.lo: extratransmitters/rtpfaketransmitter.cpp -@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT rtpfaketransmitter.lo -MD -MP -MF "$(DEPDIR)/rtpfaketransmitter.Tpo" -c -o rtpfaketransmitter.lo `test -f 'extratransmitters/rtpfaketransmitter.cpp' || echo '$(srcdir)/'`extratransmitters/rtpfaketransmitter.cpp; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/rtpfaketransmitter.Tpo" "$(DEPDIR)/rtpfaketransmitter.Plo"; else rm -f "$(DEPDIR)/rtpfaketransmitter.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='extratransmitters/rtpfaketransmitter.cpp' object='rtpfaketransmitter.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o rtpfaketransmitter.lo `test -f 'extratransmitters/rtpfaketransmitter.cpp' || echo '$(srcdir)/'`extratransmitters/rtpfaketransmitter.cpp - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-libjrtpincludeHEADERS: $(libjrtpinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libjrtpincludedir)" || $(mkdir_p) "$(DESTDIR)$(libjrtpincludedir)" - @list='$(libjrtpinclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libjrtpincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libjrtpincludedir)/$$f'"; \ - $(libjrtpincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libjrtpincludedir)/$$f"; \ - done - -uninstall-libjrtpincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libjrtpinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libjrtpincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libjrtpincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/extratransmitters - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libjrtpincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libjrtpincludeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-libjrtpincludeHEADERS - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-libjrtpincludeHEADERS \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-libjrtpincludeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/errcodecommand b/src/errcodecommand new file mode 100755 index 0000000..d944d2d --- /dev/null +++ b/src/errcodecommand @@ -0,0 +1,2 @@ +#!/bin/bash +for i in `cat rtperrors.h | cut -f 2 -d " " | cut -f 1 |grep -e "^ERR"`; do echo $i ; BLA=`grep $i *.cpp *.h|cut -f 1 -d ":"|sort|uniq`; if [ "BLA$BLA" != BLA ] ; then for j in $BLA ; do if [ $j != "rtperrors.h" ] ; then echo -e "\t$j" ; fi ; done ; fi ;done diff --git a/src/extratransmitters/rtpfaketransmitter.cpp b/src/extratransmitters/rtpfaketransmitter.cpp index 33f66d2..b35c501 100644 --- a/src/extratransmitters/rtpfaketransmitter.cpp +++ b/src/extratransmitters/rtpfaketransmitter.cpp @@ -93,6 +93,9 @@ #define WAITMUTEX_UNLOCK #endif // RTP_SUPPORT_THREAD +namespace jrtplib +{ + RTPFakeTransmitter::RTPFakeTransmitter(RTPMemoryManager *mgr ) : RTPTransmitter(mgr), destinations(mgr,RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT),acceptignoreinfo(mgr,RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; @@ -268,6 +271,13 @@ RTPTransmissionInfo *RTPFakeTransmitter::GetTransmissionInfo() return tinf; } +void RTPFakeTransmitter::DeleteTransmissionInfo(RTPTransmissionInfo *inf) +{ + if (!init) + return; + RTPDelete(inf,GetMemoryManager()); +} + int RTPFakeTransmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) @@ -1711,3 +1721,6 @@ void RTPFakeTransmitter::Dump() } } #endif // RTPDEBUG + +} // end namespace + diff --git a/src/extratransmitters/rtpfaketransmitter.h b/src/extratransmitters/rtpfaketransmitter.h index 88b445e..a953f05 100644 --- a/src/extratransmitters/rtpfaketransmitter.h +++ b/src/extratransmitters/rtpfaketransmitter.h @@ -55,12 +55,15 @@ #include #ifdef RTP_SUPPORT_THREAD - #include + #include #endif // RTP_SUPPORT_THREAD #define RTPFAKETRANS_HASHSIZE 8317 #define RTPFAKETRANS_DEFAULTPORTBASE 5000 +namespace jrtplib +{ + // Definition of a callback that is called when a packet is ready for sending // params (*data, data_len, dest_addr, dest_port, rtp [1 if rtp, 0 if rtcp]) typedef void(*packet_ready_cb)(void*, uint8_t*, uint16_t, uint32_t, uint16_t, int rtp); @@ -146,6 +149,7 @@ class RTPFakeTransmitter : public RTPTransmitter int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); void Destroy(); RTPTransmissionInfo *GetTransmissionInfo(); + void DeleteTransmissionInfo(RTPTransmissionInfo *inf); int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); @@ -232,10 +236,12 @@ class RTPFakeTransmitter : public RTPTransmitter void DestroyAbortDescriptors(); void AbortWaitInternal(); #ifdef RTP_SUPPORT_THREAD - JMutex mainmutex,waitmutex; + jthread::JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD }; -#endif // RTPFakeTRANSMITTER_H +} // end namespace + +#endif // RTPFAKETRANSMITTER_H diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index 68c8dda..1fd922e 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -32,12 +32,16 @@ #include "rtcpapppacket.h" #ifdef RTPDEBUG + #include #include #include #endif // RTPDEBUG #include "rtpdebug.h" +namespace jrtplib +{ + RTCPAPPPacket::RTCPAPPPacket(uint8_t *data,size_t datalength) : RTCPPacket(APP,data,datalength) { @@ -85,3 +89,5 @@ void RTCPAPPPacket::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 3d76880..7d53c76 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -45,6 +45,9 @@ #include #endif // WIN32 +namespace jrtplib +{ + class RTCPCompoundPacket; /** Describes an RTCP APP packet. */ @@ -123,5 +126,7 @@ inline size_t RTCPAPPPacket::GetAPPDataLength() const return appdatalen; } +} // end namespace + #endif // RTCPAPPPACKET_H diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index d68246e..8a319d9 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -38,6 +38,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPBYEPacket::RTCPBYEPacket(uint8_t *data,size_t datalength) : RTCPPacket(BYE,data,datalength) { @@ -97,3 +100,5 @@ void RTCPBYEPacket::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 79b097e..da59f6f 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -45,6 +45,9 @@ #include #endif // WIN32 +namespace jrtplib +{ + class RTCPCompoundPacket; /** Describes an RTCP BYE packet. */ @@ -131,5 +134,7 @@ inline uint8_t *RTCPBYEPacket::GetReasonData() return (data+reasonoffset+1); } +} // end namespace + #endif // RTCPBYEPACKET_H diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index addba84..b462836 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -47,6 +47,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPCompoundPacket::RTCPCompoundPacket(RTPRawPacket &rawpack, RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { compoundpacket = 0; @@ -223,3 +226,6 @@ void RTCPCompoundPacket::Dump() } } #endif // RTPDEBUG + +} // end namespace + diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index b2326d5..e4419e8 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -43,6 +43,9 @@ #include "rtpmemoryobject.h" #include +namespace jrtplib +{ + class RTPRawPacket; class RTCPPacket; @@ -102,5 +105,7 @@ class RTCPCompoundPacket : public RTPMemoryObject std::list::const_iterator rtcppackit; }; +} // end namespace + #endif // RTCPCOMPOUNDPACKET_H diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index bb503f1..b890d0a 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -46,6 +46,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPCompoundPacketBuilder::RTCPCompoundPacketBuilder(RTPMemoryManager *mgr) : RTCPCompoundPacket(mgr), report(mgr), sdes(mgr) { byesize = 0; @@ -806,3 +809,5 @@ int RTCPCompoundPacketBuilder::EndBuild() return 0; } +} // end namespace + diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index 6b3fdb7..0f302c1 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -45,6 +45,9 @@ #include "rtperrors.h" #include +namespace jrtplib +{ + class RTPMemoryManager; /** This class can be used to construct an RTCP compound packet. @@ -391,5 +394,7 @@ class RTCPCompoundPacketBuilder : public RTCPCompoundPacket void ClearBuildBuffers(); }; +} // end namespace + #endif // RTCPCOMPOUNDPACKETBUILDER_H diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index 2c77b13..eb01134 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -39,6 +39,9 @@ #ifdef RTPDEBUG +namespace jrtplib +{ + void RTCPPacket::Dump() { switch(packettype) @@ -68,4 +71,6 @@ void RTCPPacket::Dump() std::cout << std::endl; } +} // end namespace + #endif // RTPDEBUG diff --git a/src/rtcppacket.h b/src/rtcppacket.h index f19e041..7491393 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtptypes.h" +namespace jrtplib +{ + class RTCPCompoundPacket; /** Base class for specific types of RTCP packets. */ @@ -85,5 +88,7 @@ class RTCPPacket const PacketType packettype; }; +} // end namespace + #endif // RTCPPACKET_H diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index bfde452..ac265a1 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -40,6 +40,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPPacketBuilder::RTCPPacketBuilder(RTPSources &s,RTPPacketBuilder &pb,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),sources(s),rtppacketbuilder(pb),prevbuildtime(0,0),transmissiondelay(0,0),ownsdesinfo(mgr) { @@ -734,3 +737,5 @@ int RTCPPacketBuilder::BuildBYEPacket(RTCPCompoundPacket **pack,const void *reas return 0; } +} // end namespace + diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index df33aac..8d78567 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -45,6 +45,9 @@ #include "rtptimeutilities.h" #include "rtpmemoryobject.h" +namespace jrtplib +{ + class RTPSources; class RTPPacketBuilder; class RTCPScheduler; @@ -220,5 +223,7 @@ class RTCPPacketBuilder : public RTPMemoryObject int sdesbuildcount; }; +} // end namespace + #endif // RTCPPACKETBUILDER_H diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index 7be1866..44687ea 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -37,6 +37,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPRRPacket::RTCPRRPacket(uint8_t *data,size_t datalength) : RTCPPacket(RR,data,datalength) { @@ -92,3 +95,6 @@ void RTCPRRPacket::Dump() } } #endif // RTPDEBUG + +} // end namespace + diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 627bb1e..439a725 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -45,6 +45,9 @@ #include #endif // WIN32 +namespace jrtplib +{ + class RTCPCompoundPacket; /** Describes an RTCP receiver report packet. */ @@ -197,5 +200,7 @@ inline uint32_t RTCPRRPacket::GetDLSR(int index) const return ntohl(r->dlsr); } +} // end namespace + #endif // RTCPRRPACKET_H diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index 5c3f9b1..a4c4073 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -42,6 +42,9 @@ #define RTCPSCHED_MININTERVAL 1.0 +namespace jrtplib +{ + RTCPSchedulerParams::RTCPSchedulerParams() : mininterval(RTCP_DEFAULTMININTERVAL) { bandwidth = 1000; // TODO What is a good value here? @@ -416,3 +419,5 @@ RTPTime RTCPScheduler::CalculateBYETransmissionInterval() return RTPTime(T); } +} // end namespace + diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index a4290dc..f576d82 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -42,6 +42,9 @@ #include "rtptimeutilities.h" #include "rtprandom.h" +namespace jrtplib +{ + class RTCPCompoundPacket; class RTPPacket; class RTPSources; @@ -180,5 +183,7 @@ class RTCPScheduler RTPRandom &rtprand; }; +} // end namespace + #endif // RTCPSCHEDULER_H diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index 9bb1f3f..dbd9971 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -34,6 +34,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + void RTCPSDESInfo::Clear() { #ifdef RTP_SUPPORT_SDESPRIV @@ -175,3 +178,5 @@ bool RTCPSDESInfo::GetPrivateValue(const uint8_t *prefix,size_t prefixlen,uint8_ } #endif // RTP_SUPPORT_SDESPRIV +} // end namespace + diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index 9a71b6d..b2bc482 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -46,6 +46,9 @@ #include #include +namespace jrtplib +{ + /** The class RTCPSDESInfo is a container for RTCP SDES information. */ class RTCPSDESInfo : public RTPMemoryObject { @@ -211,5 +214,7 @@ class RTCPSDESInfo : public RTPMemoryObject #endif // RTP_SUPPORT_SDESPRIV }; +} // end namespace + #endif // RTCPSDESINFO_H diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 3d3743f..1b90e6a 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -38,6 +38,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPSDESPacket::RTCPSDESPacket(uint8_t *data,size_t datalength) : RTCPPacket(SDES,data,datalength) { @@ -229,3 +232,5 @@ void RTCPSDESPacket::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index fb547de..780ca95 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -46,7 +46,10 @@ #include #endif // WIN32 -class RTCPCompoundPacket; +namespace jrtplib +{ + + class RTCPCompoundPacket; /** Describes an RTCP source description packet. */ class RTCPSDESPacket : public RTCPPacket @@ -375,6 +378,8 @@ inline uint8_t *RTCPSDESPacket::GetPRIVValueData() return (currentchunk+itemoffset+sizeof(RTCPSDESHeader)+1+prefixlength); } +} // end namespace + #endif // RTP_SUPPORT_SDESPRIV #endif // RTCPSDESPACKET_H diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index e5ae130..c6e7440 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -37,6 +37,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTCPSRPacket::RTCPSRPacket(uint8_t *data,size_t datalength) : RTCPPacket(SR,data,datalength) { @@ -99,3 +102,5 @@ void RTCPSRPacket::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index d89c97e..1beb566 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -46,6 +46,9 @@ #include #endif // WIN32 +namespace jrtplib +{ + class RTCPCompoundPacket; /** Describes an RTCP sender report packet. */ @@ -243,5 +246,7 @@ inline uint32_t RTCPSRPacket::GetDLSR(int index) const return ntohl(r->dlsr); } +} // end namespace + #endif // RTCPSRPACKET_H diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 379bc6a..a4bd011 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtcppacket.h" +namespace jrtplib +{ + class RTCPCompoundPacket; /** Describes an RTCP packet of unknown type. @@ -64,5 +67,7 @@ class RTCPUnknownPacket : public RTCPPacket ~RTCPUnknownPacket() { } }; +} // end namespace + #endif // RTCPUNKNOWNPACKET_H diff --git a/src/rtpaddress.h b/src/rtpaddress.h index cd11a20..983aa14 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include +namespace jrtplib +{ + class RTPMemoryManager; /** This class is an abstract class which is used to specify destinations, multicast groups etc. */ @@ -52,6 +55,7 @@ class RTPAddress { IPv4Address, /**< Used by the UDP over IPv4 transmitter. */ IPv6Address, /**< Used by the UDP over IPv6 transmitter. */ + ByteAddress, /**< A very general type of address, consisting of a port number and a number of bytes representing the host address. */ UserDefinedAddress /**< Can be useful for a user-defined transmitter. */ }; @@ -89,5 +93,7 @@ class RTPAddress const AddressType addresstype; }; +} // end namespace + #endif // RTPADDRESS_H diff --git a/src/rtpbyteaddress.cpp b/src/rtpbyteaddress.cpp new file mode 100644 index 0000000..2251a94 --- /dev/null +++ b/src/rtpbyteaddress.cpp @@ -0,0 +1,105 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2011 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#include "rtpbyteaddress.h" +#include "rtpmemorymanager.h" +#ifdef RTPDEBUG + #include "rtpdefines.h" + #include +#endif // RTPDEBUG + +namespace jrtplib +{ + +bool RTPByteAddress::IsSameAddress(const RTPAddress *addr) const +{ + if (addr == 0) + return false; + if (addr->GetAddressType() != ByteAddress) + return false; + + const RTPByteAddress *addr2 = (const RTPByteAddress *)addr; + + if (addr2->addresslength != addresslength) + return false; + if (addresslength == 0 || (memcmp(hostaddress, addr2->hostaddress, addresslength) == 0)) + { + if (port == addr2->port) + return true; + } + return false; +} + +bool RTPByteAddress::IsFromSameHost(const RTPAddress *addr) const +{ + if (addr == 0) + return false; + if (addr->GetAddressType() != ByteAddress) + return false; + + const RTPByteAddress *addr2 = (const RTPByteAddress *)addr; + + if (addr2->addresslength != addresslength) + return false; + if (addresslength == 0 || (memcmp(hostaddress, addr2->hostaddress, addresslength) == 0)) + return true; + return false; +} + +RTPAddress *RTPByteAddress::CreateCopy(RTPMemoryManager *mgr) const +{ + RTPByteAddress *a = RTPNew(mgr, RTPMEM_TYPE_CLASS_RTPADDRESS) RTPByteAddress(hostaddress, addresslength, port); + return a; +} + +#ifdef RTPDEBUG +std::string RTPByteAddress::GetAddressString() const +{ + char str[16]; + std::string s; + + for (int i = 0 ; i < addresslength ; i++) + { + RTP_SNPRINTF(str, 16, "%02X", (int)hostaddress[i]); + s += std::string(str); + } + s += std::string(":"); + + RTP_SNPRINTF(str, 16, "%d",(int)port); + s += std::string(str); + + return s; +} + +#endif // RTPDEBUG + +} // end namespace diff --git a/src/rtpbyteaddress.h b/src/rtpbyteaddress.h new file mode 100644 index 0000000..11027a6 --- /dev/null +++ b/src/rtpbyteaddress.h @@ -0,0 +1,93 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2011 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtpbyteaddress.h + */ + +#ifndef RTPBYTEADDRESS_H + +#define RTPBYTEADDRESS_H + +#include "rtpconfig.h" +#include "rtpaddress.h" +#include "rtptypes.h" +#include + +#define RTPBYTEADDRESS_MAXLENGTH 128 + +namespace jrtplib +{ + +class RTPMemoryManager; + +/** A very general kind of address consisting of a port number and a number of bytes describing the host address. + * A very general kind of address, consisting of a port number and a number of bytes describing the host address. + */ +class RTPByteAddress : public RTPAddress +{ +public: + /** Creates an instance of the class using \c addrlen bytes of \c hostaddress as host identification, + * and using \c port as the port number. */ + RTPByteAddress(const uint8_t hostaddress[RTPBYTEADDRESS_MAXLENGTH], size_t addrlen, uint16_t port = 0) : RTPAddress(ByteAddress) { if (addrlen > RTPBYTEADDRESS_MAXLENGTH) addrlen = RTPBYTEADDRESS_MAXLENGTH; memcpy(RTPByteAddress::hostaddress, hostaddress, addrlen); RTPByteAddress::addresslength = addrlen; RTPByteAddress::port = port; } + + /** Sets the host address to the first \c addrlen bytes of \c hostaddress. */ + void SetHostAddress(const uint8_t hostaddress[RTPBYTEADDRESS_MAXLENGTH], size_t addrlen) { if (addrlen > RTPBYTEADDRESS_MAXLENGTH) addrlen = RTPBYTEADDRESS_MAXLENGTH; memcpy(RTPByteAddress::hostaddress, hostaddress, addrlen); RTPByteAddress::addresslength = addrlen; } + + /** Sets the port number to \c port. */ + void SetPort(uint16_t port) { RTPByteAddress::port = port; } + + /** Returns a pointer to the stored host address. */ + const uint8_t *GetHostAddress() const { return hostaddress; } + + /** Returns the length in bytes of the stored host address. */ + size_t GetHostAddressLength() const { return addresslength; } + + /** Returns the port number stored in this instance. */ + uint16_t GetPort() const { return port; } + + RTPAddress *CreateCopy(RTPMemoryManager *mgr) const; + bool IsSameAddress(const RTPAddress *addr) const; + bool IsFromSameHost(const RTPAddress *addr) const; +#ifdef RTPDEBUG + std::string GetAddressString() const; +#endif // RTPDEBUG +private: + uint8_t hostaddress[RTPBYTEADDRESS_MAXLENGTH]; + size_t addresslength; + uint16_t port; +}; + +} // end namespace + +#endif // RTPBYTEADDRESS_H + diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index dc5f793..cd8e190 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -39,6 +39,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPCollisionList::RTPCollisionList(RTPMemoryManager *mgr) : RTPMemoryObject(mgr) { #if (defined(WIN32) || defined(_WIN32_WCE)) @@ -123,3 +126,5 @@ void RTPCollisionList::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index f93ce95..065b506 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -44,6 +44,9 @@ #include "rtpmemoryobject.h" #include +namespace jrtplib +{ + class RTPAddress; /** This class represents a list of addresses from which SSRC collisions were detected. */ @@ -86,5 +89,7 @@ class RTPCollisionList : public RTPMemoryObject std::list addresslist; }; +} // end namespace + #endif // RTPCOLLISIONLIST_H diff --git a/src/rtpconfig.h b/src/rtpconfig.h deleted file mode 100644 index f3811c8..0000000 --- a/src/rtpconfig.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - - This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs - - Contact: jori.liesenborgs@gmail.com - - This library was developed at the Expertise Centre for Digital Media - (http://www.edm.uhasselt.be), a research center of the Hasselt University - (http://www.uhasselt.be). The library is based upon work done for - my thesis at the School for Knowledge Technology (Belgium/The Netherlands). - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - -*/ - -#ifndef RTPCONFIG_H - -#define RTPCONFIG_H - -#if (defined(WIN32) || defined(_WIN32_WCE)) -#include "rtpconfig_win.h" -#else -#include "rtpconfig_unix.h" -#endif // WIN32 - -//#define RTPDEBUG - -#endif // RTPCONFIG_H diff --git a/src/rtpconfig_unix.h.in b/src/rtpconfig.h.in similarity index 80% rename from src/rtpconfig_unix.h.in rename to src/rtpconfig.h.in index 60dcd52..91159b9 100644 --- a/src/rtpconfig_unix.h.in +++ b/src/rtpconfig.h.in @@ -34,37 +34,37 @@ #define RTPCONFIG_UNIX_H -@RTP_FILIO@ +${RTP_HAVE_SYS_FILIO} -@RTP_SOCKIO@ +${RTP_HAVE_SYS_SOCKIO} -@RTP_ENDIAN@ +${RTP_ENDIAN} -@RTP_SOCKLENTYPE_UINT@ +${RTP_SOCKLENTYPE_UINT} -@RTP_HAVE_SOCKADDR_LEN@ +${RTP_HAVE_SOCKADDR_LEN} -@RTP_SUPPORT_IPV4MULTICAST@ +${RTP_SUPPORT_IPV4MULTICAST} -@RTP_SUPPORT_THREAD@ +${RTP_SUPPORT_THREAD} -@RTP_SUPPORT_SDESPRIV@ +${RTP_SUPPORT_SDESPRIV} -@RTP_SUPPORT_PROBATION@ +${RTP_SUPPORT_PROBATION} -@RTP_SUPPORT_GETLOGINR@ +${RTP_SUPPORT_GETLOGINR} -@RTP_SUPPORT_IPV6@ +${RTP_SUPPORT_IPV6} -@RTP_SUPPORT_IPV6MULTICAST@ +${RTP_SUPPORT_IPV6MULTICAST} -@RTP_SUPPORT_IFADDRS@ +${RTP_SUPPORT_IFADDRS} -@RTP_SUPPORT_SENDAPP@ +${RTP_SUPPORT_SENDAPP} -@RTP_SUPPORT_MEMORYMANAGEMENT@ +${RTP_SUPPORT_MEMORYMANAGEMENT} -@RTP_SUPPORT_RTCPUNKNOWN@ +${RTP_SUPPORT_RTCPUNKNOWN} #endif // RTPCONFIG_UNIX_H diff --git a/src/rtpconfig_win.h b/src/rtpconfig_win.h deleted file mode 100644 index 129a4e7..0000000 --- a/src/rtpconfig_win.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - - This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs - - Contact: jori.liesenborgs@gmail.com - - This library was developed at the Expertise Centre for Digital Media - (http://www.edm.uhasselt.be), a research center of the Hasselt University - (http://www.uhasselt.be). The library is based upon work done for - my thesis at the School for Knowledge Technology (Belgium/The Netherlands). - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - -*/ - -#ifndef RTPCONFIG_WIN_H - -#define RTPCONFIG_WIN_H - -#define RTP_SUPPORT_IPV4MULTICAST - -#define RTP_SUPPORT_THREAD - -#define RTP_SUPPORT_PROBATION - -#define RTP_SUPPORT_SDESPRIV - -//#define RTP_SUPPORT_IPV6 - -//#define RTP_SUPPORT_IPV6MULTICAST - -#define RTP_SUPPORT_SENDAPP - -#define RTP_SUPPORT_MEMORYMANAGEMENT - -// #define RTP_SUPPORT_RTCPUNKNOWN - -#endif // RTPCONFIG_WIN_H - diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 889e4bf..5d3e05b 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -36,6 +36,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + struct RTPErrorInfo { int code; @@ -206,6 +209,25 @@ static RTPErrorInfo ErrorDescriptions[]= { ERR_RTP_RTPRANDOMURANDOM_CANTOPEN, "Unable to open /dev/urandom for reading"}, { ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN, "The device /dev/urandom was already opened"}, { ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED, "The rand_s call is not supported on this platform"}, + { ERR_RTP_EXTERNALTRANS_ALREADYCREATED, "The external transmission component was already created"}, + { ERR_RTP_EXTERNALTRANS_ALREADYINIT, "The external transmission component was already initialized"}, + { ERR_RTP_EXTERNALTRANS_ALREADYWAITING, "The external transmission component is already waiting for incoming data"}, + { ERR_RTP_EXTERNALTRANS_BADRECEIVEMODE, "The external transmission component only supports accepting all incoming packets"}, + { ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS, "The external transmitter was unable to create it's internal abort descriptors"}, + { ERR_RTP_EXTERNALTRANS_CANTCREATEPIPE, "The external transmitter was unable to create a pipe"}, + { ERR_RTP_EXTERNALTRANS_CANTINITMUTEX, "The external transmitter was unable to initialize a required mutex"}, + { ERR_RTP_EXTERNALTRANS_ERRORINSELECT, "An error in the external transmitter's 'select' call occurred"}, + { ERR_RTP_EXTERNALTRANS_ILLEGALPARAMETERS, "Only parameters of type RTPExternalTransmissionParams can be passed to the external transmission component"}, + { ERR_RTP_EXTERNALTRANS_NOACCEPTLIST, "The external transmitter does not have an accept list"}, + { ERR_RTP_EXTERNALTRANS_NODESTINATIONSSUPPORTED, "The external transmitter does not have a destination list"}, + { ERR_RTP_EXTERNALTRANS_NOIGNORELIST, "The external transmitter does not have an ignore list"}, + { ERR_RTP_EXTERNALTRANS_NOMULTICASTSUPPORT, "The external transmitter does not support the multicast functions"}, + { ERR_RTP_EXTERNALTRANS_NOSENDER, "No sender has been set for this external transmitter"}, + { ERR_RTP_EXTERNALTRANS_NOTCREATED, "The external transmitter has not been created yet"}, + { ERR_RTP_EXTERNALTRANS_NOTINIT, "The external transmitter has not been initialized yet"}, + { ERR_RTP_EXTERNALTRANS_NOTWAITING, "The external transmitter is not currently waiting for incoming data"}, + { ERR_RTP_EXTERNALTRANS_SENDERROR, "The external transmitter was unable to actually send the data"}, + { ERR_RTP_EXTERNALTRANS_SPECIFIEDSIZETOOBIG, "The specified data size exceeds the maximum amount that has been set"}, { 0,0 } }; @@ -231,3 +253,5 @@ std::string RTPGetErrorString(int errcode) return std::string("Unknown error code") + std::string(str); } +} // end namespace + diff --git a/src/rtperrors.h b/src/rtperrors.h index 47cf32f..cc2eb6c 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -40,9 +40,14 @@ #include +namespace jrtplib +{ + /** Returns a string describing the error code \c errcode. */ std::string RTPGetErrorString(int errcode); +} // end namespace + #define ERR_RTP_OUTOFMEM -1 #define ERR_RTP_NOTHREADSUPPORT -2 #define ERR_RTP_COLLISIONLIST_BADADDRESS -3 @@ -206,5 +211,25 @@ std::string RTPGetErrorString(int errcode); #define ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN -161 #define ERR_RTP_RTPRANDOMRANDS_NOTSUPPORTED -162 +#define ERR_RTP_EXTERNALTRANS_ALREADYCREATED -163 +#define ERR_RTP_EXTERNALTRANS_ALREADYINIT -164 +#define ERR_RTP_EXTERNALTRANS_ALREADYWAITING -165 +#define ERR_RTP_EXTERNALTRANS_BADRECEIVEMODE -166 +#define ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS -167 +#define ERR_RTP_EXTERNALTRANS_CANTCREATEPIPE -168 +#define ERR_RTP_EXTERNALTRANS_CANTINITMUTEX -169 +#define ERR_RTP_EXTERNALTRANS_ERRORINSELECT -170 +#define ERR_RTP_EXTERNALTRANS_ILLEGALPARAMETERS -171 +#define ERR_RTP_EXTERNALTRANS_NOACCEPTLIST -172 +#define ERR_RTP_EXTERNALTRANS_NODESTINATIONSSUPPORTED -173 +#define ERR_RTP_EXTERNALTRANS_NOIGNORELIST -174 +#define ERR_RTP_EXTERNALTRANS_NOMULTICASTSUPPORT -175 +#define ERR_RTP_EXTERNALTRANS_NOSENDER -176 +#define ERR_RTP_EXTERNALTRANS_NOTCREATED -177 +#define ERR_RTP_EXTERNALTRANS_NOTINIT -178 +#define ERR_RTP_EXTERNALTRANS_NOTWAITING -179 +#define ERR_RTP_EXTERNALTRANS_SENDERROR -180 +#define ERR_RTP_EXTERNALTRANS_SPECIFIEDSIZETOOBIG -181 + #endif // RTPERRORS_H diff --git a/src/rtpexternaltransmitter.cpp b/src/rtpexternaltransmitter.cpp new file mode 100644 index 0000000..39c124c --- /dev/null +++ b/src/rtpexternaltransmitter.cpp @@ -0,0 +1,925 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2011 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +#include "rtpexternaltransmitter.h" +#include "rtprawpacket.h" +#include "rtptimeutilities.h" +#include "rtpdefines.h" +#include "rtperrors.h" +#include +#include + +#ifdef RTPDEBUG + #include +#endif // RTPDEBUG + +#include "rtpdebug.h" + +#include + +#if (defined(WIN32) || defined(_WIN32_WCE)) + #define RTPSOCKERR INVALID_SOCKET + #define RTPCLOSE(x) closesocket(x) + #define RTPSOCKLENTYPE int + #define RTPIOCTL ioctlsocket +#else // not Win32 + #include + #include + #include + #include + #include + #include + #include + #include + + #ifdef RTP_HAVE_SYS_FILIO + #include + #endif // RTP_HAVE_SYS_FILIO + #ifdef RTP_HAVE_SYS_SOCKIO + #include + #endif // RTP_HAVE_SYS_SOCKIO + #ifdef RTP_SUPPORT_IFADDRS + #include + #endif // RTP_SUPPORT_IFADDRS + + #define RTPSOCKERR -1 + #define RTPCLOSE(x) close(x) + + #ifdef RTP_SOCKLENTYPE_UINT + #define RTPSOCKLENTYPE unsigned int + #else + #define RTPSOCKLENTYPE int + #endif // RTP_SOCKLENTYPE_UINT + + #define RTPIOCTL ioctl +#endif // WIN32 + +#ifdef RTP_SUPPORT_THREAD + #define MAINMUTEX_LOCK { if (threadsafe) mainmutex.Lock(); } + #define MAINMUTEX_UNLOCK { if (threadsafe) mainmutex.Unlock(); } + #define WAITMUTEX_LOCK { if (threadsafe) waitmutex.Lock(); } + #define WAITMUTEX_UNLOCK { if (threadsafe) waitmutex.Unlock(); } +#else + #define MAINMUTEX_LOCK + #define MAINMUTEX_UNLOCK + #define WAITMUTEX_LOCK + #define WAITMUTEX_UNLOCK +#endif // RTP_SUPPORT_THREAD + +namespace jrtplib +{ + +RTPExternalTransmitter::RTPExternalTransmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr), packetinjector((RTPExternalTransmitter *)this) +{ + created = false; + init = false; +#if (defined(WIN32) || defined(_WIN32_WCE)) + timeinit.Dummy(); +#endif // WIN32 || _WIN32_WCE +} + +RTPExternalTransmitter::~RTPExternalTransmitter() +{ + Destroy(); +} + +int RTPExternalTransmitter::Init(bool tsafe) +{ + if (init) + return ERR_RTP_EXTERNALTRANS_ALREADYINIT; + +#ifdef RTP_SUPPORT_THREAD + threadsafe = tsafe; + if (threadsafe) + { + int status; + + status = mainmutex.Init(); + if (status < 0) + return ERR_RTP_EXTERNALTRANS_CANTINITMUTEX; + status = waitmutex.Init(); + if (status < 0) + return ERR_RTP_EXTERNALTRANS_CANTINITMUTEX; + } +#else + if (tsafe) + return ERR_RTP_NOTHREADSUPPORT; +#endif // RTP_SUPPORT_THREAD + + init = true; + return 0; +} + +int RTPExternalTransmitter::Create(size_t maximumpacketsize,const RTPTransmissionParams *transparams) +{ + const RTPExternalTransmissionParams *params; + int status; + + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_ALREADYCREATED; + } + + // Obtain transmission parameters + + if (transparams == 0) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_ILLEGALPARAMETERS; + } + if (transparams->GetTransmissionProtocol() != RTPTransmitter::ExternalProto) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_ILLEGALPARAMETERS; + } + + params = (const RTPExternalTransmissionParams *)transparams; + + if ((status = CreateAbortDescriptors()) < 0) + { + MAINMUTEX_UNLOCK + return status; + } + + maxpacksize = maximumpacketsize; + sender = params->GetSender(); + headersize = params->GetAdditionalHeaderSize(); + + localhostname = 0; + localhostnamelength = 0; + + waitingfordata = false; + created = true; + MAINMUTEX_UNLOCK + return 0; +} + +void RTPExternalTransmitter::Destroy() +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK; + return; + } + + if (localhostname) + { + RTPDeleteByteArray(localhostname,GetMemoryManager()); + localhostname = 0; + localhostnamelength = 0; + } + + FlushPackets(); + created = false; + + if (waitingfordata) + { + AbortWaitInternal(); + DestroyAbortDescriptors(); + MAINMUTEX_UNLOCK + WAITMUTEX_LOCK // to make sure that the WaitForIncomingData function ended + WAITMUTEX_UNLOCK + } + else + DestroyAbortDescriptors(); + + MAINMUTEX_UNLOCK +} + +RTPTransmissionInfo *RTPExternalTransmitter::GetTransmissionInfo() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + RTPTransmissionInfo *tinf = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMISSIONINFO) RTPExternalTransmissionInfo(&packetinjector); + MAINMUTEX_UNLOCK + return tinf; +} + +void RTPExternalTransmitter::DeleteTransmissionInfo(RTPTransmissionInfo *i) +{ + if (!init) + return; + + RTPDelete(i, GetMemoryManager()); +} + +int RTPExternalTransmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + + if (localhostname == 0) + { + // We'll just use 'gethostname' for simplicity + + char name[1024]; + + if (gethostname(name,1023) != 0) + strcpy(name, "localhost"); // failsafe + else + name[1023] = 0; // ensure null-termination + + localhostnamelength = strlen(name); + localhostname = RTPNew(GetMemoryManager(),RTPMEM_TYPE_OTHER) uint8_t [localhostnamelength+1]; + + memcpy(localhostname, name, localhostnamelength); + localhostname[localhostnamelength] = 0; + } + + if ((*bufferlength) < localhostnamelength) + { + *bufferlength = localhostnamelength; // tell the application the required size of the buffer + MAINMUTEX_UNLOCK + return ERR_RTP_TRANS_BUFFERLENGTHTOOSMALL; + } + + memcpy(buffer,localhostname,localhostnamelength); + *bufferlength = localhostnamelength; + + MAINMUTEX_UNLOCK + return 0; +} + +bool RTPExternalTransmitter::ComesFromThisTransmitter(const RTPAddress *addr) +{ + MAINMUTEX_LOCK + bool value = false; + if (sender) + value = sender->ComesFromThisSender(addr); + MAINMUTEX_UNLOCK + return value; +} + +int RTPExternalTransmitter::Poll() +{ + return 0; +} + +int RTPExternalTransmitter::WaitForIncomingData(const RTPTime &delay,bool *dataavailable) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + + fd_set fdset; + struct timeval tv; + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + if (waitingfordata) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_ALREADYWAITING; + } + + FD_ZERO(&fdset); + FD_SET(abortdesc[0],&fdset); + tv.tv_sec = delay.GetSeconds(); + tv.tv_usec = delay.GetMicroSeconds(); + + waitingfordata = true; + + if (!rawpacketlist.empty()) + { + if (dataavailable != 0) + *dataavailable = true; + waitingfordata = false; + MAINMUTEX_UNLOCK + return 0; + } + + WAITMUTEX_LOCK + MAINMUTEX_UNLOCK + + if (select(FD_SETSIZE,&fdset,0,0,&tv) < 0) + { + MAINMUTEX_LOCK + waitingfordata = false; + MAINMUTEX_UNLOCK + WAITMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_ERRORINSELECT; + } + + MAINMUTEX_LOCK + waitingfordata = false; + if (!created) // destroy called + { + MAINMUTEX_UNLOCK; + WAITMUTEX_UNLOCK + return 0; + } + + // if aborted, read from abort buffer + if (FD_ISSET(abortdesc[0],&fdset)) + { +#define BUFLEN 256 +#if (defined(WIN32) || defined(_WIN32_WCE)) + char buf[BUFLEN]; + unsigned long len, len2; +#else + size_t len, len2; + unsigned char buf[BUFLEN]; +#endif // WIN32 + + len = 0; + RTPIOCTL(abortdesc[0],FIONREAD,&len); + + while (len > 0) + { + len2 = len; + if (len2 > BUFLEN) + len2 = BUFLEN; + +#if (defined(WIN32) || defined(_WIN32_WCE)) + recv(abortdesc[0],buf,len2,0); +#else + if (read(abortdesc[0],buf,len2)) { } // To get rid of __wur related compiler warnings +#endif // WIN32 + len -= len2; + } + } + + if (dataavailable != 0) + { + if (rawpacketlist.empty()) + *dataavailable = false; + else + *dataavailable = true; + } + + MAINMUTEX_UNLOCK + WAITMUTEX_UNLOCK + return 0; +} + +int RTPExternalTransmitter::AbortWait() +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + if (!waitingfordata) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTWAITING; + } + + AbortWaitInternal(); + + MAINMUTEX_UNLOCK + return 0; +} + +int RTPExternalTransmitter::SendRTPData(const void *data,size_t len) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + if (len > maxpacksize) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_SPECIFIEDSIZETOOBIG; + } + + if (!sender) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOSENDER; + } + + MAINMUTEX_UNLOCK + + if (!sender->SendRTP(data, len)) + return ERR_RTP_EXTERNALTRANS_SENDERROR; + + return 0; +} + +int RTPExternalTransmitter::SendRTCPData(const void *data,size_t len) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + if (len > maxpacksize) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_SPECIFIEDSIZETOOBIG; + } + + if (!sender) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOSENDER; + } + MAINMUTEX_UNLOCK + + if (!sender->SendRTCP(data, len)) + return ERR_RTP_EXTERNALTRANS_SENDERROR; + + return 0; +} + +int RTPExternalTransmitter::AddDestination(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NODESTINATIONSSUPPORTED; +} + +int RTPExternalTransmitter::DeleteDestination(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NODESTINATIONSSUPPORTED; +} + +void RTPExternalTransmitter::ClearDestinations() +{ +} + +bool RTPExternalTransmitter::SupportsMulticasting() +{ + return false; +} + +int RTPExternalTransmitter::JoinMulticastGroup(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOMULTICASTSUPPORT; +} + +int RTPExternalTransmitter::LeaveMulticastGroup(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOMULTICASTSUPPORT; +} + +void RTPExternalTransmitter::LeaveAllMulticastGroups() +{ +} + +int RTPExternalTransmitter::SetReceiveMode(RTPTransmitter::ReceiveMode m) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + if (m != RTPTransmitter::AcceptAll) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_BADRECEIVEMODE; + } + MAINMUTEX_UNLOCK + return 0; +} + +int RTPExternalTransmitter::AddToIgnoreList(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOIGNORELIST; +} + +int RTPExternalTransmitter::DeleteFromIgnoreList(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOIGNORELIST; +} + +void RTPExternalTransmitter::ClearIgnoreList() +{ +} + +int RTPExternalTransmitter::AddToAcceptList(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOACCEPTLIST; +} + +int RTPExternalTransmitter::DeleteFromAcceptList(const RTPAddress &addr) +{ + return ERR_RTP_EXTERNALTRANS_NOACCEPTLIST; +} + +void RTPExternalTransmitter::ClearAcceptList() +{ +} + +int RTPExternalTransmitter::SetMaximumPacketSize(size_t s) +{ + if (!init) + return ERR_RTP_EXTERNALTRANS_NOTINIT; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return ERR_RTP_EXTERNALTRANS_NOTCREATED; + } + maxpacksize = s; + MAINMUTEX_UNLOCK + return 0; +} + +bool RTPExternalTransmitter::NewDataAvailable() +{ + if (!init) + return false; + + MAINMUTEX_LOCK + + bool v; + + if (!created) + v = false; + else + { + if (rawpacketlist.empty()) + v = false; + else + v = true; + } + + MAINMUTEX_UNLOCK + return v; +} + +RTPRawPacket *RTPExternalTransmitter::GetNextPacket() +{ + if (!init) + return 0; + + MAINMUTEX_LOCK + + RTPRawPacket *p; + + if (!created) + { + MAINMUTEX_UNLOCK + return 0; + } + if (rawpacketlist.empty()) + { + MAINMUTEX_UNLOCK + return 0; + } + + p = *(rawpacketlist.begin()); + rawpacketlist.pop_front(); + + MAINMUTEX_UNLOCK + return p; +} + +// Here the private functions start... + +void RTPExternalTransmitter::FlushPackets() +{ + std::list::const_iterator it; + + for (it = rawpacketlist.begin() ; it != rawpacketlist.end() ; ++it) + RTPDelete(*it,GetMemoryManager()); + rawpacketlist.clear(); +} + +#if (defined(WIN32) || defined(_WIN32_WCE)) + +int RTPExternalTransmitter::CreateAbortDescriptors() +{ + SOCKET listensock; + int size; + struct sockaddr_in addr; + + listensock = socket(PF_INET,SOCK_STREAM,0); + if (listensock == RTPSOCKERR) + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + if (bind(listensock,(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + size = sizeof(struct sockaddr_in); + if (getsockname(listensock,(struct sockaddr*)&addr,&size) != 0) + { + RTPCLOSE(listensock); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + unsigned short connectport = ntohs(addr.sin_port); + + abortdesc[0] = socket(PF_INET,SOCK_STREAM,0); + if (abortdesc[0] == RTPSOCKERR) + { + RTPCLOSE(listensock); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + if (bind(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + if (listen(listensock,1) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + addr.sin_port = htons(connectport); + + if (connect(abortdesc[0],(struct sockaddr *)&addr,sizeof(struct sockaddr_in)) != 0) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + memset(&addr,0,sizeof(struct sockaddr_in)); + size = sizeof(struct sockaddr_in); + abortdesc[1] = accept(listensock,(struct sockaddr *)&addr,&size); + if (abortdesc[1] == RTPSOCKERR) + { + RTPCLOSE(listensock); + RTPCLOSE(abortdesc[0]); + return ERR_RTP_EXTERNALTRANS_CANTCREATEABORTDESCRIPTORS; + } + + // okay, got the connection, close the listening socket + + RTPCLOSE(listensock); + return 0; +} + +void RTPExternalTransmitter::DestroyAbortDescriptors() +{ + RTPCLOSE(abortdesc[0]); + RTPCLOSE(abortdesc[1]); +} + +#else // in a non winsock environment we can use pipes + +int RTPExternalTransmitter::CreateAbortDescriptors() +{ + if (pipe(abortdesc) < 0) + return ERR_RTP_EXTERNALTRANS_CANTCREATEPIPE; + return 0; +} + +void RTPExternalTransmitter::DestroyAbortDescriptors() +{ + close(abortdesc[0]); + close(abortdesc[1]); +} + +#endif // WIN32 + +void RTPExternalTransmitter::AbortWaitInternal() +{ +#if (defined(WIN32) || defined(_WIN32_WCE)) + send(abortdesc[1],"*",1,0); +#else + if (write(abortdesc[1],"*",1)) + { + // To get rid of __wur related compiler warnings + } +#endif // WIN32 +} + +void RTPExternalTransmitter::InjectRTP(const void *data, size_t len, const RTPAddress &a) +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return; + } + + RTPAddress *addr = a.CreateCopy(GetMemoryManager()); + if (addr == 0) + return; + + uint8_t *datacopy; + + datacopy = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET) uint8_t[len]; + if (datacopy == 0) + { + RTPDelete(addr,GetMemoryManager()); + return; + } + memcpy(datacopy, data, len); + + RTPTime curtime = RTPTime::CurrentTime(); + RTPRawPacket *pack; + + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,len,addr,curtime,true,GetMemoryManager()); + if (pack == 0) + { + RTPDelete(addr,GetMemoryManager()); + RTPDeleteByteArray(localhostname,GetMemoryManager()); + return; + } + rawpacketlist.push_back(pack); + AbortWaitInternal(); + + MAINMUTEX_UNLOCK +} + +void RTPExternalTransmitter::InjectRTCP(const void *data, size_t len, const RTPAddress &a) +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return; + } + + RTPAddress *addr = a.CreateCopy(GetMemoryManager()); + if (addr == 0) + return; + + uint8_t *datacopy; + + datacopy = RTPNew(GetMemoryManager(),RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET) uint8_t[len]; + if (datacopy == 0) + { + RTPDelete(addr,GetMemoryManager()); + return; + } + memcpy(datacopy, data, len); + + RTPTime curtime = RTPTime::CurrentTime(); + RTPRawPacket *pack; + + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,len,addr,curtime,false,GetMemoryManager()); + if (pack == 0) + { + RTPDelete(addr,GetMemoryManager()); + RTPDeleteByteArray(localhostname,GetMemoryManager()); + return; + } + rawpacketlist.push_back(pack); + AbortWaitInternal(); + + MAINMUTEX_UNLOCK +} + +void RTPExternalTransmitter::InjectRTPorRTCP(const void *data, size_t len, const RTPAddress &a) +{ + if (!init) + return; + + MAINMUTEX_LOCK + if (!created) + { + MAINMUTEX_UNLOCK + return; + } + + RTPAddress *addr = a.CreateCopy(GetMemoryManager()); + if (addr == 0) + return; + + uint8_t *datacopy; + bool rtp = true; + + if (len >= 2) + { + const uint8_t *pData = (const uint8_t *)data; + if (pData[1] >= 200 && pData[1] <= 204) + rtp = false; + } + + datacopy = RTPNew(GetMemoryManager(),(rtp)?RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET:RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET) uint8_t[len]; + if (datacopy == 0) + { + RTPDelete(addr,GetMemoryManager()); + return; + } + memcpy(datacopy, data, len); + + RTPTime curtime = RTPTime::CurrentTime(); + RTPRawPacket *pack; + + pack = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPRAWPACKET) RTPRawPacket(datacopy,len,addr,curtime,rtp,GetMemoryManager()); + if (pack == 0) + { + RTPDelete(addr,GetMemoryManager()); + RTPDeleteByteArray(localhostname,GetMemoryManager()); + return; + } + rawpacketlist.push_back(pack); + AbortWaitInternal(); + + MAINMUTEX_UNLOCK + +} + +#ifdef RTPDEBUG +void RTPExternalTransmitter::Dump() +{ + if (!init) + std::cout << "Not initialized" << std::endl; + else + { + MAINMUTEX_LOCK + + if (!created) + std::cout << "Not created" << std::endl; + else + { + std::cout << "Number of raw packets in queue: " << rawpacketlist.size() << std::endl; + std::cout << "Maximum allowed packet size: " << maxpacksize << std::endl; + } + + MAINMUTEX_UNLOCK + } +} +#endif // RTPDEBUG + +} // end namespace + diff --git a/src/rtpexternaltransmitter.h b/src/rtpexternaltransmitter.h new file mode 100644 index 0000000..af7eb75 --- /dev/null +++ b/src/rtpexternaltransmitter.h @@ -0,0 +1,240 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2011 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtpexternaltransmitter.h + */ + +#ifndef RTPEXTERNALTRANSMITTER_H + +#define RTPEXTERNALTRANSMITTER_H + +#include "rtpconfig.h" +#include "rtptransmitter.h" +#include + +#ifdef RTP_SUPPORT_THREAD + #include +#endif // RTP_SUPPORT_THREAD + +namespace jrtplib +{ + +class RTPExternalTransmitter; + +/** Base class to specify a mechanism to transmit RTP packets outside of this library. + * Base class to specify a mechanism to transmit RTP packets outside of this library. When + * you want to use your own mechanism to transmit RTP packets, you need to specify that + * you'll be using the external transmission component, and derive a class from this base + * class. An instance should then be specified in the RTPExternalTransmissionParams object, + * so that the transmitter will call the \c SendRTP, \c SendRTCP and \c ComesFromThisSender + * methods of this instance when needed. + */ +class RTPExternalSender +{ +public: + RTPExternalSender() { } + virtual ~RTPExternalSender() { } + + /** This member function will be called when RTP data needs to be transmitted. */ + virtual bool SendRTP(const void *data, size_t len) = 0; + + /** This member function will be called when an RTCP packet needs to be transmitted. */ + virtual bool SendRTCP(const void *data, size_t len) = 0; + + /** Used to identify if an RTPAddress instance originated from this sender (to be able to detect own packets). */ + virtual bool ComesFromThisSender(const RTPAddress *a) = 0; +}; + +/** Interface to inject incoming RTP and RTCP packets into the library. + * Interface to inject incoming RTP and RTCP packets into the library. When you have your own + * mechanism to receive incoming RTP/RTCP data, you'll need to pass these packets to the library. + * By first retrieving the RTPExternalTransmissionInfo instance for the external transmitter you'll + * be using, you can obtain the associated RTPExternalPacketInjecter instance. By calling it's + * member functions, you can then inject RTP or RTCP data into the library for further processing. + */ +class RTPExternalPacketInjecter +{ +public: + RTPExternalPacketInjecter(RTPExternalTransmitter *trans) { transmitter = trans; } + ~RTPExternalPacketInjecter() { } + + /** This function can be called to insert an RTP packet into the transmission component. */ + void InjectRTP(const void *data, size_t len, const RTPAddress &a); + + /** This function can be called to insert an RTCP packet into the transmission component. */ + void InjectRTCP(const void *data, size_t len, const RTPAddress &a); + + /** Use this function to inject an RTP or RTCP packet and the transmitter will try to figure out which type of packet it is. */ + void InjectRTPorRTCP(const void *data, size_t len, const RTPAddress &a); +private: + RTPExternalTransmitter *transmitter; +}; + +/** Parameters to initialize a transmitter of type RTPExternalTransmitter. */ +class RTPExternalTransmissionParams : public RTPTransmissionParams +{ +public: + /** Using this constructor you can specify which RTPExternalSender object you'll be using + * and how much the additional header overhead for each packet will be. */ + RTPExternalTransmissionParams(RTPExternalSender *s, int headeroverhead):RTPTransmissionParams(RTPTransmitter::ExternalProto) { sender = s; headersize = headeroverhead; } + + RTPExternalSender *GetSender() const { return sender; } + int GetAdditionalHeaderSize() const { return headersize; } +private: + RTPExternalSender *sender; + int headersize; +}; + +/** Additional information about the external transmission component. */ +class RTPExternalTransmissionInfo : public RTPTransmissionInfo +{ +public: + RTPExternalTransmissionInfo(RTPExternalPacketInjecter *p) : RTPTransmissionInfo(RTPTransmitter::ExternalProto) { packetinjector = p; } + + /** Tells you which RTPExternalPacketInjecter you need to use to pass RTP or RTCP + * data on to the transmission component. */ + RTPExternalPacketInjecter *GetPacketInjector() const { return packetinjector; } +private: + RTPExternalPacketInjecter *packetinjector; +}; + +/** A transmission component which will use user specified functions to transmit the data and + * which will expose functions to inject received RTP or RTCP data into this component. + * A transmission component which will use user specified functions to transmit the data and + * which will expose functions to inject received RTP or RTCP data into this component. Use + * a class derived from RTPExternalSender to specify the functions which need to be used for + * sending the data. Obtain the RTPExternalTransmissionInfo object associated with this + * transmitter to obtain the functions needed to pass RTP/RTCP packets on to the transmitter. + */ +class RTPExternalTransmitter : public RTPTransmitter +{ +public: + RTPExternalTransmitter(RTPMemoryManager *mgr); + ~RTPExternalTransmitter(); + + int Init(bool treadsafe); + int Create(size_t maxpacksize, const RTPTransmissionParams *transparams); + void Destroy(); + RTPTransmissionInfo *GetTransmissionInfo(); + void DeleteTransmissionInfo(RTPTransmissionInfo *inf); + + int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); + bool ComesFromThisTransmitter(const RTPAddress *addr); + size_t GetHeaderOverhead() { return headersize; } + + int Poll(); + int WaitForIncomingData(const RTPTime &delay,bool *dataavailable = 0); + int AbortWait(); + + int SendRTPData(const void *data,size_t len); + int SendRTCPData(const void *data,size_t len); + + int AddDestination(const RTPAddress &addr); + int DeleteDestination(const RTPAddress &addr); + void ClearDestinations(); + + bool SupportsMulticasting(); + int JoinMulticastGroup(const RTPAddress &addr); + int LeaveMulticastGroup(const RTPAddress &addr); + void LeaveAllMulticastGroups(); + + int SetReceiveMode(RTPTransmitter::ReceiveMode m); + int AddToIgnoreList(const RTPAddress &addr); + int DeleteFromIgnoreList(const RTPAddress &addr); + void ClearIgnoreList(); + int AddToAcceptList(const RTPAddress &addr); + int DeleteFromAcceptList(const RTPAddress &addr); + void ClearAcceptList(); + int SetMaximumPacketSize(size_t s); + + bool NewDataAvailable(); + RTPRawPacket *GetNextPacket(); +#ifdef RTPDEBUG + void Dump(); +#endif // RTPDEBUG + + void InjectRTP(const void *data, size_t len, const RTPAddress &a); + void InjectRTCP(const void *data, size_t len, const RTPAddress &a); + void InjectRTPorRTCP(const void *data, size_t len, const RTPAddress &a); +private: + void FlushPackets(); + + bool init; + bool created; + bool waitingfordata; + RTPExternalSender *sender; + RTPExternalPacketInjecter packetinjector; + + std::list rawpacketlist; + + uint8_t *localhostname; + size_t localhostnamelength; + + size_t maxpacksize; + int headersize; + + // notification descriptors for AbortWait (0 is for reading, 1 for writing) +#if (defined(WIN32) || defined(_WIN32_WCE)) + SOCKET abortdesc[2]; +#else + int abortdesc[2]; +#endif // WIN32 + int CreateAbortDescriptors(); + void DestroyAbortDescriptors(); + void AbortWaitInternal(); +#ifdef RTP_SUPPORT_THREAD + jthread::JMutex mainmutex,waitmutex; + int threadsafe; +#endif // RTP_SUPPORT_THREAD +}; + +inline void RTPExternalPacketInjecter::InjectRTP(const void *data, size_t len, const RTPAddress &a) +{ + transmitter->InjectRTP(data, len, a); +} + +inline void RTPExternalPacketInjecter::InjectRTCP(const void *data, size_t len, const RTPAddress &a) +{ + transmitter->InjectRTCP(data, len, a); +} + +inline void RTPExternalPacketInjecter::InjectRTPorRTCP(const void *data, size_t len, const RTPAddress &a) +{ + transmitter->InjectRTPorRTCP(data, len, a); +} + +} // end namespace + +#endif // RTPTCPSOCKETTRANSMITTER_H + + diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 3469292..1f867b1 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -45,6 +45,9 @@ #include #endif // RTPDEBUG +namespace jrtplib +{ + //template template class RTPHashTable : public RTPMemoryObject @@ -333,5 +336,7 @@ inline void RTPHashTable::Dump() } #endif // RTPDEBUG +} // end namespace + #endif // RTPHASHTABLE_H diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index a8608c3..78d18c2 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -38,6 +38,9 @@ #define RTPINTERNALSOURCEDATA_MAXPROBATIONPACKETS 32 +namespace jrtplib +{ + RTPInternalSourceData::RTPInternalSourceData(uint32_t ssrc,RTPSources::ProbationType probtype,RTPMemoryManager *mgr):RTPSourceData(ssrc,mgr) { #ifdef RTP_SUPPORT_PROBATION @@ -280,3 +283,5 @@ int RTPInternalSourceData::ProcessBYEPacket(const uint8_t *reason,size_t reasonl return 0; } +} // end namespace + diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index c854b0d..8df533e 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -44,6 +44,9 @@ #include "rtptimeutilities.h" #include "rtpsources.h" +namespace jrtplib +{ + class RTPInternalSourceData : public RTPSourceData { public: @@ -126,5 +129,7 @@ inline int RTPInternalSourceData::SetRTCPDataAddress(const RTPAddress *a) return 0; } +} // end namespace + #endif // RTPINTERNALSOURCEDATA_H diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 4138553..2e5bcd7 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -39,6 +39,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + bool RTPIPv4Address::IsSameAddress(const RTPAddress *addr) const { if (addr == 0) @@ -81,3 +84,6 @@ std::string RTPIPv4Address::GetAddressString() const return std::string(str); } #endif // RTPDEBUG + +} // end namespace + diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index 5337500..1f38d64 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -42,6 +42,9 @@ #include "rtpaddress.h" #include "rtptypes.h" +namespace jrtplib +{ + class RTPMemoryManager; /** Represents an IPv4 IP address and port. @@ -86,5 +89,7 @@ class RTPIPv4Address : public RTPAddress uint16_t port; }; +} // end namespace + #endif // RTPIPV4ADDRESS_H diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 9d8d94d..dbe9db9 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -51,6 +51,9 @@ #endif // RTPDEBUG #include +namespace jrtplib +{ + class RTPIPv4Destination { public: @@ -104,5 +107,7 @@ inline std::string RTPIPv4Destination::GetDestinationString() const } #endif // RTPDEBUG +} // end namespace + #endif // RTPIPV4DESTINATION_H diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 712bd88..9c0844b 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -42,6 +42,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPAddress *RTPIPv6Address::CreateCopy(RTPMemoryManager *mgr) const { RTPIPv6Address *newaddr = RTPNew(mgr,RTPMEM_TYPE_CLASS_RTPADDRESS) RTPIPv6Address(ip,port); @@ -104,5 +107,7 @@ std::string RTPIPv6Address::GetAddressString() const } #endif // RTPDEBUG +} // end namespace + #endif // RTP_SUPPORT_IPV6 diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index 9651ad3..9be155b 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -48,6 +48,9 @@ #include #endif // WIN32 +namespace jrtplib +{ + /** Represents an IPv6 IP address and port. * This class is used by the UDP over IPv4 transmission component. * When an RTPIPv6Address is used in one of the multicast functions of the @@ -99,6 +102,8 @@ class RTPIPv6Address : public RTPAddress uint16_t port; }; +} // end namespace + #endif // RTP_SUPPORT_IPV6 #endif // RTPIPV6ADDRESS_H diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index b0ec10c..0145ae7 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -55,6 +55,9 @@ #include #endif // RTPDEBUG +namespace jrtplib +{ + class RTPIPv6Destination { public: @@ -103,6 +106,8 @@ inline std::string RTPIPv6Destination::GetDestinationString() const } #endif // RTPDEBUG +} // end namespace + #endif // RTP_SUPPORT_IPV6 #endif // RTPIPV6DESTINATION_H diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 488f94e..1d334a9 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -46,6 +46,9 @@ #include #endif // RTPDEBUG +namespace jrtplib +{ + template class RTPKeyHashTable : public RTPMemoryObject { @@ -336,4 +339,6 @@ inline void RTPKeyHashTable::Dump() } #endif // RTPDEBUG +} // end namespace + #endif // RTPKEYHASHTABLE_H diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index 1fe6fe0..ec84226 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -34,9 +34,12 @@ #include "rtpdefines.h" #include +namespace jrtplib +{ + RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,8,2); + return RTPLibraryVersion(3,9,0); } std::string RTPLibraryVersion::GetVersionString() const @@ -48,4 +51,5 @@ std::string RTPLibraryVersion::GetVersionString() const return std::string(str); } +} // end namespace diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 34e50f8..75d4dde 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -41,6 +41,9 @@ #include #include +namespace jrtplib +{ + /** * Used to provide information about the version of the library. */ @@ -67,5 +70,7 @@ class RTPLibraryVersion int debugnr,minornr,majornr; }; +} // end namespace + #endif // RTPLIBRARYVERSION_H diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index 25e2934..7b366b2 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -140,6 +140,9 @@ /** Buffer to store a HashElement instance for the source table. */ #define RTPMEM_TYPE_CLASS_SOURCETABLEHASHELEMENT 32 +namespace jrtplib +{ + /** A memory manager. */ class RTPMemoryManager { @@ -160,18 +163,20 @@ class RTPMemoryManager virtual void FreeBuffer(void *buffer) = 0; }; +} // end namespace + #ifdef RTP_SUPPORT_MEMORYMANAGEMENT #include -inline void *operator new(size_t numbytes, RTPMemoryManager *mgr, int memtype) +inline void *operator new(size_t numbytes, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) return operator new(numbytes); return mgr->AllocateBuffer(numbytes,memtype); } -inline void operator delete(void *buffer, RTPMemoryManager *mgr, int memtype) +inline void operator delete(void *buffer, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) operator delete(buffer); @@ -181,14 +186,14 @@ inline void operator delete(void *buffer, RTPMemoryManager *mgr, int memtype) #if defined(WIN32) || defined(_WIN32_WCE) #if _MSC_VER >= 1300 -inline void *operator new[](size_t numbytes, RTPMemoryManager *mgr, int memtype) +inline void *operator new[](size_t numbytes, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) return operator new[](numbytes); return mgr->AllocateBuffer(numbytes,memtype); } -inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) +inline void operator delete[](void *buffer, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) operator delete[](buffer); @@ -197,14 +202,14 @@ inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) } #endif // _MSC_VER >= 1300 #else -inline void *operator new[](size_t numbytes, RTPMemoryManager *mgr, int memtype) +inline void *operator new[](size_t numbytes, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) return operator new[](numbytes); return mgr->AllocateBuffer(numbytes,memtype); } -inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) +inline void operator delete[](void *buffer, jrtplib::RTPMemoryManager *mgr, int memtype) { if (mgr == 0) operator delete[](buffer); @@ -213,6 +218,9 @@ inline void operator delete[](void *buffer, RTPMemoryManager *mgr, int memtype) } #endif // WIN32 || _WIN32_WCE +namespace jrtplib +{ + inline void RTPDeleteByteArray(uint8_t *buf, RTPMemoryManager *mgr) { if (mgr == 0) @@ -233,6 +241,8 @@ inline void RTPDelete(ClassName *obj, RTPMemoryManager *mgr) } } +} // end namespace + #define RTPNew(a,b) new(a,b) #else diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index efef1ed..182f51c 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtpmemorymanager.h" +namespace jrtplib +{ + class RTPMemoryObject { protected: @@ -65,5 +68,7 @@ class RTPMemoryObject #endif // RTP_SUPPORT_MEMORYMANAGEMENT }; +} // end namespace + #endif // RTPMEMORYOBJECT_H diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index da96d7d..03f7b62 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -46,6 +46,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + void RTPPacket::Clear() { hasextension = false; @@ -343,3 +346,5 @@ void RTPPacket::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtppacket.h b/src/rtppacket.h index 372ed69..78986f6 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -43,6 +43,9 @@ #include "rtptimeutilities.h" #include "rtpmemoryobject.h" +namespace jrtplib +{ + class RTPRawPacket; /** Represents an RTP Packet. @@ -174,5 +177,7 @@ class RTPPacket : public RTPMemoryObject RTPTime receivetime; }; +} // end namespace + #endif // RTPPACKET_H diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index acd1558..d3d1525 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -42,6 +42,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPPacketBuilder::RTPPacketBuilder(RTPRandom &r,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),rtprnd(r),lastwallclocktime(0,0) { init = false; @@ -267,4 +270,5 @@ int RTPPacketBuilder::PrivateBuildPacket(const void *data,size_t len, return 0; } +} // end namespace diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index 8ff2ed2..32bb70a 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -46,6 +46,9 @@ #include "rtptypes.h" #include "rtpmemoryobject.h" +namespace jrtplib +{ + class RTPSources; /** This class can be used to build RTP packets and is a bit more high-level than the RTPPacket @@ -265,5 +268,7 @@ inline int RTPPacketBuilder::IncrementTimestampDefault() return 0; } +} // end namespace + #endif // RTPPACKETBUILDER_H diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index 1c0ea66..a9650d1 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -46,6 +46,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPPollThread::RTPPollThread(RTPSession &session,RTCPScheduler &sched):rtpsession(session),rtcpsched(sched) { stop = false; @@ -135,7 +138,7 @@ void *RTPPollThread::Thread() rtpsession.sourcesmutex.Unlock(); rtpsession.schedmutex.Unlock(); - + if ((status = transmitter->WaitForIncomingData(rtcpdelay)) < 0) { stopthread = true; @@ -171,5 +174,7 @@ void *RTPPollThread::Thread() return 0; } +} // end namespace + #endif // RTP_SUPPORT_THREAD diff --git a/src/rtppollthread.h b/src/rtppollthread.h index 49c49ab..a650436 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -44,14 +44,17 @@ #include "rtptransmitter.h" -#include -#include +#include +#include #include +namespace jrtplib +{ + class RTPSession; class RTCPScheduler; -class RTPPollThread : private JThread +class RTPPollThread : private jthread::JThread { public: RTPPollThread(RTPSession &session,RTCPScheduler &rtcpsched); @@ -62,13 +65,15 @@ class RTPPollThread : private JThread void *Thread(); bool stop; - JMutex stopmutex; + jthread::JMutex stopmutex; RTPTransmitter *transmitter; RTPSession &rtpsession; RTCPScheduler &rtcpsched; }; +} // end namespace + #endif // RTP_SUPPORT_THREAD #endif // RTPPOLLTHREAD_H diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index ed1680b..79eaf0f 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -50,6 +50,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + uint32_t RTPRandom::PickSeed() { uint32_t x; @@ -79,3 +82,5 @@ uint32_t RTPRandom::PickSeed() return x; } +} // end namespace + diff --git a/src/rtprandom.h b/src/rtprandom.h index 1079760..99acfa5 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -44,6 +44,9 @@ #define RTPRANDOM_2POWMIN63 1.08420217248550443400745280086994171142578125e-19 +namespace jrtplib +{ + /** Interface for generating random numbers. */ class RTPRandom { @@ -67,5 +70,7 @@ class RTPRandom uint32_t PickSeed(); }; +} // end namespace + #endif // RTPRANDOM_H diff --git a/src/rtprandomrand48.cpp b/src/rtprandomrand48.cpp index b8ac92a..0575015 100644 --- a/src/rtprandomrand48.cpp +++ b/src/rtprandomrand48.cpp @@ -32,6 +32,9 @@ #include "rtprandomrand48.h" +namespace jrtplib +{ + RTPRandomRand48::RTPRandomRand48() { SetSeed(PickSeed()); @@ -51,11 +54,11 @@ void RTPRandomRand48::SetSeed(uint32_t seed) #ifdef RTP_SUPPORT_THREAD mutex.Init(); // TODO: check error! #endif // RTP_SUPPORT_THREAD - + #if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 - state = ((uint64_t)seed) << 16 | 0x330Eui64; -#else - state = ((uint64_t)seed) << 16 | 0x330EULL; + state = ((uint64_t)seed) << 16 | 0x330Eui64; +#else + state = ((uint64_t)seed) << 16 | 0x330EULL; #endif } @@ -77,18 +80,18 @@ uint32_t RTPRandomRand48::GetRandom32() { #ifdef RTP_SUPPORT_THREAD mutex.Lock(); -#endif // RTP_SUPPORT_THREAD - -#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 - state = ((0x5DEECE66Dui64*state) + 0xBui64)&0x0000ffffffffffffui64; - - uint32_t x = (uint32_t)((state>>16)&0xffffffffui64); +#endif // RTP_SUPPORT_THREAD + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + state = ((0x5DEECE66Dui64*state) + 0xBui64)&0x0000ffffffffffffui64; + + uint32_t x = (uint32_t)((state>>16)&0xffffffffui64); #else state = ((0x5DEECE66DULL*state) + 0xBULL)&0x0000ffffffffffffULL; uint32_t x = (uint32_t)((state>>16)&0xffffffffULL); -#endif - +#endif + #ifdef RTP_SUPPORT_THREAD mutex.Unlock(); #endif // RTP_SUPPORT_THREAD @@ -99,17 +102,17 @@ double RTPRandomRand48::GetRandomDouble() { #ifdef RTP_SUPPORT_THREAD mutex.Lock(); -#endif // RTP_SUPPORT_THREAD - +#endif // RTP_SUPPORT_THREAD + #if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 state = ((0x5DEECE66Dui64*state) + 0xBui64)&0x0000ffffffffffffui64; - int64_t x = (int64_t)state; -#else - state = ((0x5DEECE66DULL*state) + 0xBULL)&0x0000ffffffffffffULL; - - int64_t x = (int64_t)state; -#endif + int64_t x = (int64_t)state; +#else + state = ((0x5DEECE66DULL*state) + 0xBULL)&0x0000ffffffffffffULL; + + int64_t x = (int64_t)state; +#endif #ifdef RTP_SUPPORT_THREAD mutex.Unlock(); @@ -118,3 +121,5 @@ double RTPRandomRand48::GetRandomDouble() return y; } +} // end namespace + diff --git a/src/rtprandomrand48.h b/src/rtprandomrand48.h index 5538035..33225a9 100644 --- a/src/rtprandomrand48.h +++ b/src/rtprandomrand48.h @@ -41,10 +41,13 @@ #include "rtpconfig.h" #include "rtprandom.h" #ifdef RTP_SUPPORT_THREAD - #include + #include #endif // RTP_SUPPORT_THREAD #include +namespace jrtplib +{ + /** A random number generator using the algorithm of the rand48 set of functions. */ class RTPRandomRand48 : public RTPRandom { @@ -61,10 +64,12 @@ class RTPRandomRand48 : public RTPRandom void SetSeed(uint32_t seed); #ifdef RTP_SUPPORT_THREAD - JMutex mutex; + jthread::JMutex mutex; #endif // RTP_SUPPORT_THREAD uint64_t state; }; +} // end namespace + #endif // RTPRANDOMRAND48_H diff --git a/src/rtprandomrands.cpp b/src/rtprandomrands.cpp index b0efa06..6477964 100644 --- a/src/rtprandomrands.cpp +++ b/src/rtprandomrands.cpp @@ -49,6 +49,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + #ifndef RTP_SUPPORT_RANDS RTPRandomRandS::RTPRandomRandS() @@ -101,7 +104,7 @@ int RTPRandomRandS::Init() if (initialized) // doesn't matter then return 0; - HMODULE hAdvApi32 = LoadLibrary("ADVAPI32.DLL"); + HMODULE hAdvApi32 = LoadLibrary(TEXT("ADVAPI32.DLL")); if(hAdvApi32 != NULL) { if(NULL != GetProcAddress( hAdvApi32, "SystemFunction036" )) // RtlGenRandom @@ -193,3 +196,5 @@ double RTPRandomRandS::GetRandomDouble() #endif // RTP_SUPPORT_RANDS +} // end namespace + diff --git a/src/rtprandomrands.h b/src/rtprandomrands.h index 291fe20..1aaacb1 100644 --- a/src/rtprandomrands.h +++ b/src/rtprandomrands.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtprandom.h" +namespace jrtplib +{ + /** A random number generator which tries to use the \c rand_s function on the * Win32 platform. */ @@ -61,5 +64,7 @@ class RTPRandomRandS : public RTPRandom bool initialized; }; +} // end namespace + #endif // RTPRANDOMRANDS_H diff --git a/src/rtprandomurandom.cpp b/src/rtprandomurandom.cpp index a90cd4b..df0d214 100644 --- a/src/rtprandomurandom.cpp +++ b/src/rtprandomurandom.cpp @@ -35,6 +35,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPRandomURandom::RTPRandomURandom() { device = 0; @@ -101,17 +104,20 @@ double RTPRandomURandom::GetRandomDouble() uint64_t value; - fread(&value, sizeof(uint64_t), 1, device); - -#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 - value &= 0x7fffffffffffffffui64; -#else - value &= 0x7fffffffffffffffULL; -#endif - + fread(&value, sizeof(uint64_t), 1, device); + +#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) && _MSC_VER <= 1200 + value &= 0x7fffffffffffffffui64; +#else + value &= 0x7fffffffffffffffULL; +#endif + int64_t value2 = (int64_t)value; double x = RTPRANDOM_2POWMIN63*(double)value2; return x; } + +} // end namespace + diff --git a/src/rtprandomurandom.h b/src/rtprandomurandom.h index c0d2b09..81b128d 100644 --- a/src/rtprandomurandom.h +++ b/src/rtprandomurandom.h @@ -42,6 +42,9 @@ #include "rtprandom.h" #include +namespace jrtplib +{ + /** A random number generator which uses bytes delivered by the /dev/urandom device. */ class RTPRandomURandom : public RTPRandom { @@ -60,4 +63,6 @@ class RTPRandomURandom : public RTPRandom FILE *device; }; +} // end namespace + #endif // RTPRANDOMURANDOM_H diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 58c8b1b..658c6d8 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -44,6 +44,9 @@ #include "rtptypes.h" #include "rtpmemoryobject.h" +namespace jrtplib +{ + /** This class is used by the transmission component to store the incoming RTP and RTCP data in. */ class RTPRawPacket : public RTPMemoryObject { @@ -105,5 +108,7 @@ inline RTPRawPacket::~RTPRawPacket() RTPDelete(senderaddress,GetMemoryManager()); } +} // end namespace + #endif // RTPRAWPACKET_H diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index d5364fe..44a8be5 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -35,6 +35,7 @@ #include "rtppollthread.h" #include "rtpudpv4transmitter.h" #include "rtpudpv6transmitter.h" +#include "rtpexternaltransmitter.h" #include "rtpsessionparams.h" #include "rtpdefines.h" #include "rtprawpacket.h" @@ -80,6 +81,9 @@ #define PACKSENT_UNLOCK #endif // RTP_SUPPORT_THREAD +namespace jrtplib +{ + RTPSession::RTPSession(RTPRandom *r,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),sources(*this,mgr),rtprnd(GetRandomNumberGenerator(r)),packetbuilder(*rtprnd,mgr),rtcpsched(sources,*rtprnd), rtcpbuilder(sources,packetbuilder,mgr),collisionlist(mgr) @@ -130,6 +134,9 @@ int RTPSession::Create(const RTPSessionParams &sessparams,const RTPTransmissionP rtptrans = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMITTER) RTPUDPv6Transmitter(GetMemoryManager()); break; #endif // RTP_SUPPORT_IPV6 + case RTPTransmitter::ExternalProto: + rtptrans = RTPNew(GetMemoryManager(),RTPMEM_TYPE_CLASS_RTPTRANSMITTER) RTPExternalTransmitter(GetMemoryManager()); + break; case RTPTransmitter::UserDefinedProto: rtptrans = NewUserDefinedTransmitter(); if (rtptrans == 0) @@ -955,7 +962,9 @@ RTPTransmissionInfo *RTPSession::GetTransmissionInfo() void RTPSession::DeleteTransmissionInfo(RTPTransmissionInfo *inf) { - RTPDelete(inf,GetMemoryManager()); + if (!created) + return; + rtptrans->DeleteTransmissionInfo(inf); } int RTPSession::Poll() @@ -1645,3 +1654,5 @@ void RTPSession::DumpTransmitter() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtpsession.h b/src/rtpsession.h index b75cf6a..61380f1 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -52,9 +52,12 @@ #include #ifdef RTP_SUPPORT_THREAD - #include + #include #endif // RTP_SUPPORT_THREAD +namespace jrtplib +{ + class RTPTransmitter; class RTPSessionParams; class RTPTransmissionParams; @@ -563,7 +566,7 @@ class RTPSession : public RTPMemoryObject #ifdef RTP_SUPPORT_THREAD RTPPollThread *pollthread; - JMutex sourcesmutex,buildermutex,schedmutex,packsentmutex; + jthread::JMutex sourcesmutex,buildermutex,schedmutex,packsentmutex; friend class RTPPollThread; #endif // RTP_SUPPORT_THREAD @@ -571,5 +574,7 @@ class RTPSession : public RTPMemoryObject friend class RTCPSessionPacketBuilder; }; +} // end namespace + #endif // RTPSESSION_H diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index f3c6ef1..db6584f 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -37,6 +37,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPSessionParams::RTPSessionParams() : mininterval(0,0) { #ifdef RTP_SUPPORT_THREAD @@ -81,3 +84,5 @@ int RTPSessionParams::SetUsePollThread(bool usethread) #endif // RTP_SUPPORT_THREAD } +} // end namespace + diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 0314643..f6aae3c 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -44,6 +44,9 @@ #include "rtptimeutilities.h" #include "rtpsources.h" +namespace jrtplib +{ + /** Describes the parameters for to be used by an RTPSession instance. * Describes the parameters for to be used by an RTPSession instance. Note that the own timestamp * unit must be set to a valid number, otherwise the session can't be created. @@ -239,5 +242,7 @@ class RTPSessionParams std::string cname; }; +} // end namespace + #endif // RTPSESSIONPARAMS_H diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index f9657f0..10f540a 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -36,6 +36,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + void RTPSessionSources::OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime,const RTPAddress *senderaddress) { rtpsession.OnRTPPacket(pack,receivetime,senderaddress); @@ -107,3 +110,5 @@ void RTPSessionSources::OnNoteTimeout(RTPSourceData *srcdat) rtpsession.OnNoteTimeout(srcdat); } +} // end namespace + diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index da88559..2e95515 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtpsources.h" +namespace jrtplib +{ + class RTPSession; class RTPSessionSources : public RTPSources @@ -76,4 +79,6 @@ class RTPSessionSources : public RTPSources bool owncollision; }; +} // end namespace + #endif // RTPSESSIONSOURCES_H diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index c113d3b..bdf59f6 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -72,6 +72,9 @@ if (!ownpacket) /* for own packet, this value is set on an outgoing packet */ \ lastrtptime = prevpacktime; +namespace jrtplib +{ + void RTPSourceStats::ProcessPacket(RTPPacket *pack,const RTPTime &receivetime,double tsunit, bool ownpacket,bool *accept,bool applyprobation,bool *onprobation) { @@ -492,3 +495,6 @@ void RTPSourceData::Dump() #endif // RTPDEBUG +} // end namespace + + diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index f827eb8..9610022 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -47,6 +47,9 @@ #include "rtpmemoryobject.h" #include +namespace jrtplib +{ + class RTPAddress; class RTCPSenderReportInfo @@ -470,5 +473,8 @@ inline void RTPSourceData::FlushPackets() RTPDelete(*it,GetMemoryManager()); packetlist.clear(); } + +} // end namespace + #endif // RTPSOURCEDATA_H diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 220bfc5..0e4e0a4 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -51,6 +51,9 @@ #include "rtpdebug.h" +namespace jrtplib +{ + RTPSources::RTPSources(ProbationType probtype,RTPMemoryManager *mgr) : RTPMemoryObject(mgr),sourcelist(mgr,RTPMEM_TYPE_CLASS_SOURCETABLEHASHELEMENT) { totalcount = 0; @@ -1410,3 +1413,6 @@ bool RTPSources::CheckCollision(RTPInternalSourceData *srcdat,const RTPAddress * return false; } + +} // end namespace + diff --git a/src/rtpsources.h b/src/rtpsources.h index 8077a84..0aeec4e 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -46,6 +46,9 @@ #define RTPSOURCES_HASHSIZE 8317 +namespace jrtplib +{ + class RTPSources_GetHashIndex { public: @@ -356,5 +359,7 @@ class RTPSources : public RTPMemoryObject RTPInternalSourceData *owndata; }; +} // end namespace + #endif // RTPSOURCES_H diff --git a/src/rtpstructs.h b/src/rtpstructs.h index 360930b..bc222c1 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -41,6 +41,9 @@ #include "rtpconfig.h" #include "rtptypes.h" +namespace jrtplib +{ + struct RTPHeader { #ifdef RTP_BIG_ENDIAN @@ -119,5 +122,7 @@ struct RTCPSDESHeader uint8_t length; }; +} // end namespace + #endif // RTPSTRUCTS diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index 5306f5f..d0e2ac4 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -37,6 +37,9 @@ #include #endif // RTPDEBUG +namespace jrtplib +{ + RTPTimeInitializer::RTPTimeInitializer() { #ifdef RTPDEBUG @@ -48,5 +51,7 @@ RTPTimeInitializer::RTPTimeInitializer() RTPTimeInitializer timeinit; +} // end namespace + #endif // WIN32 || _WIN32_WCE diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 8e099fc..1f18d7d 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -51,6 +51,9 @@ #define RTP_NTPTIMEOFFSET 2208988800UL +namespace jrtplib +{ + /** * This is a simple wrapper for the most significant word (MSW) and least * significant word (LSW) of an NTP timestamp. @@ -315,5 +318,8 @@ inline bool RTPTime::operator>=(const RTPTime &t) const return true; return false; } + +} // end namespace + #endif // RTPTIMEUTILITIES_H diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 08287b3..5b8ca24 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -42,6 +42,9 @@ #include "rtptypes.h" #include "rtpmemoryobject.h" +namespace jrtplib +{ + class RTPRawPacket; class RTPAddress; class RTPTransmissionParams; @@ -51,8 +54,9 @@ class RTPTransmissionInfo; /** Abstract class from which actual transmission components should be derived. * Abstract class from which actual transmission components should be derived. * The abstract class RTPTransmitter specifies the interface for - * actual transmission components. Currently, two implementations exist: - * an UDP over IPv4 transmitter and an UDP over IPv6 transmitter. + * actual transmission components. Currently, three implementations exist: + * an UDP over IPv4 transmitter, an UDP over IPv6 transmitter and a transmitter + * which can be used to use an external transmission mechanism. */ class RTPTransmitter : public RTPMemoryObject { @@ -66,6 +70,7 @@ class RTPTransmitter : public RTPMemoryObject { IPv4UDPProto, /**< Specifies the internal UDP over IPv4 transmitter. */ IPv6UDPProto, /**< Specifies the internal UDP over IPv6 transmitter. */ + ExternalProto, /**< Specifies the transmitter which can send packets using an external mechanism, and which can have received packets injected into it - see RTPExternalTransmitter for additional information. */ UserDefinedProto /**< Specifies a user defined, external transmitter. */ }; @@ -108,10 +113,15 @@ class RTPTransmitter : public RTPMemoryObject * some additional information about the transmitter (a list of local IP addresses for example). * Currently, either an instance of RTPUDPv4TransmissionInfo or RTPUDPv6TransmissionInfo is * returned, depending on the type of the transmitter. The user has to deallocate the returned - * instance when it is no longer needed. + * instance when it is no longer needed, which can be done using RTPTransmitter::DeleteTransmissionInfo. */ virtual RTPTransmissionInfo *GetTransmissionInfo() = 0; + /** Deallocates the information returned by RTPTransmitter::GetTransmissionInfo . + * Deallocates the information returned by RTPTransmitter::GetTransmissionInfo . + */ + virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf) = 0; + /** Looks up the local host name. * Looks up the local host name based upon internal information about the local host's * addresses. This function might take some time since a DNS query might be done. \c bufferlength @@ -245,5 +255,7 @@ class RTPTransmissionInfo RTPTransmitter::TransmissionProtocol protocol; }; +} // end namespace + #endif // RTPTRANSMITTER_H diff --git a/src/rtptypes.h b/src/rtptypes.h deleted file mode 100644 index 7d77f7b..0000000 --- a/src/rtptypes.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - - This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs - - Contact: jori.liesenborgs@gmail.com - - This library was developed at the Expertise Centre for Digital Media - (http://www.edm.uhasselt.be), a research center of the Hasselt University - (http://www.uhasselt.be). The library is based upon work done for - my thesis at the School for Knowledge Technology (Belgium/The Netherlands). - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - -*/ - -#if ! (defined(WIN32) || defined(_WIN32_WCE)) - #include "rtptypes_unix.h" -#else - #include "rtptypes_win.h" -#endif // WIN32 diff --git a/src/rtptypes.h.in b/src/rtptypes.h.in new file mode 100644 index 0000000..a565e45 --- /dev/null +++ b/src/rtptypes.h.in @@ -0,0 +1,2 @@ +${RTP_WINSOCK_HEADERS} +${RTP_INTTYPE_HEADERS} diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 9732acc..90cf00d 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -30,18 +30,9 @@ */ -#ifndef RTPTYPES_H +#ifndef RTPTYPES_WIN_H -#define RTPTYPES_H - -#ifndef _WIN32_WCE - #include - #include - #include -#else - #include - #include -#endif // _WIN32_WCE +#define RTPTYPES_WIN_H #ifndef INTTYPES_DEFINED @@ -58,5 +49,5 @@ typedef unsigned __int64 uint64_t; #endif // INTTYPES_DEFINED -#endif // RTPTYPES_H +#endif // RTPTYPES_WIN_H diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index da562ab..a76535c 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -104,7 +104,13 @@ #define WAITMUTEX_UNLOCK #endif // RTP_SUPPORT_THREAD -RTPUDPv4Transmitter::RTPUDPv4Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr),destinations(mgr,RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT),multicastgroups(mgr,RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), +namespace jrtplib +{ + +RTPUDPv4Transmitter::RTPUDPv4Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr),destinations(mgr,RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT), +#ifdef RTP_SUPPORT_IPV4MULTICAST + multicastgroups(mgr,RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), +#endif // RTP_SUPPORT_IPV4MULTICAST acceptignoreinfo(mgr,RTPMEM_TYPE_CLASS_ACCEPTIGNOREHASHELEMENT) { created = false; @@ -387,6 +393,14 @@ RTPTransmissionInfo *RTPUDPv4Transmitter::GetTransmissionInfo() return tinf; } +void RTPUDPv4Transmitter::DeleteTransmissionInfo(RTPTransmissionInfo *i) +{ + if (!init) + return; + + RTPDelete(i, GetMemoryManager()); +} + int RTPUDPv4Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) @@ -1929,3 +1943,5 @@ void RTPUDPv4Transmitter::Dump() } #endif // RTPDEBUG +} // end namespace + diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 4d38469..b5d7495 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -46,7 +46,7 @@ #include #ifdef RTP_SUPPORT_THREAD - #include + #include #endif // RTP_SUPPORT_THREAD #define RTPUDPV4TRANS_HASHSIZE 8317 @@ -57,6 +57,9 @@ #define RTPUDPV4TRANS_RTPTRANSMITBUFFER 32768 #define RTPUDPV4TRANS_RTCPTRANSMITBUFFER 32768 +namespace jrtplib +{ + /** Parameters for the UDP over IPv4 transmitter. */ class RTPUDPv4TransmissionParams : public RTPTransmissionParams { @@ -196,6 +199,7 @@ class RTPUDPv4Transmitter : public RTPTransmitter int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); void Destroy(); RTPTransmissionInfo *GetTransmissionInfo(); + void DeleteTransmissionInfo(RTPTransmissionInfo *inf); int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); @@ -293,10 +297,12 @@ class RTPUDPv4Transmitter : public RTPTransmitter void DestroyAbortDescriptors(); void AbortWaitInternal(); #ifdef RTP_SUPPORT_THREAD - JMutex mainmutex,waitmutex; + jthread::JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD }; +} // end namespace + #endif // RTPUDPV4TRANSMITTER_H diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 1dcca50..61cce94 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -110,6 +110,9 @@ inline bool operator==(const in6_addr &ip1,const in6_addr &ip2) return false; } +namespace jrtplib +{ + RTPUDPv6Transmitter::RTPUDPv6Transmitter(RTPMemoryManager *mgr) : RTPTransmitter(mgr), destinations(GetMemoryManager(),RTPMEM_TYPE_CLASS_DESTINATIONLISTHASHELEMENT), multicastgroups(GetMemoryManager(),RTPMEM_TYPE_CLASS_MULTICASTHASHELEMENT), @@ -396,6 +399,14 @@ RTPTransmissionInfo *RTPUDPv6Transmitter::GetTransmissionInfo() return tinf; } +void RTPUDPv6Transmitter::DeleteTransmissionInfo(RTPTransmissionInfo *i) +{ + if (!init) + return; + + RTPDelete(i, GetMemoryManager()); +} + int RTPUDPv6Transmitter::GetLocalHostName(uint8_t *buffer,size_t *bufferlength) { if (!init) @@ -1891,5 +1902,7 @@ void RTPUDPv6Transmitter::Dump() } #endif // RTPDEBUG +} // end namespace + #endif // RTP_SUPPORT_IPV6 diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index dcfa067..f66c19a 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -53,7 +53,7 @@ #include #ifdef RTP_SUPPORT_THREAD - #include + #include #endif // RTP_SUPPORT_THREAD #define RTPUDPV6TRANS_HASHSIZE 8317 @@ -64,6 +64,9 @@ #define RTPUDPV6TRANS_RTPTRANSMITBUFFER 32768 #define RTPUDPV6TRANS_RTCPTRANSMITBUFFER 32768 +namespace jrtplib +{ + /** Parameters for the UDP over IPv6 transmitter. */ class RTPUDPv6TransmissionParams : public RTPTransmissionParams { @@ -204,6 +207,7 @@ class RTPUDPv6Transmitter : public RTPTransmitter int Create(size_t maxpacksize,const RTPTransmissionParams *transparams); void Destroy(); RTPTransmissionInfo *GetTransmissionInfo(); + void DeleteTransmissionInfo(RTPTransmissionInfo *inf); int GetLocalHostName(uint8_t *buffer,size_t *bufferlength); bool ComesFromThisTransmitter(const RTPAddress *addr); @@ -302,11 +306,13 @@ class RTPUDPv6Transmitter : public RTPTransmitter void DestroyAbortDescriptors(); void AbortWaitInternal(); #ifdef RTP_SUPPORT_THREAD - JMutex mainmutex,waitmutex; + jthread::JMutex mainmutex,waitmutex; int threadsafe; #endif // RTP_SUPPORT_THREAD }; +} // end namespace + #endif // RTP_SUPPORT_IPV6 #endif // RTPUDPV6TRANSMITTER_H diff --git a/tools/Makefile.am b/tools/Makefile.am deleted file mode 100644 index ea8663f..0000000 --- a/tools/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = gettypes.cpp - diff --git a/tools/Makefile.in b/tools/Makefile.in deleted file mode 100644 index f32f58c..0000000 --- a/tools/Makefile.in +++ /dev/null @@ -1,333 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -RTP_ENDIAN = @RTP_ENDIAN@ -RTP_FILIO = @RTP_FILIO@ -RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ -RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ -RTP_LINKLIBS = @RTP_LINKLIBS@ -RTP_SOCKIO = @RTP_SOCKIO@ -RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@ -RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@ -RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@ -RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@ -RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@ -RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@ -RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@ -RTP_SUPPORT_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ -RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ -RTP_SUPPORT_RTCPUNKNOWN = @RTP_SUPPORT_RTCPUNKNOWN@ -RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ -RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ -RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = gettypes.cpp -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tools/getloginrtest.cpp b/tools/getloginrtest.cpp new file mode 100644 index 0000000..31bb831 --- /dev/null +++ b/tools/getloginrtest.cpp @@ -0,0 +1,9 @@ +#include + +int main(void) +{ + char buf[256]; + getlogin_r(buf,256); + return 0; +} + diff --git a/tools/ipv4mcasttest.cpp b/tools/ipv4mcasttest.cpp new file mode 100644 index 0000000..4c41923 --- /dev/null +++ b/tools/ipv4mcasttest.cpp @@ -0,0 +1,21 @@ +#if defined(WIN32) || defined(_WIN32_WCE) + #include + #include + #ifndef _WIN32_WCE + #include + #endif // !_WIN32_WCE +#else + #include + #include + #include +#endif // WIN32 || _WIN32_WCE + +int main(void) +{ + int testval; + struct ip_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IP_MULTICAST_TTL; + testval = IP_ADD_MEMBERSHIP; + return 0; +} diff --git a/tools/ipv6mcasttest.cpp b/tools/ipv6mcasttest.cpp new file mode 100644 index 0000000..00434ac --- /dev/null +++ b/tools/ipv6mcasttest.cpp @@ -0,0 +1,23 @@ +#if defined(WIN32) || defined(_WIN32_WCE) + #include + #include + #ifndef _WIN32_WCE + #include + #endif // !_WIN32_WCE +#else + #include + #include + #include +#endif // WIN32 || _WIN32_WCE + +int main(void) +{ + int testval; + struct ipv6_mreq mreq,mreq2; + mreq = mreq2; // avoid 'unused variable' + testval = IPV6_MULTICAST_HOPS; + testval = IPV6_JOIN_GROUP; + testval = IPV6_LEAVE_GROUP; + return 0; +} + diff --git a/tools/ipv6test.cpp b/tools/ipv6test.cpp new file mode 100644 index 0000000..e339ce7 --- /dev/null +++ b/tools/ipv6test.cpp @@ -0,0 +1,21 @@ +#if defined(WIN32) || defined(_WIN32_WCE) + #include + #include + #ifndef _WIN32_WCE + #include + #endif // !_WIN32_WCE +#else + #include + #include + #include +#endif // WIN32 || _WIN32_WCE + +int main(void) +{ + struct sockaddr_in6 addr; + + addr.sin6_family = PF_INET6; + + return 0; +} + diff --git a/tools/salentest.cpp b/tools/salentest.cpp new file mode 100644 index 0000000..d4216c7 --- /dev/null +++ b/tools/salentest.cpp @@ -0,0 +1,20 @@ +#if defined(WIN32) || defined(_WIN32_WCE) + #include + #include + #ifndef _WIN32_WCE + #include + #endif // !_WIN32_WCE +#else + #include + #include + #include +#endif // WIN32 || _WIN32_WCE + +int main(void) +{ + struct sockaddr sa; + sa.sa_len = 0; + + return 0; +} + diff --git a/tools/socklentest.cpp b/tools/socklentest.cpp new file mode 100644 index 0000000..7333335 --- /dev/null +++ b/tools/socklentest.cpp @@ -0,0 +1,22 @@ +#if defined(WIN32) || defined(_WIN32_WCE) + #include + #include + #ifndef _WIN32_WCE + #include + #endif // !_WIN32_WCE +#else + #include + #include + #include +#endif // WIN32 || _WIN32_WCE + +int main(void) +{ + int param; + int sock = 0; + struct sockaddr addr; + + getsockname(sock,&addr,¶m); + + return 0; +} From 0b3ea2fd21a723c35054b086ee0f2ef1339f1518 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:19 +0100 Subject: [PATCH 018/136] Import of version 3.9.1 --- CMakeLists.txt | 43 ++++++-- ChangeLog | 10 +- Doxyfile | 2 +- README.TXT | 4 +- aboutrfc3550 | 177 -------------------------------- cmake/JRTPLIBConfig.cmake.in | 4 +- examples/CMakeLists.txt | 6 +- src/CMakeLists.txt | 32 +++--- src/rtcpapppacket.h | 2 +- src/rtcpbyepacket.h | 2 +- src/rtcpcompoundpacket.h | 2 +- src/rtcpcompoundpacketbuilder.h | 2 +- src/rtcppacket.h | 2 +- src/rtcppacketbuilder.h | 2 +- src/rtcprrpacket.h | 2 +- src/rtcpscheduler.h | 4 +- src/rtcpsdesinfo.h | 2 +- src/rtcpsdespacket.h | 6 +- src/rtcpsrpacket.h | 2 +- src/rtcpunknownpacket.h | 2 +- src/rtpaddress.h | 2 +- src/rtpbyteaddress.h | 2 +- src/rtpcollisionlist.h | 2 +- src/rtpconfig.h.in | 8 ++ src/rtperrors.h | 3 +- src/rtpexternaltransmitter.h | 10 +- src/rtpinternalsourcedata.h | 2 +- src/rtpipv4address.h | 2 +- src/rtpipv4destination.h | 2 +- src/rtpipv6address.h | 2 +- src/rtpipv6destination.h | 2 +- src/rtplibraryversion.cpp | 2 +- src/rtplibraryversion.h | 3 +- src/rtpmemorymanager.h | 2 +- src/rtpmemoryobject.h | 2 +- src/rtppacket.h | 2 +- src/rtppacketbuilder.h | 2 +- src/rtppollthread.h | 2 +- src/rtprandom.h | 2 +- src/rtprandomrand48.h | 2 +- src/rtprandomrands.h | 2 +- src/rtprandomurandom.h | 2 +- src/rtprawpacket.h | 2 +- src/rtpsession.h | 2 +- src/rtpsessionparams.h | 2 +- src/rtpsessionsources.h | 2 +- src/rtpsourcedata.h | 8 +- src/rtpsources.h | 4 +- src/rtptimeutilities.h | 6 +- src/rtptransmitter.h | 6 +- src/rtpudpv4transmitter.h | 10 +- src/rtpudpv6transmitter.h | 10 +- 52 files changed, 148 insertions(+), 272 deletions(-) delete mode 100644 aboutrfc3550 diff --git a/CMakeLists.txt b/CMakeLists.txt index a0b70e6..4bfcf4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(jrtplib) -set(VERSION 3.9.0) +set(VERSION 3.9.1) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") @@ -103,13 +103,22 @@ if (NOT UNIX AND WIN32) set(RTP_WINSOCK_HEADERS "#if defined(WIN32) || defined(_WIN32_WCE)\n #include \n #include \n#ifndef _WIN32_WCE\n #include \n#endif // _WIN32_WCE\n#endif // WIN32 || _WIN32_WCE\n") endif (NOT UNIX AND WIN32) -configure_file("${PROJECT_SOURCE_DIR}/src/rtptypes.h.in" "${PROJECT_BINARY_DIR}/src/rtptypes.h") -configure_file("${PROJECT_SOURCE_DIR}/src/rtpconfig.h.in" "${PROJECT_BINARY_DIR}/src/rtpconfig.h") - if (NOT UNIX) + set(JRTPLIB_COMPILE_STATIC ON CACHE BOOL "Flag indicating if a static library should be built, or a dynamic one") list(APPEND JRTPLIB_LINK_LIBS "ws2_32") endif (NOT UNIX) +if (UNIX OR JRTPLIB_COMPILE_STATIC) + set(JRTPLIB_IMPORT "") + set(JRTPLIB_EXPORT "") +else (UNIX OR JRTPLIB_COMPILE_STATIC) + set(JRTPLIB_IMPORT "__declspec(dllimport)") + set(JRTPLIB_EXPORT "__declspec(dllexport)") +endif (UNIX OR JRTPLIB_COMPILE_STATIC) + +configure_file("${PROJECT_SOURCE_DIR}/src/rtptypes.h.in" "${PROJECT_BINARY_DIR}/src/rtptypes.h") +configure_file("${PROJECT_SOURCE_DIR}/src/rtpconfig.h.in" "${PROJECT_BINARY_DIR}/src/rtpconfig.h") + save_paths(JRTPLIB_INTERNAL_INCLUDES "${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/src") add_subdirectory(src) @@ -120,12 +129,19 @@ if (UNIX) get_filename_component(JRTPLIB_LIBNAME "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) set(JRTPLIB_LIBS "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME}") else (UNIX) - get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static RELEASE_LOCATION) - get_filename_component(JRTPLIB_LIBNAME_RELEASE "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) - get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static DEBUG_LOCATION) - get_filename_component(JRTPLIB_LIBNAME_DEBUG "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME) - set(JRTPLIB_LIBS optimized "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_RELEASE}" - debug "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_DEBUG}") + if (JRTPLIB_COMPILE_STATIC) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static RELEASE_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_RELEASE "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME_WE) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-static DEBUG_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_DEBUG "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME_WE) + else (JRTPLIB_COMPILE_STATIC) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-shared RELEASE_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_RELEASE "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME_WE) + get_target_property(JRTPLIB_LOCAL_LIBRARY_NAME jrtplib-shared DEBUG_LOCATION) + get_filename_component(JRTPLIB_LIBNAME_DEBUG "${JRTPLIB_LOCAL_LIBRARY_NAME}" NAME_WE) + endif (JRTPLIB_COMPILE_STATIC) + set(JRTPLIB_LIBS optimized "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_RELEASE}.lib" + debug "${LIBRARY_INSTALL_DIR}/${JRTPLIB_LIBNAME_DEBUG}.lib") endif (UNIX) set(JRTPLIB_INCDIRS ${JRTPLIB_EXTERNAL_INCLUDES} ${CMAKE_INSTALL_PREFIX}/include) @@ -134,6 +150,13 @@ remove_empty(JRTPLIB_INCDIRS) list(REMOVE_DUPLICATES JRTPLIB_INCDIRS) remove_empty(JRTPLIB_LIBS) +foreach(ARG ${JRTPLIB_LIBS}) + set(JRTPLIB_LIBS_CMAKECONFIG "${JRTPLIB_LIBS_CMAKECONFIG} \"${ARG}\"") +endforeach() +foreach(ARG ${JRTPLIB_INCDIRS}) + set(JRTPLIB_INCDIRS_CMAKECONFIG "${JRTPLIB_INCDIRS_CMAKECONFIG} \"${ARG}\"") +endforeach() + configure_file("${PROJECT_SOURCE_DIR}/cmake/JRTPLIBConfig.cmake.in" "${PROJECT_BINARY_DIR}/cmake/JRTPLIBConfig.cmake") install(FILES "${PROJECT_BINARY_DIR}/cmake/JRTPLIBConfig.cmake" DESTINATION ${LIBRARY_INSTALL_DIR}/cmake/JRTPLIB) diff --git a/ChangeLog b/ChangeLog index 7f11bfa..4366168 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,18 @@ - July 25, 2011 + November 8, 2011 JRTPLIB ChangeLog ----------- + 3.9.1 (November 2011) + * Fixed a bug in the CMake configuration: was unable to handle + path names with spaces. + * Fixed bug in rtcpsdespacket.h: end namespace curly bracket + was in wrong place. + * In an MS-Windows environment you can now choose to build a + DLL instead of a static library. + 3.9.0 (July 2011) * Switched to CMake build system. * Added the RTPByteAddress class, which can be used to describe diff --git a/Doxyfile b/Doxyfile index 3f3164b..bb14694 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = JRTPLIB # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.9.0 +PROJECT_NUMBER = 3.9.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. diff --git a/README.TXT b/README.TXT index c717b40..6e7d87e 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - July 25, 2011 + November 8, 2011 - JRTPLIB (v3.9.0) + JRTPLIB (v3.9.1) Developed at the The Expertise Centre for diff --git a/aboutrfc3550 b/aboutrfc3550 deleted file mode 100644 index a12e815..0000000 --- a/aboutrfc3550 +++ /dev/null @@ -1,177 +0,0 @@ - * p 9 (bottom): - In the unicast case, a participant may - receive from all other participants in the session using the same - pair of ports, or may use a distinct pair of ports for each. - - COMMENT: - By default, a RTPSession instance will use only one pair - of ports. - - * p 14 (top): - A profile MAY define additional - marker bits or specify that there is no marker bit by changing the - number of bits in the payload type field (see Section 5.3). - - COMMENT: - At the moment, no support for additional marker bits is present - - * About payload data and payload types: - The library doesn't inspect payload data or payload types. It is - left to the application using the library to decide if a packet should - be ignored or accepted - - * p 18 (middle): - o If a particular class of applications needs additional - functionality independent of payload format, the profile under - which those applications operate SHOULD define additional fixed - fields to follow immediately after the SSRC field of the existing - fixed header. Those applications will be able to quickly and - directly access the additional fields while profile-independent - monitors or recorders can still process the RTP packets by - interpreting only the first twelve octets. - - COMMENT: - No direct support for such extensions are provided - - * p 20 (bottom): - 4. A fourth, OPTIONAL function is to convey minimal session control - information, for example participant identification to be - displayed in the user interface. - - COMMENT: SDES info is supported by the library - - * p 21 (top): - The - recommendations here accommodate SSM only through Section 6.2's - option of turning off receivers' RTCP entirely. - - COMMENT: - For now, the RTCP (sending) will only be disabled entirely - if no destinations are present. - - * p 25 (middle): - The profile MAY further specify that the control traffic bandwidth - may be divided into two separate session parameters for those - participants which are active data senders and those which are not; - - COMMENT: this will not be implemented - - * p 26 (top): - This delay MAY be set to half the - minimum interval to allow quicker notification that the new - participant is present. - - COMMENT: is supplied as an option which is enabled by default - - * p 26 (middle): - An implementation MAY scale the minimum RTCP interval to a smaller - value inversely proportional to the session bandwidth parameter with - the following limitations: - - COMMENT: not supported - - * p 28 (middle): - SSRC sampling -> not supported - - * p 28 (bottom): - An implementation which is constrained to two-party - unicast operation SHOULD still use randomization of the RTCP - transmission interval to avoid unintended synchronization of multiple - instances operating in the same environment, but MAY omit the "timer - reconsideration" and "reverse reconsideration" algorithms in Sections - 6.3.3, 6.3.6 and 6.3.7. - - COMMENT: randomization and reconsideration will always be used. omitting - them is not implemented. - - * p 28 (top): - New entries MAY be considered - not valid until multiple packets carrying the new SSRC have been - received (see Appendix A.1), or until an SDES RTCP packet containing - a CNAME for that SSRC has been received. - - COMMENT: Currently, probation is optional. A source is considered - valid when either a number (depending on probation) of RTP - packets are received or when a CNAME has been received - - * p 42 (bottom): - 6.4.3 Extending the Sender and Receiver Reports - - COMMENT: Extensions of SR and RR are not supported - - * p 68 (middle): - RTP relies on the underlying protocol(s) to provide demultiplexing of - RTP data and RTCP control streams. For UDP and similar protocols, - RTP SHOULD use an even destination port number and the corresponding - RTCP stream SHOULD use the next higher (odd) destination port number. - For applications that take a single port number as a parameter and - derive the RTP and RTCP port pair from that number, if an odd number - is supplied then the application SHOULD replace that number with the - next lower (even) number to use as the base of the port pair. For - applications in which the RTP and RTCP destination port numbers are - specified via explicit, separate parameters (using a signaling - protocol or other means), the application MAY disregard the - restrictions that the port numbers be even/odd and consecutive - although the use of an even/odd port pair is still encouraged. The - RTP and RTCP port numbers MUST NOT be the same since RTP relies on - the port numbers to demultiplex the RTP data and RTCP control - streams. - - COMMENT: Currently, the transporter only accepts an even portbase. - - * p 68-69: - It is RECOMMENDED that layered encoding applications (see Section - 2.4) use a set of contiguous port numbers. - - COMMENT: No direct support for this using RTPSession, but it can be - constructed in principle using several RTPTransmitter - instances. - - * p 69: - A profile MAY specify a framing method to be used even when RTP is - carried in protocols that do provide framing in order to allow - carrying several RTP packets in one lower-layer protocol data unit, - such as a UDP packet. - - COMMENT: For UDP, such a framing mechanism will not be implemented - - - - -QUESTIONS: - * p 28: after BYE packet, ssrc should be removed after an appropriate delay. - what delay is considered appropriate? - * p 57: why do CNAMEs have to be forwarded to allow SSRC identifier collisions - to work? - -> If the CSRC sources are not senders, their identifiers wont be - seen in the CSRC list of an RTP packet. By forwarding SDES CNAMEs, - their identifiers will be present in the SDES chunk and collisions - can be detected. - * p 64: Section 8.3 - * What MTU should be used? Should it be the same for all session members? - Is it the MTU of the protocol just below RTP or of the link layer? - * p 33 (BYE scheduling): Should members be increased for each BYE packet or - for each SSRC in a BYE packet? - - * p 35: - RTP receivers provide reception quality feedback using RTCP report - packets which may take one of two forms depending upon whether or not - the receiver is also a sender. The only difference between the - sender report (SR) and receiver report (RR) forms, besides the packet - type code, is that the sender report includes a 20-byte sender - information section for use by active senders. The SR is issued if a - site has sent any data packets during the interval since issuing the - last report or the previous one, otherwise the RR is issued. - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -> Is this also true when the sender timeout multiplier differs - from 2 ?? - - * About report blocks: should an entry be made for each SSRC_n in the - list of report blocks if the RR or SR originates from a valid SSRC? - -> probably not, since then we don't have the right transport - address of the SSRC_n - -> Indeed: see p 61 at bottom - - * Is it a valid tactic to use a timestamp unit estimation (from - two SRs) for jitter calculation if no exact info is available? - diff --git a/cmake/JRTPLIBConfig.cmake.in b/cmake/JRTPLIBConfig.cmake.in index 4877c56..6591475 100644 --- a/cmake/JRTPLIBConfig.cmake.in +++ b/cmake/JRTPLIBConfig.cmake.in @@ -1,7 +1,7 @@ set(JRTPLIB_FOUND 1) -set(JRTPLIB_INCLUDE_DIRS ${JRTPLIB_INCDIRS}) +set(JRTPLIB_INCLUDE_DIRS ${JRTPLIB_INCDIRS_CMAKECONFIG}) -set(JRTPLIB_LIBRARIES ${JRTPLIB_LIBS}) +set(JRTPLIB_LIBRARIES ${JRTPLIB_LIBS_CMAKECONFIG}) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b9380cd..6ebbd0f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,6 +3,10 @@ apply_include_paths("${JRTPLIB_EXTERNAL_INCLUDES}") foreach(IDX 1 2 3 4 5) add_executable(example${IDX} example${IDX}.cpp) - target_link_libraries(example${IDX} jrtplib-static) + if (UNIX OR JRTPLIB_COMPILE_STATIC) + target_link_libraries(example${IDX} jrtplib-static) + else () + target_link_libraries(example${IDX} jrtplib-shared) + endif () endforeach(IDX) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3379568..b28b129 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +add_definitions(-DJRTPLIB_COMPILING) + set (HEADERS rtcpapppacket.h rtcpbyepacket.h @@ -94,24 +96,30 @@ else (UNIX) set(CMAKE_DEBUG_POSTFIX _d) endif (UNIX) -add_library(jrtplib-static STATIC ${SOURCES} ${HEADERS}) -if (UNIX) - set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtp) -else (UNIX) - set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtplib) -endif(UNIX) -set_target_properties(jrtplib-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) -set(JRTPLIB_INSTALLTARGETS jrtplib-static) -target_link_libraries(jrtplib-static ${JRTPLIB_LINK_LIBS}) +if (UNIX OR JRTPLIB_COMPILE_STATIC) + add_library(jrtplib-static STATIC ${SOURCES} ${HEADERS}) + if (UNIX) + set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtp) + else (UNIX) + set_target_properties(jrtplib-static PROPERTIES OUTPUT_NAME jrtplib) + endif(UNIX) + set_target_properties(jrtplib-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + set(JRTPLIB_INSTALLTARGETS jrtplib-static) + target_link_libraries(jrtplib-static ${JRTPLIB_LINK_LIBS}) +endif (UNIX OR JRTPLIB_COMPILE_STATIC) -if (UNIX) +if (UNIX OR NOT JRTPLIB_COMPILE_STATIC) add_library(jrtplib-shared SHARED ${SOURCES} ${HEADERS}) + if (UNIX) + set_target_properties(jrtplib-shared PROPERTIES OUTPUT_NAME jrtp) + else (UNIX) + set_target_properties(jrtplib-shared PROPERTIES OUTPUT_NAME jrtplib) + endif(UNIX) set_target_properties(jrtplib-shared PROPERTIES VERSION ${VERSION}) - set_target_properties(jrtplib-shared PROPERTIES OUTPUT_NAME jrtp) set_target_properties(jrtplib-shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) set(JRTPLIB_INSTALLTARGETS ${JRTPLIB_INSTALLTARGETS} jrtplib-shared) target_link_libraries(jrtplib-shared ${JRTPLIB_LINK_LIBS}) -endif (UNIX) +endif (UNIX OR NOT JRTPLIB_COMPILE_STATIC) apply_include_paths("${JRTPLIB_INTERNAL_INCLUDES}") apply_include_paths("${JRTPLIB_EXTERNAL_INCLUDES}") diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index 7d53c76..eaf0ee4 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -51,7 +51,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Describes an RTCP APP packet. */ -class RTCPAPPPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPAPPPacket : public RTCPPacket { public: /** Creates an instance based on the data in \c data with length \c datalen. diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index da59f6f..5cd0299 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -51,7 +51,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Describes an RTCP BYE packet. */ -class RTCPBYEPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPBYEPacket : public RTCPPacket { public: /** Creates an instance based on the data in \c data with length \c datalen. diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index e4419e8..d135bed 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -50,7 +50,7 @@ class RTPRawPacket; class RTCPPacket; /** Represents an RTCP compound packet. */ -class RTCPCompoundPacket : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTCPCompoundPacket : public RTPMemoryObject { public: /** Creates an RTCPCompoundPacket instance from the data in \c rawpack, installing a memory manager if specified. */ diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index 0f302c1..010ede0 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -56,7 +56,7 @@ class RTPMemoryManager; * been built successfully. The member functions described below return \c ERR_RTP_RTCPCOMPPACKBUILDER_NOTENOUGHBYTESLEFT * if the action would cause the maximum allowed size to be exceeded. */ -class RTCPCompoundPacketBuilder : public RTCPCompoundPacket +class JRTPLIB_IMPORTEXPORT RTCPCompoundPacketBuilder : public RTCPCompoundPacket { public: /** Constructs an RTCPCompoundPacketBuilder instance, optionally installing a memory manager. */ diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 7491393..178e630 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -47,7 +47,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Base class for specific types of RTCP packets. */ -class RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPPacket { public: /** Identifies the specific kind of RTCP packet. */ diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index 8d78567..0a66503 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -60,7 +60,7 @@ class RTCPCompoundPacketBuilder; * an RTPSources instance to automatically generate the next compound packet which should be sent. It also * provides functions to determine when SDES items other than the CNAME item should be sent. */ -class RTCPPacketBuilder : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTCPPacketBuilder : public RTPMemoryObject { public: /** Creates an RTCPPacketBuilder instance. diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index 439a725..ddc85ba 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -51,7 +51,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Describes an RTCP receiver report packet. */ -class RTCPRRPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPRRPacket : public RTCPPacket { public: /** Creates an instance based on the data in \c data with length \c datalen. diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index f576d82..04e8f84 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -50,7 +50,7 @@ class RTPPacket; class RTPSources; /** Describes parameters used by the RTCPScheduler class. */ -class RTCPSchedulerParams +class JRTPLIB_IMPORTEXPORT RTCPSchedulerParams { public: RTCPSchedulerParams(); @@ -98,7 +98,7 @@ class RTCPSchedulerParams }; /** This class determines when RTCP compound packets should be sent. */ -class RTCPScheduler +class JRTPLIB_IMPORTEXPORT RTCPScheduler { public: /** Creates an instance which will use the source table RTPSources to determine when RTCP compound diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index b2bc482..91b20ba 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -50,7 +50,7 @@ namespace jrtplib { /** The class RTCPSDESInfo is a container for RTCP SDES information. */ -class RTCPSDESInfo : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTCPSDESInfo : public RTPMemoryObject { public: /** Constructs an instance, optionally installing a memory manager. */ diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index 780ca95..fd70898 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -52,7 +52,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Describes an RTCP source description packet. */ -class RTCPSDESPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPSDESPacket : public RTCPPacket { public: /** Identifies the type of an SDES item. */ @@ -378,9 +378,9 @@ inline uint8_t *RTCPSDESPacket::GetPRIVValueData() return (currentchunk+itemoffset+sizeof(RTCPSDESHeader)+1+prefixlength); } -} // end namespace - #endif // RTP_SUPPORT_SDESPRIV +} // end namespace + #endif // RTCPSDESPACKET_H diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 1beb566..46d0221 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -52,7 +52,7 @@ namespace jrtplib class RTCPCompoundPacket; /** Describes an RTCP sender report packet. */ -class RTCPSRPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPSRPacket : public RTCPPacket { public: /** Creates an instance based on the data in \c data with length \c datalen. diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index a4bd011..69952c8 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -51,7 +51,7 @@ class RTCPCompoundPacket; * the ones it inherited. Note that since an unknown packet type doesn't have any format to check * against, the IsKnownFormat function will trivially return \c true. */ -class RTCPUnknownPacket : public RTCPPacket +class JRTPLIB_IMPORTEXPORT RTCPUnknownPacket : public RTCPPacket { public: /** Creates an instance based on the data in \c data with length \c datalen. diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 983aa14..0cef011 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -47,7 +47,7 @@ namespace jrtplib class RTPMemoryManager; /** This class is an abstract class which is used to specify destinations, multicast groups etc. */ -class RTPAddress +class JRTPLIB_IMPORTEXPORT RTPAddress { public: /** Identifies the actual implementation being used. */ diff --git a/src/rtpbyteaddress.h b/src/rtpbyteaddress.h index 11027a6..53353a5 100644 --- a/src/rtpbyteaddress.h +++ b/src/rtpbyteaddress.h @@ -53,7 +53,7 @@ class RTPMemoryManager; /** A very general kind of address consisting of a port number and a number of bytes describing the host address. * A very general kind of address, consisting of a port number and a number of bytes describing the host address. */ -class RTPByteAddress : public RTPAddress +class JRTPLIB_IMPORTEXPORT RTPByteAddress : public RTPAddress { public: /** Creates an instance of the class using \c addrlen bytes of \c hostaddress as host identification, diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index 065b506..812b297 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -50,7 +50,7 @@ namespace jrtplib class RTPAddress; /** This class represents a list of addresses from which SSRC collisions were detected. */ -class RTPCollisionList : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPCollisionList : public RTPMemoryObject { public: /** Constructs an instance, optionally installing a memory manager. */ diff --git a/src/rtpconfig.h.in b/src/rtpconfig.h.in index 91159b9..f1b15a0 100644 --- a/src/rtpconfig.h.in +++ b/src/rtpconfig.h.in @@ -34,6 +34,14 @@ #define RTPCONFIG_UNIX_H +#define JRTPLIB_IMPORT ${JRTPLIB_IMPORT} +#define JRTPLIB_EXPORT ${JRTPLIB_EXPORT} +#ifdef JRTPLIB_COMPILING + #define JRTPLIB_IMPORTEXPORT JRTPLIB_EXPORT +#else + #define JRTPLIB_IMPORTEXPORT JRTPLIB_IMPORT +#endif // JRTPLIB_COMPILING + ${RTP_HAVE_SYS_FILIO} ${RTP_HAVE_SYS_SOCKIO} diff --git a/src/rtperrors.h b/src/rtperrors.h index cc2eb6c..c0b6994 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -38,13 +38,14 @@ #define RTPERRORS_H +#include "rtpconfig.h" #include namespace jrtplib { /** Returns a string describing the error code \c errcode. */ -std::string RTPGetErrorString(int errcode); +std::string JRTPLIB_IMPORTEXPORT RTPGetErrorString(int errcode); } // end namespace diff --git a/src/rtpexternaltransmitter.h b/src/rtpexternaltransmitter.h index af7eb75..8db73a8 100644 --- a/src/rtpexternaltransmitter.h +++ b/src/rtpexternaltransmitter.h @@ -59,7 +59,7 @@ class RTPExternalTransmitter; * so that the transmitter will call the \c SendRTP, \c SendRTCP and \c ComesFromThisSender * methods of this instance when needed. */ -class RTPExternalSender +class JRTPLIB_IMPORTEXPORT RTPExternalSender { public: RTPExternalSender() { } @@ -82,7 +82,7 @@ class RTPExternalSender * be using, you can obtain the associated RTPExternalPacketInjecter instance. By calling it's * member functions, you can then inject RTP or RTCP data into the library for further processing. */ -class RTPExternalPacketInjecter +class JRTPLIB_IMPORTEXPORT RTPExternalPacketInjecter { public: RTPExternalPacketInjecter(RTPExternalTransmitter *trans) { transmitter = trans; } @@ -101,7 +101,7 @@ class RTPExternalPacketInjecter }; /** Parameters to initialize a transmitter of type RTPExternalTransmitter. */ -class RTPExternalTransmissionParams : public RTPTransmissionParams +class JRTPLIB_IMPORTEXPORT RTPExternalTransmissionParams : public RTPTransmissionParams { public: /** Using this constructor you can specify which RTPExternalSender object you'll be using @@ -116,7 +116,7 @@ class RTPExternalTransmissionParams : public RTPTransmissionParams }; /** Additional information about the external transmission component. */ -class RTPExternalTransmissionInfo : public RTPTransmissionInfo +class JRTPLIB_IMPORTEXPORT RTPExternalTransmissionInfo : public RTPTransmissionInfo { public: RTPExternalTransmissionInfo(RTPExternalPacketInjecter *p) : RTPTransmissionInfo(RTPTransmitter::ExternalProto) { packetinjector = p; } @@ -136,7 +136,7 @@ class RTPExternalTransmissionInfo : public RTPTransmissionInfo * sending the data. Obtain the RTPExternalTransmissionInfo object associated with this * transmitter to obtain the functions needed to pass RTP/RTCP packets on to the transmitter. */ -class RTPExternalTransmitter : public RTPTransmitter +class JRTPLIB_IMPORTEXPORT RTPExternalTransmitter : public RTPTransmitter { public: RTPExternalTransmitter(RTPMemoryManager *mgr); diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index 8df533e..d5d17a5 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -47,7 +47,7 @@ namespace jrtplib { -class RTPInternalSourceData : public RTPSourceData +class JRTPLIB_IMPORTEXPORT RTPInternalSourceData : public RTPSourceData { public: RTPInternalSourceData(uint32_t ssrc, RTPSources::ProbationType probtype, RTPMemoryManager *mgr = 0); diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index 1f38d64..f85c7f3 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -53,7 +53,7 @@ class RTPMemoryManager; * number is ignored. When an instance is used in one of the accept or ignore functions of the * transmitter, a zero port number represents all ports for the specified IP address. */ -class RTPIPv4Address : public RTPAddress +class JRTPLIB_IMPORTEXPORT RTPIPv4Address : public RTPAddress { public: /** Creates an instance with IP address \c ip and port number \c port (both are interpreted in host byte order). */ diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index dbe9db9..6b0ad5a 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -54,7 +54,7 @@ namespace jrtplib { -class RTPIPv4Destination +class JRTPLIB_IMPORTEXPORT RTPIPv4Destination { public: RTPIPv4Destination(uint32_t ip,uint16_t rtpportbase) diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index 9be155b..dfbbbb5 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -58,7 +58,7 @@ namespace jrtplib * the accept or ignore functions of the transmitter, a zero port number represents * all ports for the specified IP address. */ -class RTPIPv6Address : public RTPAddress +class JRTPLIB_IMPORTEXPORT RTPIPv6Address : public RTPAddress { public: /** Creates an instance with IP address and port number set to zero. */ diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 0145ae7..3b322fa 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -58,7 +58,7 @@ namespace jrtplib { -class RTPIPv6Destination +class JRTPLIB_IMPORTEXPORT RTPIPv6Destination { public: RTPIPv6Destination(in6_addr ip,uint16_t portbase) diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index ec84226..beb4e6b 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -39,7 +39,7 @@ namespace jrtplib RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,9,0); + return RTPLibraryVersion(3,9,1); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 75d4dde..635261e 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -38,6 +38,7 @@ #define RTPLIBRARYVERSION_H +#include "rtpconfig.h" #include #include @@ -47,7 +48,7 @@ namespace jrtplib /** * Used to provide information about the version of the library. */ -class RTPLibraryVersion +class JRTPLIB_IMPORTEXPORT RTPLibraryVersion { public: /** Returns an instance of RTPLibraryVersion describing the version of the library. */ diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index 7b366b2..3384395 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -144,7 +144,7 @@ namespace jrtplib { /** A memory manager. */ -class RTPMemoryManager +class JRTPLIB_IMPORTEXPORT RTPMemoryManager { public: RTPMemoryManager() { } diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index 182f51c..91c61a6 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -44,7 +44,7 @@ namespace jrtplib { -class RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPMemoryObject { protected: #ifdef RTP_SUPPORT_MEMORYMANAGEMENT diff --git a/src/rtppacket.h b/src/rtppacket.h index 78986f6..9c163b9 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -53,7 +53,7 @@ class RTPRawPacket; * The class can also be used to create a new RTP packet according to the parameters specified by * the user. */ -class RTPPacket : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPPacket : public RTPMemoryObject { public: /** Creates an RTPPacket instance based upon the data in \c rawpack, optionally installing a memory manager. diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index 32bb70a..dd06faf 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -54,7 +54,7 @@ class RTPSources; /** This class can be used to build RTP packets and is a bit more high-level than the RTPPacket * class: it generates an SSRC identifier, keeps track of timestamp and sequence number etc. */ -class RTPPacketBuilder : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPPacketBuilder : public RTPMemoryObject { public: /** Constructs an instance which will use \c rtprand for generating random numbers diff --git a/src/rtppollthread.h b/src/rtppollthread.h index a650436..ac68130 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -54,7 +54,7 @@ namespace jrtplib class RTPSession; class RTCPScheduler; -class RTPPollThread : private jthread::JThread +class JRTPLIB_IMPORTEXPORT RTPPollThread : private jthread::JThread { public: RTPPollThread(RTPSession &session,RTCPScheduler &rtcpsched); diff --git a/src/rtprandom.h b/src/rtprandom.h index 99acfa5..3c277ca 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -48,7 +48,7 @@ namespace jrtplib { /** Interface for generating random numbers. */ -class RTPRandom +class JRTPLIB_IMPORTEXPORT RTPRandom { public: RTPRandom() { } diff --git a/src/rtprandomrand48.h b/src/rtprandomrand48.h index 33225a9..5916af4 100644 --- a/src/rtprandomrand48.h +++ b/src/rtprandomrand48.h @@ -49,7 +49,7 @@ namespace jrtplib { /** A random number generator using the algorithm of the rand48 set of functions. */ -class RTPRandomRand48 : public RTPRandom +class JRTPLIB_IMPORTEXPORT RTPRandomRand48 : public RTPRandom { public: RTPRandomRand48(); diff --git a/src/rtprandomrands.h b/src/rtprandomrands.h index 1aaacb1..442d6c8 100644 --- a/src/rtprandomrands.h +++ b/src/rtprandomrands.h @@ -47,7 +47,7 @@ namespace jrtplib /** A random number generator which tries to use the \c rand_s function on the * Win32 platform. */ -class RTPRandomRandS : public RTPRandom +class JRTPLIB_IMPORTEXPORT RTPRandomRandS : public RTPRandom { public: RTPRandomRandS(); diff --git a/src/rtprandomurandom.h b/src/rtprandomurandom.h index 81b128d..65b2791 100644 --- a/src/rtprandomurandom.h +++ b/src/rtprandomurandom.h @@ -46,7 +46,7 @@ namespace jrtplib { /** A random number generator which uses bytes delivered by the /dev/urandom device. */ -class RTPRandomURandom : public RTPRandom +class JRTPLIB_IMPORTEXPORT RTPRandomURandom : public RTPRandom { public: RTPRandomURandom(); diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 658c6d8..576d619 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -48,7 +48,7 @@ namespace jrtplib { /** This class is used by the transmission component to store the incoming RTP and RTCP data in. */ -class RTPRawPacket : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPRawPacket : public RTPMemoryObject { public: /** Creates an instance which stores data from \c data with length \c datalen. diff --git a/src/rtpsession.h b/src/rtpsession.h index 61380f1..df84609 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -76,7 +76,7 @@ class RTCPAPPPacket; * \note The RTPSession class is not meant to be thread safe. The user should use some kind of locking * mechanism to prevent different threads from using the same RTPSession instance. */ -class RTPSession : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPSession : public RTPMemoryObject { public: /** Constructs an RTPSession instance, optionally using a specific instance of a random diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index f6aae3c..6aa8a71 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -51,7 +51,7 @@ namespace jrtplib * Describes the parameters for to be used by an RTPSession instance. Note that the own timestamp * unit must be set to a valid number, otherwise the session can't be created. */ -class RTPSessionParams +class JRTPLIB_IMPORTEXPORT RTPSessionParams { public: RTPSessionParams(); diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index 2e95515..2eb931e 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -46,7 +46,7 @@ namespace jrtplib class RTPSession; -class RTPSessionSources : public RTPSources +class JRTPLIB_IMPORTEXPORT RTPSessionSources : public RTPSources { public: RTPSessionSources(RTPSession &sess,RTPMemoryManager *mgr) : RTPSources(RTPSources::ProbationStore,mgr),rtpsession(sess) diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index 9610022..3be2fa6 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -52,7 +52,7 @@ namespace jrtplib class RTPAddress; -class RTCPSenderReportInfo +class JRTPLIB_IMPORTEXPORT RTCPSenderReportInfo { public: RTCPSenderReportInfo():ntptimestamp(0,0),receivetime(0,0) { hasinfo = false; rtptimestamp = 0; packetcount = 0; bytecount = 0; } @@ -74,7 +74,7 @@ class RTCPSenderReportInfo RTPTime receivetime; }; -class RTCPReceiverReportInfo +class JRTPLIB_IMPORTEXPORT RTCPReceiverReportInfo { public: RTCPReceiverReportInfo():receivetime(0,0) { hasinfo = false; fractionlost = 0; packetslost = 0; exthighseqnr = 0; jitter = 0; lsr = 0; dlsr = 0; } @@ -100,7 +100,7 @@ class RTCPReceiverReportInfo RTPTime receivetime; }; -class RTPSourceStats +class JRTPLIB_IMPORTEXPORT RTPSourceStats { public: RTPSourceStats(); @@ -164,7 +164,7 @@ inline RTPSourceStats::RTPSourceStats():prevpacktime(0,0),lastmsgtime(0,0),lastr } /** Describes an entry in the RTPSources source table. */ -class RTPSourceData : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPSourceData : public RTPMemoryObject { protected: RTPSourceData(uint32_t ssrc, RTPMemoryManager *mgr = 0); diff --git a/src/rtpsources.h b/src/rtpsources.h index 0aeec4e..8c9ce85 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -49,7 +49,7 @@ namespace jrtplib { -class RTPSources_GetHashIndex +class JRTPLIB_IMPORTEXPORT RTPSources_GetHashIndex { public: static int GetIndex(const uint32_t &ssrc) { return ssrc%RTPSOURCES_HASHSIZE; } @@ -71,7 +71,7 @@ class RTPSourceData; * is used to identify packets from our own session. The class also provides some overridable functions * which can be used to catch certain events (new SSRC, SSRC collision, ...). */ -class RTPSources : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPSources : public RTPMemoryObject { public: /** Type of probation to use for new sources. */ diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index 1f18d7d..c45d4b5 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -58,7 +58,7 @@ namespace jrtplib * This is a simple wrapper for the most significant word (MSW) and least * significant word (LSW) of an NTP timestamp. */ -class RTPNTPTime +class JRTPLIB_IMPORTEXPORT RTPNTPTime { public: /** This constructor creates and instance with MSW \c m and LSW \c l. */ @@ -77,7 +77,7 @@ class RTPNTPTime * This class is used to specify wallclock time, delay intervals etc. * It stores a number of seconds and a number of microseconds. */ -class RTPTime +class JRTPLIB_IMPORTEXPORT RTPTime { public: /** Returns an RTPTime instance representing the current wallclock time. @@ -206,7 +206,7 @@ inline void RTPTime::Wait(const RTPTime &delay) Sleep(t); } -class RTPTimeInitializer +class JRTPLIB_IMPORTEXPORT RTPTimeInitializer { public: RTPTimeInitializer(); diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index 5b8ca24..e46205d 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -58,7 +58,7 @@ class RTPTransmissionInfo; * an UDP over IPv4 transmitter, an UDP over IPv6 transmitter and a transmitter * which can be used to use an external transmission mechanism. */ -class RTPTransmitter : public RTPMemoryObject +class JRTPLIB_IMPORTEXPORT RTPTransmitter : public RTPMemoryObject { public: /** Used to identify a specific transmitter. @@ -224,7 +224,7 @@ class RTPTransmitter : public RTPMemoryObject * GetTransmissionProtocol function which identifies the component type for which * these parameters are valid. */ -class RTPTransmissionParams +class JRTPLIB_IMPORTEXPORT RTPTransmissionParams { protected: RTPTransmissionParams(RTPTransmitter::TransmissionProtocol p) { protocol = p; } @@ -243,7 +243,7 @@ class RTPTransmissionParams * GetTransmissionProtocol function which identifies the component type for which * these parameters are valid. */ -class RTPTransmissionInfo +class JRTPLIB_IMPORTEXPORT RTPTransmissionInfo { protected: RTPTransmissionInfo(RTPTransmitter::TransmissionProtocol p) { protocol = p; } diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index b5d7495..23a8e34 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -61,7 +61,7 @@ namespace jrtplib { /** Parameters for the UDP over IPv4 transmitter. */ -class RTPUDPv4TransmissionParams : public RTPTransmissionParams +class JRTPLIB_IMPORTEXPORT RTPUDPv4TransmissionParams : public RTPTransmissionParams { public: RTPUDPv4TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv4UDPProto) { portbase = RTPUDPV4TRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; mcastifaceIP = 0; rtpsendbuf = RTPUDPV4TRANS_RTPTRANSMITBUFFER; rtprecvbuf= RTPUDPV4TRANS_RTPRECEIVEBUFFER; rtcpsendbuf = RTPUDPV4TRANS_RTCPTRANSMITBUFFER; rtcprecvbuf = RTPUDPV4TRANS_RTCPRECEIVEBUFFER; } @@ -135,7 +135,7 @@ class RTPUDPv4TransmissionParams : public RTPTransmissionParams }; /** Additional information about the UDP over IPv4 transmitter. */ -class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo +class JRTPLIB_IMPORTEXPORT RTPUDPv4TransmissionInfo : public RTPTransmissionInfo { public: #if ! (defined(WIN32) || defined(_WIN32_WCE)) @@ -168,13 +168,13 @@ class RTPUDPv4TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 }; -class RTPUDPv4Trans_GetHashIndex_IPv4Dest +class JRTPLIB_IMPORTEXPORT RTPUDPv4Trans_GetHashIndex_IPv4Dest { public: static int GetIndex(const RTPIPv4Destination &d) { return d.GetIP()%RTPUDPV4TRANS_HASHSIZE; } }; -class RTPUDPv4Trans_GetHashIndex_uint32_t +class JRTPLIB_IMPORTEXPORT RTPUDPv4Trans_GetHashIndex_uint32_t { public: static int GetIndex(const uint32_t &k) { return k%RTPUDPV4TRANS_HASHSIZE; } @@ -189,7 +189,7 @@ class RTPUDPv4Trans_GetHashIndex_uint32_t * argument require an argument of RTPIPv4Address. The GetTransmissionInfo member function * returns an instance of type RTPUDPv4TransmissionInfo. */ -class RTPUDPv4Transmitter : public RTPTransmitter +class JRTPLIB_IMPORTEXPORT RTPUDPv4Transmitter : public RTPTransmitter { public: RTPUDPv4Transmitter(RTPMemoryManager *mgr); diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index f66c19a..21bb7ad 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -68,7 +68,7 @@ namespace jrtplib { /** Parameters for the UDP over IPv6 transmitter. */ -class RTPUDPv6TransmissionParams : public RTPTransmissionParams +class JRTPLIB_IMPORTEXPORT RTPUDPv6TransmissionParams : public RTPTransmissionParams { public: RTPUDPv6TransmissionParams():RTPTransmissionParams(RTPTransmitter::IPv6UDPProto) { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; for (int i = 0 ; i < 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; rtpsendbuf = RTPUDPV6TRANS_RTPTRANSMITBUFFER; rtprecvbuf= RTPUDPV6TRANS_RTPRECEIVEBUFFER; rtcpsendbuf = RTPUDPV6TRANS_RTCPTRANSMITBUFFER; rtcprecvbuf = RTPUDPV6TRANS_RTCPRECEIVEBUFFER; } @@ -143,7 +143,7 @@ class RTPUDPv6TransmissionParams : public RTPTransmissionParams }; /** Additional information about the UDP over IPv6 transmitter. */ -class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo +class JRTPLIB_IMPORTEXPORT RTPUDPv6TransmissionInfo : public RTPTransmissionInfo { public: #if ! (defined(WIN32) || defined(_WIN32_WCE)) @@ -176,13 +176,13 @@ class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo #endif // WIN32 }; -class RTPUDPv6Trans_GetHashIndex_IPv6Dest +class JRTPLIB_IMPORTEXPORT RTPUDPv6Trans_GetHashIndex_IPv6Dest { public: static int GetIndex(const RTPIPv6Destination &d) { in6_addr ip = d.GetIP(); return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } }; -class RTPUDPv6Trans_GetHashIndex_in6_addr +class JRTPLIB_IMPORTEXPORT RTPUDPv6Trans_GetHashIndex_in6_addr { public: static int GetIndex(const in6_addr &ip) { return ((((uint32_t)ip.s6_addr[12])<<24)|(((uint32_t)ip.s6_addr[13])<<16)|(((uint32_t)ip.s6_addr[14])<<8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; } @@ -197,7 +197,7 @@ class RTPUDPv6Trans_GetHashIndex_in6_addr * argument require an argument of RTPIPv6Address. The GetTransmissionInfo member function * returns an instance of type RTPUDPv6TransmissionInfo. */ -class RTPUDPv6Transmitter : public RTPTransmitter +class JRTPLIB_IMPORTEXPORT RTPUDPv6Transmitter : public RTPTransmitter { public: RTPUDPv6Transmitter(RTPMemoryManager *mgr); From 05abf5055af5894f89c056b0f4a47438ff2c2d2b Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sat, 3 Dec 2016 16:12:19 +0100 Subject: [PATCH 019/136] Import of version 3.9.2 --- CMakeLists.txt | 8 +++-- ChangeLog | 11 +++--- Doxyfile | 2 +- README.TXT | 8 ++--- TODO | 0 examples/example1.cpp | 5 ++- src/rtcpapppacket.cpp | 2 +- src/rtcpapppacket.h | 2 +- src/rtcpbyepacket.cpp | 2 +- src/rtcpbyepacket.h | 2 +- src/rtcpcompoundpacket.cpp | 2 +- src/rtcpcompoundpacket.h | 2 +- src/rtcpcompoundpacketbuilder.cpp | 2 +- src/rtcpcompoundpacketbuilder.h | 2 +- src/rtcppacket.cpp | 2 +- src/rtcppacket.h | 2 +- src/rtcppacketbuilder.cpp | 2 +- src/rtcppacketbuilder.h | 2 +- src/rtcprrpacket.cpp | 2 +- src/rtcprrpacket.h | 2 +- src/rtcpscheduler.cpp | 4 +-- src/rtcpscheduler.h | 2 +- src/rtcpsdesinfo.cpp | 2 +- src/rtcpsdesinfo.h | 2 +- src/rtcpsdespacket.cpp | 4 +-- src/rtcpsdespacket.h | 2 +- src/rtcpsrpacket.cpp | 2 +- src/rtcpsrpacket.h | 2 +- src/rtcpunknownpacket.h | 2 +- src/rtpaddress.h | 2 +- src/rtpbyteaddress.cpp | 2 +- src/rtpbyteaddress.h | 2 +- src/rtpcollisionlist.cpp | 2 +- src/rtpcollisionlist.h | 2 +- src/rtpconfig.h.in | 2 +- src/rtpdebug.cpp | 2 +- src/rtpdebug.h | 2 +- src/rtpdefines.h | 2 +- src/rtperrors.cpp | 2 +- src/rtperrors.h | 2 +- src/rtpexternaltransmitter.cpp | 2 +- src/rtpexternaltransmitter.h | 2 +- src/rtphashtable.h | 2 +- src/rtpinternalsourcedata.cpp | 11 +++--- src/rtpinternalsourcedata.h | 2 +- src/rtpipv4address.cpp | 2 +- src/rtpipv4address.h | 2 +- src/rtpipv4destination.h | 2 +- src/rtpipv6address.cpp | 2 +- src/rtpipv6address.h | 2 +- src/rtpipv6destination.h | 2 +- src/rtpkeyhashtable.h | 2 +- src/rtplibraryversion.cpp | 5 +-- src/rtplibraryversion.h | 2 +- src/rtplibraryversioninternal.h.in | 46 ++++++++++++++++++++++++ src/rtpmemorymanager.h | 2 +- src/rtpmemoryobject.h | 2 +- src/rtppacket.cpp | 7 ++-- src/rtppacket.h | 2 +- src/rtppacketbuilder.cpp | 2 +- src/rtppacketbuilder.h | 2 +- src/rtppollthread.cpp | 2 +- src/rtppollthread.h | 2 +- src/rtprandom.cpp | 2 +- src/rtprandom.h | 2 +- src/rtprandomrand48.cpp | 2 +- src/rtprandomrand48.h | 2 +- src/rtprandomrands.cpp | 2 +- src/rtprandomrands.h | 2 +- src/rtprandomurandom.cpp | 2 +- src/rtprandomurandom.h | 2 +- src/rtprawpacket.h | 2 +- src/rtpsession.cpp | 4 +-- src/rtpsession.h | 2 +- src/rtpsessionparams.cpp | 2 +- src/rtpsessionparams.h | 2 +- src/rtpsessionsources.cpp | 2 +- src/rtpsessionsources.h | 2 +- src/rtpsourcedata.cpp | 2 +- src/rtpsourcedata.h | 3 +- src/rtpsources.cpp | 9 +++-- src/rtpsources.h | 2 +- src/rtpstructs.h | 2 +- src/rtptimeutilities.cpp | 2 +- src/rtptimeutilities.h | 2 +- src/rtptransmitter.h | 2 +- src/rtptypes_win.h | 2 +- src/rtpudpv4transmitter.cpp | 57 ++++++++++++++++++++++++++---- src/rtpudpv4transmitter.h | 2 +- src/rtpudpv6transmitter.cpp | 47 +++++++++++++++++++++--- src/rtpudpv6transmitter.h | 2 +- 91 files changed, 253 insertions(+), 126 deletions(-) delete mode 100644 TODO create mode 100644 src/rtplibraryversioninternal.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bfcf4a..2fd9542 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,10 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 2.8) project(jrtplib) -set(VERSION 3.9.1) +set(VERSION_MAJOR 3) +set(VERSION_MINOR 9) +set(VERSION_DEBUG 2) +set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_DEBUG}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") @@ -118,6 +121,7 @@ endif (UNIX OR JRTPLIB_COMPILE_STATIC) configure_file("${PROJECT_SOURCE_DIR}/src/rtptypes.h.in" "${PROJECT_BINARY_DIR}/src/rtptypes.h") configure_file("${PROJECT_SOURCE_DIR}/src/rtpconfig.h.in" "${PROJECT_BINARY_DIR}/src/rtpconfig.h") +configure_file("${PROJECT_SOURCE_DIR}/src/rtplibraryversioninternal.h.in" "${PROJECT_BINARY_DIR}/src/rtplibraryversioninternal.h") save_paths(JRTPLIB_INTERNAL_INCLUDES "${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/src") diff --git a/ChangeLog b/ChangeLog index 4366168..f7a547d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,12 @@ - November 8, 2011 - JRTPLIB ChangeLog - - ----------- + ----------------- + + 3.9.2 (December 2016) + * Major bugfix: zero length UDP packets should no longer block + the reception of packets. + * Various compiler warnings were fixed. Thanks to Ruotger Skupin + (roddi@me.com) for supplying the patch. 3.9.1 (November 2011) * Fixed a bug in the CMake configuration: was unable to handle diff --git a/Doxyfile b/Doxyfile index bb14694..02d7ce9 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = JRTPLIB # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.9.1 +PROJECT_NUMBER = 3.9.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. diff --git a/README.TXT b/README.TXT index 6e7d87e..10d6cf9 100644 --- a/README.TXT +++ b/README.TXT @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------ - November 8, 2011 + December 2, 2016 - JRTPLIB (v3.9.1) + JRTPLIB (v3.9.2) Developed at the The Expertise Centre for @@ -23,10 +23,6 @@ from this url: If you have questions about the library, you can mail me at: jori.liesenborgs@gmail.com -There is also a mailing list for the library. To subscribe to the list, -just send an e-mail to jrtplib-subscribe@edm.uhasselt.be and you'll -receive further instructions. - ACKNOWLEDGMENT ============== diff --git a/TODO b/TODO deleted file mode 100644 index e69de29..0000000 diff --git a/examples/example1.cpp b/examples/example1.cpp index b1a0eeb..980bb5a 100644 --- a/examples/example1.cpp +++ b/examples/example1.cpp @@ -8,6 +8,7 @@ #include "rtpipv4address.h" #include "rtpsessionparams.h" #include "rtperrors.h" +#include "rtplibraryversion.h" #ifndef WIN32 #include #include @@ -52,7 +53,9 @@ int main(void) std::string ipstr; int status,i,num; - // First, we'll ask for the necessary information + std::cout << "Using version " << RTPLibraryVersion::GetVersion().GetVersionString() << std::endl; + + // First, we'll ask for the necessary information std::cout << "Enter local portbase:" << std::endl; std::cin >> portbase; diff --git a/src/rtcpapppacket.cpp b/src/rtcpapppacket.cpp index 1fd922e..b72f633 100644 --- a/src/rtcpapppacket.cpp +++ b/src/rtcpapppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpapppacket.h b/src/rtcpapppacket.h index eaf0ee4..f33b6eb 100644 --- a/src/rtcpapppacket.h +++ b/src/rtcpapppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.cpp b/src/rtcpbyepacket.cpp index 8a319d9..5b1efd2 100644 --- a/src/rtcpbyepacket.cpp +++ b/src/rtcpbyepacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpbyepacket.h b/src/rtcpbyepacket.h index 5cd0299..0b454e3 100644 --- a/src/rtcpbyepacket.h +++ b/src/rtcpbyepacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.cpp b/src/rtcpcompoundpacket.cpp index b462836..9d96362 100644 --- a/src/rtcpcompoundpacket.cpp +++ b/src/rtcpcompoundpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacket.h b/src/rtcpcompoundpacket.h index d135bed..b40dc80 100644 --- a/src/rtcpcompoundpacket.h +++ b/src/rtcpcompoundpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.cpp b/src/rtcpcompoundpacketbuilder.cpp index b890d0a..40e4204 100644 --- a/src/rtcpcompoundpacketbuilder.cpp +++ b/src/rtcpcompoundpacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpcompoundpacketbuilder.h b/src/rtcpcompoundpacketbuilder.h index 010ede0..f4af20d 100644 --- a/src/rtcpcompoundpacketbuilder.h +++ b/src/rtcpcompoundpacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.cpp b/src/rtcppacket.cpp index eb01134..23f902c 100644 --- a/src/rtcppacket.cpp +++ b/src/rtcppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacket.h b/src/rtcppacket.h index 178e630..b4c9894 100644 --- a/src/rtcppacket.h +++ b/src/rtcppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.cpp b/src/rtcppacketbuilder.cpp index ac265a1..ee038e0 100644 --- a/src/rtcppacketbuilder.cpp +++ b/src/rtcppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcppacketbuilder.h b/src/rtcppacketbuilder.h index 0a66503..ebe0122 100644 --- a/src/rtcppacketbuilder.h +++ b/src/rtcppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.cpp b/src/rtcprrpacket.cpp index 44687ea..1864be2 100644 --- a/src/rtcprrpacket.cpp +++ b/src/rtcprrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcprrpacket.h b/src/rtcprrpacket.h index ddc85ba..ce66672 100644 --- a/src/rtcprrpacket.h +++ b/src/rtcprrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpscheduler.cpp b/src/rtcpscheduler.cpp index a4c4073..a2492d9 100644 --- a/src/rtcpscheduler.cpp +++ b/src/rtcpscheduler.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -87,7 +87,7 @@ int RTCPSchedulerParams::SetMinimumTransmissionInterval(const RTPTime &t) return 0; } -RTCPScheduler::RTCPScheduler(RTPSources &s, RTPRandom &r) : rtprand(r),sources(s),nextrtcptime(0,0),prevrtcptime(0,0) +RTCPScheduler::RTCPScheduler(RTPSources &s, RTPRandom &r) : sources(s),nextrtcptime(0,0),prevrtcptime(0,0),rtprand(r) { Reset(); diff --git a/src/rtcpscheduler.h b/src/rtcpscheduler.h index 04e8f84..1b4510f 100644 --- a/src/rtcpscheduler.h +++ b/src/rtcpscheduler.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.cpp b/src/rtcpsdesinfo.cpp index dbd9971..41c83b0 100644 --- a/src/rtcpsdesinfo.cpp +++ b/src/rtcpsdesinfo.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdesinfo.h b/src/rtcpsdesinfo.h index 91b20ba..4edff77 100644 --- a/src/rtcpsdesinfo.h +++ b/src/rtcpsdesinfo.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsdespacket.cpp b/src/rtcpsdespacket.cpp index 1b90e6a..64f165a 100644 --- a/src/rtcpsdespacket.cpp +++ b/src/rtcpsdespacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -81,8 +81,6 @@ RTCPSDESPacket::RTCPSDESPacket(uint8_t *data,size_t datalength) while ((ssrccount > 0) && (len > 0)) { - chunkoffset = 0; - if (len < (sizeof(uint32_t)*2)) // chunk must contain at least a SSRC identifier return; // and a (possibly empty) item diff --git a/src/rtcpsdespacket.h b/src/rtcpsdespacket.h index fd70898..f38b070 100644 --- a/src/rtcpsdespacket.h +++ b/src/rtcpsdespacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.cpp b/src/rtcpsrpacket.cpp index c6e7440..38224fb 100644 --- a/src/rtcpsrpacket.cpp +++ b/src/rtcpsrpacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpsrpacket.h b/src/rtcpsrpacket.h index 46d0221..b9ad307 100644 --- a/src/rtcpsrpacket.h +++ b/src/rtcpsrpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtcpunknownpacket.h b/src/rtcpunknownpacket.h index 69952c8..c6d51a3 100644 --- a/src/rtcpunknownpacket.h +++ b/src/rtcpunknownpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpaddress.h b/src/rtpaddress.h index 0cef011..46872ab 100644 --- a/src/rtpaddress.h +++ b/src/rtpaddress.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpbyteaddress.cpp b/src/rtpbyteaddress.cpp index 2251a94..c0512b4 100644 --- a/src/rtpbyteaddress.cpp +++ b/src/rtpbyteaddress.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpbyteaddress.h b/src/rtpbyteaddress.h index 53353a5..83426a8 100644 --- a/src/rtpbyteaddress.h +++ b/src/rtpbyteaddress.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.cpp b/src/rtpcollisionlist.cpp index cd8e190..5ed32ab 100644 --- a/src/rtpcollisionlist.cpp +++ b/src/rtpcollisionlist.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpcollisionlist.h b/src/rtpcollisionlist.h index 812b297..929c5a8 100644 --- a/src/rtpcollisionlist.h +++ b/src/rtpcollisionlist.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpconfig.h.in b/src/rtpconfig.h.in index f1b15a0..a8ce20a 100644 --- a/src/rtpconfig.h.in +++ b/src/rtpconfig.h.in @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.cpp b/src/rtpdebug.cpp index 3496df6..1dc3b22 100644 --- a/src/rtpdebug.cpp +++ b/src/rtpdebug.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdebug.h b/src/rtpdebug.h index a0c7078..4dc5b76 100644 --- a/src/rtpdebug.h +++ b/src/rtpdebug.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpdefines.h b/src/rtpdefines.h index 826311b..0a6d6af 100644 --- a/src/rtpdefines.h +++ b/src/rtpdefines.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.cpp b/src/rtperrors.cpp index 5d3e05b..2972cb7 100644 --- a/src/rtperrors.cpp +++ b/src/rtperrors.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtperrors.h b/src/rtperrors.h index c0b6994..5a2f3d4 100644 --- a/src/rtperrors.h +++ b/src/rtperrors.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpexternaltransmitter.cpp b/src/rtpexternaltransmitter.cpp index 39c124c..e4bb2bb 100644 --- a/src/rtpexternaltransmitter.cpp +++ b/src/rtpexternaltransmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpexternaltransmitter.h b/src/rtpexternaltransmitter.h index 8db73a8..8bd0b03 100644 --- a/src/rtpexternaltransmitter.h +++ b/src/rtpexternaltransmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtphashtable.h b/src/rtphashtable.h index 1f867b1..f2aad1e 100644 --- a/src/rtphashtable.h +++ b/src/rtphashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpinternalsourcedata.cpp b/src/rtpinternalsourcedata.cpp index 78d18c2..224352f 100644 --- a/src/rtpinternalsourcedata.cpp +++ b/src/rtpinternalsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -209,20 +209,18 @@ int RTPInternalSourceData::ProcessSDESItem(uint8_t sdesid,const uint8_t *data,si break; case RTCP_SDES_ID_NAME: { - uint8_t *oldname; size_t oldlen; - oldname = SDESinf.GetName(&oldlen); + SDESinf.GetName(&oldlen); if (oldlen == 0) // Name not set return SDESinf.SetName(data,itemlen); } break; case RTCP_SDES_ID_EMAIL: { - uint8_t *oldemail; size_t oldlen; - oldemail = SDESinf.GetEMail(&oldlen); + SDESinf.GetEMail(&oldlen); if (oldlen == 0) return SDESinf.SetEMail(data,itemlen); } @@ -233,10 +231,9 @@ int RTPInternalSourceData::ProcessSDESItem(uint8_t sdesid,const uint8_t *data,si return SDESinf.SetLocation(data,itemlen); case RTCP_SDES_ID_TOOL: { - uint8_t *oldtool; size_t oldlen; - oldtool = SDESinf.GetTool(&oldlen); + SDESinf.GetTool(&oldlen); if (oldlen == 0) return SDESinf.SetTool(data,itemlen); } diff --git a/src/rtpinternalsourcedata.h b/src/rtpinternalsourcedata.h index d5d17a5..fdc4913 100644 --- a/src/rtpinternalsourcedata.h +++ b/src/rtpinternalsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.cpp b/src/rtpipv4address.cpp index 2e5bcd7..4404264 100644 --- a/src/rtpipv4address.cpp +++ b/src/rtpipv4address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4address.h b/src/rtpipv4address.h index f85c7f3..fce5cbf 100644 --- a/src/rtpipv4address.h +++ b/src/rtpipv4address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv4destination.h b/src/rtpipv4destination.h index 6b0ad5a..05190e8 100644 --- a/src/rtpipv4destination.h +++ b/src/rtpipv4destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.cpp b/src/rtpipv6address.cpp index 9c0844b..0b4dc87 100644 --- a/src/rtpipv6address.cpp +++ b/src/rtpipv6address.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6address.h b/src/rtpipv6address.h index dfbbbb5..934db44 100644 --- a/src/rtpipv6address.h +++ b/src/rtpipv6address.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpipv6destination.h b/src/rtpipv6destination.h index 3b322fa..b7b64ac 100644 --- a/src/rtpipv6destination.h +++ b/src/rtpipv6destination.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpkeyhashtable.h b/src/rtpkeyhashtable.h index 1d334a9..76de2f0 100644 --- a/src/rtpkeyhashtable.h +++ b/src/rtpkeyhashtable.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtplibraryversion.cpp b/src/rtplibraryversion.cpp index beb4e6b..f9057f1 100644 --- a/src/rtplibraryversion.cpp +++ b/src/rtplibraryversion.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -32,6 +32,7 @@ #include "rtplibraryversion.h" #include "rtpdefines.h" +#include "rtplibraryversioninternal.h" #include namespace jrtplib @@ -39,7 +40,7 @@ namespace jrtplib RTPLibraryVersion RTPLibraryVersion::GetVersion() { - return RTPLibraryVersion(3,9,1); + return RTPLibraryVersion(JRTPLIB_VERSION_MAJOR, JRTPLIB_VERSION_MINOR, JRTPLIB_VERSION_DEBUG); } std::string RTPLibraryVersion::GetVersionString() const diff --git a/src/rtplibraryversion.h b/src/rtplibraryversion.h index 635261e..9326fab 100644 --- a/src/rtplibraryversion.h +++ b/src/rtplibraryversion.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtplibraryversioninternal.h.in b/src/rtplibraryversioninternal.h.in new file mode 100644 index 0000000..cc79ff8 --- /dev/null +++ b/src/rtplibraryversioninternal.h.in @@ -0,0 +1,46 @@ +/* + + This file is a part of JRTPLIB + Copyright (c) 1999-2016 Jori Liesenborgs + + Contact: jori.liesenborgs@gmail.com + + This library was developed at the Expertise Centre for Digital Media + (http://www.edm.uhasselt.be), a research center of the Hasselt University + (http://www.uhasselt.be). The library is based upon work done for + my thesis at the School for Knowledge Technology (Belgium/The Netherlands). + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +*/ + +/** + * \file rtplibraryversioninternal.h + */ + +#ifndef RTPLIBRARYVERSIONINTERNAL_H + +#define RTPLIBRARYVERSIONINTERNAL_H + +#define JRTPLIB_VERSION_MAJOR ${VERSION_MAJOR} +#define JRTPLIB_VERSION_MINOR ${VERSION_MINOR} +#define JRTPLIB_VERSION_DEBUG ${VERSION_DEBUG} + +#endif // RTPLIBRARYVERSIONINTERNAL_H + diff --git a/src/rtpmemorymanager.h b/src/rtpmemorymanager.h index 3384395..a350711 100644 --- a/src/rtpmemorymanager.h +++ b/src/rtpmemorymanager.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpmemoryobject.h b/src/rtpmemoryobject.h index 91c61a6..e45cdd9 100644 --- a/src/rtpmemoryobject.h +++ b/src/rtpmemoryobject.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacket.cpp b/src/rtppacket.cpp index 03f7b62..4c9bde9 100644 --- a/src/rtppacket.cpp +++ b/src/rtppacket.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -112,7 +112,6 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) int payloadoffset,payloadlength; int numpadbytes; RTPExtensionHeader *rtpextheader; - uint16_t exthdrlen; if (!rawpack.IsRTP()) // If we didn't receive it on the RTP port, we'll ignore it return ERR_RTP_PACKET_INVALIDPACKET; @@ -159,13 +158,13 @@ int RTPPacket::ParseRawPacket(RTPRawPacket &rawpack) { rtpextheader = (RTPExtensionHeader *)(packetbytes+payloadoffset); payloadoffset += sizeof(RTPExtensionHeader); - exthdrlen = ntohs(rtpextheader->length); + + uint16_t exthdrlen = ntohs(rtpextheader->length); payloadoffset += ((int)exthdrlen)*sizeof(uint32_t); } else { rtpextheader = 0; - exthdrlen = 0; } payloadlength = packetlen-numpadbytes-payloadoffset; diff --git a/src/rtppacket.h b/src/rtppacket.h index 9c163b9..6d7367e 100644 --- a/src/rtppacket.h +++ b/src/rtppacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacketbuilder.cpp b/src/rtppacketbuilder.cpp index d3d1525..0ce62a9 100644 --- a/src/rtppacketbuilder.cpp +++ b/src/rtppacketbuilder.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppacketbuilder.h b/src/rtppacketbuilder.h index dd06faf..1c5e159 100644 --- a/src/rtppacketbuilder.h +++ b/src/rtppacketbuilder.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.cpp b/src/rtppollthread.cpp index a9650d1..c6dd6c4 100644 --- a/src/rtppollthread.cpp +++ b/src/rtppollthread.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtppollthread.h b/src/rtppollthread.h index ac68130..319a129 100644 --- a/src/rtppollthread.h +++ b/src/rtppollthread.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.cpp b/src/rtprandom.cpp index 79eaf0f..6a676bd 100644 --- a/src/rtprandom.cpp +++ b/src/rtprandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandom.h b/src/rtprandom.h index 3c277ca..05a8918 100644 --- a/src/rtprandom.h +++ b/src/rtprandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrand48.cpp b/src/rtprandomrand48.cpp index 0575015..ba05c8d 100644 --- a/src/rtprandomrand48.cpp +++ b/src/rtprandomrand48.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrand48.h b/src/rtprandomrand48.h index 5916af4..4148db8 100644 --- a/src/rtprandomrand48.h +++ b/src/rtprandomrand48.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrands.cpp b/src/rtprandomrands.cpp index 6477964..ca68218 100644 --- a/src/rtprandomrands.cpp +++ b/src/rtprandomrands.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomrands.h b/src/rtprandomrands.h index 442d6c8..45fa947 100644 --- a/src/rtprandomrands.h +++ b/src/rtprandomrands.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomurandom.cpp b/src/rtprandomurandom.cpp index df0d214..4188031 100644 --- a/src/rtprandomurandom.cpp +++ b/src/rtprandomurandom.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprandomurandom.h b/src/rtprandomurandom.h index 65b2791..967bbcd 100644 --- a/src/rtprandomurandom.h +++ b/src/rtprandomurandom.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtprawpacket.h b/src/rtprawpacket.h index 576d619..2685ce3 100644 --- a/src/rtprawpacket.h +++ b/src/rtprawpacket.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsession.cpp b/src/rtpsession.cpp index 44a8be5..79ddc85 100644 --- a/src/rtpsession.cpp +++ b/src/rtpsession.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -85,7 +85,7 @@ namespace jrtplib { RTPSession::RTPSession(RTPRandom *r,RTPMemoryManager *mgr) - : RTPMemoryObject(mgr),sources(*this,mgr),rtprnd(GetRandomNumberGenerator(r)),packetbuilder(*rtprnd,mgr),rtcpsched(sources,*rtprnd), + : RTPMemoryObject(mgr),rtprnd(GetRandomNumberGenerator(r)),sources(*this,mgr),packetbuilder(*rtprnd,mgr),rtcpsched(sources,*rtprnd), rtcpbuilder(sources,packetbuilder,mgr),collisionlist(mgr) { created = false; diff --git a/src/rtpsession.h b/src/rtpsession.h index df84609..0ae5fd1 100644 --- a/src/rtpsession.h +++ b/src/rtpsession.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.cpp b/src/rtpsessionparams.cpp index db6584f..5e44fe0 100644 --- a/src/rtpsessionparams.cpp +++ b/src/rtpsessionparams.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionparams.h b/src/rtpsessionparams.h index 6aa8a71..719067f 100644 --- a/src/rtpsessionparams.h +++ b/src/rtpsessionparams.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.cpp b/src/rtpsessionsources.cpp index 10f540a..e2f378b 100644 --- a/src/rtpsessionsources.cpp +++ b/src/rtpsessionsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsessionsources.h b/src/rtpsessionsources.h index 2eb931e..f0a3447 100644 --- a/src/rtpsessionsources.h +++ b/src/rtpsessionsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsourcedata.cpp b/src/rtpsourcedata.cpp index bdf59f6..23350e0 100644 --- a/src/rtpsourcedata.cpp +++ b/src/rtpsourcedata.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpsourcedata.h b/src/rtpsourcedata.h index 3be2fa6..00ed4b0 100644 --- a/src/rtpsourcedata.h +++ b/src/rtpsourcedata.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -140,7 +140,6 @@ class JRTPLIB_IMPORTEXPORT RTPSourceStats #ifdef RTP_SUPPORT_PROBATION uint16_t prevseqnr; int probation; - RTPSources::ProbationType probationtype; #endif // RTP_SUPPORT_PROBATION }; diff --git a/src/rtpsources.cpp b/src/rtpsources.cpp index 0e4e0a4..76262bd 100644 --- a/src/rtpsources.cpp +++ b/src/rtpsources.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -1082,10 +1082,9 @@ void RTPSources::NoteTimeout(const RTPTime &curtime,const RTPTime &timeoutdelay) while (sourcelist.HasCurrentElement()) { RTPInternalSourceData *srcdat = sourcelist.GetCurrentElement(); - uint8_t *note; size_t notelen; - note = srcdat->SDES_GetNote(¬elen); + srcdat->SDES_GetNote(¬elen); if (notelen != 0) // Note has been set { RTPTime notetime = srcdat->INF_GetLastSDESNoteTime(); @@ -1149,7 +1148,7 @@ void RTPSources::MultipleTimeouts(const RTPTime &curtime,const RTPTime &senderti RTPInternalSourceData *srcdat = sourcelist.GetCurrentElement(); bool deleted,issender,isactive; bool byetimeout,normaltimeout,notetimeout; - uint8_t *note; + size_t notelen; issender = srcdat->IsSender(); @@ -1159,7 +1158,7 @@ void RTPSources::MultipleTimeouts(const RTPTime &curtime,const RTPTime &senderti normaltimeout = false; notetimeout = false; - note = srcdat->SDES_GetNote(¬elen); + srcdat->SDES_GetNote(¬elen); if (notelen != 0) // Note has been set { RTPTime notetime = srcdat->INF_GetLastSDESNoteTime(); diff --git a/src/rtpsources.h b/src/rtpsources.h index 8c9ce85..218f9bf 100644 --- a/src/rtpsources.h +++ b/src/rtpsources.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpstructs.h b/src/rtpstructs.h index bc222c1..ffac564 100644 --- a/src/rtpstructs.h +++ b/src/rtpstructs.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.cpp b/src/rtptimeutilities.cpp index d0e2ac4..f78ea81 100644 --- a/src/rtptimeutilities.cpp +++ b/src/rtptimeutilities.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptimeutilities.h b/src/rtptimeutilities.h index c45d4b5..11abcb7 100644 --- a/src/rtptimeutilities.h +++ b/src/rtptimeutilities.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptransmitter.h b/src/rtptransmitter.h index e46205d..3630a10 100644 --- a/src/rtptransmitter.h +++ b/src/rtptransmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtptypes_win.h b/src/rtptypes_win.h index 90cf00d..87e0639 100644 --- a/src/rtptypes_win.h +++ b/src/rtptypes_win.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv4transmitter.cpp b/src/rtpudpv4transmitter.cpp index a76535c..a3bfd53 100644 --- a/src/rtpudpv4transmitter.cpp +++ b/src/rtpudpv4transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -1263,6 +1263,9 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) int sock; #endif // WIN32 struct sockaddr_in srcaddr; + bool dataavailable; + fd_set fdset; + struct timeval zerotv; if (rtp) sock = rtpsock; @@ -1271,10 +1274,32 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) len = 0; RTPIOCTL(sock,FIONREAD,&len); - if (len <= 0) - return 0; - while (len > 0) + if (len <= 0) // make sure a packet of length zero is not queued + { + // An alternative workaround would be to just use non-blocking sockets. + // However, since the user does have access to the sockets and I do not + // know how this would affect anyone else's code, I chose to do it using + // an extra select call in case ioctl says the length is zero. + + FD_ZERO(&fdset); + FD_SET(sock,&fdset); + + zerotv.tv_sec = 0; + zerotv.tv_usec = 0; + + if (select(FD_SETSIZE,&fdset,0,0,&zerotv) < 0) + return ERR_RTP_UDPV4TRANS_ERRORINSELECT; + + if (FD_ISSET(sock, &fdset)) + dataavailable = true; + else + dataavailable = false; + } + else + dataavailable = true; + + while (dataavailable) { RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in); @@ -1318,6 +1343,25 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp) } len = 0; RTPIOCTL(sock,FIONREAD,&len); + + if (len <= 0) // make sure a packet of length zero is not queued + { + FD_ZERO(&fdset); + FD_SET(sock,&fdset); + + zerotv.tv_sec = 0; + zerotv.tv_usec = 0; + + if (select(FD_SETSIZE,&fdset,0,0,&zerotv) < 0) + return ERR_RTP_UDPV4TRANS_ERRORINSELECT; + + if (FD_ISSET(sock, &fdset)) + dataavailable = true; + else + dataavailable = false; + } + else + dataavailable = true; } return 0; } @@ -1762,7 +1806,6 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() { struct hostent *he; char name[1024]; - uint32_t ip; bool done; int i,j; @@ -1772,7 +1815,6 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() if (he == 0) return; - ip = 0; i = 0; done = false; while (!done) @@ -1781,7 +1823,8 @@ void RTPUDPv4Transmitter::GetLocalIPList_DNS() done = true; else { - ip = 0; + uint32_t ip = 0; + for (j = 0 ; j < 4 ; j++) ip |= ((uint32_t)((unsigned char)he->h_addr_list[i][j])<<((3-j)*8)); localIPs.push_back(ip); diff --git a/src/rtpudpv4transmitter.h b/src/rtpudpv4transmitter.h index 23a8e34..3d05159 100644 --- a/src/rtpudpv4transmitter.h +++ b/src/rtpudpv4transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com diff --git a/src/rtpudpv6transmitter.cpp b/src/rtpudpv6transmitter.cpp index 61cce94..a9e53ec 100644 --- a/src/rtpudpv6transmitter.cpp +++ b/src/rtpudpv6transmitter.cpp @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com @@ -1276,6 +1276,9 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) int sock; #endif // WIN32 struct sockaddr_in6 srcaddr; + fd_set fdset; + struct timeval zerotv; + bool dataavailable; if (rtp) sock = rtpsock; @@ -1284,10 +1287,27 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) len = 0; RTPIOCTL(sock,FIONREAD,&len); - if (len <= 0) - return 0; - while (len > 0) + if (len <= 0) // make sure a packet of length zero is not queued + { + FD_ZERO(&fdset); + FD_SET(sock,&fdset); + + zerotv.tv_sec = 0; + zerotv.tv_usec = 0; + + if (select(FD_SETSIZE,&fdset,0,0,&zerotv) < 0) + return ERR_RTP_UDPV4TRANS_ERRORINSELECT; + + if (FD_ISSET(sock, &fdset)) + dataavailable = true; + else + dataavailable = false; + } + else + dataavailable = true; + + while (dataavailable) { RTPTime curtime = RTPTime::CurrentTime(); fromlen = sizeof(struct sockaddr_in6); @@ -1331,6 +1351,25 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp) } len = 0; RTPIOCTL(sock,FIONREAD,&len); + + if (len <= 0) // make sure a packet of length zero is not queued + { + FD_ZERO(&fdset); + FD_SET(sock,&fdset); + + zerotv.tv_sec = 0; + zerotv.tv_usec = 0; + + if (select(FD_SETSIZE,&fdset,0,0,&zerotv) < 0) + return ERR_RTP_UDPV4TRANS_ERRORINSELECT; + + if (FD_ISSET(sock, &fdset)) + dataavailable = true; + else + dataavailable = false; + } + else + dataavailable = true; } return 0; } diff --git a/src/rtpudpv6transmitter.h b/src/rtpudpv6transmitter.h index 21bb7ad..6ea29a7 100644 --- a/src/rtpudpv6transmitter.h +++ b/src/rtpudpv6transmitter.h @@ -1,7 +1,7 @@ /* This file is a part of JRTPLIB - Copyright (c) 1999-2011 Jori Liesenborgs + Copyright (c) 1999-2016 Jori Liesenborgs Contact: jori.liesenborgs@gmail.com From 81a11d827d568e4daa76b96aac9dd9764766adf5 Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sun, 4 Dec 2016 13:41:45 +0100 Subject: [PATCH 020/136] Added some files from internal repository --- aboutrfc3550.txt | 177 ++++++++++++++++++ builddist.sh | 54 ++++++ visual_studio_jthread_jrtplib_compilation.txt | 56 ++++++ 3 files changed, 287 insertions(+) create mode 100644 aboutrfc3550.txt create mode 100755 builddist.sh create mode 100644 visual_studio_jthread_jrtplib_compilation.txt diff --git a/aboutrfc3550.txt b/aboutrfc3550.txt new file mode 100644 index 0000000..a12e815 --- /dev/null +++ b/aboutrfc3550.txt @@ -0,0 +1,177 @@ + * p 9 (bottom): + In the unicast case, a participant may + receive from all other participants in the session using the same + pair of ports, or may use a distinct pair of ports for each. + + COMMENT: + By default, a RTPSession instance will use only one pair + of ports. + + * p 14 (top): + A profile MAY define additional + marker bits or specify that there is no marker bit by changing the + number of bits in the payload type field (see Section 5.3). + + COMMENT: + At the moment, no support for additional marker bits is present + + * About payload data and payload types: + The library doesn't inspect payload data or payload types. It is + left to the application using the library to decide if a packet should + be ignored or accepted + + * p 18 (middle): + o If a particular class of applications needs additional + functionality independent of payload format, the profile under + which those applications operate SHOULD define additional fixed + fields to follow immediately after the SSRC field of the existing + fixed header. Those applications will be able to quickly and + directly access the additional fields while profile-independent + monitors or recorders can still process the RTP packets by + interpreting only the first twelve octets. + + COMMENT: + No direct support for such extensions are provided + + * p 20 (bottom): + 4. A fourth, OPTIONAL function is to convey minimal session control + information, for example participant identification to be + displayed in the user interface. + + COMMENT: SDES info is supported by the library + + * p 21 (top): + The + recommendations here accommodate SSM only through Section 6.2's + option of turning off receivers' RTCP entirely. + + COMMENT: + For now, the RTCP (sending) will only be disabled entirely + if no destinations are present. + + * p 25 (middle): + The profile MAY further specify that the control traffic bandwidth + may be divided into two separate session parameters for those + participants which are active data senders and those which are not; + + COMMENT: this will not be implemented + + * p 26 (top): + This delay MAY be set to half the + minimum interval to allow quicker notification that the new + participant is present. + + COMMENT: is supplied as an option which is enabled by default + + * p 26 (middle): + An implementation MAY scale the minimum RTCP interval to a smaller + value inversely proportional to the session bandwidth parameter with + the following limitations: + + COMMENT: not supported + + * p 28 (middle): + SSRC sampling -> not supported + + * p 28 (bottom): + An implementation which is constrained to two-party + unicast operation SHOULD still use randomization of the RTCP + transmission interval to avoid unintended synchronization of multiple + instances operating in the same environment, but MAY omit the "timer + reconsideration" and "reverse reconsideration" algorithms in Sections + 6.3.3, 6.3.6 and 6.3.7. + + COMMENT: randomization and reconsideration will always be used. omitting + them is not implemented. + + * p 28 (top): + New entries MAY be considered + not valid until multiple packets carrying the new SSRC have been + received (see Appendix A.1), or until an SDES RTCP packet containing + a CNAME for that SSRC has been received. + + COMMENT: Currently, probation is optional. A source is considered + valid when either a number (depending on probation) of RTP + packets are received or when a CNAME has been received + + * p 42 (bottom): + 6.4.3 Extending the Sender and Receiver Reports + + COMMENT: Extensions of SR and RR are not supported + + * p 68 (middle): + RTP relies on the underlying protocol(s) to provide demultiplexing of + RTP data and RTCP control streams. For UDP and similar protocols, + RTP SHOULD use an even destination port number and the corresponding + RTCP stream SHOULD use the next higher (odd) destination port number. + For applications that take a single port number as a parameter and + derive the RTP and RTCP port pair from that number, if an odd number + is supplied then the application SHOULD replace that number with the + next lower (even) number to use as the base of the port pair. For + applications in which the RTP and RTCP destination port numbers are + specified via explicit, separate parameters (using a signaling + protocol or other means), the application MAY disregard the + restrictions that the port numbers be even/odd and consecutive + although the use of an even/odd port pair is still encouraged. The + RTP and RTCP port numbers MUST NOT be the same since RTP relies on + the port numbers to demultiplex the RTP data and RTCP control + streams. + + COMMENT: Currently, the transporter only accepts an even portbase. + + * p 68-69: + It is RECOMMENDED that layered encoding applications (see Section + 2.4) use a set of contiguous port numbers. + + COMMENT: No direct support for this using RTPSession, but it can be + constructed in principle using several RTPTransmitter + instances. + + * p 69: + A profile MAY specify a framing method to be used even when RTP is + carried in protocols that do provide framing in order to allow + carrying several RTP packets in one lower-layer protocol data unit, + such as a UDP packet. + + COMMENT: For UDP, such a framing mechanism will not be implemented + + + + +QUESTIONS: + * p 28: after BYE packet, ssrc should be removed after an appropriate delay. + what delay is considered appropriate? + * p 57: why do CNAMEs have to be forwarded to allow SSRC identifier collisions + to work? + -> If the CSRC sources are not senders, their identifiers wont be + seen in the CSRC list of an RTP packet. By forwarding SDES CNAMEs, + their identifiers will be present in the SDES chunk and collisions + can be detected. + * p 64: Section 8.3 + * What MTU should be used? Should it be the same for all session members? + Is it the MTU of the protocol just below RTP or of the link layer? + * p 33 (BYE scheduling): Should members be increased for each BYE packet or + for each SSRC in a BYE packet? + + * p 35: + RTP receivers provide reception quality feedback using RTCP report + packets which may take one of two forms depending upon whether or not + the receiver is also a sender. The only difference between the + sender report (SR) and receiver report (RR) forms, besides the packet + type code, is that the sender report includes a 20-byte sender + information section for use by active senders. The SR is issued if a + site has sent any data packets during the interval since issuing the + last report or the previous one, otherwise the RR is issued. + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + -> Is this also true when the sender timeout multiplier differs + from 2 ?? + + * About report blocks: should an entry be made for each SSRC_n in the + list of report blocks if the RR or SR originates from a valid SSRC? + -> probably not, since then we don't have the right transport + address of the SSRC_n + -> Indeed: see p 61 at bottom + + * Is it a valid tactic to use a timestamp unit estimation (from + two SRs) for jitter calculation if no exact info is available? + diff --git a/builddist.sh b/builddist.sh new file mode 100755 index 0000000..91ba3ec --- /dev/null +++ b/builddist.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +VERSION_MAJOR=`cat CMakeLists.txt|grep VERSION_MAJOR | head -n 1 | grep set | head -n 1 |cut -f 2 -d " "|cut -f 1 -d ")"` +VERSION_MINOR=`cat CMakeLists.txt|grep VERSION_MINOR | head -n 1 | grep set | head -n 1 |cut -f 2 -d " "|cut -f 1 -d ")"` +VERSION_DEBUG=`cat CMakeLists.txt|grep VERSION_DEBUG | head -n 1 | grep set | head -n 1 |cut -f 2 -d " "|cut -f 1 -d ")"` +VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_DEBUG +LIBNAME=jrtplib + +TMPDIR=`tempfile` +CURDIR=`pwd` +rm -r $TMPDIR +if ! mkdir $TMPDIR ; then + echo "Couldn't create temporary directory" + exit -1 +fi + +cd $TMPDIR +TMPDIR=`pwd` # Get the full path +cd $CURDIR + +if ! git archive --format tar --prefix=${LIBNAME}-${VERSION}/ HEAD | (cd $TMPDIR && tar xf -) ; then + echo "Couldn't archive repository" + exit -1 +fi + +cd $TMPDIR/${LIBNAME}-${VERSION} + +rm -f `find . -name ".git*"` +rm -f builddist.sh +rm -rf sphinxdoc +rm -f TODO +rm -rf nodist +rm -f aboutrfc3550.txt + +cd .. + +if ! tar cfz ${LIBNAME}-${VERSION}.tar.gz ${LIBNAME}-${VERSION}/ ; then + echo "Couldn't create archive" + exit -1 +fi + +if ! tar cfj ${LIBNAME}-${VERSION}.tar.bz2 ${LIBNAME}-${VERSION}/ ; then + echo "Couldn't create archive" + exit -1 +fi + +if ! zip ${LIBNAME}-${VERSION}.zip `find ${LIBNAME}-${VERSION}/` ; then + echo "Couldn't create archive" + exit -1 +fi + +mv $TMPDIR $CURDIR/ + + diff --git a/visual_studio_jthread_jrtplib_compilation.txt b/visual_studio_jthread_jrtplib_compilation.txt new file mode 100644 index 0000000..9e85b86 --- /dev/null +++ b/visual_studio_jthread_jrtplib_compilation.txt @@ -0,0 +1,56 @@ +To build JThread and JRTPLIB, you'll need to use 'cmake' to generate +the project files. Below you can find the procedure you can follow. +I've also created a screencast which illustrates the steps in making +the library. You can try one of these files (it's the same file, in +different video formats): + +http://research.edm.uhasselt.be/jori/jthread_jrtplib_example_mpeg1.mpg +http://research.edm.uhasselt.be/jori/jthread_jrtplib_example_mpeg2.mpg +http://research.edm.uhasselt.be/jori/jthread_jrtplib_example.avi + +In words you'll need to do the following. As an example, I'll assume +that jrtplib is extracted into c:\projects\jrtplib-3.9.1 and jthread +is in c:\projects\jthread-1.3.1 + +First we'll build jthread. Start the CMake gui and enter +c:\projects\jthread-1.3.1 as the source directory and +c:\projects\jthread-1.3.1\build as the build directory. Then, +before doing anything else, you'll need to specify where the library +should be installed. I always use c:\local as the prefix, which will +install the headers in c:\local\include and the libraries in +c:\local\lib. To do this, add the cmake variable +CMAKE_INSTALL_PREFIX and set it to c:\local + +Then, press 'configure'. When this first configure step is complete, +press 'configure' again, and afterward press 'generate'. There you can +specify to generate a visual studio project. When this is done, open +the visual studio project (you can find it in +c:\projects\jthread-1.3.1\build) and run the 'INSTALL' project. +When this is done, select the 'release' build type, and run the +'INSTALL' project again. If all went well, you should find the +jthread headers in c:\local\include\jthread, and the jthread library +in c:\local\lib. + +Then, follow the exact same procedure for jrtplib. By using the same +installation prefix (c:\local in my example), the cmake script will +automatically detect jthread as well. After building and installing +jrtplib, you should find that the examples are built as well, and +that you can run them. + +To use jrtplib and jthread in another project, you must then do the +following: +- in the project settings, add the include directory + c:\local\include to the list of include directories (for debug and + release builds) +- in the project settings, add c:\local\lib to the list of library + directories. +- for the release version, add jrtplib.lib, jthread.lib and + ws2_32.lib to the list of libraries +- for the debug version, add jrtplib_d.lib, jthread_d.lib and + ws2_32.lib to the list of libraries. + +In your program files, include a jrtplib header like this: +#include +and a jthread header like this: +#include + From 4285c0160e9eb3f4d206c6c734b3ee43947ebf7b Mon Sep 17 00:00:00 2001 From: Jori Liesenborgs Date: Sun, 4 Dec 2016 14:08:50 +0100 Subject: [PATCH 021/136] Using markdown in docs and changed sphinx script to set version in Doxyfile --- Doxyfile | 2420 ++++++++++++++++++++++++-------------- doc/jrtplib.h | 716 +++++------ sphinxdoc/source/conf.py | 27 +- 3 files changed, 1938 insertions(+), 1225 deletions(-) diff --git a/Doxyfile b/Doxyfile index 02d7ce9..4dcb1c5 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,107 +1,129 @@ -# Doxyfile 1.7.3 +# Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored. +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. PROJECT_NAME = JRTPLIB -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. -PROJECT_NUMBER = 3.9.2 +PROJECT_NUMBER = "{X.X.X}" -# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. +# The default value is: YES. REPEAT_BRIEF = NO -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# doxygen will generate a detailed section even if there is only a brief # description. +# The default value is: NO. ALWAYS_DETAILED_SEC = NO @@ -109,538 +131,683 @@ ALWAYS_DETAILED_SEC = NO # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. +# The default value is: NO. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. JAVADOC_AUTOBRIEF = YES -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. INHERIT_DOCS = NO -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. -TAB_SIZE = 8 +TAB_SIZE = 4 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. EXTENSION_MAPPING = +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. +# The default value is: NO. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. +# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. IDL_PROPERTY_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. +# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_MEMBERS = YES -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_CLASSES = YES -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. +# The default value is: system dependent. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. SHOW_INCLUDE_FILES = YES -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. SORT_BY_SCOPE_NAME = NO -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. +# The default value is: YES. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. LAYOUT_FILE = +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. WARN_IF_DOC_ERROR = YES -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. INPUT = src/ doc/ # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. FILE_PATTERNS = *.h -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should +# The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. +# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = @@ -649,716 +816,1110 @@ EXCLUDE_PATTERNS = # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). IMAGE_PATH = doc/ # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. REFERENCES_RELATION = YES -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = documentation -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a # standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. #HTML_STYLESHEET = doc/jrtplib.css -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be # written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [0,1..20]) -# that doxygen will group on one line in the generated HTML documentation. -# Note that a value of 0 will completely suppress the enum values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. -USE_INLINE_TREES = NO +ENUM_VALUES_PER_LINE = 4 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing -# MathJax, but it is strongly recommended to install a local copy of MathJax -# before deployment. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /