diff --git a/Makefile.am b/Makefile.am index 05a79515..f4f55e84 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,4 +7,4 @@ endif SUBDIRS = $(FCGI_SRC) src man -EXTRA_DIST = COPYING.FCGI doc windows docker +EXTRA_DIST = doc windows docker scripts diff --git a/README b/README index 137d5a8d..a3c7d9f3 100644 --- a/README +++ b/README @@ -338,7 +338,7 @@ and change the fastcgi_pass parameter in the above location configuration to poi ### Java Application Servers (Tomcat, Jetty, JBoss etc) -IIPImage can also be used with Java Application Servers such as Apache Tomcat, JBoss and Jetty. Simply add the JFastCGI jar file to your webapp and add the following to your web.xml configuration file in order to re-route FCGI requests to the IIPImage server on the specified port. +IIPImage can also be used with Java Application Servers such as [Apache Tomcat](https://tomcat.apache.org), JBoss and Jetty. Simply add the [JFastCGI](https://jfastcgi.org/) jar file to your webapp and add the following to your web.xml configuration file in order to re-route FCGI requests to the IIPImage server on the specified port. ``` diff --git a/doc/doxygen-html.conf b/doc/doxygen-html.conf index faf2bb9b..feadc5b5 100644 --- a/doc/doxygen-html.conf +++ b/doc/doxygen-html.conf @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = iipsrv -PROJECT_NUMBER = 1.1 +PROJECT_NUMBER = 1.2 PROJECT_BRIEF = "iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images" PROJECT_LOGO = doc/iip.png OUTPUT_DIRECTORY = doc diff --git a/COPYING.FCGI b/fcgi/COPYING.FCGI similarity index 100% rename from COPYING.FCGI rename to fcgi/COPYING.FCGI diff --git a/fcgi/LICENSE.TERMS b/fcgi/LICENSE.TERMS deleted file mode 100644 index 7e6bdfde..00000000 --- a/fcgi/LICENSE.TERMS +++ /dev/null @@ -1,28 +0,0 @@ -This FastCGI application library source and object code (the -"Software") and its documentation (the "Documentation") are -copyrighted by Open Market, Inc ("Open Market"). The following terms -apply to all files associated with the Software and Documentation -unless explicitly disclaimed in individual files. - -Open Market permits you to use, copy, modify, distribute, and license -this Software and the Documentation for any purpose, provided that -existing copyright notices are retained in all copies and that this -notice is included verbatim in any distributions. No written -agreement, license, or royalty fee is required for any of the -authorized uses. Modifications to this Software and Documentation may -be copyrighted by their authors and need not follow the licensing -terms described here. If modifications to this Software and -Documentation have new licensing terms, the new terms must be clearly -indicated on the first page of each file where they apply. - -OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE -SOFTWARE OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN -NO EVENT SHALL OPEN MARKET BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY -DAMAGES ARISING FROM OR RELATING TO THIS SOFTWARE OR THE -DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST PROFITS OR -LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS". -OPEN MARKET HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE OR -OTHERWISE ARISING OUT OF THIS SOFTWARE OR THE DOCUMENTATION. diff --git a/fcgi/Makefile.am b/fcgi/Makefile.am index 8192ca3b..b462c565 100644 --- a/fcgi/Makefile.am +++ b/fcgi/Makefile.am @@ -4,88 +4,7 @@ # $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $ # -SUBDIRS = libfcgi include #examples cgi-fcgi +SUBDIRS = libfcgi +#include #examples cgi-fcgi include_HEADERS = fcgi_config.h - -EXTRA_DIST = LICENSE.TERMS \ - Makefile.nt \ - cgi-fcgi/cgi-fcgi.mak \ - examples/authorizer.mak \ - examples/echo.mak \ - examples/echox.mak \ - examples/size.mak \ - examples/echo-cpp.mak \ - libfcgi/libfcgi.mak \ - images/aplib-hd.gif \ - images/divider.gif \ - images/fcgi-hd.gif \ - images/mail-hd.gif \ - images/navbar.gif \ - images/serv-hd.gif \ - images/words-hd.gif \ - include/fcgi_config_x86.h \ - java/FCGIGlobalDefs.java \ - java/FCGIInputStream.java \ - java/FCGIInterface.java \ - java/FCGIMessage.java \ - java/FCGIOutputStream.java \ - java/FCGIRequest.java \ - libfcgi/os_unix.c \ - libfcgi/os_win32.c \ - perl/ChangeLog \ - perl/FCGI.PL \ - perl/FCGI.XL \ - perl/MANIFEST \ - perl/Makefile.PL \ - perl/README \ - perl/aclocal.m4 \ - perl/configure \ - perl/configure.in \ - perl/echo.PL \ - perl/fcgi_config.h.in \ - perl/oldinterface.pod \ - perl/remote.PL \ - perl/threaded.PL \ - perl/typemap \ - perl/version.pm \ - Win32/FastCGI.dsw \ - Win32/authorizer.dsp \ - Win32/cgifcgi.dsp \ - Win32/echo-cpp.dsp \ - Win32/echo.dsp \ - Win32/echox.dsp \ - Win32/libfcgi.dsp \ - Win32/logdump.dsp \ - Win32/size.dsp \ - Win32/threaded.dsp \ - doc/FCGI_Accept.3 \ - doc/FCGI_Finish.3 \ - doc/FCGI_SetExitStatus.3 \ - doc/FCGI_StartFilterData.3 \ - doc/cgi-fcgi.1 \ - doc/fcgi-devel-kit.htm \ - doc/fcgi-java.htm \ - doc/fcgi-perf.htm \ - doc/fcgi-perl.htm \ - doc/fcgi-spec.html \ - doc/fcgi-tcl.htm \ - doc/omi-logo.gif \ - doc/overview.html \ - doc/www5-api-workshop.html \ - doc/fastcgi-prog-guide/ap_guida.htm \ - doc/fastcgi-prog-guide/ap_guide.htm \ - doc/fastcgi-prog-guide/apaman.htm \ - doc/fastcgi-prog-guide/ch1inta1.gif \ - doc/fastcgi-prog-guide/ch1intra.gif \ - doc/fastcgi-prog-guide/ch1intro.htm \ - doc/fastcgi-prog-guide/ch2c.htm \ - doc/fastcgi-prog-guide/ch3perl.htm \ - doc/fastcgi-prog-guide/ch4tcl.htm \ - doc/fastcgi-prog-guide/cover.htm \ - doc/fastcgi-prog-guide/covera.gif \ - doc/fastcgi-whitepaper/fastcgi.htm \ - doc/fastcgi-whitepaper/img00001.gif \ - doc/fastcgi-whitepaper/img00002.gif \ - doc/fastcgi-whitepaper/img00003.gif - diff --git a/fcgi/Win32/FastCGI.dsw b/fcgi/Win32/FastCGI.dsw deleted file mode 100644 index 114606da..00000000 --- a/fcgi/Win32/FastCGI.dsw +++ /dev/null @@ -1,164 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "authorizer"=".\authorizer.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "cgifcgi"=".\cgifcgi.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "config_h"=".\config_h.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "echo"=".\echo.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "echo_cpp"=".\echo-cpp.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "echox"=".\echox.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "libfcgi"=".\libfcgi.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name config_h - End Project Dependency -}}} - -############################################################################### - -Project: "logdump"=".\logdump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "size"=".\size.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Project: "threaded"=".\threaded.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libfcgi - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/fcgi/Win32/authorizer.dsp b/fcgi/Win32/authorizer.dsp deleted file mode 100644 index ed2fc5d9..00000000 --- a/fcgi/Win32/authorizer.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="authorizer" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=authorizer - 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 "authorizer.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 "authorizer.mak" CFG="authorizer - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "authorizer - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "authorizer - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "authorizer - 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 "..\examples\authorizer\Release" -# PROP Intermediate_Dir "..\examples\authorizer\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "authorizer - 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 "..\examples/authorizer/Debug" -# PROP Intermediate_Dir "..\examples/authorizer/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "authorizer - Win32 Release" -# Name "authorizer - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\examples\authorizer.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/cgifcgi.dsp b/fcgi/Win32/cgifcgi.dsp deleted file mode 100644 index c522a210..00000000 --- a/fcgi/Win32/cgifcgi.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="cgifcgi" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=cgifcgi - 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 "cgifcgi.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 "cgifcgi.mak" CFG="cgifcgi - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cgifcgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "cgifcgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "cgifcgi - 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 "..\cgi-fcgi\Release" -# PROP Intermediate_Dir "..\cgi-fcgi\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"..\cgi-fcgi\Release\cgi-fcgi.exe" /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "cgifcgi - 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 "../cgi-fcgi/Debug" -# PROP Intermediate_Dir "../cgi-fcgi/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"..\cgi-fcgi\Debug\cgi-fcgi.exe" /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "cgifcgi - Win32 Release" -# Name "cgifcgi - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\cgi-fcgi\cgi-fcgi.c" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/echo-cpp.dsp b/fcgi/Win32/echo-cpp.dsp deleted file mode 100644 index 7f44ebf7..00000000 --- a/fcgi/Win32/echo-cpp.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="echo_cpp" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=echo_cpp - 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 "echo-cpp.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 "echo-cpp.mak" CFG="echo_cpp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "echo_cpp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "echo_cpp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "echo_cpp - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "echo-cpp\Release" -# PROP BASE Intermediate_Dir "echo-cpp\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\examples\echo-cpp\Release" -# PROP Intermediate_Dir "..\examples\echo-cpp\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "echo_cpp - 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 "../examples/echo-cpp\Debug" -# PROP Intermediate_Dir "../examples/echo-cpp\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "echo_cpp - Win32 Release" -# Name "echo_cpp - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\examples\echo-cpp.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/echo.dsp b/fcgi/Win32/echo.dsp deleted file mode 100644 index d7e94103..00000000 --- a/fcgi/Win32/echo.dsp +++ /dev/null @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="echo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=echo - 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 "echo.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 "echo.mak" CFG="echo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "echo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "echo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "echo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "echo\Release" -# PROP BASE Intermediate_Dir "echo\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\examples\echo\Release" -# PROP Intermediate_Dir "..\examples\echo\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX- /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "echo - 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 "../examples/echo\Debug" -# PROP Intermediate_Dir "../examples/echo\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /GX- /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /map /debug /machine:IX86 /libpath:"..\libfcgi\Debug" -# SUBTRACT LINK32 /verbose - -!ENDIF - -# Begin Target - -# Name "echo - Win32 Release" -# Name "echo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\examples\echo.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/echox.dsp b/fcgi/Win32/echox.dsp deleted file mode 100644 index 77e7870f..00000000 --- a/fcgi/Win32/echox.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="echox" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=echox - 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 "echox.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 "echox.mak" CFG="echox - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "echox - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "echox - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "echox - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "echo-x\Release" -# PROP BASE Intermediate_Dir "echo-x\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\examples\echo-x\Release" -# PROP Intermediate_Dir "..\examples\echo-x\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX- /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"..\examples\echo-x\Release\echo-x.exe" /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "echox - 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 "../examples/echo-x\Debug" -# PROP Intermediate_Dir "../examples/echo-x\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /GX- /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"..\examples\echo-x\Debug\echo-x.exe" /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "echox - Win32 Release" -# Name "echox - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\examples\echo-x.c" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/libfcgi.dsp b/fcgi/Win32/libfcgi.dsp deleted file mode 100644 index 5839b919..00000000 --- a/fcgi/Win32/libfcgi.dsp +++ /dev/null @@ -1,175 +0,0 @@ -# Microsoft Developer Studio Project File - Name="libfcgi" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=libfcgi - 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 "libfcgi.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 "libfcgi.mak" CFG="libfcgi - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libfcgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libfcgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "libfcgi - 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 "..\libfcgi\Release" -# PROP Intermediate_Dir "..\libfcgi\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /O2 /Ob2 /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "LIBFCGI_EXPORTS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 Ws2_32.lib /nologo /dll /pdb:none /machine:I386 -# SUBTRACT LINK32 /verbose /nodefaultlib - -!ELSEIF "$(CFG)" == "libfcgi - 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 "..\libfcgi\Debug" -# PROP Intermediate_Dir "..\libfcgi\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "LIBFCGI_EXPORTS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Ws2_32.lib /nologo /dll /profile /map /debug /machine:I386 -# SUBTRACT LINK32 /verbose /nodefaultlib - -!ENDIF - -# Begin Target - -# Name "libfcgi - Win32 Release" -# Name "libfcgi - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\libfcgi\fcgi_stdio.c -# End Source File -# Begin Source File - -SOURCE=..\libfcgi\fcgiapp.c -# End Source File -# Begin Source File - -SOURCE=..\libfcgi\fcgio.cpp - -!IF "$(CFG)" == "libfcgi - Win32 Release" - -# ADD CPP /GX - -!ELSEIF "$(CFG)" == "libfcgi - Win32 Debug" - -# ADD CPP /W3 /GX - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\libfcgi\os_unix.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=..\libfcgi\os_win32.c -# End Source File -# Begin Source File - -SOURCE=..\libfcgi\strerror.c -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\include\fastcgi.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgi_config.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgi_config_x86.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgi_stdio.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgiapp.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgimisc.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgio.h -# End Source File -# Begin Source File - -SOURCE=..\include\fcgios.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/logdump.dsp b/fcgi/Win32/logdump.dsp deleted file mode 100644 index 4d0074d6..00000000 --- a/fcgi/Win32/logdump.dsp +++ /dev/null @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="logdump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=logdump - 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 "logdump.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 "logdump.mak" CFG="logdump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "logdump - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "logdump - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "logdump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "log-dump\Release" -# PROP BASE Intermediate_Dir "log-dump\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\examples\log-dump\Release" -# PROP Intermediate_Dir "..\examples\log-dump\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX- /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"..\examples\log-dump\Release\log-dump.exe" /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "logdump - 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 "../examples/log-dump\Debug" -# PROP Intermediate_Dir "../examples/log-dump\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /GX- /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"..\examples\log-dump\Debug\log-dump.exe" /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "logdump - Win32 Release" -# Name "logdump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\examples\log-dump.c" -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/size.dsp b/fcgi/Win32/size.dsp deleted file mode 100644 index 9bafd29a..00000000 --- a/fcgi/Win32/size.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="size" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=size - 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 "size.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 "size.mak" CFG="size - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "size - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "size - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "size - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "size\Release" -# PROP BASE Intermediate_Dir "size\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\examples\size\Release" -# PROP Intermediate_Dir "..\examples\size\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX- /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "size - 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 "../examples/size\Debug" -# PROP Intermediate_Dir "../examples/size\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /GX- /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "size - Win32 Release" -# Name "size - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\examples\size.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/Win32/threaded.dsp b/fcgi/Win32/threaded.dsp deleted file mode 100644 index bce22686..00000000 --- a/fcgi/Win32/threaded.dsp +++ /dev/null @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="threaded" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=threaded - 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 "threaded.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 "threaded.mak" CFG="threaded - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "threaded - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "threaded - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "threaded - 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 "..\examples\threaded\Release" -# PROP Intermediate_Dir "..\examples\threaded\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gi /GX /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libfcgi.lib /nologo /pdb:none /machine:IX86 /libpath:"..\libfcgi\Release" - -!ELSEIF "$(CFG)" == "threaded - 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 "..\examples/threaded/Debug" -# PROP Intermediate_Dir "..\examples/threaded/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W4 /Gm /Gi /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libfcgi.lib /nologo /profile /debug /machine:IX86 /libpath:"..\libfcgi\Debug" - -!ENDIF - -# Begin Target - -# Name "threaded - Win32 Release" -# Name "threaded - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\examples\threaded.c -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/fcgi/acinclude.m4 b/fcgi/acinclude.m4 deleted file mode 100644 index ab199359..00000000 --- a/fcgi/acinclude.m4 +++ /dev/null @@ -1,391 +0,0 @@ -dnl $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ - -AC_DEFUN(FCGI_COMMON_CHECKS, [ - AC_CHECK_TYPE([ssize_t], [int]) - - AC_MSG_CHECKING([for sun_len in sys/un.h]) - AC_EGREP_HEADER([sun_len], [sys/un.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SOCKADDR_UN_SUN_LEN], [1], - [Define if sockaddr_un in sys/un.h contains a sun_len component])], - AC_MSG_RESULT([no])) - - AC_MSG_CHECKING([for fpos_t in stdio.h]) - AC_EGREP_HEADER([fpos_t], [stdio.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FPOS], [1], - [Define if the fpos_t typedef is in stdio.h])], - AC_MSG_RESULT([no])) - - AC_CHECK_HEADERS([sys/socket.h netdb.h netinet/in.h arpa/inet.h]) - AC_CHECK_HEADERS([sys/time.h limits.h sys/param.h unistd.h]) - - AC_MSG_CHECKING([for a fileno() prototype in stdio.h]) - AC_EGREP_HEADER([fileno], [stdio.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FILENO_PROTO], [1], - [Define if there's a fileno() prototype in stdio.h])], - AC_MSG_RESULT([no])) - - if test "$HAVE_SYS_SOCKET_H"; then - AC_MSG_CHECKING([for socklen_t in sys/socket.h]) - AC_EGREP_HEADER([socklen_t], [sys/socket.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SOCKLEN], [1], - [Define if the socklen_t typedef is in sys/socket.h])], - AC_MSG_RESULT([no])) - fi - - #-------------------------------------------------------------------- - # Do we need cross-process locking on this platform? - #-------------------------------------------------------------------- - AC_MSG_CHECKING([whether cross-process locking is required by accept()]) - case "`uname -sr`" in - IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) - AC_MSG_RESULT([yes]) - AC_DEFINE([USE_LOCKING], [1], - [Define if cross-process locking is required by accept()]) - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac - - #-------------------------------------------------------------------- - # Does va_arg(arg, long double) crash the compiler? - # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler) - #-------------------------------------------------------------------- - AC_MSG_CHECKING([whether va_arg(arg, long double) crashes the compiler]) - AC_TRY_COMPILE([#include ], - [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);], - AC_MSG_RESULT([no]), - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_VA_ARG_LONG_DOUBLE_BUG], [1], - [Define if va_arg(arg, long double) crashes the compiler])]) - - AC_C_CONST -]) - - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl This macro figures out how to build C programs using POSIX -dnl threads. It sets the PTHREAD_LIBS output variable to the threads -dnl library and linker flags, and the PTHREAD_CFLAGS output variable -dnl to any special C compiler flags that are needed. (The user can also -dnl force certain compiler flags/libs to be tested by setting these -dnl environment variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl If you are only building threads programs, you may wish to -dnl use these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE -dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands -dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, -dnl the default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, -dnl or if you have any other suggestions or comments. This macro was -dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org) -dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread -dnl macros posted by AFC to the autoconf macro repository. We are also -dnl grateful for the helpful feedback of numerous users. -dnl -dnl @version $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ -dnl @author Steven G. Johnson and Alejandro Forero Cuervo - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -acx_pthread_ok=no - -# First, check if the POSIX threads header, pthread.h, is available. -# If it isn't, don't bother looking for the threads libraries. -AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader) - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - AC_MSG_CHECKING([for joinable pthread attribute]) - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_JOINABLE;], - ok=PTHREAD_CREATE_JOINABLE, ok=unknown) - if test x"$ok" = xunknown; then - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_UNDETACHED;], - ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) - fi - if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then - AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, - [Define to the necessary symbol if this constant - uses a non-standard name on your system.]) - fi - AC_MSG_RESULT(${ok}) - if test x"$ok" = xunknown; then - AC_MSG_WARN([we do not know how to create joinable pthreads]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; - *solaris* | alpha*-osf*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with cc_r - AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi - -])dnl ACX_PTHREAD - - - -dnl @synopsis AC_PROG_CC_WARNINGS([ANSI]) -dnl -dnl Enables a reasonable set of warnings for the C compiler. Optionally, -dnl if the first argument is nonempty, turns on flags which enforce and/or -dnl enable proper ANSI C if such flags are known to the compiler used. -dnl -dnl Currently this macro knows about GCC, Solaris C compiler, -dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler, -dnl and IRIX C compiler. -dnl -dnl @version $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ -dnl @author Ville Laurikari -dnl -AC_DEFUN([AC_PROG_CC_WARNINGS], [ - ansi=$1 - if test -z "$ansi"; then - msg="for C compiler warning flags" - else - msg="for C compiler warning and ANSI conformance flags" - fi - AC_CACHE_CHECK($msg, ac_cv_prog_cc_warnings, [ - if test -n "$CC"; then - cat > conftest.c <&1 | grep "Xc.*strict ANSI C" > /dev/null 2>&1 && - $CC -c -v -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-v" - else - ac_cv_prog_cc_warnings="-v -Xc" - fi - - dnl HP-UX C compiler - elif $CC > /dev/null 2>&1 && - $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="+w1" - else - ac_cv_prog_cc_warnings="+w1 -Aa" - fi - - dnl Digital Unix C compiler - elif ! $CC > /dev/null 2>&1 && - $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos" - else - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1" - fi - - dnl C for AIX Compiler - elif $CC > /dev/null 2>&1 | grep AIX > /dev/null 2>&1 && - $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" - else - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi" - fi - - dnl IRIX C compiler - elif $CC -fullwarn -ansi -ansiE > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-fullwarn" - else - ac_cv_prog_cc_warnings="-fullwarn -ansi -ansiE" - fi - - fi - rm -f conftest.* - fi - if test -n "$ac_cv_prog_cc_warnings"; then - CFLAGS="$CFLAGS $ac_cv_prog_cc_warnings" - else - ac_cv_prog_cc_warnings="unknown" - fi - ]) -]) - - diff --git a/fcgi/cgi-fcgi/cgi-fcgi.mak b/fcgi/cgi-fcgi/cgi-fcgi.mak deleted file mode 100644 index c5b58d15..00000000 --- a/fcgi/cgi-fcgi/cgi-fcgi.mak +++ /dev/null @@ -1,206 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on cgifcgi.dsp - -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "cgifcgi.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\cgi-fcgi\Release -INTDIR=.\..\cgi-fcgi\Release -# Begin Custom Macros -OutDir=.\..\cgi-fcgi\Release -# End Custom Macros - -ALL : "$(OUTDIR)\cgi-fcgi.exe" - -CLEAN : - -@erase "$(INTDIR)\cgi-fcgi.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\cgi-fcgi.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\cgifcgi.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\cgifcgi.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\cgi-fcgi.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\cgi-fcgi.obj" \ - "..\libfcgi\Release\libfcgi.lib" - -"$(OUTDIR)\cgi-fcgi.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\../cgi-fcgi/Debug -INTDIR=.\../cgi-fcgi/Debug -# Begin Custom Macros -OutDir=.\../cgi-fcgi/Debug -# End Custom Macros - -ALL : "$(OUTDIR)\cgi-fcgi.exe" "$(OUTDIR)\cgifcgi.bsc" - -CLEAN : - -@erase "$(INTDIR)\cgi-fcgi.obj" - -@erase "$(INTDIR)\cgi-fcgi.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\cgi-fcgi.exe" - -@erase "$(OUTDIR)\cgifcgi.bsc" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\cgifcgi.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\cgifcgi.bsc" -BSC32_SBRS= \ - "$(INTDIR)\cgi-fcgi.sbr" - -"$(OUTDIR)\cgifcgi.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"$(OUTDIR)\cgi-fcgi.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\cgi-fcgi.obj" \ - "..\libfcgi\Debug\libfcgi.lib" - -"$(OUTDIR)\cgi-fcgi.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -"..\cgi-fcgi\cgi-fcgi.c" : \ - "..\include\fastcgi.h"\ - "..\include\fcgi_config.h"\ - "..\include\fcgiapp.h"\ - "..\include\fcgimisc.h"\ - "..\include\fcgios.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE="..\cgi-fcgi\cgi-fcgi.c" - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\cgi-fcgi.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\cgi-fcgi.obj" "$(INTDIR)\cgi-fcgi.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!ENDIF - diff --git a/fcgi/configure b/fcgi/configure deleted file mode 100755 index af83652d..00000000 --- a/fcgi/configure +++ /dev/null @@ -1,11250 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. -# -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# 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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# 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: 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 - - # 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. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\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 sensible 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= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -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='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 - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="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="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 - - -# Find the correct PATH separator. Usually this is `:', but -# DJGPP uses `;' like DOS. -if test "X${PATH_SEPARATOR+set}" != Xset; then - UNAME=${UNAME-`uname 2>/dev/null`} - case X$UNAME in - *-DOS) lt_cv_sys_path_separator=';' ;; - *) lt_cv_sys_path_separator=':' ;; - esac - PATH_SEPARATOR=$lt_cv_sys_path_separator -fi - - -# 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 && - 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. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - 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="$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 - - - -# 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_config_libobj_dir=. -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= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot 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 CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB EGREP LIBTOOL CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE LIBFCGIXX ECHO_CPP PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS THREADED LIBOBJS SYSTEM LTLIBOBJS' -ac_subst_files='' - -# 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. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -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' - -ac_prev= -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -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 | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$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" ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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 ;; - - -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 ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - 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 ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - 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 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 -do - eval ac_val=$`echo $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; }; };; - esac -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 - - -# 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 || -$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 - 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 - { (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 - { (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 - -# -# 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 \`..'] - -_ACEOF - - cat <<_ACEOF -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] - --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] -_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] - --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors - --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-libtool-lock avoid locking (might break parallel builds) - -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 - -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 - CPPFLAGS C/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 - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -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 - 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 - -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 -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - 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 - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -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 -fi -exec 5>config.log -cat >&5 <<_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.57. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -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` -hostinfo = `(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 - -} >&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_sep= -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_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - 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: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -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, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "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" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - 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 && - rm -rf 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 -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >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 -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 -fi -for ac_site_file in $CONFIG_SITE; 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 `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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.7" -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 -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. - -# 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" -# ./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/* | \ - /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 $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. - : - 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 - - -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 - # break other packages using the cache if that directory is - # removed, or if the path is relative. - 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 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 - -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 $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 - -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 dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(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 -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 - 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=fcgi - VERSION=2.4.0 - - -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"} - - -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 -# 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 $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 - -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 $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 - - 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 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -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. - - - - - ac_config_headers="$ac_config_headers fcgi_config.h" - - -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 $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 - -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 $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 - -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 - - CC=$ac_ct_CC -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 $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 - -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 -else - 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 -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 $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 - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 - 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 $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 - -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 -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 $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 - -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 - - CC=$ac_ct_CC -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` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&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_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_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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" >&5 -echo $ECHO_N "checking for C compiler default output... $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 - 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 -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. - ;; - [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 - break;; - * ) - break;; - esac -done -else - 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 -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 -# 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' - { (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 - 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 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 - 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 | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - 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 -#line $LINENO "configure" -/* 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 { (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 - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) 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 -#line $LINENO "configure" -/* 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 { (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_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_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f 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 -CFLAGS="-g" -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 -#line $LINENO "configure" -/* 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 { (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_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_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -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 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 $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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; -} -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 -# 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__" -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>&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_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -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 ;; - *) - 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" ;; -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>&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 \ - ''\ - '#include ' \ - '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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -$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>&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.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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>&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.$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.$ac_objext 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 -DEPDIR="${am__leading_dot}deps" - - ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -doit: - @echo done -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 or --disable-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 - - - - -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 - - 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 - # 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. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}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=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ - >/dev/null 2>conftest.err && - grep conftest.h 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 - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' 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 - - -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 -#line $LINENO "configure" -/* 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 { (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_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 -#line $LINENO "configure" -/* 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 { (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_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 - -# 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" -# ./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/* | \ - /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 $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. - : - 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 - - -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 - # break other packages using the cache if that directory is - # removed, or if the path is relative. - 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' - -# Check whether --enable-shared or --disable-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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_shared=yes -fi; -# Check whether --enable-static or --disable-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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_static=yes -fi; -# Check whether --enable-fast-install or --disable-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. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_fast_install=yes -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;} - { (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_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { 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;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -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 -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;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -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/'` - - -# Find the correct PATH separator. Usually this is `:', but -# DJGPP uses `;' like DOS. -if test "X${PATH_SEPARATOR+set}" != Xset; then - UNAME=${UNAME-`uname 2>/dev/null`} - case X$UNAME in - *-DOS) lt_cv_sys_path_separator=';' ;; - *) lt_cv_sys_path_separator=':' ;; - esac - PATH_SEPARATOR=$lt_cv_sys_path_separator -fi - - -# Check whether --with-gnu-ld or --without-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 GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $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. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path 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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - 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 GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$lt_cv_path_LD" -if test -n "$LD"; then - 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 -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 ld's only accept -v. -if $LD -v 2>&1 &5; then - lt_cv_prog_gnu_ld=yes -else - lt_cv_prog_gnu_ld=no -fi -fi -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 -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 -test -n "$reload_flag" && reload_flag=" $reload_flag" - -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 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/${ac_tool_prefix}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 - if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then - lt_cv_path_NM="$tmp_nm -B" - break - elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - lt_cv_path_NM="$tmp_nm -p" - break - else - 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 - fi - fi - done - IFS="$ac_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi - -NM="$lt_cv_path_NM" -echo "$as_me:$LINENO: result: $NM" >&5 -echo "${ECHO_T}$NM" >&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 - # 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_executable_p="test -f" -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_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" - fi - done - done -done - - # Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} -{ - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=$TMPDIR/sed$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 - { (exit 1); exit 1; } -} - _max=0 - _count=0 - # Add /usr/xpg4/bin/sed as it is typically found on Solaris - # along with /bin/sed that truncates output. - for _sed in $_sed_list /usr/xpg4/bin/sed; do - test ! -f ${_sed} && break - cat /dev/null > "$tmp/sed.in" - _count=0 - echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" - # Check for GNU sed and select it if it is found. - if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then - lt_cv_path_SED=${_sed} - break - fi - while true; do - cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" - mv "$tmp/sed.tmp" "$tmp/sed.in" - cp "$tmp/sed.in" "$tmp/sed.nl" - echo >>"$tmp/sed.nl" - ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break - cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break - # 40000 chars as input seems more than enough - test $_count -gt 10 && break - _count=`expr $_count + 1` - if test $_count -gt $_max; then - _max=$_count - lt_cv_path_SED=$_sed - fi - done - done - rm -rf "$tmp" - -fi - -if test "X$SED" != "X"; then - lt_cv_path_SED=$SED -else - SED=$lt_cv_path_SED -fi -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&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 -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 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 - 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 egrep 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 - ;; - -bsdi4*) - 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* | mingw* | pw32*) - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' - lt_cv_file_magic_cmd='/usr/bin/file -L' - case "$host_os" in - rhapsody* | darwin1.[012]) - lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` - ;; - *) # Darwin 1.3 on - lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' - ;; - esac - ;; - -freebsd*) - 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_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_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - irix5* | nonstopux*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" - ;; - esac - lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux-gnu*) - case $host_cpu in - alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM - 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` - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' - 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 - ;; - -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' - else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' - fi - ;; - -osf3* | osf4* | osf5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' - lt_cv_file_magic_test_file=/shlib/libc.so - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - lt_cv_file_magic_test_file=/lib/libc.so - ;; - -sysv5uw[78]* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - 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 - ;; - esac - ;; -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 - - - - - - - - -# 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" >&5 -echo $ECHO_N "checking command to parse $NM output... $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 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_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_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 - lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris* | sysv5*) - symcode='[BDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $host_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. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTW]' -fi - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' 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_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{ -EOF - sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$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="$save_LIBS" - CFLAGS="$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 - -global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" -if test -z "$lt_cv_sys_global_symbol_pipe"; then - global_symbol_to_cdecl= - global_symbol_to_c_name_address= -else - global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" - global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" -fi -if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; -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 egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_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' - 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: 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 -#line $LINENO "configure" -/* 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 { (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_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_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 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 -#line $LINENO "configure" -/* 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 -#line $LINENO "configure" -/* 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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#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)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./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 - : -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 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 eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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_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 - 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 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 -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 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 - 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 -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 -#line $LINENO "configure" -/* 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 { (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_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.$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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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 - 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_c_preproc_warn_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 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 preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - 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: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_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 $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 - -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 - - - - - - -# 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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. - ;; - *) - ac_save_MAGIC_CMD="$MAGIC_CMD" - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="/usr/bin:$PATH" - for ac_dir in $ac_dummy; do - 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="$ac_save_ifs" - MAGIC_CMD="$ac_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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. - ;; - *) - ac_save_MAGIC_CMD="$MAGIC_CMD" - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="/usr/bin:$PATH" - for ac_dir in $ac_dummy; do - 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="$ac_save_ifs" - MAGIC_CMD="$ac_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 - -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 $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 - -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 $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 - - 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 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_ct_RANLIB -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 $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 - -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 $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 - - 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 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - - -enable_dlopen=no -enable_win32_dll=no - -# Check whether --enable-libtool-lock or --disable-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 -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 4650 "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 - 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 - 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 -#line $LINENO "configure" -/* 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 { (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); } && - { 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 - 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 conftest.$ac_objext 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 - ;; - - -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//' -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' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" -need_locks="$enable_libtool_lock" - -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 "$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 "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -if test x"$host" != x"$build"; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case $host_os in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -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 - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -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="\$RANLIB \$oldlib~$old_postinstall_cmds" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$as_me:$LINENO: result: $objdir" >&5 -echo "${ECHO_T}$objdir" >&6 - - - -# Check whether --with-pic or --without-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 - -# We assume here that the value for lt_cv_prog_cc_pic will not be cached -# in isolation, and that seeing it set (from the cache) indicates that -# the associated values are set (in the cache) correctly too. -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 "${lt_cv_prog_cc_pic+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_cc_pic= - lt_cv_prog_cc_shlib= - lt_cv_prog_cc_wl= - lt_cv_prog_cc_static= - lt_cv_prog_cc_no_builtin= - lt_cv_prog_cc_can_build_shared=$can_build_shared - - if test "$GCC" = yes; then - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static='-static' - - case $host_os in - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # not sure about C++ programs. - lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" - ;; - 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_cv_prog_cc_pic='-fno-common' - ;; - cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_cv_prog_cc_pic=-Kconform_pic - fi - ;; - *) - lt_cv_prog_cc_pic='-fPIC' - ;; - esac - else - # PORTME Check for PIC flags for the system compiler. - case $host_os in - aix3* | aix4* | aix5*) - lt_cv_prog_cc_wl='-Wl,' - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_cv_prog_cc_static='-Bstatic' - else - lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - hpux9* | hpux10* | hpux11*) - # Is there a better lt_cv_prog_cc_static that works with the bundled CC? - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" - lt_cv_prog_cc_pic='+Z' - ;; - - irix5* | irix6* | nonstopux*) - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' - ;; - - newsos6) - lt_cv_prog_cc_pic='-KPIC' - lt_cv_prog_cc_static='-Bstatic' - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - lt_cv_prog_cc_wl='-Wl,' - lt_cv_prog_cc_static='-non_shared' - ;; - - sco3.2v5*) - lt_cv_prog_cc_pic='-Kpic' - lt_cv_prog_cc_static='-dn' - lt_cv_prog_cc_shlib='-belf' - ;; - - solaris*) - lt_cv_prog_cc_pic='-KPIC' - lt_cv_prog_cc_static='-Bstatic' - lt_cv_prog_cc_wl='-Wl,' - ;; - - sunos4*) - lt_cv_prog_cc_pic='-PIC' - lt_cv_prog_cc_static='-Bstatic' - lt_cv_prog_cc_wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_cv_prog_cc_pic='-KPIC' - lt_cv_prog_cc_static='-Bstatic' - lt_cv_prog_cc_wl='-Wl,' - ;; - - uts4*) - lt_cv_prog_cc_pic='-pic' - lt_cv_prog_cc_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_cv_prog_cc_pic='-Kconform_pic' - lt_cv_prog_cc_static='-Bstatic' - fi - ;; - - *) - lt_cv_prog_cc_can_build_shared=no - ;; - esac - fi - -fi - -if test -z "$lt_cv_prog_cc_pic"; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 -else - echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 -echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 - - # Check to make sure the pic_flag actually works. - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 - if test "${lt_cv_prog_cc_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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_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 - case $host_os in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then - # they create non-PIC objects. So, if there were any warnings, we - # assume that PIC is not supported. - if test -s conftest.err; then - lt_cv_prog_cc_pic_works=no - else - lt_cv_prog_cc_pic_works=yes - fi - ;; - *) - lt_cv_prog_cc_pic_works=yes - ;; - esac - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_prog_cc_pic_works=no - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" - -fi - - - if test "X$lt_cv_prog_cc_pic_works" = Xno; then - lt_cv_prog_cc_pic= - lt_cv_prog_cc_can_build_shared=no - else - lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" - fi - - echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 -echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 -fi - -# Check for any special shared library compilation flags. -if test -n "$lt_cv_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no - fi -fi - -echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 -if test "${lt_cv_prog_cc_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_cc_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { 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 - lt_cv_prog_cc_static_works=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi - - -# Belt *and* braces to stop my trousers falling down: -test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= -echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 -echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 - -pic_flag="$lt_cv_prog_cc_pic" -special_shlib_compile_flags="$lt_cv_prog_cc_shlib" -wl="$lt_cv_prog_cc_wl" -link_static_flag="$lt_cv_prog_cc_static" -no_builtin_flag="$lt_cv_prog_cc_no_builtin" -can_build_shared="$lt_cv_prog_cc_can_build_shared" - - -# Check to see if options -o and -c are simultaneously supported by compiler -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_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -$rm -r conftest 2>/dev/null -mkdir conftest -cd conftest -echo "int some_variable = 0;" > conftest.$ac_ext -mkdir out -# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -# that will create temporary files in the current directory regardless of -# the output directory. Thus, making CWD read-only will cause this test -# to fail, enabling locking or at least warning the user not to do parallel -# builds. -chmod -w . -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" -compiler_c_o=no -if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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_compiler_c_o=no - else - lt_cv_compiler_c_o=yes - fi -else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - lt_cv_compiler_c_o=no -fi -CFLAGS="$save_CFLAGS" -chmod u+w . -$rm conftest* out/* -rmdir out -cd .. -rmdir conftest -$rm -r conftest 2>/dev/null - -fi - -compiler_c_o=$lt_cv_compiler_c_o -echo "$as_me:$LINENO: result: $compiler_c_o" >&5 -echo "${ECHO_T}$compiler_c_o" >&6 - -if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 - if test "${lt_cv_compiler_o_lo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - lt_cv_compiler_o_lo=no - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - save_objext="$ac_objext" - ac_objext=lo - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -int some_variable = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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 - # 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_cv_compiler_o_lo=no - else - lt_cv_compiler_o_lo=yes - fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - ac_objext="$save_objext" - CFLAGS="$save_CFLAGS" - -fi - - compiler_o_lo=$lt_cv_compiler_o_lo - echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 -echo "${ECHO_T}$compiler_o_lo" >&6 -else - compiler_o_lo=no -fi - -# Check to see if we can do hard links to lock some files if needed -hard_links="nottested" -if test "$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 - -if test "$GCC" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - 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 "int some_variable = 0;" > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" - compiler_rtti_exceptions=no - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -int some_variable = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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 - # 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 - compiler_rtti_exceptions=no - else - compiler_rtti_exceptions=yes - fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" - echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$compiler_rtti_exceptions" >&6 - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi -fi - -# See if the linker supports building shared libraries. -echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 - -allow_undefined_flag= -no_undefined_flag= -need_lib_prefix=unknown -need_version=unknown -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -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_into_libs=no -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= -link_all_deplibs=unknown -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 egrep regular expression 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= - -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 - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # 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*) - # On AIX, the GNU linker is very broken - # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. - 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 - ;; - - 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 use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': 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*) - # 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=yes - - extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ - sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ - test -f $output_objdir/impgen.exe || (cd $output_objdir && \ - if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ - else $CC -o impgen impgen.c ; fi)~ - $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' - - # cygwin and mingw dlls have different entry points and sets of symbols - # to exclude. - # FIXME: what about values for MSVC? - dll_entry=__cygwin_dll_entry@12 - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ - case $host_os in - mingw*) - # mingw values - dll_entry=_DllMainCRTStartup@12 - dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ - ;; - esac - - # mingw and cygwin differ, and it's simplest to just exclude the union - # of the two symbol sets. - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 - - # recent cygwin and mingw systems supply a stub DllMain which the user - # can override, but on older systems we have to supply one (in ltdll.c) - if test "x$lt_cv_need_dllmain" = "xyes"; then - ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " - ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ - test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' - else - ltdll_obj= - ltdll_cmds= - fi - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left be newer dlltools. - export_symbols_cmds="$ltdll_cmds"' - $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' - - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is. - # If DATA tags from a recent dlltool are present, honour them! - 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; - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \$# in - 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; - 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; - *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done; - fi~ - '"$ltdll_cmds"' - $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ - $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ - $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' - ;; - - 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep '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 | egrep ': 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 - ;; - - 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 | egrep ': 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" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw* | pw32*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - 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 "$link_static_flag"; 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 - 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. - - hardcode_direct=yes - archive_cmds='' - hardcode_libdir_separator=':' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - 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=yes - 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' - else - # not using gcc - if test "$host_cpu" = ia64; then - shared_flag='${wl}-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 can do strange things, 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' - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' - 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" - 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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='${wl}-berok' - # This is a bit strange, but 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 ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $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 - ;; - - 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 - # 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"`' - ;; - - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - allow_undefined_flag='-flat_namespace -undefined suppress' - ;; - esac - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. Also zsh mangles - # `"' quotes if we put them in here... so don't! - archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' - # We need to add '_' to the symbols in $export_symbols first - #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' - hardcode_direct=yes - hardcode_shlibpath_var=no - whole_archive_flag_spec='-all_load $convenience' - ;; - - 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*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case $host_os in - hpux9*) 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' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - 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' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - 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='-rpath $libdir' - fi - 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*) - 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' - 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 - ;; - - 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 "-exported_symbol " >> $lib.exp; echo "\$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' - - #Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - 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 - export_dynamic_flag_spec='${wl}-Bexport' - ;; - - solaris*) - # gcc --version < 3.0 without binutils cannot create self contained - # shared libraries reliably, requiring libgcc.a to resolve some of - # the object symbols generated in some cases. Libraries that use - # assert need libgcc.a to resolve __eprintf, for example. Linking - # a copy of libgcc.a into every shared library to guarantee resolving - # such symbols causes other problems: According to Tim Van Holder - # , C++ libraries end up with a separate - # (to the application) exception stack for one thing. - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - case `$CC --version 2>/dev/null` in - [12].*) - cat <&2 - -*** Warning: Releases of GCC earlier than version 3.0 cannot reliably -*** create self contained shared libraries on Solaris systems, without -*** introducing a dependency on libgcc.a. Therefore, libtool is disabling -*** -no-undefined support, which will at least allow you to build shared -*** libraries. However, you may find that when you link such libraries -*** into an application without using GCC, you have to manually add -*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to -*** upgrade to a newer version of GCC. Another option is to rebuild your -*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. - -EOF - no_undefined_flag= - ;; - esac - fi - # $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='-R$libdir' - 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='-z allextract$convenience -z defaultextract' ;; - 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' - ;; - - 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= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - 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.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5uw7* | 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' - else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - 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 - -# Check hardcoding attributes. -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"; 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 "$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 - -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 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -reload_cmds='$LD$reload_flag -o $output$reload_objs' -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -# PORTME Fill in your ld.so characteristics -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= -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" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$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}.so$major ${libname}${release}.so$versuffix $libname.so' - 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}.so$versuffix ${libname}${release}.so$major $libname.so' - 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}.so$major' - fi - shlibpath_var=LIBPATH - fi - hardcode_into_libs=yes - ;; - -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}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$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" - export_dynamic_flag_spec=-rdynamic - # 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 - need_version=no - need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin*) - library_names_spec='$libname.dll.a' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' - postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog .libs/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - ;; - yes,mingw*) - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` - ;; - yes,pw32*) - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' - ;; - *) - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $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 - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. - library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' - soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - 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}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - *) - 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}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$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. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # 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 ;; - *) version_type=irix ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") 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}" - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$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 - - # 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}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - 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 - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - 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" - hardcode_into_libs=yes - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$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 - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -*) - 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 - -# Report the final consequences. -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*) - 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 - -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 - -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 - -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 - ;; - - cygwin* | mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - *) - 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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* 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>&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.$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 -#line $LINENO "configure" -/* 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>&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.$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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* 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>&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.$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 -#line $LINENO "configure" -/* 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>&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.$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 -#line $LINENO "configure" -/* 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>&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 - -ac_cv_lib_svld_dlopen=no -fi -rm -f 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 -#line $LINENO "configure" -/* 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 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>&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 - -ac_cv_lib_dld_dld_link=no -fi -rm -f 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 - - -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" - 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); */ - } - - 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* - - -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 - 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 - -#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); */ - } - - 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* - - -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 - - -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 - if test "${lt_cv_archive_cmds_need_lc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - $rm conftest* - echo 'static int dummy;' > 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 - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_cv_prog_cc_wl - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - 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 - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi -fi - - echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 -echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 - ;; - esac -fi -need_lc=${lt_cv_archive_cmds_need_lc-yes} - -# The second 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 - : -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. - test -f Makefile && make "$ltmain" -fi - -if test -f "$ltmain"; then - trap "$rm \"${ofile}T\"; exit 1" 1 2 15 - $rm -f "${ofile}T" - - echo creating $ofile - - # 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 SED \ - AR AR_FLAGS CC LD LN_S NM SHELL \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ - postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ - old_striplib striplib file_magic_cmd export_symbols_cmds \ - deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - global_symbol_to_c_name_address \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case $var in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_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 - - cat <<__EOF__ > "${ofile}T" -#! $SHELL - -# `$echo "$ofile" | 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-2000 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., 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. - -# A sed that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -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 - -# ### 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=$need_lc - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# The default C compiler. -CC=$lt_CC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# 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=$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_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_pic_flag -pic_mode=$pic_mode - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_compiler_c_o - -# Can we write directly to a .lo ? -compiler_o_lo=$lt_compiler_o_lo - -# 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_link_static_flag - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_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 to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# 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_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_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 - -# 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.so 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 - -# 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="$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 >> "${ofile}T" - -# 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 - - case $host_os in - cygwin* | mingw* | pw32* | os2*) - cat <<'EOF' >> "${ofile}T" - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments -# /* 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 */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments -# /* impgen.c starts here */ -# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -# -# This file is part of GNU libtool. -# -# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# */ -# -# #include /* for printf() */ -# #include /* for open(), lseek(), read() */ -# #include /* for O_RDONLY, O_BINARY */ -# #include /* for strdup() */ -# -# /* O_BINARY isn't required (or even defined sometimes) under Unix */ -# #ifndef O_BINARY -# #define O_BINARY 0 -# #endif -# -# static unsigned int -# pe_get16 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[2]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 2); -# return b[0] + (b[1]<<8); -# } -# -# static unsigned int -# pe_get32 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[4]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 4); -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# static unsigned int -# pe_as32 (ptr) -# void *ptr; -# { -# unsigned char *b = ptr; -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# int -# main (argc, argv) -# int argc; -# char *argv[]; -# { -# int dll; -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -# unsigned long export_rva, export_size, nsections, secptr, expptr; -# unsigned long name_rvas, nexp; -# unsigned char *expdata, *erva; -# char *filename, *dll_name; -# -# filename = argv[1]; -# -# dll = open(filename, O_RDONLY|O_BINARY); -# if (dll < 1) -# return 1; -# -# dll_name = filename; -# -# for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; -# -# pe_header_offset = pe_get32 (dll, 0x3c); -# opthdr_ofs = pe_header_offset + 4 + 20; -# num_entries = pe_get32 (dll, opthdr_ofs + 92); -# -# if (num_entries < 1) /* no exports */ -# return 1; -# -# export_rva = pe_get32 (dll, opthdr_ofs + 96); -# export_size = pe_get32 (dll, opthdr_ofs + 100); -# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -# secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); -# -# expptr = 0; -# for (i = 0; i < nsections; i++) -# { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } -# } -# -# expdata = (unsigned char*)malloc(export_size); -# lseek (dll, expptr, SEEK_SET); -# read (dll, expdata, export_size); -# erva = expdata - export_rva; -# -# nexp = pe_as32 (expdata+24); -# name_rvas = pe_as32 (expdata+32); -# -# printf ("EXPORTS\n"); -# for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) - - mv -f "${ofile}T" "$ofile" || \ - (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") - chmod +x "$ofile" -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 - - - -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 -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 - 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 $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 - -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 $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 $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 - -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 -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - - CXX=$ac_ct_CXX -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` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&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_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_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 -#line $LINENO "configure" -/* 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 { (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_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_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f 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 -CXXFLAGS="-g" -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 -#line $LINENO "configure" -/* 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 { (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_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_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cxx_g=no -fi -rm -f 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 \ - ''\ - '#include ' \ - '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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -$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>&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.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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>&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.$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 - -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 - -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 - - 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 - # 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. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}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=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ - >/dev/null 2>conftest.err && - grep conftest.h 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 - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' 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 - - - -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 - - -echo "$as_me:$LINENO: checking whether $CXX works" >&5 -echo $ECHO_N "checking whether $CXX works... $ECHO_C" >&6 - -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -std::cout << "ok"; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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 - LIBFCGIXX=libfcgi++.la - ECHO_CPP=echo-cpp${EXEEXT} - echo "$as_me:$LINENO: checking whether cin has a streambuf assignment operator" >&5 -echo $ECHO_N "checking whether cin has a streambuf assignment operator... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -cin = static_cast(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOSTREAM_WITHASSIGN_STREAMBUF 1 -_ACEOF - -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.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking whether char_type is defined in the context of streambuf" >&5 -echo $ECHO_N "checking whether char_type is defined in the context of streambuf... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -class fcgi_streambuf : public std::streambuf { char_type ct; } - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STREAMBUF_CHAR_TYPE 1 -_ACEOF - -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.$ac_objext conftest.$ac_ext -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.$ac_objext 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 - - - -echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 gethostbyname (); -int -main () -{ -gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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_nsl_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_nsl_gethostbyname=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 -if test $ac_cv_lib_nsl_gethostbyname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 socket (); -int -main () -{ -socket (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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_socket_socket=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_socket_socket=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 -if test $ac_cv_lib_socket_socket = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - - - -acx_pthread_ok=no - -# First, check if the POSIX threads header, pthread.h, is available. -# If it isn't, don't bother looking for the threads libraries. -if test "${ac_cv_header_pthread_h+set}" = set; then - echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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>&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.$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 pthread.h presence" >&5 -echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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_c_preproc_warn_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 in - yes:no ) - { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 - -fi -if test $ac_cv_header_pthread_h = yes; then - : -else - acx_pthread_ok=noheader -fi - - - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 pthread_join (); -int -main () -{ -pthread_join (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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 - acx_pthread_ok=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6 - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 -echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6 - ;; - - -*) - echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 -echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6 - PTHREAD_CFLAGS="$flag" - ;; - - *) - echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 -echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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 - acx_pthread_ok=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6 - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 -echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -int attr=PTHREAD_CREATE_JOINABLE; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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 - ok=PTHREAD_CREATE_JOINABLE -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ok=unknown -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - if test x"$ok" = xunknown; then - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -int attr=PTHREAD_CREATE_UNDETACHED; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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 - ok=PTHREAD_CREATE_UNDETACHED -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ok=unknown -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<\_ACEOF -#define PTHREAD_CREATE_JOINABLE $ok -_ACEOF - - fi - echo "$as_me:$LINENO: result: ${ok}" >&5 -echo "${ECHO_T}${ok}" >&6 - if test x"$ok" = xunknown; then - { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 -echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} - fi - - echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 -echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6 - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; - *solaris* | alpha*-osf*) flag="-D_REENTRANT";; - esac - echo "$as_me:$LINENO: result: ${flag}" >&5 -echo "${ECHO_T}${flag}" >&6 - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with cc_r - # Extract the first word of "cc_r", so it can be a program name with args. -set dummy cc_r; 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_PTHREAD_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_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_PTHREAD_CC="cc_r" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 -echo "${ECHO_T}$PTHREAD_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -else - PTHREAD_CC="$CC" -fi - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - THREADED=threaded${EXEEXT} - : -else - acx_pthread_ok=no - -fi - - - - - - echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 -if test "${ac_cv_type_ssize_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((ssize_t *) 0) - return 0; -if (sizeof (ssize_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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_cv_type_ssize_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_ssize_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 -if test $ac_cv_type_ssize_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - - - echo "$as_me:$LINENO: checking for sun_len in sys/un.h" >&5 -echo $ECHO_N "checking for sun_len in sys/un.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 "sun_len" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKADDR_UN_SUN_LEN 1 -_ACEOF - -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - - echo "$as_me:$LINENO: checking for fpos_t in stdio.h" >&5 -echo $ECHO_N "checking for fpos_t in stdio.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 "fpos_t" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FPOS 1 -_ACEOF - -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - - - - - -for ac_header in sys/socket.h netdb.h netinet/in.h arpa/inet.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 - 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 -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 -#line $LINENO "configure" -/* 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 { (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_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.$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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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 - 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_c_preproc_warn_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 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 preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - 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: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_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 $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 - -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 - - - - - -for ac_header in sys/time.h limits.h sys/param.h unistd.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 - 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 -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 -#line $LINENO "configure" -/* 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 { (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_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.$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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -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 - 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_c_preproc_warn_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 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 preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - 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: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_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 $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 - -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 - - - echo "$as_me:$LINENO: checking for a fileno() prototype in stdio.h" >&5 -echo $ECHO_N "checking for a fileno() prototype in stdio.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 "fileno" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FILENO_PROTO 1 -_ACEOF - -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - - if test "$HAVE_SYS_SOCKET_H"; then - echo "$as_me:$LINENO: checking for socklen_t in sys/socket.h" >&5 -echo $ECHO_N "checking for socklen_t in sys/socket.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 "socklen_t" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKLEN 1 -_ACEOF - -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - fi - - #-------------------------------------------------------------------- - # Do we need cross-process locking on this platform? - #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking whether cross-process locking is required by accept()" >&5 -echo $ECHO_N "checking whether cross-process locking is required by accept()... $ECHO_C" >&6 - case "`uname -sr`" in - IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define USE_LOCKING 1 -_ACEOF - - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac - - #-------------------------------------------------------------------- - # Does va_arg(arg, long double) crash the compiler? - # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler) - #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking whether va_arg(arg, long double) crashes the compiler" >&5 -echo $ECHO_N "checking whether va_arg(arg, long double) crashes the compiler... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VA_ARG_LONG_DOUBLE_BUG 1 -_ACEOF - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - - echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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_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_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_const=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - - - - -for ac_func in strerror -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -/* 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 $ac_func (); -/* 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_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { 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 - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" -fi -done - - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -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_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_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 -case $ac_cv_c_inline in - inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline -_ACEOF - ;; -esac - - -#-------------------------------------------------------------------- -# This is a little hokie in that it avoids including config.guess -# and config.sub in the distribution, but its been working so far. -# Windows builds don't run configure so we should be safe fixing -# this to 'unix' (at least for now). -#-------------------------------------------------------------------- -SYSTEM=unix - - - - ansi= - if test -z "$ansi"; then - msg="for C compiler warning flags" - else - msg="for C compiler warning and ANSI conformance flags" - fi - echo "$as_me:$LINENO: checking $msg" >&5 -echo $ECHO_N "checking $msg... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_warnings+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test -n "$CC"; then - cat > conftest.c <&1 | grep "Xc.*strict ANSI C" > /dev/null 2>&1 && - $CC -c -v -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-v" - else - ac_cv_prog_cc_warnings="-v -Xc" - fi - - elif $CC > /dev/null 2>&1 && - $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="+w1" - else - ac_cv_prog_cc_warnings="+w1 -Aa" - fi - - elif ! $CC > /dev/null 2>&1 && - $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos" - else - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1" - fi - - elif $CC > /dev/null 2>&1 | grep AIX > /dev/null 2>&1 && - $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" - else - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi" - fi - - elif $CC -fullwarn -ansi -ansiE > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-fullwarn" - else - ac_cv_prog_cc_warnings="-fullwarn -ansi -ansiE" - fi - - fi - rm -f conftest.* - fi - if test -n "$ac_cv_prog_cc_warnings"; then - CFLAGS="$CFLAGS $ac_cv_prog_cc_warnings" - else - ac_cv_prog_cc_warnings="unknown" - fi - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_warnings" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_warnings" >&6 - - - ac_config_files="$ac_config_files Makefile cgi-fcgi/Makefile include/Makefile libfcgi/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 -# 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, don't put newlines in cache variables' values. -# 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. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *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" - ;; - esac; -} | - sed ' - t 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" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - 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}' - -# 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 - -DEFS=-DHAVE_CONFIG_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' -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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# 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 - - # 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. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\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;} - { (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 - # 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= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -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='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 - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="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="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 -# 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 - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -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 - -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, 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 - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -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.57, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -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" -_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 - ;; - *) # 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 ) - 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;; - -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;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - 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 $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 -fi - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS section. -# - -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "cgi-fcgi/Makefile" ) CONFIG_FILES="$CONFIG_FILES cgi-fcgi/Makefile" ;; - "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "libfcgi/Makefile" ) CONFIG_FILES="$CONFIG_FILES libfcgi/Makefile" ;; - "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "fcgi_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS fcgi_config.h" ;; - *) { { 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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - 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 to put 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. -$debug || -{ - trap 'exit_status=$?; rm -rf $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` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$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. -# - -# 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,@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 -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;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,@CPP@,$CPP,;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,@LN_S@,$LN_S,;t t -s,@ECHO@,$ECHO,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@EGREP@,$EGREP,;t t -s,@LIBTOOL@,$LIBTOOL,;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,@LIBFCGIXX@,$LIBFCGIXX,;t t -s,@ECHO_CPP@,$ECHO_CPP,;t t -s,@PTHREAD_CC@,$PTHREAD_CC,;t t -s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t -s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t -s,@THREADED@,$THREADED,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@SYSTEM@,$SYSTEM,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_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 - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -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 ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { 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 - -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 -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - 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; } -_ACEOF -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,@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_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; 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 ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # 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; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # 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 - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { 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; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -# Compute $ac_file's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $ac_file | $ac_file:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || -$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'`/stamp-h$_am_stamp_count -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'` - 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 - -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 -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - { 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 - # 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=`(dirname "$mf") 2>/dev/null || -$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 - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n -e '/^U = / s///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 -e ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //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=`(dirname "$file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir - 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 $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} - { (exit 1); exit 1; }; }; } - - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (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/fcgi/doc/FCGI_Accept.3 b/fcgi/doc/FCGI_Accept.3 deleted file mode 100644 index 65ff08ab..00000000 --- a/fcgi/doc/FCGI_Accept.3 +++ /dev/null @@ -1,128 +0,0 @@ -NAME - FCGI_Accept, FCGI_ToFILE, FCGI_ToFcgiStream - - fcgi_stdio compatibility library - -SYNOPSIS - #include "fcgi_stdio.h" - - int - FCGI_Accept(void); - - FILE * - FCGI_ToFILE(FCGI_FILE *); - - FCGI_Stream * - FCGI_ToFcgiStream(FCGI_FILE *); - - -DESCRIPTION - The FCGI_Accept function accepts a new request from the HTTP server - and creates a CGI-compatible execution environment for the request. - - If the application was invoked as a CGI program, the first - call to FCGI_Accept is essentially a no-op and the second - call returns -1. This causes a correctly coded FastCGI Responder - application to run a single request and exit, giving CGI - behavior. - - If the application was invoked as a FastCGI server, the first - call to FCGI_Accept indicates that the application has completed - its initialization and is ready to accept its first request. - Subsequent calls to FCGI_Accept indicate that the application has - completed processing its current request and is ready to accept a - new request. An application can complete the current request - without accepting a new one by calling FCGI_Finish(3); later, when - ready to accept a new request, the application calls FCGI_Accept. - - In completing the current request, FCGI_Accept may detect - errors, e.g. a broken pipe to a client who has disconnected - early. FCGI_Accept ignores such errors. An application - that wishes to handle such errors should explicitly call - fclose(stderr), then fclose(stdout); an EOF return from - either one indicates an error. - - If the environment variable FCGI_WEB_SERVER_ADDRS is set when - FCGI_Accept is called, it should contain a comma-separated list - of IP addresses. Each IP address is written as four decimal - numbers in the range [0..255] separated by decimal points. - (nslookup(8) translates the more familiar symbolic IP hostname - into this form.) So one legal binding for this variable is - - FCGI_WEB_SERVER_ADDRS=199.170.183.28,199.170.183.71 - - FCGI_Accept checks the peer IP address of each new connection for - membership in the list. If the check fails (including the - possibility that the connection didn't use TCP/IP transport), - FCGI_Accept closes the connection and accepts another one - (without returning in between). - - After accepting a new request, FCGI_Accept assigns new values - to the global variables stdin, stdout, stderr, and environ. - After FCGI_Accept returns, these variables have the same - interpretation as on entry to a CGI program. - - FCGI_Accept frees any storage allocated by the previous call - to FCGI_Accept. This has important consequences: - - DO NOT retain pointers to the environ array or any strings - contained in it (e.g. to the result of calling getenv(3)), - since these will be freed by the next call to FCGI_Finish or - FCGI_Accept. - - DO NOT use setenv(3) or putenv(3) to modify the environ array - created by FCGI_Accept, since this will either leak storage - or cause the next call to FCGI_Finish or FCGI_Accept to free - storage that should not be freed. - - If your application needs to use setenv or putenv to modify - the environ array, it should follow this coding pattern: - - char **savedEnviron, **requestEnviron; - int acceptStatus; - - savedEnviron = environ; - acceptStatus = FCGI_Accept(); - requestEnviron = environ; - environ = savedEnviron; - if(acceptStatus >= 0 && !FCGX_IsCGI()) { - /* - * requestEnviron points to name-value pairs in - * storage allocated by FCGI_Accept. OK to read, - * not OK to retain pointers -- make copies instead. - */ - } - /* - * OK to do setenv or putenv, but beware of storage leaks! - */ - - In addition to the standard CGI environment variables, the - environment variable FCGI_ROLE is always set to the role - of the current request. The roles currently defined are - RESPONDER, AUTHORIZER, and FILTER. - - In the FILTER role, the additional variables FCGI_DATA_LENGTH - and FCGI_DATA_LAST_MOD are also defined. See the manpage - FCGI_StartFilterData(3) for complete information. - - The macros FCGI_ToFILE and FCGI_ToFcgiStream are provided - to allow escape to native functions that use the types FILE or - FCGI_Stream. In the case of FILE, functions would have to - be separately compiled, since fcgi_stdio.h replaces the standard - FILE with FCGI_FILE. - - -RETURN VALUES - 0 for successful call, -1 for error (application should exit). - -SEE ALSO - FCGI_Finish(3) - FCGI_StartFilterData(3) - FCGI_SetExitStatus(3) - cgi-fcgi(1) - nslookup(8) - -HISTORY - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: FCGI_Accept.3,v 1.1.1.1 1997/09/16 15:36:25 stanleyg Exp $ diff --git a/fcgi/doc/FCGI_Finish.3 b/fcgi/doc/FCGI_Finish.3 deleted file mode 100644 index 93322532..00000000 --- a/fcgi/doc/FCGI_Finish.3 +++ /dev/null @@ -1,41 +0,0 @@ -NAME - FCGI_Finish - - fcgi_stdio compatibility library - -SYNOPSIS - #include "fcgi_stdio.h" - - void - FCGI_Finish(void); - - -DESCRIPTION - The FCGI_Finish function finishes the current request from the - HTTP server. The current request was started by the most recent - call to FCGI_Accept(3). - - FCGI_Finish allows an application to interleave other activities - with the processing of requests. In an extreme case, an - application would call FCGI_Finish to complete the current - request before exiting, e.g. to reclaim leaked storage. - - In completing the current request, FCGI_Finish may detect - errors, e.g. a broken pipe to a client who has disconnected - early. FCGI_Finish ignores such errors. An application - that wishes to handle such errors should explicitly call - fclose(stderr), then fclose(stdout); an EOF return from - either one indicates an error. - - FCGI_Finish frees any storage allocated by the most recent call - to FCGI_Accept. See FCGI_Accept(3) for warnings against retaining - pointers to this storage. - - -SEE ALSO - FCGI_Accept(3) - -HISTORY - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: FCGI_Finish.3,v 1.1.1.1 1997/09/16 15:36:25 stanleyg Exp $ diff --git a/fcgi/doc/FCGI_SetExitStatus.3 b/fcgi/doc/FCGI_SetExitStatus.3 deleted file mode 100644 index d0538ff8..00000000 --- a/fcgi/doc/FCGI_SetExitStatus.3 +++ /dev/null @@ -1,28 +0,0 @@ -NAME - FCGI_SetExitStatus - fcgi_stdio compatibility library - -SYNOPSIS - #include "fcgi_stdio.h" - - void - FCGI_SetExitStatus(int status); - - -DESCRIPTION - Sets the exit status for the current FastCGI request. - The exit status is the status code the request would have - exited with, had the request been run as a CGI program. - - You can call FCGI_SetExitStatus several times during a request; - the last call before the request ends determines the value. - -SEE ALSO - FCGI_Accept(3) - FCGI_StartFilterData(3) - cgi-fcgi(1) - -HISTORY - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: FCGI_SetExitStatus.3,v 1.1.1.1 1997/09/16 15:36:25 stanleyg Exp $ diff --git a/fcgi/doc/FCGI_StartFilterData.3 b/fcgi/doc/FCGI_StartFilterData.3 deleted file mode 100644 index 12ff2daf..00000000 --- a/fcgi/doc/FCGI_StartFilterData.3 +++ /dev/null @@ -1,52 +0,0 @@ -NAME - FCGI_StartFilterData - fcgi_stdio compatibility library - -SYNOPSIS - #include "fcgi_stdio.h" - - int - FCGI_StartFilterData(void); - - -DESCRIPTION - Enables a FastCGI Filter application to begin reading its filter - input data from stdin. - - In order to call FCGI_StartFilterData, the FastCGI - application should have been invoked in the Filter role - (getenv("FCGI_ROLE") == "FILTER"), and should have read - stdin to EOF, consuming the entire FCGI_STDIN data stream. - The call to FCGI_StartFilterData positions stdin at the - start of FCGI_DATA. - - If the preconditions are not met (e.g. the application has - not read stdin to EOF), FCGI_StartFilterData returns - a negative result, and the application will get EOF on attempts - to read from stdin. - - The application can determine the number of bytes available - on FCGI_DATA by performing atoi(getenv("FCGI_DATA_LENGTH")). - If fewer than this many bytes are delievered on stdin after - calling FCGI_StartFilterData, the application should perform - an application-specific error response. If the application - normally makes an update, most likely it should abort the update. - - The application can determine last modification time of the - filter input data by performing getenv("FCGI_DATA_LAST_MOD"). - This allows applications to perform caching based on last - modification time. - - -RETURN VALUES - 0 for successful call, < 0 for error. - -SEE ALSO - FCGI_Accept(3) - FCGI_SetExitStatus(3) - cgi-fcgi(1) - -HISTORY - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: FCGI_StartFilterData.3,v 1.1.1.1 1997/09/16 15:36:26 stanleyg Exp $ diff --git a/fcgi/doc/cgi-fcgi.1 b/fcgi/doc/cgi-fcgi.1 deleted file mode 100644 index 1af4d0ac..00000000 --- a/fcgi/doc/cgi-fcgi.1 +++ /dev/null @@ -1,113 +0,0 @@ -NAME - cgi-fcgi - bridge from CGI to FastCGI - -SYNOPSIS - cgi-fcgi -f cmdPath - cgi-fcgi -bind -connect connName - cgi-fcgi -start -connect connName appPath [nServers] - cgi-fcgi -connect connName appPath [nServers] - -DESCRIPTION - cgi-fcgi is a CGI/1.1 program that communicates with an - already-running FastCGI application in order to respond to an - HTTP request. cgi-fcgi is also capable of starting a FastCGI - application. - - When you invoke cgi-fcgi as - - cgi-fcgi -f cmdPath - - then cgi-fcgi opens the file at cmdPath and reads its - arguments from that file. cgi-fcgi will skip lines - that begin with the comment character #. The first - non-comment line should contain valid arguments in - one of the other three forms. - - The -f form of cgi-fcgi is designed for Unix systems - whose exec(2) family of system calls supports the execution of - command interpreter files. For instance, if a file with - execute permission contains the text - - #! /bin/cgi-fcgi -f - -connect /httpd/root/sock/app /httpd/root/bin/app - - the effect is the same as executing - - /bin/cgi-fcgi -connect /httpd/root/sock/app /httpd/root/bin/app - - When you invoke cgi-fcgi as - - cgi-fcgi -bind -connect connName - - the connName argument is either the path name of a Unix domain - listening socket or a host:port pair. If connName contains - a colon, it is assumed to be host:port. cgi-fcgi performs - a connect(2) using connName. If the connect succeeds, cgi-fcgi - forwards the CGI environment variables and stdin data to the - FastCGI application, and forwards the stdout and stderr data from - the application to cgi-fcgi's stdout (most likely connected to - a Web server). When the FastCGI application signals the end of - its response, cgi-fcgi flushes its buffers and - exits, and the Web server completes the http response. - - When you invoke cgi-fcgi as - - cgi-fcgi -start -connect connName appPath [nServers] - - then cgi-fcgi performs the function of starting one or more - FastCGI application processes. The connName argument specifies - either the path name of the Unix domain listening socket that - cgi-fcgi will create, or is "localhost:NNN" where NNN is the port - number of the TCP/IP listening socket that cgi-fcgi will create - on the local machine. (cgi-fcgi will not create processes - on remote machines.) After cgi-fcgi creates the listening socket, - it forks nServers copies of a process running the executable file - appPath. If nServers is omitted, the effect is as if the value "1" - had been specified. The processes share the single listening socket. - - When you invoke cgi-fcgi as - - cgi-fcgi -connect connName appPath [nServers] - - cgi-fcgi performs -bind and then, if necssary, performs -start - and repeats the -bind. That is, cgi-fcgi first operates as if - the command had been - - cgi-fcgi -bind -connect connName - - If the connect fails, cgi-fcgi tries - - cgi-fcgi -start -connect connName appPath [nServers] - - and finally retries - - cgi-fcgi -bind -connect connName - - In this form, cgi-fcgi does not support TCP/IP connections. - -ENVIRONMENT VARIABLES - The usual CGI ones, but they are not interpreted by cgi-fcgi. - -SEE ALSO - FGCI_accept(3) - -BUGS - cgi-fcgi doesn't generate useful HTTP responses in case of error, - and it generates no response at all when run as start-fcgi. - - On Digital UNIX 3.0 systems the implementation of Unix Domain - sockets does not work when such sockets are stored on NFS file - systems. Symptom: cgi-fcgi may core dump or may exit with - status 38. Work-around: store sockets in local file systems - (/tmp often works) or use TCP/IP. - - On AIX systems the implementation of listening sockets - does not support socket sharing, and the standard FastCGI - application libraries can't synchronize access to AIX listening - sockets. Work-around: Don't use the nServers argument on AIX. - -HISTORY - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: cgi-fcgi.1,v 1.1.1.1 1997/09/16 15:36:26 stanleyg Exp $ diff --git a/fcgi/doc/fastcgi-prog-guide/ap_guida.htm b/fcgi/doc/fastcgi-prog-guide/ap_guida.htm deleted file mode 100644 index 77d8c179..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ap_guida.htm +++ /dev/null @@ -1,322 +0,0 @@ - - - - - FastCGI Application Programmer's Guide - Index - - - - - [Top] [Prev] -

- [Next] [Bottom] -

-
-
- -
-

- Index
-

-
- -
-

- A -

-
-
-
- -
-
- applications in Tcl 19 -
-
- Authorizer applications 4 -
-
- -
-
- environment variables 6 -
-
- stdin and stderr 4 -
-
-
-
- -
-

- C -

-
-
-
- -
-
- C language, writing FastCGI applications in 11 -
-
- -
-

- E -

-
-
-
- -
-
- environment variables -
-
- -
-
- differences from CGI 6 -
-
- returned from Authorizer applications 4 -
-
- -
-
- examples -
-
- -
-
- responder application in C 13 -
-
- responder application in perl 18 -
-
- responder application in Tcl 20 -
-
- -
-
- exit status, of FastCGI application 24 -
-
- -
-

- F -

-
-
-
- -
-
- FastCGI -
-
- -
-
- 19 -
-
- applications in C 11 -
-
- applications in Perl 17 -
-
- differences from CGI 1 -
-
- -
-
- FCGI_DATA_LAST_MOD 23 -
-
- FCGI_DATA_LENGTH 23 -
-
- FCGI_DATA_LENGTH (in Filter applications) 6 -
-
- FCGI_ROLE 6, 22 -
-
- FCGI_SetExitStatus 24 -
-
- FCGI_StartFilterData 22 -
-
- fcgi_stdio library 11 -
-
- -
-
- location of 15 -
-
- manpages for 21 -
-
- -
-
- FCGI_ToFcgiStream 22 -
-
- FCGI_ToFILE 22 -
-
- fcgiapp library 11 -
-
- FILE_LAST_MOD (in Filter applications) 6 -
-
- Filter applications -
-
- -
-
- last modification time 23 -
-
- reading from stdin 23 -
-
-
-
- -
-

- G -

-
-
-
- -
-
- Great Circle (C garbage collector) 16 -
-
- -
-

- I -

-
-
-
- -
-
- Initial Environment Variables 5 -
-
- -
-

- M -

-
-
-
- -
-
- manpages 21 -
-
- memory leaks 16 -
-
- -
-

- P -

-
-
-
- -
-
- Perl -
-
- -
-
- writing FastCGI applications in 17 -
-
- -
-
- Purify (for checking storage leaks) 16 -
-
- -
-

- R -

-
-
-
- -
-
- response loop 5 -
-
- -
-
- in C 12 -
-
- in Perl 17 -
-
- in TCL 19 -
-
-
-
-
-
- [Top] [Prev] -

- [Next] [Bottom] -

-
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/ap_guide.htm b/fcgi/doc/fastcgi-prog-guide/ap_guide.htm deleted file mode 100644 index f0491204..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ap_guide.htm +++ /dev/null @@ -1,226 +0,0 @@ - - - - - FastCGI Programmer's Guide - Table of Contents - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -

- 1. The Fast Common Gateway Interface 1 -

-
-
- -
-
- Advantages of FastCGI 1 -
-
- -
-
- Long-lived Applications 1 -
-
- Separating Application and Server 2 -
-
- FastCGI "Roles" 2 -
-
- -
-
- Writing FastCGI Applications 4 -
-
- -
-
- Code Structure 5 -
-
- Initial Environment Variables 5 -
-
- Per-Request Environment Variables 6 -
-
- Building FastCGI Applications in C 6 -
-
- Building FastCGI Applications in Perl 7 -
-
- Building FastCGI Applications in Tcl 7 -
-
- -
-
- Implementation Details 7 -
-
- -
-
- The fcgi_stdio Library: I/O Compatibility 9 -
-
- The fcgi_stdio Library: Binary compatibility 10 -
-
-
-
-

- 2. Developing FastCGI Applications in C 11 -

-
-
- -
-
- The I/O Libraries 11 -
-
- Code Structure 12 -
-
- Example 1: TinyFastCGI 12 -
-
-
-
- Example 2: Prime Number Generator 13 -
-
- Building 15 -
-
- Memory Leaks 16 -
-
-

- 3. Developing FastCGI Applications in Perl 17 -

-
-
- -
-
- Getting Started 17 -
-
- Example: TinyFastCGI 18 -
-
-

- 4. Developing FastCGI Applications in Tcl 19 -

-
-
- -
-
- Getting Started 19 -
-
- Example: TinyFastCGI 20 -
-
-

- A. FastCGI Reference Pages 21 -

-
-
- -
-
- FCGI_Accept (3) 21 -
-
- -
-
- Name 21 -
-
- Synopsis 21 -
-
- Description 21 -
-
- Return Values 22 -
-
- -
-
- FCGI_StartFilterData (3) 22 -
-
- -
-
- Name 22 -
-
- Synopsis 22 -
-
- Description 23 -
-
- Return Values 23 -
-
- Example 23 -
-
- -
-
- FCGI_SetExitStatus(3) 24 -
-
- -
-
- Name 24 -
-
- Synopsis 24 -
-
- Description 24 -
-
-
-
-
-
- [Top] [Prev] [Next] [Bottom] -
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/apaman.htm b/fcgi/doc/fastcgi-prog-guide/apaman.htm deleted file mode 100644 index 8ff40cdf..00000000 --- a/fcgi/doc/fastcgi-prog-guide/apaman.htm +++ /dev/null @@ -1,290 +0,0 @@ - - - - - FCGI_Accept(2) Man Page - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -
-

- A FastCGI
- Reference Pages -

-
- -

- This appendix contains reference pages for the following FastCGI routines from the fcgi_stdio - library: -

-
-
-
    -
  • - -
  • -
  • - FCGI_Accept -
  • -
  • - FCGI_Start_Filter_Data -
  • -
  • - FCGI_SetExitStatus -
  • -
-

- FCGI_Accept (3) -

-

- Name -

- FCGI_Accept, FCGI_ToFILE, FCGI_ToFcgiStream -

- - fcgi_stdio compatibility library -

-
-
-

- Synopsis -

-
-#include <fcgi_stdio.h>
-
-int
- FCGI_Accept(void); -
-FILE *
- FCGI_ToFILE(FCGI_FILE *); -
-FCGI_Stream *
- FCGI_ToFcgiStream(FCGI_FILE *); -
-
-

- Description -

- -

- The FCGI_Accept function accepts a new request from the HTTP server and creates a CGI-compatible execution - environment for the request. -

-

- If the application was invoked as a CGI program, the first call to FCGI_Accept is - essentially a no-op and the second call returns -1. This causes a correctly coded FastCGI application to run a - single request and exit, giving CGI behavior. -

-

- If the application was invoked as a FastCGI server, the first call to FCGI_Accept - indicates that the application has completed its initialization and is ready to accept its first request. - Subsequent calls to FCGI_Accept indicate that the application has completed processing its current request and - is ready to accept a new request. -

-

- In completing the current request, FCGI_Accept may detect errors, such as a broken pipe - to a client who has disconnected early. FCGI_Accept ignores such errors. An application that wishes to handle - such errors should explicitly call fclose(stderr), then fclose(stdout); an EOF return from either one - indicates an error. -

-

- After accepting a new request, FCGI_Accept assigns new values to the global variables - stdin, stdout, stderr, and environ. After FCGI_Accept returns, these variables have the same interpretation as - on entry to a CGI program. -

-

- In addition to the standard CGI environment variables, the environment variable - FCGI_ROLE is always set to the role of the current request. The roles currently defined are - RESPONDER, AUTHORIZER, and FILTER. -

-

- In the FILTER role, the additional variables FCGI_DATA_LENGTH - and FCGI_DATA_LAST_MOD are also defined. See FCGI_StartFilterData(3) - for complete information. -

-

- The macros FCGI_ToFILE and FCGI_ToFcgiStream are provided to - allow escape to native functions that use the types FILE or FCGI_Stream. In the case - of FILE, functions would have to be separately compiled, since fcgi_stdio.h replaces - the standard FILE with FCGI_FILE. -

-
-
-

- Return Values -

- -

- 0 for successful call, -1 for error (application should exit). -

-
-
-

- FCGI_StartFilterData (3) -

-

- Name -

- FCGI_StartFilterData -

- -fcgi_stdio compatibility library -

-
-
-

- Synopsis -

-
-#include <fcgi_stdio.h>
-
-int FCGI_StartFilterData(void)
-
-
-

- Description -

- -

- Enables a FastCGI Filter application to begin reading its filter input data from stdin. -

-

- In order to call FCGI_StartFilterData, the FastCGI application should have - been invoked in the filter role (getenv("FCGI_ROLE") == "FILTER"), and should - have read stdin to EOF, consuming the entire FCGI_STDIN data stream. The call to - FCGI_StartFilterData positions stdin at the start of FCGI_DATA. -

-

- If the preconditions are not met (e.g., the application has not read stdin - to EOF), FCGI_StartFilterData returns a negative result, and the application will get EOF on - attempts to read from stdin. -

-

- The application can determine the number of bytes available on FCGI_DATA by - performing atoi(getenv("FCGI_DATA_LENGTH"). If fewer than this many bytes are delivered - on stdin after calling FCGI_StartFilterData, the application should perform an - application-specific error response. If the application normally makes an update, most likely it should abort - the update. -

-

- The application can determine last modification time of the filter input data by - performing getenv("FCGI_DATA_LAST_MOD"). This allows applications to perform caching - based on last modification time. -

-
-
-

- Return Values -

- -

- Returns 0 on success and a negative integer on failure. -

-
-
-

- Example -

- -

- The following example reads in all the client data, but ignores it. Then, the code calls - FCGI_StartFilterData. Finally, the code reads in the file to be filtered and simply echos it back - to the client. -

-
-
-
-while (FCGI_Accept() >= 0) {
-
-...
-
- /* Read data passed by client. */
-
-  while (getchar () != OF) 
-
-{
-
-}
-
-
-
- /* Adjust standard input stream. */
-
-  status = FCGI_StartFilterData();
-
-
-
- /* Read in filter data and echo it back to client. */
-
-  while ((len = fread(tempBuffer, 1, 1024, stdin)) > 0) 
-
-    fwrite(tempBuffer, 1, len, stdout);
-
-
-
-} /* End FCGI_Accept loop */
-
-
-

- FCGI_SetExitStatus(3) -

-

- Name -

- FCGI_SetExitStatus -

- - fcgi_stdio compatibility library -

-
-
-

- Synopsis -

-
-#include <fcgi_stdio.h>
-
-void FCGI_SetExitStatus(int status);
-
-
-

- Description -

- -

- Sets the exit status for the current FastCGI request. The exit status is the status code the request would - have exited with, had the request been run as a CGI program. -

-

- You can call FCGI_SetExitStatus several times during a request; the last - call before the request ends determines the value. -

-

- -

-

-

-
-
- [Top] [Prev] [Next] [Bottom] -
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/ch1inta1.gif b/fcgi/doc/fastcgi-prog-guide/ch1inta1.gif deleted file mode 100644 index 4111cc62..00000000 Binary files a/fcgi/doc/fastcgi-prog-guide/ch1inta1.gif and /dev/null differ diff --git a/fcgi/doc/fastcgi-prog-guide/ch1intra.gif b/fcgi/doc/fastcgi-prog-guide/ch1intra.gif deleted file mode 100644 index 5565f985..00000000 Binary files a/fcgi/doc/fastcgi-prog-guide/ch1intra.gif and /dev/null differ diff --git a/fcgi/doc/fastcgi-prog-guide/ch1intro.htm b/fcgi/doc/fastcgi-prog-guide/ch1intro.htm deleted file mode 100644 index 0132ffad..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ch1intro.htm +++ /dev/null @@ -1,581 +0,0 @@ - - - - - FastCGI Programmer's Guide - Chapter 1, The Fast Common Gateway Interface - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -
-

- 1 The Fast Common
- Gateway Interface -

-
- -

- The Fast Common Gateway Interface (FastCGI) is an enhancement to the existing CGI (Common Gateway Interface), - which is a standard for interfacing external applications with Web servers. -

-

- FastCGI is a proposed open standard and we expect both free and commercial Web servers to - support it. FastCGI is included in Open Market WebServer and Secure WebServer, versions 2.0 and greater. -

-
-
-

- Advantages of FastCGI -

- -

- FastCGI extends and enhances the CGI model in several ways: -

-
-
-
    -
  • - -
  • -
  • - FastCGI enables applications to persist between client requests, eliminating application start up overhead - and allowing the application to maintain state between client calls. -
  • -
  • - FastCGI enables applications to reside on remote systems (rather than having to reside on the same system - as the Web server) -
  • -
  • - FastCGI enables additional flexibility in application functionality, with explicit support for applications - that do client authentication and filtering of input. -
  • -
-

- Long-lived Applications -

- -

- CGI applications are ephemeral and short-lived: each time a client requests a CGI application, the server asks - the operating system to spawn a new CGI process. After the CGI process satisfies the request, the server kills - it. The server spawns and subsequently kills a new process for each client request. -

-

- FastCGI applications are long-lived, and can persist between client calls. The server - spawns the FastCGI process once and it continues to run and satisfy client requests until it is explicitly - terminated. You can also ask the Web server to start multiple copies of a FastCGI application, if you expect - that concurrent processing will improve the application's performance. -

-

- Long-lived applications have two important advantages over short-lived applications: -

-
-
-
    -
  • - -
  • -
  • - A short-lived application pays start up overhead on every request; a long-lived application spreads the - overhead over many requests. For an application that has a heavy start up cost, such as opening a database, - doing initialization on every call can be very inefficient. Reinitializing for every client is also very - inefficient for Perl programs, where the interpreter reads through the entire program before executing any - of it. -
  • -
  • - A long-lived application can cache information in memory between requests, allowing it to respond more - quickly to later requests. -
  • -
- -

- FastCGI is not the only way to get a long-lived application on the Web, however. For example, there are many - existing search engines that are implemented as long-lived applications. -

-

- In most cases, these applications rely on customized Web servers. In other words, since - most Web servers do not support long-lived applications, a programmer must code this support into a Web - server. This approach requires a tremendous amount of work and also ties the application to a particular - server. -

-

- Another way to get a long-lived application is to write code that calls routines from the - Web server's API. This alternative involves a lot of extra coding, ties the application to a particular - Web server, and introduces problems of maintainability, scalability, and security. -

-

- We believe that FastCGI is the most general and flexible strategy for building long-lived - Web applications. -

-
-
-

- Separating Application and Server -

- -

- CGI applications must run on the same node as the Web server; FastCGI applications can run on any node that - can be reached from your Web server using TCP/IP protocols. For example, you might want to run the FastCGI - application on a high-speed computer server or database engine, and run the Web server on a different node. -

-
-
-

- FastCGI "Roles" -

- -

- CGI and FastCGI applications are effective ways to allow an application to act as an extension to the Web - server. CGI provides no explicit support for different kinds of applications: under CGI, every application - receives an HTTP request, does something with it, and generates an HTTP response. FastCGI provides explicit - support for several common "roles" that applications can play. -

-

- The three roles supported by the WebServer 2.0 are: -

-
-
-
    -
  • - -
  • -
  • - Responder -
  • -
  • - Filter -
  • -
  • - Authorizer -
  • -
-

- Responder Applications -

- -

- A responder application is the most basic kind of FastCGI application: it receives the information - associated with an HTTP request and generates an HTTP response. Responder is the role most similar to - traditional CGI programming, and most FastCGI applications are responders. -

-
-
-

- Filter Applications -

- -

- A filter FastCGI application receives the information associated with an HTTP request, plus an extra - stream of data from a file stored on the Web server, and generates a "filtered" version of the data - stream as an HTTP response. -

-

- With filter applications, the system administrator maps a particular MIME-type to a - particular filter FastCGI application. When a client requests a URL with that MIME-type, the Web server - invokes the filter application, which processes the file at the specified URL and sends a response (usually - HTML text) back to the client. -

-

- For example, suppose you write a filter FastCGI application that converts SGML text to - HTML, and map the extension .sgml (MIME-type SGML) to your filter FastCGI application. Now, suppose that a - user requests the following URL: -

-
-
-
-/www.aerjug.com/docs/chap1.sgml
-
-
- -

- Given this URL, the Web server passes chap1.sgml as input to your filter FastCGI application, - which processes chap1.sgml and returns an HTML version of it to the requesting client. -

-
-
-

- Authorizer Applications -

- -

- An authorizer FastCGI application receives the information in an HTTP request header and generates a - decision whether to authorize the request. -

-

- To mark a FastCGI application as having the authorizer role, the system administrator - names the application inside the server configuration file, using a directive called - AuthorizeRegion. (See the Open Market Web Server manual for information on server configuration - directives.) -

-

- When a client requests a URL that meets the AuthorizeRegion criteria, the Web - server calls your authorizer FastCGI application. If your application grants authorization (by returning a - response code of 200), the Web server resumes execution of commands in the AuthorizeRegion - section. If your application denies authorization (by returning any other response code), the Web server stops - processing subsequent commands in the AuthorizeRegion section, and returns the response from your - FastCGI application to the client. -

-

- Authorizer applications can return headers containing environment variables. Other CGI or - FastCGI programs accessing this request (including other authorizers) can access these environment variables. - The headers must have the following format: -

-
-
-
-Variable-name: value
-
-
- -

- For example, the following header -

-
-
-
-Variable-AUTH_METHOD: database lookup
-
-
- -

- causes the environment variable AUTH_METHOD to be set to "database lookup" - for this request. Other CGI or FastCGI applications running on this request can access the value of - AUTH_METHOD. -

-

- Authorizer applications cannot successfully read from standard input. Any attempts to read - from standard input result in an immediate EOF. -

-

- All data that authorizer applications write to standard error will get written to the - traditional server error logs. -

-
-
-

- Writing FastCGI Applications -

- -

- The work involved in writing a FastCGI application depends in large part on the I/O libraries that you use. - This manual describes how to write FastCGI applications in terms of the Open Market libraries, which are - available for C, Perl, and Tcl. FastCGI is an open standard and you are welcome to build your own libraries - for other languages as well, but this manual focuses on building FastCGI applications in the context of the - Open Market libraries. -

-

- -

-

- In general, the goal of the libraries is to make the job of writing a FastCGI application - as much like writing a CGI application as possible. For example, you use the same techniques for query string - decoding, HTML output to stdout, use of environment variables, and so on. When you use our libraries, porting - CGI applications to FastCGI is mostly a matter of restructuring the code to take advantage of FastCGI features - and libraries. -

-
-
-

- Code Structure -

- -

- The main task of converting a CGI program into a FastCGI program is separating the initialization code from - the code that needs to run for each request. The structure should look something like this: -

-
-
-
-Initialization code
-
-Start of response loop
-
-   body of response loop
-
-End of response loop
-
-
- -

- The initialization code is run exactly once, when the application is initialized. Initialization code - usually performs time-consuming operations such as opening databases or calculating values for tables or - bitmaps. -

-

- The response loop runs continuously, waiting for client requests to arrive. The - loop starts with a call to FCGI_Accept, a routine in the FastCGI library. The - FCGI_Accept routine blocks program execution until a client requests the FastCGI application. - When a client request comes in, FCGI_Accept unblocks, runs one iteration of the response loop - body, and then blocks again waiting for another client request. The loop terminates only when the system - administrator or the Web server kills the FastCGI application. -

-
-
-

- Initial Environment Variables -

- -

- When a FastCGI process starts up, it has not yet accepted a request, and therefore none of the CGI environment - variables are set. -

-

- You set the initial environment of a FastCGI process started by the AppClass - directive using the -initial-env option. The process would use this environment to configure its - options and locate files or databases. -

-

- In FastCGI processes started by the AppClass directive with the -affinity - option, the FCGI_PROCESS_ID variable is set in the initial environment (not in the environment of - a request). FCGI_PROCESS_ID is a decimal number in the range 0 to N - 1 where N is the number of - processes (argument to the -processes option to AppClass). The process would use - FCGI_PROCESS_ID in conjunction with other variables to locate session-related files or databases - during restart. -

-
-
-

- Per-Request Environment Variables -

- -

- In general, FastCGI uses the same per-request environment variables as CGI, and you access the values of - environment variables in FastCGI applications just as you would in CGI applications. The only differences are - as follows: -

-
-
-
    -
  • - -
  • -
  • - In Authorizer FastCGI applications, the Web server unsets the PATH_INFO, - PATH_TRANSLATED, and CONTENT_LENGTH variables. -
  • -
  • - In Filter FastCGI applications, the Web server sets two additional environment variables: -
      -
    • - -
    • -
    • - FILE_LAST_MOD: The Web server sets FILE_LAST_MOD to the date and time that - filter input file was last modified. The format is the number of seconds since midnight (UTC), - January 1, 1970. -
    • -
    • - FCGI_DATA_LENGTH: The application reads at most FCGI_DATA_LENGTH bytes from - the data stream before receiving the end-of-stream indication. -
    • -
    - -
  • -
  • - FastCGI sets FCGI_ROLE for each request to RESPONDER, AUTHORIZER, or - FILTER. -
  • -
-

- Building FastCGI Applications in C -

- -

- The Software Development Toolkit that accompanies WebServer 2.0 contains two libraries, fcgi_stdio and - fcgiapp, for building FastCGI applications in C. -

-

- The fcgi_stdio library implements our philosophy of making FastCGI applications similar to - CGI applications, and provides full binary compatibility between FastCGI applications and CGI applications: - you can run the same C binary as either CGI or FastCGI. -

-

- The fcgiapp library is more specific to FastCGI, and doesn't attempt the veneer of - CGI. -

-

- We recommend that you use the fcgi_stdio library, and this manual describes the routines - in that library. The documentation for the fcgiapp library is in the code in the development kit. -

-
-
-

- Building FastCGI Applications in Perl -

- -

- To build FastCGI applications in Perl, you need a FastCGI-savvy version of Perl, plus the FastCGI extension to - Perl. We build FastCGI-savvy versions of the Perl interpreter for several common platforms and make them - available on our Website. For details and examples, see Chapter 3, "Developing - FastCGI Applications in Perl," on page 17. -

-
-
-

- Building FastCGI Applications in Tcl -

- -

- To build FastCGI applications in Tcl, you need a FastCGI-savvy version of Tcl. We build FastCGI-savvy versions - of the Tcl interpreter for several common platforms and make them available on our Website. For details and - examples, see Chapter 4, "Developing FastCGI Applications in Tcl," on page - 19. -

-
-
-

- Implementation Details -

- -

- The FastCGI application libraries are designed to shield you from the details of the FastCGI design. This - section is designed for the curious reader who would like some low-level understanding. If you are not curious - about the implementation, you can happily skip this section. -

-

- As shown in the following figure, CGI applications use the three standard POSIX streams - (stdin, stdout, and stderr), plus environment variables, to communicate - with an HTTP server. -

-

- error-file:TidyOut.log -

-

- -

-
-
-
- Figure 1: Flow of Data in CGI -
- -

- The fundamental difference between FastCGI and CGI is that FastCGI applications are long-lived, which means - that the Web Server needs to rendezvous with a running application, rather than starting the application in - order to explicitly communicate with it. -

-

- The FastCGI implementation basically creates a bidirectional connection between two - processes that have no relationship. FastCGI uses a single connection for all the data associated with an - application -- stdin, stdout, stderr, and environment variables. The data on the connection is encapsulated - using a FastCGI protocol that allows stdin and the environment variables to share the same half connection (on - the way in) and stdout and stderr to share the half connection (on the way out). -

-

- On the input side, the FastCGI application receives data on the connection, unpacks it to - separate stdin from the environment variables and then invokes the application. On the output side, FastCGI - wraps stdout and stderr with appropriate protocol headers, and sends the encapsulated data out to the server. -

-

- Since a FastCGI application does not always run on the same node as the HTTP server, we - support two implementations of the connection: a stream pipe1, for - communications on the same machine, and TCP streams, for communication when the client and the server are on - different machines. -

-

- error-file:TidyOut.log -

-
-
-
- Figure 2: Flow of Data in FastCGI when server and application are on different machines -
-

- The fcgi_stdio Library: I/O Compatibility -

- -

- The implementation for I/O compatibility is that the library fcgi_stdio.h contains macros to - translate the types and procedures defined in stdio.h into the appropriate FastCGI calls. For example, - consider a FastCGI program written in C containing the following line of code: -

-
-
-
-fprintf(stdout, "<H2>Aerobic Juggling</H2>/n");
-
-
- fcgi_stdio.h -

- header file contains the macro -

-
-
-
-#define fprintf FCGI_fprintf
-
-
- -

- So the preprocessor translates the fprintf call into the following call: -

-
-
-
-FCGI_fprintf(stdout, "<H2>Aerobic Juggling</H2>/n");
-
-
- FCGI_fprintf -

- takes the same arguments as fprintf. -

-

- The implementation of FCGI_fprintf tests the file to see if it is a normal C stream or a - FastCGI stream, and calls the appropriate implementation. -

-

- The fcgi_stdio.h header file contains macros to translate calls to all ISO - stdio.h routines (and all conventional Posix additions, such as fileno, fdopen, - popen, and pclose) into their FastCGI equivalents. -

-
-
-

- The fcgi_stdio Library: Binary compatibility -

- -

- The fcgi_stdio library provides full binary compatibility between FastCGI applications and CGI applications: - you can run the same C binary as either CGI or FastCGI. -

-

- The implementation is in FCGI_Accept: the FCGI_Accept function tests its environment to - determine whether the application was invoked as a CGI program or an FastCGI program. If it was invoked as a - CGI program, the request loop will satisfy a single client request and then exit, producing CGI behavior. -

-

- -

-

-

-
-
- [Top] [Prev] [Next] [Bottom] -
-
- 1 -

- UNIX Network Programming, W. Richard Stevens, 1990 Prentice-Hall, Section 7.9 -

-

- - - - - - -

- - - diff --git a/fcgi/doc/fastcgi-prog-guide/ch2c.htm b/fcgi/doc/fastcgi-prog-guide/ch2c.htm deleted file mode 100644 index 8e696973..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ch2c.htm +++ /dev/null @@ -1,379 +0,0 @@ - - - - - FastCGI Programmer's Guide - Chapter 2, Developing FastCGI Applications in C - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -
-

- 2 Developing FastCGI
- Applications in C -

-
- -

- This chapter explains how to code FastCGI applications in C and how to build them into executables. -

-

- If you are converting a CGI application into a FastCGI application, in many cases you will - only need to add a few lines of code. For more complex applications, you may also need to rearrange some code. -

-
-
-

- The I/O Libraries -

- -

- The FastCGI Software Development Kit that accompanies Open Market WebServer 2.0 includes I/O libraries to - simplify the job of converting existing CGI applications to FastCGI or writing new FastCGI applications. There - are two libraries in the kit: fcgi_stdio and fcgiapp. You must include one of these header files in your - program: -

-
-
-
    -
  • - -
  • -
  • - fcgi_stdio.h -
  • -
  • - fcgiapp.h -
  • -
- -

- The fcgi_stdio library is a layer on top of the fcgiapp library, and we recommend - strongly that you use it, both for converting existing CGI applications and for writing new FastCGI - applications. The fcgi_stdio library offers several advantages: -

-
-
-
    -
  • - -
  • -
  • - Simplicity: there are only 3 new API calls to learn -
  • -
  • - Familiarity: If you are converting a CGI application to FastCGI, you will find few changes between CGI and - FastCGI. We designed our library to make the job of building a FastCGI application as similar as possible - to that of building a FastCGI application: you use the same environment variables, same techniques for - parsing query strings, the same I/O routines, and so on. -
  • -
  • - Convenience: the library provides full binary compatibility between CGI and FastCGI. That is, you can run - the same binary as either CGI or FastCGI. -
  • -
- -

- The fcgiapp library is more specific to FastCGI, without trying to provide the veneer of familiarity with CGI. - This manual describes the fcgi_stdio library; the fcgiapp library is documented in the header files that - accompany the development kit. -

-
-
-

- Code Structure -

- -

- To structure code for FastCGI, you separate your code into two sections: -

-
-
-
    -
  • - -
  • -
  • - Initialization section, which is executed only once. -
  • -
  • - Response loop section, which gets executed every time the FastCGI script gets called. -
  • -
- -

- A response loop typically has the following format: -

-
-
-
-while (FCGI_Accept() >= 0) {
-
-# body of response loop
-
-}
-
-
- -

- The FCGI_Accept blocks until a client request comes in, and then returns 0. If there is a system - failure, or the system administrator terminates the process, Accept will return -1. -

-

- If the application was invoked as a CGI program, the first call to Accept returns 0 and - the second always returns -1, producing CGI behavior. (See "FCGI_Accept - (3)" on page 21 for details.) -

-

- Also note that the CGI world encourages small scripts, whereas FastCGI encourages - combining scripts. You may choose to rethink the overall structure of your applications to take better - advantage of FastCGI performance gains. -

-
-
-

- Example 1: TinyFastCGI -

- Here is a simple example of a responder FastCGI application written in C:
-
-
-#include "fcgi_stdio.h" /* fcgi library; put it first*/
-#include <stdlib.h> - -int count; - -void initialize(void) -{ - count=0; -} - -void main(void) -{ -/* Initialization. */ - initialize(); - -/* Response loop. */ - while (FCGI_Accept() >= 0) { - printf("Content-type: text/html\r\n" - "\r\n" - "<title>FastCGI Hello! (C, fcgi_stdio library)</title>" - "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>" - "Request number %d running on host <i>%s</i>\n", - ++count, getenv("SERVER_HOSTNAME")); - } -} -
-

- Example 2: Prime Number Generator -

- -

- Consider a responder application that generates the n-th prime number. -

-

- A CGI application would have no efficient way of solving this problem. For example, if the - user asks for the 50,000th prime number, a CGI application would have to calculate the first prime number, - then the second, and so on, up until the 50,000th. The application would then terminate, taking with it all - its hard-earned calculations. If a client then asks for the 49,000th prime number, the server will have to - spawn a new CGI application which will have to start calculating prime numbers from scratch. -

-

- FastCGI applications can be much more efficient at this sort of problem, since they can - maintain state. A FastCGI application can calculate an extensive table of prime numbers in its initialization - phase and then keep the table around indefinitely. Whenever a client requests a particular prime number, the - response loop merely needs to look it up in the table. -

-

- Here is the code for the prime number example: -

-
-
-
-#include "fcgi_stdio.h"
-#include <stdlib.h>
-#include <string.h>
-
-#define POTENTIALLY_PRIME 0
-#define COMPOSITE 1
-#define VALS_IN_SIEVE_TABLE 1000000
-#define MAX_NUMBER_OF_PRIME_NUMBERS 78600 
-
-/* All initialized to POTENTIALLY_PRIME */
-long int  sieve_table[VALS_IN_SIEVE_TABLE]; 
-long int  prime_table[MAX_NUMBER_OF_PRIME_NUMBERS];  
-/* Use Sieve of Erastothenes method of building 
-   a prime number table. */
-void
-initialize_prime_table(void)
-{
- long int prime_counter=1;
- long int current_prime=2, c, d; 
-  
-  prime_table[prime_counter]=current_prime;
-
-  while (current_prime < VALS_IN_SIEVE_TABLE)   {
-   /* Mark off composite numbers. */
-     for (c = current_prime; c <= VALS_IN_SIEVE_TABLE; 
-          c += current_prime)  {
-        sieve_table[c] = COMPOSITE;  
-     }
-
-   /* Find the next prime number. */
-     for (d=current_prime+1; sieve_table[d] == COMPOSITE; d++); 
-   /* Put the new prime number into the table. */ 
-     prime_table[++prime_counter]=d; 
-     current_prime=d;
-  }
-}
-
-
-void main(void)
-{
-    char *query_string;
-    long int n;
-
-    initialize_prime_table();
-
-    while(FCGI_Accept() >= 0) {
-        /*
-         * Produce the necessary HTTP header.
-         */
-        printf("Content-type: text/html\r\n"
-               "\r\n");
-        /*
-         * Produce the constant part of the HTML document.
-         */
-        printf("<title>Prime FastCGI</title>\n"
-               "<h1>Prime FastCGI</h1>\n");
-        /*
-         * Read the query string and produce the variable part
-         * of the HTML document.
-         */
-        query_string = getenv("QUERY_STRING");
-        if(query_string == NULL) {
-            printf("Usage: Specify a positive number in the query string.\n");
-        } else {
-            query_string = strchr(query_string, `=') + 1;
-            n = strtol(query_string);
-            if(n < 1) {
-                printf("The query string `%s' is not a positive number.\n",
-                       query_string);
-            } else if(n > MAX_NUMBER_OF_PRIME_NUMBERS) {
-                printf("The number %d is too large for this program.\n", n);
-            } else
-                printf("The %ldth prime number is %ld.\n", n, prime_table[n]);
-            }
-        }
-    } /* while FCGI_Accept */
-}
-
- -

- This application has a noticeable start up cost while it initializes the table, but subsequent accesses are - fast. -

-
-
-

- Building -

- -

- This section explains how to build and debug FastCGI applications written in C. -

-

- The C preprocessor needs to know the location of the fcgi_stdio.h header - file, which is at the following pathname: -

-
-
-
-$toolkit/include/fcgi_stdio.h
-
-
- -

- where $toolkit symbolizes the directory in which you have installed the Software Development Kit for - FastCGI. -

-

- The linker needs to know the location of the libfcgi.a library file, which is - at the following pathname: -

-
-
-
-$toolkit/libfcgi/libfcgi.a 
-
-
- -

- If your linker does not search the Berkeley socket library, then you must add linker directives to force this - search. -

-

- We provide a sample application Makefile at the following pathname: -

-
-
-
-$toolkit/examples/Makefile
-
-
- -

- This Makefile contains the necessary rules and pathnames to build the C FastCGI applications - accompanying the toolkit. To build all the applications, type: -

-
-
-
-$ ./configure
-$ make -
-
-

- Memory Leaks -

- -

- Memory leaks are seldom a problem in CGI programming because CGI applications rarely run long enough to be - concerned with leaks. However, memory leaks can become a problem in FastCGI applications, particularly if each - call to a popular FastCGI application causes additional memory to leak. -

-

- When converting to FastCGI, you can either use a tool such as Purify from Pure Software to - discover and fix storage leaks or you can run a C garbage collector such as Great Circle from Geodesic - Systems. -

-

- -

-

-

-
-
- [Top] [Prev] [Next] [Bottom] -
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/ch3perl.htm b/fcgi/doc/fastcgi-prog-guide/ch3perl.htm deleted file mode 100644 index e2a20e34..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ch3perl.htm +++ /dev/null @@ -1,151 +0,0 @@ - - - - - FastCGI Programmer's Guide - Chapter 3, Developing FastCGI Applications in Perl - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -
-

- 3 Developing FastCGI
- Applications in Perl -

-
- -

- This chapter explains how to code FastCGI applications in Perl. Before you can build FastCGI applications in - Perl, you must have a FastCGI-savvy version of the Perl interpreter. Open Market develops such Perl binaries - for popular platforms and makes them available with our developer's kit. -

-

- The FastCGI-savvy binaries are extensions of standard Perl, and are intended to replace - your existing Perl installation. There is no need to maintain two versions of Perl: the version that we supply - will work fine when invoked from a shell or a CGI program. There are also directions in the developer's - kit for how to make your own FastCGI-savvy Perl, if you need a version for some platform that we don't - supply. -

-

- FastCGI is ideal for applications written in Perl, because it provides a huge performance - gain. When you run a Perl script, the Perl interpreter analyzes the entire script before executing any of it. - With FastCGI, you can factor out this initialization cost and pay it only once, making execution of the actual - script much faster in response to client calls. -

-
-
-

- Getting Started -

- -

- The first line of any Perl script typically specifies the pathname of the Perl interpreter itself. You must - specify the pathname of a FastCGI-savvy Perl. -

-

- Next, you must tell Perl to load the FastCGI extension. To do so, place the following line - near the beginning of every FastCGI script: -

-
-
-
-use FCGI;
-
-
- -

- Then, you have to divide FastCGI scripts into the following two sections: -

-
-
-
    -
  • - -
  • -
  • - Initialization section, which is executed only once. -
  • -
  • - Response loop section, which gets executed every time the FastCGI script gets called. -
  • -
- -

- A response loop typically has the following format: -

-
-
-
-while (FCGI::accept >= 0) {
-
-# body of response loop
-
-}
-
-
- -

- The accept call returns 0 whenever a client requests the FastCGI script. Otherwise, the - accept call returns -1. -

-
-
-

- Example: TinyFastCGI -

- -

- Here is a simple example of a FastCGI application written in Perl: -

-
-
-
-
-#!fcgi-savvy-perl
-
-use FCGI; # Imports the library; required line
-
-# Initialization code
-
-$cnt = 0;
-
-# Response loop
-
-while (FCGI::accept >= 0) {
-  print "Content-type: text/html\r\n\r\n";
-  print "<head>\n<title>FastCGI Demo Page (perl)</title>\n</head>\n";
-  print  "<h1>FastCGI Demo Page (perl)</h1>\n";
-  print "This is coming from a FastCGI server.\n<BR>\n";
-  print "Running on <EM>$ENV{SERVER_NAME}</EM> to <EM>$ENV{REMOTE_HOST}</EM>\n<BR>\n";
-   $cnt++;
-  print "This is connection number $cnt\n";
-}
-
-

-

-
-
- [Top] [Prev] [Next] [Bottom] -
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/ch4tcl.htm b/fcgi/doc/fastcgi-prog-guide/ch4tcl.htm deleted file mode 100644 index 9a5f652d..00000000 --- a/fcgi/doc/fastcgi-prog-guide/ch4tcl.htm +++ /dev/null @@ -1,131 +0,0 @@ - - - - - FastCGI Programmer's Guide - Chapter 4, Developing FastCGI Applications in Tcl - - - - - [Top] [Prev] [Next] [Bottom] -
-
- -
-

- 4 Developing FastCGI
- Applications in Tcl -

-
- -

- This chapter explains how to code FastCGI applications in Tcl. Prior to creating a FastCGI application, you - must have a FastCGI-savvy version of the Tcl interpreter. Open Market develops Tcl binaries for popular - platforms and makes them available with our developer's kit. -

-

- The FastCGI-savvy binaries are extensions of standard Tcl, and are intended to replace - your existing Tcl installation. There is no need to maintain two versions of Tcl: the version that we supply - will work fine when invoked from a shell or a CGI program. There are also directions in the developer's - kit for how to make your own FastCGI-savvy Tcl, if you need a version for some platform that we don't - supply. -

-

- In many cases, you can convert a Tcl script from CGI to FastCGI by adding a few lines of - code to an existing script. For more complex scripts, you may also need to rearrange some existing code. -

-
-
-

- Getting Started -

- -

- The first line of any Tcl script typically specifies the pathname of the Tcl interpreter itself. You must - specify the pathname of a FastCGI-savvy Tcl. -

-

- Then, you have to divide FastCGI scripts into the following two sections: -

-
-
-
    -
  • - -
  • -
  • - Initialization section, which is executed only once. -
  • -
  • - Response loop section, which gets executed every time the FastCGI script gets called. -
  • -
- -

- A response loop typically has the following format: -

-
-
-
-while {[FCGI_Accept] >= 0 } {
-
-# body of response loop
-
-}
-
-
- -

- The FCGI_Accept call returns 0 whenever a client requests the FastCGI script. Otherwise, the - FCGI_Accept call returns -1. -

-
-
-

- Example: TinyFastCGI -

- -

- Here is a simple example of a FastCGI application written in Tcl: -

-
-
-
-
-#!fcgi-savvy-tcl
-
-set count 0
-
-# Response Loop
-while {[FCGI_Accept] >= 0 } {
-        incr count
-        puts -nonewline "Content-type: text/html\r\n\r\n"
-        puts "<title>FastCGI Hello! (Tcl)</title>"
-        puts "<h1>FastCGI Hello! (Tcl)</h1>"
-        puts "Request number $count running on host  <i>$env(SERVER_NAME)</i>"
-}
-
-

-

-
-
- [Top] [Prev] [Next] [Bottom] -
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/cover.htm b/fcgi/doc/fastcgi-prog-guide/cover.htm deleted file mode 100644 index 78c3006f..00000000 --- a/fcgi/doc/fastcgi-prog-guide/cover.htm +++ /dev/null @@ -1,119 +0,0 @@ - - - - - FastCGI Programmer's Guide - - - - -

- [Top] [Prev] [Next] [Bottom] -

-
-
- -

- Open Market FastCGI 1.0 -

- -

- Open Market, Inc.
- 245 First Street, Cambridge, MA 02142
- T: 617-621-9500 F: 617-252-3492 -

-
-
-

- error-file:TidyOut.log -

-

- Programmer's Guide -

-

- April 15, 1996 s p/n 42-10530-001 Rev. A -

-
-
- -

- OPEN MARKET, INC., PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR - PURPOSE. In no event shall Open Market be liable for any loss of profits, loss of business, loss of use of - data, interruption of business, or for indirect, special, incidental, or consequential damages of any kind, - even if Open Market has been advised of the possibility of such damages arising from any defect or error in - this publication. -

-

- -

-

- Open Market may revise this publication from time to time without notice. Some states or - jurisdictions do not allow disclaimer of express or implied warranties in certain transactions; therefore, - this statement may not apply to you. -

-

- -

-

- Copyright © 1996 Open Market, Inc. -

-

- -

-

- All rights reserved. -

-

- -

-

- Alpha/OSF is a trademark of Digital Equipment Corporation. -

-

- Digital UNIX is a trademark of Digital Equipment Corporation.
- BSD/386 is a trademark of Berkeley Software Design, Inc.
- BSD/OS is a trademark of Berkeley Software Design, Inc. -

-

- Great Circle is a trademark of Geodesic Systems, Inc.
- HP-UX is a trademark of Hewlett-Packard Co., Inc.
- IBM AIX is a trademark of International Business Machines, Inc.
- Word is a trademark of Microsoft Corporation.
- Netscape is a trademark of Netscape Communications Company.
- PostScript is a trademark of Adobe Systems Inc. -

-

- Purify is a trademark of Pure Software, Inc.
- SecureWeb is a trademark of Terisa Systems, Inc.
- HylaFAX is a trademark of Silicon Graphics, Inc.
- SGI IRIX is a trademark of Silicon Graphics, Inc.
- Solaris is a trademark of Sun Microsystems, Inc.
- SunOS is a trademark of Sun Microsystems, Inc.
- UNIX is a trademark of UNIX Systems Laboratories, Inc. -

-

- -

-

- Any other trademarks and product names used herein may be the trademarks of their - respective companies. -

-

- [Top] [Prev] [Next] [Bottom] -

-
-
- - - - - - - - - diff --git a/fcgi/doc/fastcgi-prog-guide/covera.gif b/fcgi/doc/fastcgi-prog-guide/covera.gif deleted file mode 100644 index c1012fd1..00000000 Binary files a/fcgi/doc/fastcgi-prog-guide/covera.gif and /dev/null differ diff --git a/fcgi/doc/fastcgi-whitepaper/fastcgi.htm b/fcgi/doc/fastcgi-whitepaper/fastcgi.htm deleted file mode 100644 index 13b419ba..00000000 --- a/fcgi/doc/fastcgi-whitepaper/fastcgi.htm +++ /dev/null @@ -1,833 +0,0 @@ - - - - FastCGI - - - - - - - - - -

- Open Market, Inc. -

-

-

-
- Technical White Paper
-
-

- FastCGI:
- A High-Performance Web Server Interface -

-

- April 1996 -

-
- -

- 1. Introduction -

-

- The surge in the use of the Web by business has created a tremendous need for server extension applications - that create dynamic content. These are the applications that will allow businesses to deliver products, - services, and messages whose shape and content are in part determined by the interaction with, and knowledge - of, the customers to which they are delivered. -

-

- This important movement away from static Web content is pushing the limits and exposing the weaknesses of the - environment in which these applications are currently bound: CGI (Common Gateway Interface). Most importantly - it does not offer the performance these applications require. A new communication infrastructure is needed to - connect Web servers with these new applications. This is what led Open Market to develop FastCGI. -

-

- FastCGI is a fast, open, and secure Web server interface that solves the performance problems inherent in CGI, - without introducing the overhead and complexity of proprietary APIs (Application Programming Interfaces). -

-

- This paper assumes that the reader has basic familiarity with Web technology and developing Web applications. -

-

- Common Gateway Interface -

-

- The de facto standard interface for Web server applications is CGI, which was first implemented in the NCSA - server. CGI has many benefits: -

-
    -
  • - Simplicity. It is easy to understand. -
  • -
  • - Language independence. CGI applications can be written in nearly any language. -
  • -
  • - Process isolation. Since applications run in separate processes, buggy applications cannot crash the - Web server or access the server's private internal state. -
  • -
  • - Open standard. Some form of CGI has been implemented on every Web server. -
  • -
  • - Architecture independence. CGI is not tied to any particular server architecture (single threaded, - multi-threaded, etc.). -
  • -
-

- CGI also has some significant drawbacks. The leading problem is performance: Since a new process is created - for each request and thrown away when the request is done, efficiency is poor. -

-

- CGI also has limited functionality: It only supports a simple "responder" role, where the - application generates the response that is returned to the client. CGI programs can't link into other - stages of Web server request processing, such as authorization and logging. -

-

- Server APIs -

-

- In response to the performance problems for CGI, several vendors have developed APIs for their servers. The - two most notable are NSAPI from Netscape and ISAPI from Microsoft. The freely available Apache server also has - an API. -

-

- Applications linked into the server API may be significantly faster than CGI programs. The CGI - startup/initialization problem is improved, because the application runs in the server process and is - persistent across requests. Web server APIs also offer more functionality than CGI: you can write extensions - that perform access control, get access to the server's log file, and link in to other stages in the - server's request processing. -

-

- However, APIs sacrifice all of CGI's benefits. Vendor APIs have the following problems: -

-
    -
  • - Complexity. Vendor APIs introduce a steep learning curve, with increased implementation and - maintenance costs. -
  • -
  • - Language dependence. Applications have to be written in a language supported by the vendor API - (usually C/C++). Perl, the most popular language for CGI programs, can't be used with any existing - vendor API. -
  • -
  • - No process isolation. Since the applications run in the server's address space, buggy - applications can corrupt the core server (or each other). A malicious or buggy application can compromise - server security, and bugs in the core server can corrupt applications. -
  • -
  • - Proprietary. Coding your application to a particular API locks you into a particular vendor's - server. -
  • -
  • - Tie-in to server architecture. API applications have to share the same architecture as the server: - If the Web server is multi-threaded, the application has to be thread-safe. If the Web server has - single-threaded processes, multi-threaded applications don't gain any performance advantage. Also, when - the vendor changes the server's architecture, the API will usually have to change, and applications - will have to be adapted or rewritten. -
  • -
-

- FastCGI -

-

- The FastCGI interface combines the best aspects of CGI and vendor APIs. Like CGI, FastCGI applications run in - separate, isolated processes. FastCGI's advantages include: -

-
    -
  • - Performance. FastCGI processes are persistent-they are reused to handle multiple requests. This - solves the CGI performance problem of creating new processes for each request. -
  • -
  • - Simplicity, with easy migration from CGI. The FastCGI application library (described on page 9) - simplifies the migration of existing CGI applications. Applications built with the application library can - also run as CGI programs, for backward compatibility with old Web servers. -
  • -
  • - Language independence. Like CGI, FastCGI applications can be written in any language, not just - languages supported by the vendor API. -
  • -
  • - Process isolation. A buggy FastCGI application cannot crash or corrupt the core server or other - applications. A malicious FastCGI application cannot steal any secrets (such as session keys for - encryption) from the Web server. -
  • -
  • - Non-proprietary. FastCGI is supported in all of Open Market's server products, and support is - under development for other Web servers, including the freely available Apache and NCSA servers, as well as - commercial servers from Microsoft and Netscape. -
  • -
  • - Architecture independence. The FastCGI interface is not tied to a particular server architecture. - Any Web server can implement the FastCGI interface. Also, FastCGI does not impose any architecture on the - application: applications can be single or multi-threaded, regardless of the threading architecture of the - Web server. -
  • -
  • - Support for distributed computing. FastCGI provides the ability to run applications remotely, which - is useful for distributing load and managing external Web sites. -
  • -
-

- The following sections describe the FastCGI interface, protocol, application library, and support in Open - Market's WebServer products. -

-

- 2. FastCGI Interface -

-

- The functionality provided by the FastCGI interface is very similar to that provided by CGI. To best - understand the FastCGI protocol, we review the CGI interface here. Basic CGI request processing proceeds as - follows: -

-
    -
  1. - For each request, the server creates a new process and the process initializes itself. -
  2. -
  3. - The Web server passes the request information (such as remote host, username, HTTP headers, etc.) to the - CGI program in environment variables. -
  4. -
  5. - The Web server sends any client input (such as user-entered field values from an HTML form) to the CGI - program's standard input. -
  6. -
  7. - The CGI program writes any output to be returned to the client on standard output. Error information - written to standard error is logged by the Web server. -
  8. -
  9. - When the CGI process exits, the request is complete. -
  10. -
-

- FastCGI is conceptually very similar to CGI, with two major differences: -

-
    -
  • - FastCGI processes are persistent: after finishing a request, they wait for a new request instead of - exiting. -
  • -
  • - Instead of using operating system environment variables and pipes, the FastCGI protocol multiplexes the - environment information, standard input, output and error over a single full-duplex connection. This allows - FastCGI programs to run on remote machines, using TCP connections between the Web server and the FastCGI - application. -
  • -
-

- Request processing in a single-threaded FastCGI application proceeds as follows: -

-
    -
  1. - The Web server creates FastCGI application processes to handle requests. The processes may be created at - startup, or created on demand. -
  2. -
  3. - The FastCGI program initializes itself, and waits for a new connection from the Web server. -
  4. -
  5. - When a client request comes in, the Web server opens a connection to the FastCGI process. The server sends - the CGI environment variable information and standard input over the connection. -
  6. -
  7. - The FastCGI process sends the standard output and error information back to the server over the same - connection. -
  8. -
  9. - When the FastCGI process closes the connection, the request is complete. The FastCGI process then waits for - another connection from the Web server. -
  10. -
-

- FastCGI applications can run locally (on the same machine as the Web server) or remotely. For local - applications, the server uses a full-duplex pipe to connect to the FastCGI application process. For remote - applications, the server uses a TCP connection. -

-

- FastCGI applications can be single-threaded or multi-threaded. For single threaded applications, the Web - server maintains a pool of processes (if the application is running locally) to handle client requests. The - size of the pool is user configurable. Multi-threaded FastCGI applications may accept multiple connections - from the Web server and handle them simultaneously in a single process. (For example, Java's built-in - multi-threading, garbage collection, synchronization primitives, and platform independence make it a natural - implementation language for multi-threaded FastCGI applications.) -

-

- Remote FastCGI -

-

- FastCGI's ability to run applications remotely (over a TCP connection) provides some major benefits. These - benefits are described in this section, along with some of the security issues that affect remote FastCGI - applications. -

-

- FastCGI with Firewalls -

-

- Applications that run on organizational (external) Web servers and depend on internal databases can be a - challenge to administer. Figure 1 shows a typical organization, with an external Web server, a firewall - restricting access to the internal network, and internal databases and applications. -

-

-

-
- error-file:TidyOut.logFigure 1 -
-

- With CGI and vendor APIs, the application has to run on the Web server machine. This means the server - administrator has to replicate the necessary database information onto the system hosting the Web server - (which may be difficult to do in an automated way without compromising firewall security). Or, the - administrator may build a "bridge" that allows access through the Web server to internal databases - and applications (which is effectively re-inventing remote FastCGI). -

-

- With remote FastCGI, the applications can run on the internal network, simplifying the administrator's - job. When used with appropriate firewall configuration and auditing, this approach provides a secure, - high-performance, scalable way to bring internal applications and data to the external network. -

-

- Load Distribution -

-

- For resource-intensive CGI and API applications, the Web server machine quickly becomes the bottleneck for - overall throughput. The usual way to solve this performance problem is to buy a bigger, faster Web server - machine, or to partition the Web site across several Web servers. -

-

- With remote FastCGI, the resource-intensive applications can be moved off the Web server machine, giving the - server administrator additional flexibility in configuring the Web server. The administrator can configure - FastCGI applications "behind the scenes" without having to change any content links or the external - view of the Web site. The administrator can use several smaller, inexpensive server machines for applications, - and can tailor each machine to the application it is hosting. -

-

- Security Issues with Remote FastCGI -

-

- The two security issues with remote FastCGI connections are authentication and privacy. FastCGI applications - should only accept connections from Web servers that they trust (the application library includes support for - IP address validation). Future versions of the protocol will include support for applications authenticating - Web servers, as well as support for running remote connections over secure transport protocols such as SSL or - PCT. -

-

- The FastCGI Protocol -

-

- This section offers a brief introduction to the protocol used on the connection between the Web server and - FastCGI application. Most application developers will use the FastCGI application library and won't have - to worry about the protocol details. However, specialized applications are free to implement the FastCGI - protocol directly. -

-

- FastCGI uses a simple packet record format on the connection between the application and the Web server. The - same record format is used in both directions and is outlined in Figure 2. -

-

-

-
- error-file:TidyOut.logFigure 2 -
-

- The protocol version field specifies the version of the FastCGI protocol that is in use. The type field - specifies the type of the record (described in the following section). The request ID identifies this record - to a particular request, allowing multiple requests to be multiplexed over a single connection. The data - length field specifies the number of data bytes that follow. -

-

- The different FastCGI packet types are: -

- - - - - - - - - - - - - - - - - - - - - - - - - -
- FCGI_PARAMS - - Used for sending name/value pairs (CGI environment variables) from the Web server to the application. -
- FCGI_STDIN - - Used for sending the standard input from the Web server to the application. -
- FCGI_DATA - - Used for sending filter data to the application (for more information, see the filter role described on - page 7.) -
- FCGI_STDOUT - - Used to send standard output from the application to the Web server. -
- FCGI_STDERR - - Used to send standard error information from the application to the Web server. -
- FCGI_END_REQUEST - - Ends the request (can be sent by either the server or the application). -
-

-

-

- For complete protocol details, see the FastCGI Protocol Specification, available from the Web site - listed at the end of this paper. -

-

- 3. Application Roles -

-

- A major problem with CGI is its limited functionality: CGI programs can only provide simple responses to - requests. FastCGI provides expanded functionality with support for three different application - "roles": -

-
    -
  • - Responder. This is the basic FastCGI role, and corresponds to the simple functionality offered by - CGI today. -
  • -
  • - Filter. The FastCGI application filters the requested Web server file before sending it to the - client. -
  • -
  • - Authorizer. The FastCGI program performs an access control decision for the request (such as - performing a username/password database lookup). -
  • -
-

- Other roles will be defined in the future. For instance, a "logger" role would be useful, where the - FastCGI program would receive the server's log entries for real-time processing and analysis. -

-

- The roles are described in more detail in the following sections. -

-

- Responder Role -

-

- FastCGI's Responder role is identical to the functionality provided by CGI today. When a request comes - into the server, the FastCGI program generates the response that's returned to the client (typically an - HTML page). -

-

- Filter Role -

-

- The Filter role allows a FastCGI application to process a requested file before it is returned to the client. -

-

- Let's assume that the Web server is configured so that all files with the .sgml - extension are processed by a SGML-to-HTML FastCGI filter application, and the user accesses the following URL: -

-

- /document.sgml -

-

- After the Web server makes an access control decision and maps this URL to a content file, it invokes the - FastCGI filter application with this file available as input. The FastCGI program's HTML output is sent - back to the client, just as in the responder role. The process is outlined in Figure 3. -

-

-

-
- error-file:TidyOut.logFigure 3 -
-

- Filter applications can significantly improve performance by caching filter results (the server provides the - modification time in the request information so that applications can flush the cache when the server file has - been modified). -

-

- The Filter role is useful for: -

-
    -
  • - On-the-fly format conversions -
  • -
  • - Dynamic documents (such as documents with embedded SQL queries, or dynamic advertisement insertion) -
  • -
  • - Applying a standard template: headers, footers, and backgrounds -
  • -
-

- Authorizer Role -

-

- The Authorizer role allows a FastCGI application to make an access control decision for a request. The FastCGI - application is invoked with all of the request information, just as in the Responder role. If the authorizer - application generates a "200 OK" HTTP result, the Web server assumes that access is allowed and - proceeds with the request. (The Web server may process other access checks, including other FastCGI - authorizers, before access is ultimately allowed.) If the application generates any other response, that - response is returned to the client and the request is ended. The response can be any valid HTTP response, - including "Access Denied" or "Redirect". -

-

- The Authorizer role is useful for: -

-
    -
  • - Access control based on username and password, where the user information is looked up in an external - database. -
  • -
  • - Complex access policies, such as time-of-day based access. -
  • -
  • - Smart-card challenge/response authentication. -
  • -
  • - Dynamic redirects, where the user is sent to different pages based on the request profile. -
  • -
-

- 4. FastCGI Application Library -

-

- Open Market has developed a FastCGI application library that implements the FastCGI protocol (hiding the - protocol details from the developer). This library makes implementing FastCGI programs as easy as writing CGI - applications. -

-

- The application library provides a replacement for the C language standard I/O (stdio) routines, such as printf() and gets(). The library converts references to standard input, - standard output, and standard error to the FastCGI protocol. References to other files "fall - through" to the underlying operating system standard I/O routines. -

-

- This approach has several benefits: -

-
    -
  • - Developers don't have to learn a new API to develop FastCGI applications. -
  • -
  • - Existing CGI programs can be migrated with minimal source changes (CGI migration is described in more - detail in the following section). -
  • -
  • - FastCGI interpreters for Perl, Tcl, and other interpreted languages can be built without modifying the - interpreter source code. -
  • -
-

- Here's a simple FastCGI application: -

-
-
-
-    #include <fcgi_stdio.h>
-
-    void main(void)
-    {
-        int count = 0;
-        while(FCGI_Accept() >= 0) {
-            printf("Content-type: text/html\r\n");
-            printf("\r\n");
-            printf("Hello world!<br>\r\n");
-            printf("Request number %d.", count++);
-        }
-        exit(0);
-    }
-
-

- This application returns a "Hello world" HTML response to the client. It also keeps a counter of the - number of times it has been accessed, displaying the value of the counter at each request. -

-

- The fcgi_stdio.h header file provides the FastCGI replacement routines for the C standard I/O - library. The FCGI_Accept() routine accepts a new request from the Web server. -

-

- Migrating Existing CGI Programs -

-

- The application library was designed to make migration of existing CGI programs as simple as possible. Many - applications can be converted by adding a loop around the main request processing code and recompiling with - the FastCGI application library. FastCGI applications have the following structure, with an initialization - section and a request processing loop: -

-

- Initialize application;
-
while(FCGI_Accept() >= 0) {
- Process request;
- } -

-

- To ease migration to FastCGI, executables built with the application library can run as either CGI or FastCGI - programs, depending on how they are invoked. The library detects the execution environment and automatically - selects FastCGI or regular I/O routines, as appropriate. -

-

- After migration, developers can clean up their FastCGI applications for best performance: -

-
    -
  • - Fix any resource leaks. Many CGI programs do not attempt to manage memory or close files, because they - assume the world is going to be cleaned up when they exit. (If you don't want to clean up your program, - you can just have your process assume that it is leaking memory and exit after processing some fixed number - of requests.) Purify from Pure Software is one of a number of excellent tools for finding leaks and other - memory use problems. -
  • -
  • - Fix any problems with retained application state. The application must ensure that any state that it - creates in processing one request has no unintended effects on later requests. -
  • -
  • - Collapse functionality. A common practice with CGI applications is to implement many small programs, with - one function per program. CGI encourages this, because smaller programs load faster. With FastCGI, it's - better to have related functionality in a single executable, so there are fewer processes to manage and - applications can take advantage of sharing cached information across functions. -
  • -
-

- Applications written in Perl, Tcl, and other scripting languages can be migrated by using a language - interpreter built with the application library. FastCGI-integrated Tcl and Perl interpreters for popular Unix - platforms are available from Open Market. The interpreters are backward-compatible: They can run standard Tcl - and Perl applications. -

-

- 5. FastCGI in the Open Market WebServer -

-

- This section describes the FastCGI support in the following Open Market server products: -

-
    -
  • - Open Market WebServer V2.0 -
  • -
  • - Open Market Secure WebServer V2.0 -
  • -
  • - Open Market Secure WebServer (Global) V2.0 -
  • -
-

- For more information about FastCGI support, see the Open Market WebServer Installation and Configuration - Guide. -

-

- Server Configuration -

-

- FastCGI applications are configured with the server's configuration file. Configuration has two parts. -

-

- First, the server administrator defines an application class. For local applications, the application - class specifies the details of running the FastCGI application, such as: -

-
    -
  • - The pathname of the application executable. -
  • -
  • - Any arguments and environment variables to pass to the process at startup. -
  • -
  • - The number of processes to run. -
  • -
-

- For remote applications, the class configuration information includes the host and TCP port to connect to. The - Web server assumes that the FastCGI application has been started on the remote host. If a request comes in and - the server can't connect to the FastCGI TCP port, the server logs an error and returns an error page to - the client. -

-

- The second configuration step is mapping the application class to a role: -

-
    -
  • - For responder roles, the administrator configures some part of the URL space to be handled by the FastCGI - application. For example, all URLs beginning with /rollcall/ might be handled by - the employee database application. -
  • -
  • - For filter roles, the administrator configures a file extension to be handled by a filter application. For - example, all files with the .sql extension could be handled by a SQL query lookup - filter. -
  • -
  • - For authorizer roles, the administrator configures an authorizer application in the same manner as other - access methods (hostname, username/password, etc.) A request must pass all access control checks - (possibly including multiple FastCGI authorizers) before access is allowed. -
  • -
-

- Basic FastCGI -

-

- To simplify migration for existing CGI programs, the WebServer provides a simple way to install new FastCGI - programs without having to reconfigure the server. However, this approach doesn't offer all of the - performance benefits of FastCGI application classes. -

-

- The WebServer treats any file with the extension .fcg as a FastCGI application. When a - request corresponds to such a file, the WebServer creates a new FastCGI process to handle the request, and - shuts down the process when the request is complete (just as in CGI). In this mode of operation performance is - comparable to CGI. Future versions of the WebServer will improve performance by automatically caching - processes and re-using them for subsequent requests. -

-

- Session Affinity -

-

- FastCGI programs can improve performance by caching information in the application process. For applications - that require frequent but expensive operations such as validating a username/password in an external database - for each request, this technique can significantly improve performance. -

-

- To improve the effectiveness of this technique, the WebServer implements session affinity. When session - affinity is enabled, the WebServer arranges for all requests in a user session to be handled by the same - FastCGI application process. What constitutes a "session" is configurable. The default configuration - uses the WebServer's built-in session tracking facility to identify user sessions. However, the server - administrator can use any part of the request information for the session affinity mapping: the URL path, the - client's hostname, the username, etc. - -

-

- 6. FastCGI Performance Analysis -

-

- How fast is FastCGI? The answer depends on the application. This section contains some real FastCGI - performance measurements, as well as guidelines for estimating the FastCGI speedup. -

-

- FastCGI vs CGI -

-

- We measured the relative performance of CGI, FastCGI, and static files on the Open Market WebServer, using a - simple application that generates a fixed number of output bytes. The following table shows the measured - request processing time for different request types on a typical platform. The times are measured from the - client perspective and include client, server, and application processing time. -

- - - - - - - - - - - - - -
-
- Static file -
-
-
- 21ms + 0.19ms per Kbyte -
-
-
- FastCGI -
-
-
- 22ms + 0.28ms per Kbyte -
-
-
- CGI -
-
-
- 59ms + 0.37ms per Kbyte -
-
-

- FastCGI performance is comparable to serving static files, and significantly better than CGI (clearly showing - the high overhead for process creation). Real applications have an additional time component: process - initialization, which should be added to overall request processing time. -

-

- Let's use this data to estimate the speedup from migrating a typical database CGI application to FastCGI. - Assume the application takes 50ms to initialize the database connection and generates 5K of output data. - Request performance can be computed as follows: -

- - - - - - - - - -
- CGI - - 59ms + 50ms + (0.37ms)(5) = 111ms -
- FastCGI - - 22ms + (0.28ms)(5) = 23ms -
-

- In this example, FastCGI has a 5x performance advantage over CGI, mostly due to savings from not having to - create and initialize new processes for each request. -

-

- 7. Conclusions -

-

- Today's Web business applications need a platform that's fast, open, maintainable, straightforward, - stable, and secure. FastCGI's design meets these requirements, and provides for a logical extension from - proven and widely deployed CGI technology. This allows developers to take advantage of FastCGI's benefits - without losing their existing investment in CGI applications. - - -

-

- 8. For More Information -

-

- For more information about Open Market and our products, visit our Web site at:http://www.openmarket.com/ -

-

- For more information about the FastCGI protocol and the developer's kit, and the latest information about - FastCGI standardization and support in other Web servers, visit the FastCGI project page at:http://www.openmarket.com/fastcgi/ -

- - - diff --git a/fcgi/doc/fastcgi-whitepaper/img00001.gif b/fcgi/doc/fastcgi-whitepaper/img00001.gif deleted file mode 100644 index f69a978c..00000000 Binary files a/fcgi/doc/fastcgi-whitepaper/img00001.gif and /dev/null differ diff --git a/fcgi/doc/fastcgi-whitepaper/img00002.gif b/fcgi/doc/fastcgi-whitepaper/img00002.gif deleted file mode 100644 index 3a398208..00000000 Binary files a/fcgi/doc/fastcgi-whitepaper/img00002.gif and /dev/null differ diff --git a/fcgi/doc/fastcgi-whitepaper/img00003.gif b/fcgi/doc/fastcgi-whitepaper/img00003.gif deleted file mode 100644 index 45e997e3..00000000 Binary files a/fcgi/doc/fastcgi-whitepaper/img00003.gif and /dev/null differ diff --git a/fcgi/doc/fcgi-devel-kit.htm b/fcgi/doc/fcgi-devel-kit.htm deleted file mode 100644 index 0f2c8ac7..00000000 --- a/fcgi/doc/fcgi-devel-kit.htm +++ /dev/null @@ -1,691 +0,0 @@ - - - - - FastCGI Developer's Kit - - - - -

- [[FastCGI]]
-

-

- FastCGI Developer's Kit -

- - - -

- Mark R. Brown
- Open Market, Inc.
-

-

- Document Version: 1.08
- 11 June 1996
-

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
- $Id: fcgi-devel-kit.htm,v 1.6 2002/02/25 00:42:59 robs Exp $
-
-
- -
-

- 1. Introduction -

-

- FastCGI is an open extension to CGI that provides high performance for all Internet applications without the - penalties of Web server APIs. -

-

- FastCGI is designed to be layered on top of existing Web server APIs. For instance, the mod_fastcgi - Apache module adds FastCGI support to the Apache server. FastCGI can also be used, with reduced functionality - and reduced performance, on any Web server that supports CGI. -

-

- This FastCGI Developer's Kit is designed to make developing FastCGI applications easy. The kit currently - supports FastCGI applications written in C/C++, Perl, Tcl, and Java. -

-

- This document: -

-
    -
  • - Describes how to configure and build the kit for your development platform. -
  • -
  • - Tells how to write applications using the libraries in the kit. -
  • -
  • - Tells how to run applications using Web servers that support FastCGI or using any Web server and - cgi-fcgi. -
  • -
-

- The kit includes a technical white paper, - doc/fastcgi-whitepaper/fastcgi.htm. You should read at least the first three sections of the - technical white paper before starting to write FastCGI applications. The performance - paper will help you understand how application design affects performance with FastCGI. -

-

- The FastCGI Specification, doc/fcgi-spec.html, defines the interface - between a FastCGI application and a Web server that supports FastCGI. The software in the kit implements the - specification. You don't need to read the specification in order to write applications. -

-

- Additional information is provided in the FAQ document, which - contains frequently asked questions about application development using FastCGI, as well as some general - information. -

-

- Experience with CGI programming will be extremely valuable in writing FastCGI applications. If you don't - have enough experience with CGI programming, you should read one of the popular books on the topic or study - the NCSA CGI page. For a more formal treatment of CGI/1.1 see - the Internet Draft CGI 1.1 Specification. -

-

- 2. Getting started -

-

- The kit is a compressed tar (tar.Z) file, distributed via the fastcgi.com - Web page. Unpacking the tar file creates a new directory fcgi-devel-kit. -

-

- Open the kit's index page, fcgi-devel-kit/index.html, using the "Open File" command in - your Web browser. The index page gives you an overview of the kit structure and helps you navigate the kit. - The index page also contains links that run some example applications, but the applications won't work - when index.html is opened using the "Open File" command because they aren't aren't being - accessed through a Web server. -

-

- In order to use the kit in earnest you'll need a Web server that you control, a Web server running with - your user ID. The Web server will be starting FastCGI applications that you will need to debug; this will be a - lot more convenient for you if these processes run with your user ID. It is best to have a Web server that - supports FastCGI. Section 4 discusses Web server issues. -

-

- If you can, keep the kit on a file system accessible from your personal workstation, do your builds on your - workstation, and run your Web server on your workstation. If that's not possible, arrange a configuration - such that the kit is accessible from the machine that's going to run your Web server, and build the kit - and your applications on a machine that's configured exactly the same way (same processor architecture, - operating system, etc.) as the machine that's going to run your Web server. -

-

- To build the kit you execute this sequence of commands in the fcgi-devel-kit directory: -

-
-    % ./configure
-    % make
-
-

- We've built and exercised the kit on these platforms (listed in alphabetical order): -

-
    -
  • - BSD/OS 1.1 (Intel Pentium), gcc -
  • -
  • - Digital UNIX V3.2 148 (Alpha), gcc/cc -
  • -
  • - Hewlett-Packard HP-UX A.09.05 C and B.10.01 A (PA-RISC), gcc/cc -
  • -
  • - IBM AIX 1 4 (RS/6000), gcc -
  • -
  • - Silicon Graphics IRIX 5.3 11091812 (MIPS), gcc -
  • -
  • - Sun Solaris 2.4 and 2.5 (SPARC), gcc/cc -
  • -
  • - Sun SunOS 4.1.4 (SPARC), gcc -
  • -
-

- Once you've built the kit, follow the directions in Section 4 to bring up your Web - server and run the example applications. -

-

- 3. Writing applications -

-

- 3.1 Using the fcgi_stdio library -

-

- The fcgi_stdio library provides the easiest transition for C CGI programs and C CGI programmers to - FastCGI. Using this library your application can run using either CGI or FastCGI, with the same binary for - both situations. -

-

- To introduce the fcgi_stdio library we give a pair of examples: a tiny CGI program and the - translation of this program to FastCGI. These two example programs are included in the kit. -

-

- The CGI program is examples/tiny-cgi.c: -

-
-    #include <stdio.h>
-    #include <stdlib.h>
-
-    void main(void)
-    {
-        int count = 0;
-        printf("Content-type: text/html\r\n"
-               "\r\n"
-               "<title>CGI Hello!</title>"
-               "<h1>CGI Hello!</h1>"
-               "Request number %d running on host <i>%s</i>\n",
-               ++count, getenv("SERVER_NAME"));
-    }
-
-

- The key features of this tiny CGI program are: -

-
    -
  • - The program sends data to the Web server by writing to stdout, using printf in this - example. The CGI program first sends a Content-type header, then a small HTML document. The - program includes stdio.h in order to get access to the printf function. -
  • -
  • - The program obtains parameters provided by the Web server by reading environment variables. The CGI program - reads the SERVER_NAME variable using getenv and includes the value in the HTML document. - The program includes stdlib.h in order to get access to the getenv function. -
  • -
-

- The count variable is degenerate in this example; the CGI program runs a single request, so the - request number is always one. This variable will be more interesting in the FastCGI example. -

-

- The corresponding FastCGI program is examples/tiny-fcgi.c: -

-
-    #include "fcgi_stdio.h"
-    #include <stdlib.h>
-
-    void main(void)
-    {
-        int count = 0;
-        while(FCGI_Accept() >= 0)
-            printf("Content-type: text/html\r\n"
-                   "\r\n"
-                   "<title>FastCGI Hello!</title>"
-                   "<h1>FastCGI Hello!</h1>"
-                   "Request number %d running on host <i>%s</i>\n",
-                    ++count, getenv("SERVER_NAME"));
-    }
-
-

- The key features of this tiny FastCGI program are: -

-
    -
  • - The program is structured as a loop that begins by calling the function FCGI_Accept. The - FCGI_Accept function blocks until a new request arrives for the program to execute. The program - includes fcgi_stdio.h in order to get access to the FCGI_Accept function. -
  • -
  • - Within the loop, FCGI_Accept creates a CGI-compatible world. printf and getenv - operate just as in the CGI program. stdin and stderr, not used by this tiny program, also - operate just as in a CGI program. -
  • -
-

- The count variable increments each time through the loop, so the program displays a new request - number each time. You can use the reload button in your browser to demonstrate this, once you've got the - program built and running. -

-

- Building the program -

-

- If you can build examples/tiny-cgi.c, it will be straightforward for you to build - examples/tiny-fcgi.c. You need to: -

-
    -
  • - Add the directory containing the fcgi_stdio.h header to the compiler's include search path. - The kit calls this directory include. -
  • -
  • - Add the library libfcgi.a to the linker's command line so that it will be searched when - linking. The libfcgi.a library implements the functions defined in fcgi_stdio.h. The kit - calls the directory containing this library libfcgi. -
  • -
  • - Determine whether or not the linker on your platform searches the Berkeley socket library by default, and - if not, add linker directives to force this search. -
  • -
-

- See examples/Makefile (created by configure) for a Makefile that builds both programs. - Autoconf handles the platform-dependent linking issues; to see how, examine configure.in and - examples/Makefile.in. -

-

- Running the program -

-

- Section 4 is all about how to run FastCGI applications. -

-

- You can use CGI to run application binaries built with the fcgi_stdio library. The - FCGI_Accept function tests its environment to determine how the application was invoked. If it was - invoked as a CGI program, the first call to FCGI_Accept is essentially a no-op and the second call returns - -1. In effect, the request loop disappears. -

-

- Of course, when a FastCGI application is run using CGI it does not get the benefits of FastCGI. For instance, - the application exits after servicing a single request, so it cannot maintain cached information. -

-

- Implementation details -

-

- fcgi_stdio.h works by first including stdio.h, then defining macros to replace essentially - all of the types and procedures defined in stdio.h. (stdio.h defines a few procedures that - have nothing to do with FILE *, such as sprintf and sscanf; fcgi_stdio.h - doesn't replace these.) For instance, FILE becomes FCGI_FILE and printf becomes - FCGI_printf. You'll only see these new names if you read fcgi_stdio.h or examine your C - source code after preprocessing. -

-

- Here are some consequences of this implementation technique: -

-
    -
  • - On some platforms the implementation will break if you include stdio.h after including - fcgi_stdio.h, because stdio.h often defines macros for functions such as getc - and putc. Fortunately, on most platforms stdio.h is protected against multiple includes - by lines near the top of the file that look like -
    -    #ifndef _STDIO_H
    -    #define _STDIO_H
    -   
    -
    -

    - The specific symbol used for multiple-include protection, _STDIO_H in this example, varies from - platform to platform. As long as your platform protects stdio.h against multiple includes, you - can forget about this issue. -

    -
  • -
  • - If your application passes FILE * to functions implemented in libraries for which you have source - code, then you'll want to recompile these libraries with fcgi_stdio.h included. Most C - compilers provide a command-line option for including headers in a program being compiled; using such a - compiler feature allows you to rebuild your libraries without making source changes. For instance the gcc - command line -
    -    gcc -include /usr/local/include/fcgi_stdio.h wonderlib.c
    -   
    -
    -

    - causes gcc to include fcgi_stdio.h before it even begins to read the module - wonderlib.c. -

    -
  • -
  • - If your application passes FILE * to functions implemented in libraries for which you do not have - source code, then you'll need to include the headers for these libraries before you include - fcgi_stdio.h. You can't pass the stdin, stdout, or stderr streams - produced by FCGI_Accept to any functions implemented by these libraries. You can pass a stream on - a Unix file to a library function by following this pattern: -
    -    FILE *myStream = fopen(path, "r");
    -    answer = MungeStream(FCGI_ToFile(myStream));
    -   
    -
    -

    - Here MungeStream is a library function that you can't recompile and FCGI_ToFile is - a macro that converts from FCGI_FILE * to FILE *. The macro FCGI_ToFile is - defined in fcgi_stdio.h. -

    -
  • -
-

- Converting CGI programs -

-

- The main task in converting a CGI program into a FastCGI program is separating the code that needs to execute - once, initializing the program, from the code that needs to run for each request. In our tiny example, - initializing the count variable is outside the loop, while incrementing the count variable - goes inside. -

-

- Retained application state may be an issue. You must ensure that any application state created in processing - one request has no unintended effects on later requests. FastCGI offers the possibility of significant - application performance improvements, through caching; it is up to you to make the caches work correctly. -

-

- Storage leaks may be an issue. Many CGI programs don't worry about storage leaks because the programs - don't run for long enough for bloating to be a problem. When converting to FastCGI, you can either use a - tool such as Purify from Pure Software to discover and fix storage - leaks, or you can run a C garbage collector such as Great Circle - from Geodesic Systems. -

-

- Limitations -

-

- Currently there are some limits to the compatibility provided by the fcgi_stdio library: -

-
    -
  • - The library does not provide FastCGI versions of the functions fscanf and scanf. If you - wish to apply fscanf or scanf to stdin of a FastCGI program, the workaround is - to read lines or other natural units into memory and then call sscanf. If you wish to apply - fscanf to a stream on a Unix file, the workaround is to follow the pattern: -
    -    FILE *myStream = fopen(path, "r");
    -    count = fscanf(FCGI_ToFile(myStream), format, ...);
    -   
    -
    -
  • -
-

- Reference documentation -

-

- The FCGI_Accept manpage, doc/FCGI_Accept.3, describes the - function in the traditional format. -

-

- The FCGI_Finish (doc/FCGI_Finish.3), FCGI_SetExitStatus (doc/FCGI_SetExitStatus.3), and FCGI_StartFilterData (doc/FCGI_StartFilterData.3) manpages - document capabilities of the fcgi-stdio library that are not illustrated above. -

-

- 3.2 Using the fcgiapp library -

-

- The fcgiapp library is a second C library for FastCGI. It does not provide the high degree of source - code compatibility provided by fcgi_stdio; in return, it does not make such heavy use of - #define. fcgi_stdio is implemented as a thin layer on top of fcgiapp. -

-

- Applications built using the fcgiapp library cannot run as CGI programs; that feature is provided at - the fcgi_stdio level. -

-

- Functions defined in fcgiapp are named using the prefix FCGX_ rather than FCGI_. - For instance, FCGX_Accept is the fcgiapp version of FCGI_Accept. -

-

- Documentation of the fcgiapp library takes the form of extensive comments in the header file - include/fcgiapp.h. The sample programs examples/tiny-fcgi2.c and examples/echo2.c - illustrate how to use fcgiapp. -

-

- 3.3 Using Perl and Tcl -

-

- A major advantage of the FastCGI approach to high-performance Web applications is its language-neutrality. CGI - scripts written in popular languages such as Perl and Tcl can be evolved into high-performance FastCGI - applications. -

-

- We have produced FastCGI-integrated Perl and Tcl interpreters. Doing so was easy, since Perl and Tcl are - conventional C applications and fcgi_stdio was designed for converting conventional C applications. - Essentially no source code changes were required in these programs; a small amount of code was added in order - to make FCGI_Accept and other FastCGI primitives available in these languages. And because these - interpreters were developed using fcgi_stdio, they run standard Perl and Tcl applications (e.g. CGI - scripts) as well as FastCGI applications. -

-

- See the fastcgi.com Web page for more information about the Perl and Tcl - libraries. -

-

- Here are the Perl and Tcl versions of tiny-fcgi: -

-
-#!./perl
-use FCGI;
-$count = 0;
-while(FCGI::accept() >= 0) {
-    print("Content-type: text/html\r\n\r\n",
-          "<title>FastCGI Hello! (Perl)</title>\n",
-          "<h1>FastCGI Hello! (Perl)</h1>\n";
-          "Request number ",  ++$count,
-          " running on host <i>";$env(SERVER_NAME)</i>");
-}
-
-
-#!./tclsh
-set count 0 
-while {[FCGI_Accept] >= 0 } {
-    incr count
-    puts -nonewline "Content-type: text/html\r\n\r\n"
-    puts "<title>FastCGI Hello! (Tcl)</title>"
-    puts "<h1>FastCGI Hello! (Tcl)</h1>"
-    puts "Request number $count running on host <i>$env(SERVER_NAME)</i>"
-}
-
-

- Converting a Perl or Tcl CGI application to FastCGI is not fundamentally different from converting a C CGI - application to FastCGI. You separate the portion of the application that performs one-time initialization from - the portion that performs per-request processing. You put the per-request processing into a loop controlled by - FCGI::accept (Perl) or FCGI_Accept (Tcl). -

-

- 3.4 Using Java -

-

- Java is not just for browser-based applets. It is already suitable for writing some Web server applications, - and its range of applicability will only grow as Java compilers and other Java tools improve. Java's - modules, garbage collection, and threads are especially valuable for writing long-lived application servers. -

-

- The FCGIInterface class provides facilities for Java applications analogous to what - fcgi_stdio provides for C applications. Using this library your Java application can run using either - CGI or FastCGI. -

-

- The kit includes separate companion document on using FastCGI with Java. The - source code for FastCGI classes is contained in directory java/src and the compiled code in - java/classes. -

-

- Here is the Java version of tiny-fcgi: -

-
-import FCGIInterface;
-
-class TinyFCGI { 
-    public static void main (String args[]) {  
-        int count = 0;
-        while(new FCGIInterface().FCGIaccept()>= 0) {
-            count ++;
-            System.out.println("Content-type: text/html\r\n\r\n");
-            System.out.println(
-                    "<title>FastCGI Hello! (Java)</title>");
-            System.out.println("<h1>FastCGI Hello! (Java)</h1>");
-            System.out.println(
-                    "request number " + count + " running on host <i>" +
-                    System.getProperty("SERVER_NAME") + "</i>");
-        }
-    }
-}
-
-

- 4. Running applications -

-

- 4.1 Using a Web server that supports FastCGI -

-

- For a current listing of Web servers that support FastCGI, see the fastcgi.com Web page. -

-

- Some of the Web servers that support FastCGI perform management of FastCGI applications. You don't need to - start and stop FastCGI applications; the Web server takes care of this. If an application process should - crash, the Web server restarts it. -

-

- Web servers support FastCGI via new configuration directives. Since these directives are server-specific, get - more information from the documentation that accompanies each server. -

-

- 4.2 Using cgi-fcgi with any Web server -

-

- The program cgi-fcgi allows you to run FastCGI applications using any Web server that supports CGI. -

-

- Here is how cgi-fcgi works. cgi-fcgi is a standard CGI program that uses Unix domain or - TCP/IP sockets to communicate with a FastCGI application. cgi-fcgi takes the path name or host/port - name of a listening socket as a parameter and connects to the FastCGI application listening on that - socket. cgi-fcgi then forwards the CGI environment variables and stdin data to the FastCGI - application, and forwards the stdout and stderr data from the FastCGI application to the Web - server. When the FastCGI application signals the end of its response, cgi-fcgi flushes its buffers - and exits. -

-

- Obviously, having cgi-fcgi is not as good as having a server with integrated FastCGI support: -

-
    -
  • - Communication is slower than with a Web server that avoids the fork/exec overhead on every FastCGI request. -
  • -
  • - cgi-fcgi does not perform application management, so you need to provide this yourself. -
  • -
  • - cgi-fcgi supports only the Responder role. -
  • -
-

- But cgi-fcgi does allow you to develop applications that retain state in memory between connections, - which often provides a major performance boost over normal CGI. And all the applications you develop using - cgi-fcgi will work with Web servers that have integrated support for FastCGI. -

-

- The file examples/tiny-fcgi.cgi demonstrates a way to use cgi-fcgi to run a typical - application, in this case the examples/tiny-fcgi application: -

-
-    #!../cgi-fcgi/cgi-fcgi -f
-    -connect sockets/tiny-fcgi tiny-fcgi
-
-

- On most Unix platforms, executing this command-interpreter file runs cgi-fcgi with arguments - -f and examples/tiny-fcgi.cgi. (Beware: On some Unix platforms, including HP-UX, the first - line of a command-interpreter file cannot contain more than 32 characters, including the newline; you may need - to install the cgi-fcgi application in a standard place like /usr/local/bin or create a - symbolic link to the cgi-fcgi application in the directory containing your application.) The - cgi-fcgi program reads the command-interpreter file and connects to the FastCGI application whose - listening socket is examples/sockets/tiny-fcgi. -

-

- Continuing the example, if cgi-fcgi's connection attempt fails, it creates a new process running - the program examples/tiny-fcgi and listening on socket examples/sockets/tiny-fcgi. Then - cgi-fcgi retries the connection attempt, which now should succeed. -

-

- The cgi-fcgi program has two other modes of operation. In one mode it connects to applications but - does not start them; in the other it starts applications but does not connect to them. These modes are - required when using TCP/IP. The cgi-fcgi manpage, doc/cgi-fcgi.1, - tells the full story. -

-

- To run the example applications using cgi-fcgi, start your Web server and give it the directory - fcgi-devel-kit as the root of its URL space. If the machine running your server is called - bowser and your server is running on port 8888, you'd then open the URL - http://bowser:8888/index.html to reach the kit's index page. Now the links on the index page that - run example applications via cgi-fcgi should be active. -

-

- 5. Known problems -

-

- On Digital UNIX 3.0 there's a problem with Unix domain listening sockets on NFS file systems. The symptom - when using cgi-fcgi is an exit status of 38 (ENOTSOCK: socket operation on non-socket), but cgi-fcgi - may dump core in this case when compiled optimized. Work-around: Store your Unix domain listening sockets on a - non NFS file system, upgrade to Digital UNIX 3.2, or use TCP sockets. -

-

- On AIX there's a problem with shared listening sockets. The symptoms can include application core dumps - and kernel panic. Work-around: Run a single FastCGI application server per listening socket. -

-

- 6. Getting support -

-

- The mailing list fastcgi-developers is used for discussions of issues in developing FastCGI - applications. Topics include announcement of FastCGI-capable Web servers or changes to such servers, - announcement of new application libraries or changes to such libraries, announcement of known bugs, discussion - of design trade-offs in FastCGI application programming, and discussion of development plans and experiences. - To join the list, see http://fastcgi.com/fastcgi-developers. -

-

- A link to a mail archive can be found on the FastCGI home page, http://www.fastcgi.com -

-
-
- © 1996, Open Market, Inc. / mbrown@openmarket.com -
- - - diff --git a/fcgi/doc/fcgi-java.htm b/fcgi/doc/fcgi-java.htm deleted file mode 100644 index b19f3814..00000000 --- a/fcgi/doc/fcgi-java.htm +++ /dev/null @@ -1,501 +0,0 @@ - - - - - Integrating FastCGI with Java - - - - -
- [[FastCGI]] -
-
-
-

- Integrating FastCGI with Java -

-
- - - - -

- Steve Harris
- Open Market, Inc.
- 7 May 1996 -

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
-
-
-

- 1. Introduction -

-

- Java is an object-oriented programming language developed by Sun Microsystems. The Java Depvelopers Kit (JDK), - which contains the basic Java class packages, is available from Sun in both source and binary forms at - Sun's JavaSoft site. This document - assumes that you have some familiarity with the basics of compiling and running Java programs. -

-

- There are two kinds of applications built using Java. -

-
    -
  • - Java Applets are graphical components which are run off HTML pages via the <APPLET> - HTML extention tag.
    -
    -
  • -
  • - Java Applications (Apps) are stand-alone programs that are run by invoking the Java interpreter - directly. Like C programs, they have a main() method which the interpreter uses as an entry point. -
  • -
-

- The initial emphasis on using Java for client side applets should not obscure the fact that Java is a full - strength programming language which can be used to develop server side stand alone applications, including CGI - and now FastCGI applications. -

-

- The remainder of this document explains how to write and run FastCGI Java applications. It also illustrates - the conversion of a sample Java CGI program to a FastCGI program. -

-

- 2. Writing FastCGI applications in Java -

-

- Writing a FastCGI application in Java is as simple as writing one in C. -

-
    -
  1. - Import the FCGIInterface class. -
  2. -
  3. - Perform one-time initialization at the top of the main() method. -
  4. -
  5. - Create a new FCGIInterface object and send it an FCGIaccept() message in a loop. -
  6. -
  7. - Put the per-request application code inside that loop. -
  8. -
-

- On return from FCGIaccept() you can access the request's environment variables using - System.getProperty and perform request-related I/O through the standard variables System.in, - System.out, and System.err. -

-

- To illustrate these points, the kit includes examples/TinyCGI, a CGI Java application, and - examples/TinyFCGI, the FastCGI version of TinyCGI. These programs perform the same functions as the C - programs examples/tiny-cgi.c and examples/tiny-fcgi.c that are used as examples in the FastCGI Developer's Kit document. -

-

- A. TinyCGI -

-
- 
-class TinyCGI { 
- public static void main (String args[]) {  
-  int count = 0;
-                ++count;
-  System.out.println("Content-type: text/html\n\n");
-  System.out.println("<html>");
-  System.out.println(
-                 "<head><TITLE>CGI Hello</TITLE></head>");
-  System.out.println("<body>");
-  System.out.println("<H3>CGI-Hello</H3>");
-  System.out.println("request number " + count + 
-     " running on host " 
-    + System.getProperty<"SERVER_NAME"));
-  System.out.println("</body>");
-  System.out.println("</html>"); 
-  }
- }
-
-
-

- B. TinyFCGI -

-
- 
-import FCGIInterface;
-
-class TinyFCGI { 
- public static void main (String args[]) {  
-  int count = 0;
-   while(new FCGIInterface().FCGIaccept()>= 0) {
-   count ++;
-   System.out.println("Content-type: text/html\n\n");
-   System.out.println("<html>");
-   System.out.println(
-     "<head><TITLE>FastCGI-Hello Java stdio</TITLE></head>");
-   System.out.println("<body>");
-   System.out.println("<H3>FastCGI-HelloJava stdio</H3>");
-   System.out.println("request number " + count + 
-     " running on host " 
-    + System.getProperty<"SERVER_NAME"));
-   System.out.println("</body>");
-   System.out.println("</html>"); 
-   }
-  }
- }
-
-
-

- C. Running these Examples -

-

- We assume that you have downloaded the JDK and the FastCGI Developer's Kit, and that you have a Web server - running that can access the fcgi-devel-kit/examples directory. In all cases where we specify paths, - we are using relative paths within fcgi-devel-kit or the JDK which will need to be enlarged to a full - path by the user. -

-
- Configuring -
-
    -
  1. - Add your JDK's java/bin directory to your Unix PATH if it isn't there - already.
    -
    -
  2. -
  3. - Add the directories fcgi-devel-kit/examples and fcgi-devel-kit/java/classes to your Java - CLASSPATH.
    -
    -
  4. -
  5. - In your Open Market Secure WebServer configuration file, httpd.config, add the following two - lines:
    -
    - ExternalAppClass TinyFCGI -host hostName:portNum
    - Responder TinyFCGI fcgi-devel-kit/examples/TinyFCGI
    -
    - -
      -
    • - hostName is the name of your host machine.
      -
    • -
    • - portNum is the port that you've selected for communication between the Web server and the - Java application.
      -
    • -
    -
    - On other servers you can use cgi-fcgi to get a similar effect. -
  6. -
  7. - Create a soft link examples/javexe to the java/bin directory in your JDK. This link is - required only to run the CGI scripts examples/TinyCGI.cgi and examples/TinyFCGI.cgi, - which use it to invoke the Java interpreter java/bin/java. It is not used by FastCGI applications. -
  8. -
  9. - You might have to modify examples/TinyFCGI.cgi to use a Unix shell for which your CLASSPATH is - defined. -
  10. -
-
- Running -
-
    -
  • - To run TinyFCGI as FastCGI, you invoke the Java interpreter with the -D option, giving it the - FCGI_PORT environment variable and the same portNum that was used in the Web server - configuration. The command is:
    -
    - java -DFCGI_PORT=portNum TinyFCGI
    -
    - Then point your browser at fcgi-devel-kit/examples/TinyFCGI. Notice that each time you reload, - the count increments.
    -
    -
  • -
  • - To run TinyCGI, point your browser at fcgi-devel-kit/examples/TinyCGI.cgi on your host machine. - Notice that the count does not increment.
    -
    -
  • -
  • - Finally, you can run TinyFCGI as a straight CGI program by pointing your browser at - fcgi-devel-kit/examplesi/TinyFCGI.cgi. The results are exactly the same as when you ran TinyCGI. - Invoking a FastCGI program without an FCGI_PORT parameter tells the FastCGI interface to leave the - normal CGI environment in place. -
  • -
-

- Due to gaps in the Java interpreter's support for listening sockets, Java FastCGI applications are - currently limited to being started as external applications. They can't be started and managed by the Web - server because they are incapable of using a listening socket that the Web server creates. -

-

- 3. Standard I/O and Application Libraries -

-

- As we have seen above, FastCGI for Java offers a redefinition of standard I/O corresponding to the the - fcgi_stdio functionality. It also offers a set of directly callable I/O methods corresponding to the - fcgiapp C library. To understand where these methods occur we need to look briefly at the FastCGI - redefinition of standard I/O. -

-

- Java defines standard I/O in the java.System class as follows: -

-

- public static InputStream in = new BufferedInputStream(new FileInputStream(FileDescriptor.in), 128);
- public static PrintStream out = new PrintStream(new BufferedOutputStream(new - FileOutputStream(FileDescriptor.out), 128), true);
- public static PrintStream err = new PrintStream(new BufferedOutputStream(new - FileOutputStream(FileDescriptor.err), 128), true); -

-

- The File Descriptors in, out, err are constants set to 0, 1 and 2 respectively. -

-

- The FastCGI interface redefines java.System in, out, and err by replacing the File streams with - Socket streams and inserting streams which know how to manage the FastCGI protocol between the Socket streams - and the Buffered streams in the above definitions. -

-

- For those cases where the FCGI application needs to bypass the standard I/O streams, it can directly access - the methods of the FCGI input and output streams which roughly correspond to the functions in the C - fcgiapp library. These streams can be accessed via the request class variable in FCGIInterface. - Each Request object has instance variables that refer to an FCGIInputStream, and to two FCGIOutputStreams - associated with that request. -

-

- 4. Environment Variables -

-

- Java does not use the C environ list. Nor is there a getenv command that reads system - environment variables. This is intentional for reasons of portability and security. Java has an internal - dictionary of properties which belongs to the System class. These System properties are name/value - associations that constitute the Java environment. When a Java application starts up, it reads in a file with - default properties. As we have seen, additional System properties may be inserted by using the -D Java - command argument. -

-

- For CGI, where the Java application is invoked from a .cgi script that, in turn, invokes the Java interpreter, - this script could read the environment and pass the variables to the Java application either by writing a file - or by creating -D options on the fly. Both of these methods are somewhat awkward. -

-

- For FastCGI Java applications, the environment variables are obtained from the FastCGI web server via - FCGI_PARAMS records that are sent to the application at the start of each request. The FastCGI - interface stores the original startup properties, combines these with the properties obtained from the server, - and puts the new set of properties in the System properties dictionary. The only parameter that has to be - specifically added at startup time is the FCGI_PORT parameter for the Socket creation. In the future, we - expect that even this parameter won't be needed, since its use is due to an acknowledged rigidity in the - JDK's implementation of sockets. -

-

-

-

- 5. Further examples: EchoFCGI and Echo2FCGI -

-

- The next two examples illustrate the points made in the last two sections. EchoFCGI and Echo2FCGI both echo - user input and display the application's environment variables. EchoFCGI reads the user input from - System.in, while Echo2FCGI reads the user input directly from the intermediate FastCGI input stream. -

-

- A. EchoFCGI -

-
-import FCGIInterface;
-import FCGIGlobalDefs;
-import java.io.*;
-
-class EchoFCGI {
- 
- public static void main (String args[]) {
-  int status = 0;
-   while(new FCGIInterface().FCGIaccept()>= 0) {
-  System.out.println("Content-type: text/html\n\n");
-   System.out.println("<html>");
-   System.out.println(
-    "<head%gt;<TITLE>FastCGI echo
-                                      </TITLE></head>");
-   System.out.println("<body>"); 
-   System.out.println(
-                                         "<H2>FastCGI echo</H2>");
-   System.out.println("<H3>STDIN</H3>");
-   for ( int c = 0; c != -1; ) {
-    try {
-     c = System.in.read();
-    } catch(IOException e) {
-     System.out.println(
-     "<br><b>SYSTEM EXCEPTION");
-     Runtime rt = Runtime.getRuntime();
-     rt.exit(status);
-     }
-    if (c != -1) { 
-     System.out.print((char)c);
-     }
-    }
-   System.out.println(
-    "<H3>Environment Variables:</H3>");
- 
-   System.getProperties().list(System.out);
-   System.out.println("</body>");
-   System.out.println("</html>");
-      }
-  }
-   }
-
-

- B. Echo2FCGI -

-
-import FCGIInterface;
-import FCGIGlobalDefs;
-import FCGIInputStream;
-import FCGIOutputStream;
-import FCGIMessage;
-import FCGIRequest;
-import java.io.*;
-
-class Echo2FCGI {
-
- public static void main (String args[]) {
-  int status = 0;
-                FCGIInterface intf = new FCGIInterface();
-   while(intf.FCGIaccept()>= 0) {
-  System.out.println("Content-type: text/html\n\n");
-   System.out.println("<html>");
-   System.out.println(
-    "<head><TITLE>FastCGI echo
-                                    </TITLE></head>");
-   System.out.println("<body>");   
-   System.out.println("<H2>FastCGI echo</H2>");
-   System.out.println("<H3>STDIN:</H3">);
-   for ( int c = 0; c != -1; ) {
-    try {
-     c = intf.request.inStream.read();
-    } catch(IOException e) {
-     System.out.println(
-     "<br><b>SYSTEM EXCEPTION");
-     Runtime rt = Runtime.getRuntime();
-     rt.exit(status);
-     }
-    if (c != -1) { 
-     System.out.print((char)c);
-     }
-    }
-   System.out.println(
-    "<H3>Environment Variables:</H3>");
- 
-   System.getProperties().list(System.out);
-   System.out.println(<"/body>");
-   System.out.println("</html>");
-      }
-  }
-   }
-
-

- C. Running these Examples -

-
- Configuring -
-

- As with TinyFCGI, you need to configure the web server to recognize these two FastCGI applications. Your - configuration now looks like this: -

-

-

-
-ExternalAppClass java1 -host hostname:portNum
-Responder java1 fcgi-devel-kit/examples/TinyFCGI
-ExternalAppClass java2 -host hostname:portNumA
-Responder java2 fcgi-devel-kit/examples/EchoFCGI
-ExternalAppClass java3 -host hostname:porNumB
-Responder java3 fcgi-devel-kit/examples/Echo2FCGI
-
-

- Note that the application classes and port numbers are different for each application. -

-
- Running -
-

- As with TinyFCGI, you need to run these programs with the -D option using FCGI_PORT and the appropriate port - number. To get some data for standard input we have created two html pages with forms that use a POST method. - These are echo.html and echo2.html. You must edit these .html files to expand the path to - fcgi-devel-kit/examples to a full path. Once the appropriate Java program is running, point your - browser at the corresponding HTML page, enter some data and select the go_find button. -

-

- 6. FastCGI Java Classes -

-

- The Java FastCGI classes are included in both source and byte code format in fcgi-devel-kit/java/src - and :fcgi-devel-kit/java/classes respectively. The following is a brief description of these classes: -

-

-

-
-
- FCGIInterface -
-
- This class contains the FCGIaccept method called by the FastCGI user application. This method sets up the - appropriate FastCGI environment for communication with the web server and manages FastCGI requests.
-
-
- FCGIInputStream -
-
- This input stream manages FastCGI internal buffers to ensure that the user gets all of the FastCGI messages - associated with a request. It uses FCGIMessage objects to interpret these incoming messages.
-
-
- FCGIOutputStream -
-
- This output stream manages FastCGI internal buffers to send user data back to the web server and to notify - the server of various FCGI protocol conditions. It uses FCGIMessage objects to format outgoing FastCGI - messages.
-
-
- FCGIMessage -
-
- This is the only class that understands the actual structure of the FastCGI messages. It interprets - incoming FastCGI records and constructs outgoing ones..
-
-
- FCGIRequest -
-
- This class currently contains data fields used by FastCGI to manage user requests. In a multi-threaded - version of FastCGI, the role of this class will be expanded.
-
-
- FCGIGlobalDefs -
-
- This class contains definitions of FastCGI constants. -
-
-
-
- Steve Harris // harris@openmarket.com -
- - - diff --git a/fcgi/doc/fcgi-perf.htm b/fcgi/doc/fcgi-perf.htm deleted file mode 100644 index bf697c91..00000000 --- a/fcgi/doc/fcgi-perf.htm +++ /dev/null @@ -1,456 +0,0 @@ - - - - - Understanding FastCGI Application Performance - - - - -
- [[FastCGI]] -
-
-
-

- Understanding FastCGI Application Performance -

-
- - - -
- Mark R. Brown
- Open Market, Inc.
-

- 10 June 1996
-

-
-

-

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
- $Id: fcgi-perf.htm,v 1.4 2002/02/25 00:42:59 robs Exp $
-
-
- -

-

-
-

- 1. Introduction -

-

- Just how fast is FastCGI? How does the performance of a FastCGI application compare with the performance of - the same application implemented using a Web server API? -

-

- Of course, the answer is that it depends upon the application. A more complete answer is that FastCGI often - wins by a significant margin, and seldom loses by very much. -

-

- Papers on computer system performance can be laden with complex graphs showing how this varies with that. - Seldom do the graphs shed much light on why one system is faster than another. Advertising copy is - often even less informative. An ad from one large Web server vendor says that its server "executes web - applications up to five times faster than all other servers," but the ad gives little clue where the - number "five" came from. -

-

- This paper is meant to convey an understanding of the primary factors that influence the performance of Web - server applications and to show that architectural differences between FastCGI and server APIs often give an - "unfair" performance advantage to FastCGI applications. We run a test that shows a FastCGI - application running three times faster than the corresponding Web server API application. Under different - conditions this factor might be larger or smaller. We show you what you'd need to measure to figure that - out for the situation you face, rather than just saying "we're three times faster" and moving - on. -

-

- This paper makes no attempt to prove that FastCGI is better than Web server APIs for every application. Web - server APIs enable lightweight protocol extensions, such as Open Market's SecureLink extension, to be - added to Web servers, as well as allowing other forms of server customization. But APIs are not well matched - to mainstream applications such as personalized content or access to corporate databases, because of API - drawbacks including high complexity, low security, and limited scalability. FastCGI shines when used for the - vast majority of Web applications. -

-

-

-

- 2. Performance Basics -

-

- Since this paper is about performance we need to be clear on what "performance" is. -

-

- The standard way to measure performance in a request-response system like the Web is to measure peak request - throughput subject to a response time constriaint. For instance, a Web server application might be capable of - performing 20 requests per second while responding to 90% of the requests in less than 2 seconds. -

-

- Response time is a thorny thing to measure on the Web because client communications links to the Internet have - widely varying bandwidth. If the client is slow to read the server's response, response time at both the - client and the server will go up, and there's nothing the server can do about it. For the purposes of - making repeatable measurements the client should have a high-bandwidth communications link to the server. -

-

- [Footnote: When designing a Web server application that will be accessed over slow (e.g. 14.4 or even 28.8 - kilobit/second modem) channels, pay attention to the simultaneous connections bottleneck. Some servers are - limited by design to only 100 or 200 simultaneous connections. If your application sends 50 kilobytes of data - to a typical client that can read 2 kilobytes per second, then a request takes 25 seconds to complete. If your - server is limited to 100 simultaneous connections, throughput is limited to just 4 requests per second.] -

-

- Response time is seldom an issue when load is light, but response times rise quickly as the system approaches - a bottleneck on some limited resource. The three resources that typical systems run out of are network I/O, - disk I/O, and processor time. If short response time is a goal, it is a good idea to stay at or below 50% load - on each of these resources. For instance, if your disk subsystem is capable of delivering 200 I/Os per second, - then try to run your application at 100 I/Os per second to avoid having the disk subsystem contribute to slow - response times. Through careful management it is possible to succeed in running closer to the edge, but - careful management is both difficult and expensive so few systems get it. -

-

- If a Web server application is local to the Web server machine, then its internal design has no impact on - network I/O. Application design can have a big impact on usage of disk I/O and processor time. -

-

-

-

- 3. Caching -

-

- It is a rare Web server application that doesn't run fast when all the information it needs is available - in its memory. And if the application doesn't run fast under those conditions, the possible solutions are - evident: Tune the processor-hungry parts of the application, install a faster processor, or change the - application's functional specification so it doesn't need to do so much work. -

-

- The way to make information available in memory is by caching. A cache is an in-memory data structure that - contains information that's been read from its permanent home on disk. When the application needs - information, it consults the cache, and uses the information if it is there. Otherwise is reads the - information from disk and places a copy in the cache. If the cache is full, the application discards some old - information before adding the new. When the application needs to change cached information, it changes both - the cache entry and the information on disk. That way, if the application crashes, no information is lost; the - application just runs more slowly for awhile after restarting, because the cache doesn't improve - performance when it is empty. -

-

- Caching can reduce both disk I/O and processor time, because reading information from disk uses more processor - time than reading it from the cache. Because caching addresses both of the potential bottlenecks, it is the - focal point of high-performance Web server application design. CGI applications couldn't perform in-memory - caching, because they exited after processing just one request. Web server APIs promised to solve this - problem. But how effective is the solution? -

-

- Today's most widely deployed Web server APIs are based on a pool-of-processes server model. The Web server - consists of a parent process and a pool of child processes. Processes do not share memory. An incoming request - is assigned to an idle child at random. The child runs the request to completion before accepting a new - request. A typical server has 32 child processes, a large server has 100 or 200. -

-

- In-memory caching works very poorly in this server model because processes do not share memory and incoming - requests are assigned to processes at random. For instance, to keep a frequently-used file available in memory - the server must keep a file copy per child, which wastes memory. When the file is modified all the children - need to be notified, which is complex (the APIs don't provide a way to do it). -

-

- FastCGI is designed to allow effective in-memory caching. Requests are routed from any child process to a - FastCGI application server. The FastCGI application process maintains an in-memory cache. -

-

- In some cases a single FastCGI application server won't provide enough performance. FastCGI provides two - solutions: session affinity and multi-threading. -

-

- With session affinity you run a pool of application processes and the Web server routes requests to individual - processes based on any information contained in the request. For instance, the server can route according to - the area of content that's been requested, or according to the user. The user might be identified by an - application-specific session identifier, by the user ID contained in an Open Market Secure Link ticket, by the - Basic Authentication user name, or whatever. Each process maintains its own cache, and session affinity - ensures that each incoming request has access to the cache that will speed up processing the most. -

-

- With multi-threading you run an application process that is designed to handle several requests at the same - time. The threads handling concurrent requests share process memory, so they all have access to the same - cache. Multi-threaded programming is complex -- concurrency makes programs difficult to test and debug -- but - with FastCGI you can write single threaded or multithreaded applications. -

-

-

-

- 4. Database Access -

-

- Many Web server applications perform database access. Existing databases contain a lot of valuable - information; Web server applications allow companies to give wider access to the information. -

-

- Access to database management systems, even within a single machine, is via connection-oriented protocols. An - application "logs in" to a database, creating a connection, then performs one or more accesses. - Frequently, the cost of creating the database connection is several times the cost of accessing data over an - established connection. -

-

- To a first approximation database connections are just another type of state to be cached in memory by an - application, so the discussion of caching above applies to caching database connections. -

-

- But database connections are special in one respect: They are often the basis for database licensing. You pay - the database vendor according to the number of concurrent connections the database system can sustain. A - 100-connection license costs much more than a 5-connection license. It follows that caching a database - connection per Web server child process is not just wasteful of system's hardware resources, it could - break your software budget. -

-

-

-

- 5. A Performance Test -

-

- We designed a test application to illustrate performance issues. The application represents a class of - applications that deliver personalized content. The test application is quite a bit simpler than any real - application would be, but still illustrates the main performance issues. We implemented the application using - both FastCGI and a current Web server API, and measured the performance of each. -

-

-

-

- 5.1 Application Scenario -

-

- The application is based on a user database and a set of content files. When a user requests a content file, - the application performs substitutions in the file using information from the user database. The application - then returns the modified content to the user. -

-

- Each request accomplishes the following: -

-

-

-
    -
  1. - authentication check: The user id is used to retrieve and check the password. -

    -

    -
  2. -
  3. - attribute retrieval: The user id is used to retrieve all of the user's attribute values. -

    -

    -
  4. -
  5. - file retrieval and filtering: The request identifies a content file. This file is read and all occurrences - of variable names are replaced with the user's corresponding attribute values. The modified HTML is - returned to the user.
    -
    -
  6. -
-

- Of course, it is fair game to perform caching to shortcut any of these steps. -

-

- Each user's database record (including password and attribute values) is approximately 100 bytes long. - Each content file is 3,000 bytes long. Both database and content files are stored on disks attached to the - server platform. -

-

- A typical user makes 10 file accesses with realistic think times (30-60 seconds) between accesses, then - disappears for a long time. -

-

-

-

- 5.2 Application Design -

-

- The FastCGI application maintains a cache of recently-accessed attribute values from the database. When the - cache misses the application reads from the database. Because only a small number of FastCGI application - processes are needed, each process opens a database connection on startup and keeps it open. -

-

- The FastCGI application is configured as multiple application processes. This is desirable in order to get - concurrent application processing during database reads and file reads. Requests are routed to these - application processes using FastCGI session affinity keyed on the user id. This way all a user's requests - after the first hit in the application's cache. -

-

- The API application does not maintain a cache; the API application has no way to share the cache among its - processes, so the cache hit rate would be too low to make caching pay. The API application opens and closes a - database connection on every request; keeping database connections open between requests would result in an - unrealistically large number of database connections open at the same time, and very low utilization of each - connection. -

-

-

-

- 5.3 Test Conditions -

-

- The test load is generated by 10 HTTP client processes. The processes represent disjoint sets of users. A - process makes a request for a user, then a request for a different user, and so on until it is time for the - first user to make another request. -

-

- For simplicity the 10 client processes run on the same machine as the Web server. This avoids the possibility - that a network bottleneck will obscure the test results. The database system also runs on this machine, as - specified in the application scenario. -

-

- Response time is not an issue under the test conditions. We just measure throughput. -

-

- The API Web server is in these tests is Netscape 1.1. -

-

-

-

- 5.4 Test Results and Discussion -

-

- Here are the test results: -

-

-

-
-
-    FastCGI  12.0 msec per request = 83 requests per second
-    API      36.6 msec per request = 27 requests per second
-
-
-

- Given the big architectural advantage that the FastCGI application enjoys over the API application, it is not - surprising that the FastCGI application runs a lot faster. To gain a deeper understanding of these results we - measured two more conditions: -

-

-

-
    -
  • - API with sustained database connections. If you could afford the extra licensing cost, how much faster - would your API application run? -

    -

    -
    -    API      16.0 msec per request = 61 requests per second
    -
    - Answer: Still not as fast as the FastCGI application. -

    -

    -
  • -
  • - FastCGI with cache disabled. How much benefit does the FastCGI application get from its cache? -

    -

    -
    -    FastCGI  20.1 msec per request = 50 requests per second
    -
    - Answer: A very substantial benefit, even though the database access is quite simple.
    -
    -
  • -
-

- What these two extra experiments show is that if the API and FastCGI applications are implemented in exactly - the same way -- caching database connections but not caching user profile data -- the API application is - slightly faster. This is what you'd expect, since the FastCGI application has to pay the cost of - inter-process communication not present in the API application. -

-

- In the real world the two applications would not be implemented in the same way. FastCGI's architectural - advantage results in much higher performance -- a factor of 3 in this test. With a remote database or more - expensive database access the factor would be higher. With more substantial processing of the content files - the factor would be smaller. -

-

-

-

- 6. Multi-threaded APIs -

-

- Web servers with a multi-threaded internal structure (and APIs to match) are now starting to become more - common. These servers don't have all of the disadvantages described in Section 3. Does this mean that - FastCGI's performance advantages will disappear? -

-

- A superficial analysis says yes. An API-based application in a single-process, multi-threaded server can - maintain caches and database connections the same way a FastCGI application can. The API-based application - does not pay for inter-process communication, so the API-based application will be slightly faster than the - FastCGI application. -

-

- A deeper analysis says no. Multi-threaded programming is complex, because concurrency makes programs much more - difficult to test and debug. In the case of multi-threaded programming to Web server APIs, the normal problems - with multi-threading are compounded by the lack of isolation between different applications and between the - applications and the Web server. With FastCGI you can write programs in the familiar single-threaded style, - get all the reliability and maintainability of process isolation, and still get very high performance. If you - truly need multi-threading, you can write multi-threaded FastCGI and still isolate your multi-threaded - application from other applications and from the server. In short, multi-threading makes Web server APIs - unusable for practially all applications, reducing the choice to FastCGI versus CGI. The performance winner in - that contest is obviously FastCGI. -

-

-

-

- 7. Conclusion -

-

- Just how fast is FastCGI? The answer: very fast indeed. Not because it has some specially-greased path through - the operating system, but because its design is well matched to the needs of most applications. We invite you - to make FastCGI the fast, open foundation for your Web server applications. -

-

-

-
- OMI Home Page -
- © 1995, Open Market, Inc. / mbrown@openmarket.com -
- - - diff --git a/fcgi/doc/fcgi-perl.htm b/fcgi/doc/fcgi-perl.htm deleted file mode 100644 index c5f936c1..00000000 --- a/fcgi/doc/fcgi-perl.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Integrating FastCGI with Perl-5 - - - - -
- [[FastCGI]] -
-
- -
-

- Integrating FastCGI with Perl-5 -

-
- - - -
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-949-7000 URL: http://www.openmarket.com/
- $Id: fcgi-perl.htm,v 1.5 2002/02/25 00:42:59 robs Exp $
-
-
-

- Perl (Practical Extraction and Report Language) is a scripting language that is often used for CGI - programming. Perl is freely available. -

-

- FastCGI support is available for Perl via the FCGI.pm Perl module. FCGI.pm no longer requires SFIO or a - specially-built Perl. FCGI.pm is available via CPAN as well as in the perl directory of this kit. -

-

- Please see the FCGI.pm documentation for examples and details. -

- - - diff --git a/fcgi/doc/fcgi-spec.html b/fcgi/doc/fcgi-spec.html deleted file mode 100644 index e24f3785..00000000 --- a/fcgi/doc/fcgi-spec.html +++ /dev/null @@ -1,1340 +0,0 @@ - - - - - - - - FastCGI Specification - - - - -
-

- FastCGI Specification -

-
-
- Mark R. Brown
- Open Market, Inc.
-

- Document Version: 1.0
- 29 April 1996
-

-
-

-

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
-
- $Id: fcgi-spec.html,v 1.4 2002/02/25 00:42:59 robs Exp $ -
-
- -

-

-
-

- 1. Introduction -

-

- FastCGI is an open extension to CGI that provides high performance for all Internet applications without the - penalties of Web server APIs. -

-

- This specification has narrow goal: to specify, from an application perspective, the interface between a - FastCGI application and a Web server that supports FastCGI. Many Web server features related to FastCGI, e.g. - application management facilities, have nothing to do with the application to Web server interface, and are - not described here. -

-

- This specification is for Unix (more precisely, for POSIX systems that support Berkeley Sockets). The bulk of - the specification is a simple communications protocol that is independent of byte ordering and will extend to - other systems. -

-

- We'll introduce FastCGI by comparing it with conventional Unix implementations of CGI/1.1. FastCGI is - designed to support long-lived application processes, i.e. application servers. That's a major - difference compared with conventional Unix implementations of CGI/1.1, which construct an application process, - use it respond to one request, and have it exit. -

-

- The initial state of a FastCGI process is more spartan than the initial state of a CGI/1.1 process, because - the FastCGI process doesn't begin life connected to anything. It doesn't have the conventional open - files stdin, stdout, and stderr, and it doesn't receive much information - through environment variables. The key piece of initial state in a FastCGI process is a listening socket, - through which it accepts connections from a Web server. -

-

- After a FastCGI process accepts a connection on its listening socket, the process executes a simple protocol - to receive and send data. The protocol serves two purposes. First, the protocol multiplexes a single transport - connection between several independent FastCGI requests. This supports applications that are able to process - concurrent requests using event-driven or multi-threaded programming techniques. Second, within each request - the protocol provides several independent data streams in each direction. This way, for instance, both - stdout and stderr data pass over a single transport connection from the application to the - Web server, rather than requiring separate pipes as with CGI/1.1. -

-

- A FastCGI application plays one of several well-defined roles. The most familiar is the - Responder role, in which the application receives all the information associated with an HTTP request - and generates an HTTP response; that's the role CGI/1.1 programs play. A second role is Authorizer, - in which the application receives all the information associated with an HTTP request and generates an - authorized/unauthorized decision. A third role is Filter, in which the application receives all the - information associated with an HTTP request, plus an extra stream of data from a file stored on the Web - server, and generates a "filtered" version of the data stream as an HTTP response. The framework is - extensible so that more FastCGI can be defined later. -

-

- In the remainder of this specification the terms "FastCGI application," "application - process," or "application server" are abbreviated to "application" whenever that - won't cause confusion. -

-

-

-

- 2. Initial Process State -

-

- 2.1 Argument list -

-

- By default the Web server creates an argument list containing a single element, the name of the application, - taken to be the last component of the executable's path name. The Web server may provide a way to specify - a different application name, or a more elaborate argument list. -

-

- Note that the file executed by the Web server might be an interpreter file (a text file that starts with the - characters #!), in which case the application's argument list is constructed as described in the - execve manpage. -

-

-

-

- 2.2 File descriptors -

-

- The Web server leaves a single file descriptor, FCGI_LISTENSOCK_FILENO, open when the application - begins execution. This descriptor refers to a listening socket created by the Web server. -

-

- FCGI_LISTENSOCK_FILENO equals STDIN_FILENO. The standard descriptors STDOUT_FILENO - and STDERR_FILENO are closed when the application begins execution. A reliable method for an - application to determine whether it was invoked using CGI or FastCGI is to call - getpeername(FCGI_LISTENSOCK_FILENO), which returns -1 with errno set to ENOTCONN - for a FastCGI application. -

-

- The Web server's choice of reliable transport, Unix stream pipes (AF_UNIX) or TCP/IP - (AF_INET), is implicit in the internal state of the FCGI_LISTENSOCK_FILENO socket. -

-

-

-

- 2.3 Environment variables -

-

- The Web server may use environment variables to pass parameters to the application. This specification defines - one such variable, FCGI_WEB_SERVER_ADDRS; we expect more to be defined as the specification evolves. - The Web server may provide a way to bind other environment variables, such as the PATH variable. -

-

-

-

- 2.4 Other state -

-

- The Web server may provide a way to specify other components of an application's initial process state, - such as the priority, user ID, group ID, root directory, and working directory of the process. -

-

-

-

- 3. Protocol Basics -

-

- 3.1 Notation -

-

- We use C language notation to define protocol message formats. All structure elements are defined in terms of - the unsigned char type, and are arranged so that an ISO C compiler lays them out in the obvious - manner, with no padding. The first byte defined in the structure is transmitted first, the second byte second, - etc. -

-

- We use two conventions to abbreviate our definitions. -

-

- First, when two adjacent structure components are named identically except for the suffixes - "B1" and "B0," it means that the two components may be viewed as a - single number, computed as B1<<8 + B0. The name of this single number is the name of the - components, minus the suffixes. This convention generalizes in an obvious way to handle numbers represented in - more than two bytes. -

-

- Second, we extend C structs to allow the form -

-
-        struct {
-            unsigned char mumbleLengthB1;
-            unsigned char mumbleLengthB0;
-            ... /* other stuff */
-            unsigned char mumbleData[mumbleLength];
-        };
-
-

- meaning a structure of varying length, where the length of a component is determined by the values of the - indicated earlier component or components. -

-

-

-

- 3.2 Accepting Transport Connections -

-

- A FastCGI application calls accept() on the socket referred to by file descriptor - FCGI_LISTENSOCK_FILENO to accept a new transport connection. If the accept() succeeds, and - the FCGI_WEB_SERVER_ADDRS environment variable is bound, the application application immediately - performs the following special processing: -

-

-

-
    -
  • - FCGI_WEB_SERVER_ADDRS: The value is a list of valid IP addresses for the Web server. -

    - If FCGI_WEB_SERVER_ADDRS was bound, the application checks the peer IP address of the new - connection for membership in the list. If the check fails (including the possibility that the connection - didn't use TCP/IP transport), the application responds by closing the connection. -

    -

    - FCGI_WEB_SERVER_ADDRS is expressed as a comma-separated list of IP addresses. Each IP address - is written as four decimal numbers in the range [0..255] separated by decimal points. So one legal - binding for this variable is FCGI_WEB_SERVER_ADDRS=199.170.183.28,199.170.183.71. -

    -
    -
    -
  • -
-

- An application may accept several concurrent transport connections, but it need not do so. -

-

-

-

- 3.3 Records -

-

- Applications execute requests from a Web server using a simple protocol. Details of the protocol depend upon - the application's role, but roughly speaking the Web server first sends parameters and other data to the - application, then the application sends result data to the Web server, and finally the application sends the - Web server an indication that the request is complete. -

-

- All data that flows over the transport connection is carried in FastCGI records. FastCGI records - accomplish two things. First, records multiplex the transport connection between several independent FastCGI - requests. This multiplexing supports applications that are able to process concurrent requests using - event-driven or multi-threaded programming techniques. Second, records provide several independent data - streams in each direction within a single request. This way, for instance, both stdout and - stderr data can pass over a single transport connection from the application to the Web server, - rather than requiring separate connections. -

-

-

-
-        typedef struct {
-            unsigned char version;
-            unsigned char type;
-            unsigned char requestIdB1;
-            unsigned char requestIdB0;
-            unsigned char contentLengthB1;
-            unsigned char contentLengthB0;
-            unsigned char paddingLength;
-            unsigned char reserved;
-            unsigned char contentData[contentLength];
-            unsigned char paddingData[paddingLength];
-        } FCGI_Record;
-
-

- A FastCGI record consists of a fixed-length prefix followed by a variable number of content and padding bytes. - A record contains seven components: -

-

-

-
    -
  • - version: Identifies the FastCGI protocol version. This specification documents - FCGI_VERSION_1. -

    -

    -
  • -
  • - type: Identifies the FastCGI record type, i.e. the general function that the record performs. - Specific record types and their functions are detailed in later sections. -

    -

    -
  • -
  • - requestId: Identifies the FastCGI request to which the record belongs. -

    -

    -
  • -
  • - contentLength: The number of bytes in the contentData component of the record. -

    -

    -
  • -
  • - paddingLength: The number of bytes in the paddingData component of the record. -

    -

    -
  • -
  • - contentData: Between 0 and 65535 bytes of data, interpreted according to the record type. -

    -

    -
  • -
  • - paddingData: Between 0 and 255 bytes of data, which are ignored.
    -
    -
  • -
-

- We use a relaxed C struct initializer syntax to specify constant FastCGI records. We omit the - version component, ignore padding, and treat requestId as a number. Thus - {FCGI_END_REQUEST, 1, {FCGI_REQUEST_COMPLETE,0}} is a record with type == FCGI_END_REQUEST, - requestId == 1, and contentData == {FCGI_REQUEST_COMPLETE,0}. -

-

-

-
- Padding -
-

- The protocol allows senders to pad the records they send, and requires receivers to interpret the - paddingLength and skip the paddingData. Padding allows senders to keep data aligned for more - efficient processing. Experience with the X window system protocols shows the performance benefit of such - alignment. -

-

- We recommend that records be placed on boundaries that are multiples of eight bytes. The fixed-length portion - of a FCGI_Record is eight bytes. -

-

-

-
- Managing Request IDs -
-

- The Web server re-uses FastCGI request IDs; the application keeps track of the current state of each request - ID on a given transport connection. A request ID R becomes active when the application receives a - record {FCGI_BEGIN_REQUEST, R, ...} and becomes inactive when the application sends a record - {FCGI_END_REQUEST, R, ...} to the Web server. -

-

- While a request ID R is inactive, the application ignores records with requestId == R, - except for FCGI_BEGIN_REQUEST records as just described. -

-

- The Web server attempts to keep FastCGI request IDs small. That way the application can keep track of request - ID states using a short array rather than a long array or a hash table. An application also has the option of - accepting only one request at a time. In this case the application simply checks incoming requestId - values against the current request ID. -

-

-

-
- Types of Record Types -
-

- There are two useful ways of classifying FastCGI record types. -

-

- The first distinction is between management records and application records. A management record - contains information that is not specific to any Web server request, such as information about the protocol - capabilities of the application. An application record contains information about a particular request, - identified by the requestId component. -

-

- Management records have a requestId value of zero, also called the null request ID. - Application records have a nonzero requestId. -

-

- The second distinction is between discrete and stream records. A discrete record contains a - meaningful unit of data all by itself. A stream record is part of a stream, i.e. a series of zero or - more non-empty records (length != 0) of the stream type, followed by an empty record (length == - 0) of the stream type. The contentData components of a stream's records, when concatenated, - form a byte sequence; this byte sequence is the value of the stream. Therefore the value of a stream is - independent of how many records it contains or how its bytes are divided among the non-empty records. -

-

- These two classifications are independent. Among the record types defined in this version of the FastCGI - protocol, all management record types are also discrete record types, and nearly all application record types - are stream record types. But three application record types are discrete, and nothing prevents defining a - management record type that's a stream in some later version of the protocol. -

-

-

-

- 3.4 Name-Value Pairs -

-

- In many of their roles, FastCGI applications need to read and write varying numbers of variable-length values. - So it is useful to adopt a standard format for encoding a name-value pair. -

-

- FastCGI transmits a name-value pair as the length of the name, followed by the length of the value, followed - by the name, followed by the value. Lengths of 127 bytes and less can be encoded in one byte, while longer - lengths are always encoded in four bytes: -

-

-

-
-        typedef struct {
-            unsigned char nameLengthB0;  /* nameLengthB0  >> 7 == 0 */
-            unsigned char valueLengthB0; /* valueLengthB0 >> 7 == 0 */
-            unsigned char nameData[nameLength];
-            unsigned char valueData[valueLength];
-        } FCGI_NameValuePair11;
-
-        typedef struct {
-            unsigned char nameLengthB0;  /* nameLengthB0  >> 7 == 0 */
-            unsigned char valueLengthB3; /* valueLengthB3 >> 7 == 1 */
-            unsigned char valueLengthB2;
-            unsigned char valueLengthB1;
-            unsigned char valueLengthB0;
-            unsigned char nameData[nameLength];
-            unsigned char valueData[valueLength
-                    ((B3 & 0x7f) << 24) + (B2 << 16) + (B1 << 8) + B0];
-        } FCGI_NameValuePair14;
-
-        typedef struct {
-            unsigned char nameLengthB3;  /* nameLengthB3  >> 7 == 1 */
-            unsigned char nameLengthB2;
-            unsigned char nameLengthB1;
-            unsigned char nameLengthB0;
-            unsigned char valueLengthB0; /* valueLengthB0 >> 7 == 0 */
-            unsigned char nameData[nameLength
-                    ((B3 & 0x7f) << 24) + (B2 << 16) + (B1 << 8) + B0];
-            unsigned char valueData[valueLength];
-        } FCGI_NameValuePair41;
-
-        typedef struct {
-            unsigned char nameLengthB3;  /* nameLengthB3  >> 7 == 1 */
-            unsigned char nameLengthB2;
-            unsigned char nameLengthB1;
-            unsigned char nameLengthB0;
-            unsigned char valueLengthB3; /* valueLengthB3 >> 7 == 1 */
-            unsigned char valueLengthB2;
-            unsigned char valueLengthB1;
-            unsigned char valueLengthB0;
-            unsigned char nameData[nameLength
-                    ((B3 & 0x7f) << 24) + (B2 << 16) + (B1 << 8) + B0];
-            unsigned char valueData[valueLength
-                    ((B3 & 0x7f) << 24) + (B2 << 16) + (B1 << 8) + B0];
-        } FCGI_NameValuePair44;
-
-

- The high-order bit of the first byte of a length indicates the length's encoding. A high-order zero - implies a one-byte encoding, a one a four-byte encoding. -

-

- This name-value pair format allows the sender to transmit binary values without additional encoding, and - enables the receiver to allocate the correct amount of storage immediately even for large values. -

-

-

-

- 3.5 Closing Transport Connections -

-

- The Web server controls the lifetime of transport connections. The Web server can close a connection when no - requests are active. Or the Web server can delegate close authority to the application (see - FCGI_BEGIN_REQUEST). In this case the application closes the connection at the end of a specified - request. -

-

- This flexibility accommodates a variety of application styles. Simple applications will process one request at - a time and accept a new transport connection for each request. More complex applications will process - concurrent requests, over one or multiple transport connections, and will keep transport connections open for - long periods of time. -

-

- A simple application gets a significant performance boost by closing the transport connection when it has - finished writing its response. The Web server needs to control the connection lifetime for long-lived - connections. -

-

- When an application closes a connection or finds that a connection has closed, the application initiates a new - connection. -

-

-

-

- 4. Management Record Types -

-

- 4.1 FCGI_GET_VALUES, FCGI_GET_VALUES_RESULT -

-

- The Web server can query specific variables within the application. The server will typically perform a query - on application startup in order to to automate certain aspects of system configuration. -

-

- The application receives a query as a record {FCGI_GET_VALUES, 0, ...}. The contentData - portion of a FCGI_GET_VALUES record contains a sequence of name-value pairs with empty values. -

-

- The application responds by sending a record {FCGI_GET_VALUES_RESULT, 0, ...} with the values - supplied. If the application doesn't understand a variable name that was included in the query, it omits - that name from the response. -

-

- FCGI_GET_VALUES is designed to allow an open-ended set of variables. The initial set provides - information to help the server perform application and connection management: -

-

-

-
    -
  • - FCGI_MAX_CONNS: The maximum number of concurrent transport connections this application will - accept, e.g. "1" or "10". -

    -

    -
  • -
  • - FCGI_MAX_REQS: The maximum number of concurrent requests this application will accept, e.g. - "1" or "50". -

    -

    -
  • -
  • - FCGI_MPXS_CONNS: "0" if this application does not multiplex connections (i.e. - handle concurrent requests over each connection), "1" otherwise.
    -
    -
  • -
-

- An application may receive a FCGI_GET_VALUES record at any time. The application's response - should not involve the application proper but only the FastCGI library. -

-

-

-

- 4.2 FCGI_UNKNOWN_TYPE -

-

- The set of management record types is likely to grow in future versions of this protocol. To provide for this - evolution, the protocol includes the FCGI_UNKNOWN_TYPE management record. When an application - receives a management record whose type T it does not understand, the application responds with - {FCGI_UNKNOWN_TYPE, 0, {T}}. -

-

- The contentData component of a FCGI_UNKNOWN_TYPE record has the form: -

-
-        typedef struct {
-            unsigned char type;    
-            unsigned char reserved[7];
-        } FCGI_UnknownTypeBody;
-
-

- The type component is the type of the unrecognized management record. -

-

-

-

- 5. Application Record Types -

-

- 5.1 FCGI_BEGIN_REQUEST -

-

- The Web server sends a FCGI_BEGIN_REQUEST record to start a request. -

-

- The contentData component of a FCGI_BEGIN_REQUEST record has the form: -

-
-        typedef struct {
-            unsigned char roleB1;
-            unsigned char roleB0;
-            unsigned char flags;
-            unsigned char reserved[5];
-        } FCGI_BeginRequestBody;
-
-

- The role component sets the role the Web server expects the application to play. The - currently-defined roles are: -

-

-

-
    -
  • - FCGI_RESPONDER -
  • -
  • - FCGI_AUTHORIZER -
  • -
  • - FCGI_FILTER -
  • -
-

- Roles are described in more detail in Section 6 below. -

-

- The flags component contains a bit that controls connection shutdown: -

-

-

-
    -
  • - flags & FCGI_KEEP_CONN: If zero, the application closes the connection after responding to - this request. If not zero, the application does not close the connection after responding to this request; - the Web server retains responsibility for the connection.
    -
    -
  • -
-

- 5.2 Name-Value Pair Stream: FCGI_PARAMS -

- FCGI_PARAMS -

- is a stream record type used in sending name-value pairs from the Web server to the application. The - name-value pairs are sent down the stream one after the other, in no specified order. -

-

-

-

- 5.3 Byte Streams: FCGI_STDIN, FCGI_DATA, FCGI_STDOUT, - FCGI_STDERR -

- FCGI_STDIN -

- is a stream record type used in sending arbitrary data from the Web server to the application. - FCGI_DATA is a second stream record type used to send additional data to the application. -

-

- FCGI_STDOUT and FCGI_STDERR are stream record types for sending arbitrary data and error - data respectively from the application to the Web server. -

-

-

-

- 5.4 FCGI_ABORT_REQUEST -

-

- The Web server sends a FCGI_ABORT_REQUEST record to abort a request. After receiving - {FCGI_ABORT_REQUEST, R}, the application responds as soon as possible with {FCGI_END_REQUEST, R, - {FCGI_REQUEST_COMPLETE, appStatus}}. This is truly a response from the application, not a low-level - acknowledgement from the FastCGI library. -

-

- A Web server aborts a FastCGI request when an HTTP client closes its transport connection while the FastCGI - request is running on behalf of that client. The situation may seem unlikely; most FastCGI requests will have - short response times, with the Web server providing output buffering if the client is slow. But the FastCGI - application may be delayed communicating with another system, or performing a server push. -

-

- When a Web server is not multiplexing requests over a transport connection, the Web server can abort a request - by closing the request's transport connection. But with multiplexed requests, closing the transport - connection has the unfortunate effect of aborting all the requests on the connection. -

-

-

-

- 5.5 FCGI_END_REQUEST -

-

- The application sends a FCGI_END_REQUEST record to terminate a request, either because the - application has processed the request or because the application has rejected the request. -

-

- The contentData component of a FCGI_END_REQUEST record has the form: -

-
-        typedef struct {
-            unsigned char appStatusB3;
-            unsigned char appStatusB2;
-            unsigned char appStatusB1;
-            unsigned char appStatusB0;
-            unsigned char protocolStatus;
-            unsigned char reserved[3];
-        } FCGI_EndRequestBody;
-
-

- The appStatus component is an application-level status code. Each role documents its usage of - appStatus. -

-

- The protocolStatus component is a protocol-level status code; the possible protocolStatus - values are: -

-

-

-
    -
  • - FCGI_REQUEST_COMPLETE: normal end of request. -

    -

    -
  • -
  • - FCGI_CANT_MPX_CONN: rejecting a new request. This happens when a Web server sends concurrent - requests over one connection to an application that is designed to process one request at a time per - connection. -

    -

    -
  • -
  • - FCGI_OVERLOADED: rejecting a new request. This happens when the application runs out of some - resource, e.g. database connections. -

    -

    -
  • -
  • - FCGI_UNKNOWN_ROLE: rejecting a new request. This happens when the Web server has specified a role - that is unknown to the application.
    -
    -
  • -
-

- 6. Roles -

-

- 6.1 Role Protocols -

-

- Role protocols only include records with application record types. They transfer essentially all data using - streams. -

-

- To make the protocols reliable and to simplify application programming, role protocols are designed to use - nearly sequential marshalling. In a protocol with strictly sequential marshalling, the application - receives its first input, then its second, etc. until it has received them all. Similarly, the application - sends its first output, then its second, etc. until it has sent them all. Inputs are not interleaved with each - other, and outputs are not interleaved with each other. -

-

- The sequential marshalling rule is too restrictive for some FastCGI roles, because CGI programs can write to - both stdout and stderr without timing restrictions. So role protocols that use both - FCGI_STDOUT and FCGI_STDERR allow these two streams to be interleaved. -

-

- All role protocols use the FCGI_STDERR stream just the way stderr is used in conventional - applications programming: to report application-level errors in an intelligible way. Use of the - FCGI_STDERR stream is always optional. If an application has no errors to report, it sends either no - FCGI_STDERR records or one zero-length FCGI_STDERR record. -

-

- When a role protocol calls for transmitting a stream other than FCGI_STDERR, at least one record of - the stream type is always transmitted, even if the stream is empty. -

-

- Again in the interests of reliable protocols and simplified application programming, role protocols are - designed to be nearly request-response. In a truly request-response protocol, the application receives - all of its input records before sending its first output record. Request-response protocols don't allow - pipelining. -

-

- The request-response rule is too restrictive for some FastCGI roles; after all, CGI programs aren't - restricted to read all of stdin before starting to write stdout. So some role protocols - allow that specific possibility. First the application receives all of its inputs except for a final stream - input. As the application begins to receive the final stream input, it can begin writing its output. -

-

- When a role protocol uses FCGI_PARAMS to transmit textual values, such as the values that CGI - programs obtain from environment variables, the length of the value does not include the terminating null - byte, and the value itself does not include a null byte. An application that needs to provide - environ(7) format name-value pairs must insert an equal sign between the name and value and append a - null byte after the value. -

-

- Role protocols do not support the non-parsed header feature of CGI. FastCGI applications set response status - using the Status and Location CGI headers. -

-

-

-

- 6.2 Responder -

-

- A Responder FastCGI application has the same purpose as a CGI/1.1 program: It receives all the information - associated with an HTTP request and generates an HTTP response. -

-

- It suffices to explain how each element of CGI/1.1 is emulated by a Responder: -

-
-
-
    -
  • - The Responder application receives CGI/1.1 environment variables from the Web server over - FCGI_PARAMS. -

    -

    -
  • -
  • - Next the Responder application receives CGI/1.1 stdin data from the Web server over - FCGI_STDIN. The application receives at most CONTENT_LENGTH bytes from this stream before - receiving the end-of-stream indication. (The application receives less than CONTENT_LENGTH bytes - only if the HTTP client fails to provide them, e.g. because the client crashed.) -

    -

    -
  • -
  • - The Responder application sends CGI/1.1 stdout data to the Web server over FCGI_STDOUT, - and CGI/1.1 stderr data over FCGI_STDERR. The application sends these concurrently, not - one after the other. The application must wait to finish reading FCGI_PARAMS before it begins - writing FCGI_STDOUT and FCGI_STDERR, but it needn't finish reading from - FCGI_STDIN before it begins writing these two streams. -

    -

    -
  • -
  • - After sending all its stdout and stderr data, the Responder application sends a - FCGI_END_REQUEST record. The application sets the protocolStatus component to - FCGI_REQUEST_COMPLETE and the appStatus component to the status code that the CGI program - would have returned via the exit system call.
    -
    -
  • -
-

- A Responder performing an update, e.g. implementing a POST method, should compare the number of bytes - received on FCGI_STDIN with CONTENT_LENGTH and abort the update if the two numbers are not - equal. -

-

-

-

- 6.3 Authorizer -

-

- An Authorizer FastCGI application receives all the information associated with an HTTP request and generates - an authorized/unauthorized decision. In case of an authorized decision the Authorizer can also associate - name-value pairs with the HTTP request; when giving an unauthorized decision the Authorizer sends a complete - response to the HTTP client. -

-

- Since CGI/1.1 defines a perfectly good way to represent the information associated with an HTTP request, - Authorizers use the same representation: -

-

-

-
    -
  • - The Authorizer application receives HTTP request information from the Web server on the - FCGI_PARAMS stream, in the same format as a Responder. The Web server does not send - CONTENT_LENGTH, PATH_INFO, PATH_TRANSLATED, and SCRIPT_NAME headers. -

    -

    -
  • -
  • - The Authorizer application sends stdout and stderr data in the same manner as a - Responder. The CGI/1.1 response status specifies the disposition of the request. If the application sends - status 200 (OK), the Web server allows access. Depending upon its configuration the Web server may proceed - with other access checks, including requests to other Authorizers. -

    - An Authorizer application's 200 response may include headers whose names are prefixed with - Variable-. These headers communicate name-value pairs from the application to the Web server. - For instance, the response header -

    -
    -        Variable-AUTH_METHOD: database lookup
    -
    - transmits the value "database lookup" with name AUTH-METHOD. The server - associates such name-value pairs with the HTTP request and includes them in subsequent CGI or FastCGI - requests performed in processing the HTTP request. When the application gives a 200 response, the server - ignores response headers whose names aren't prefixed with Variable- prefix, and ignores any - response content. -

    - For Authorizer response status values other than "200" (OK), the Web server denies access and - sends the response status, headers, and content back to the HTTP client. -

    -
    -
    -
  • -
-

- 6.4 Filter -

-

- A Filter FastCGI application receives all the information associated with an HTTP request, plus an extra - stream of data from a file stored on the Web server, and generates a "filtered" version of the data - stream as an HTTP response. -

-

- A Filter is similar in functionality to a Responder that takes a data file as a parameter. The difference is - that with a Filter, both the data file and the Filter itself can be access controlled using the Web - server's access control mechanisms, while a Responder that takes the name of a data file as a parameter - must perform its own access control checks on the data file. -

-

- The steps taken by a Filter are similar to those of a Responder. The server presents the Filter with - environment variables first, then standard input (normally form POST data), finally the data file - input: -

-
-
-
    -
  • - Like a Responder, the Filter application receives name-value pairs from the Web server over - FCGI_PARAMS. Filter applications receive two Filter-specific variables: - FCGI_DATA_LAST_MOD and FCGI_DATA_LENGTH. -

    -

    -
  • -
  • - Next the Filter application receives CGI/1.1 stdin data from the Web server over - FCGI_STDIN. The application receives at most CONTENT_LENGTH bytes from this stream before - receiving the end-of-stream indication. (The application receives less than CONTENT_LENGTH bytes - only if the HTTP client fails to provide them, e.g. because the client crashed.) -

    -

    -
  • -
  • - Next the Filter application receives the file data from the Web server over FCGI_DATA. This - file's last modification time (expressed as an integer number of seconds since the epoch January 1, - 1970 UTC) is FCGI_DATA_LAST_MOD; the application may consult this variable and respond from a - cache without reading the file data. The application reads at most FCGI_DATA_LENGTH bytes from - this stream before receiving the end-of-stream indication. -

    -

    -
  • -
  • - The Filter application sends CGI/1.1 stdout data to the Web server over FCGI_STDOUT, and - CGI/1.1 stderr data over FCGI_STDERR. The application sends these concurrently, not one - after the other. The application must wait to finish reading FCGI_STDIN before it begins writing - FCGI_STDOUT and FCGI_STDERR, but it needn't finish reading from FCGI_DATA - before it begins writing these two streams. -

    -

    -
  • -
  • - After sending all its stdout and stderr data, the application sends a - FCGI_END_REQUEST record. The application sets the protocolStatus component to - FCGI_REQUEST_COMPLETE and the appStatus component to the status code that a similar CGI - program would have returned via the exit system call.
    -
    -
  • -
-

- A Filter should compare the number of bytes received on FCGI_STDIN with CONTENT_LENGTH and - on FCGI_DATA with FCGI_DATA_LENGTH. If the numbers don't match and the Filter is a - query, the Filter response should provide an indication that data is missing. If the numbers don't match - and the Filter is an update, the Filter should abort the update. -

-

-

-

- 7. Errors -

-

- A FastCGI application exits with zero status to indicate that it terminated on purpose, e.g. in order to - perform a crude form of garbage collection. A FastCGI application that exits with nonzero status is assumed to - have crashed. How a Web server or other application manager responds to applications that exit with zero or - nonzero status is outside the scope of this specification. -

-

- A Web server can request that a FastCGI application exit by sending it SIGTERM. If the application - ignores SIGTERM the Web server can resort to SIGKILL. -

-

- FastCGI applications report application-level errors with the FCGI_STDERR stream and the - appStatus component of the FCGI_END_REQUEST record. In many cases an error will be reported - directly to the user via the FCGI_STDOUT stream. -

-

- On Unix, applications report lower-level errors, including FastCGI protocol errors and syntax errors in - FastCGI environment variables, to syslog. Depending upon the severity of the error, the application - may either continue or exit with nonzero status. -

-

-

-

- 8. Types and Constants -

-
-/*
- * Listening socket file number
- */
-#define FCGI_LISTENSOCK_FILENO 0
-
-typedef struct {
-    unsigned char version;
-    unsigned char type;
-    unsigned char requestIdB1;
-    unsigned char requestIdB0;
-    unsigned char contentLengthB1;
-    unsigned char contentLengthB0;
-    unsigned char paddingLength;
-    unsigned char reserved;
-} FCGI_Header;
-
-/*
- * Number of bytes in a FCGI_Header.  Future versions of the protocol
- * will not reduce this number.
- */
-#define FCGI_HEADER_LEN  8
-
-/*
- * Value for version component of FCGI_Header
- */
-#define FCGI_VERSION_1           1
-
-/*
- * Values for type component of FCGI_Header
- */
-#define FCGI_BEGIN_REQUEST       1
-#define FCGI_ABORT_REQUEST       2
-#define FCGI_END_REQUEST         3
-#define FCGI_PARAMS              4
-#define FCGI_STDIN               5
-#define FCGI_STDOUT              6
-#define FCGI_STDERR              7
-#define FCGI_DATA                8
-#define FCGI_GET_VALUES          9
-#define FCGI_GET_VALUES_RESULT  10
-#define FCGI_UNKNOWN_TYPE       11
-#define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
-
-/*
- * Value for requestId component of FCGI_Header
- */
-#define FCGI_NULL_REQUEST_ID     0
-
-typedef struct {
-    unsigned char roleB1;
-    unsigned char roleB0;
-    unsigned char flags;
-    unsigned char reserved[5];
-} FCGI_BeginRequestBody;
-
-typedef struct {
-    FCGI_Header header;
-    FCGI_BeginRequestBody body;
-} FCGI_BeginRequestRecord;
-
-/*
- * Mask for flags component of FCGI_BeginRequestBody
- */
-#define FCGI_KEEP_CONN  1
-
-/*
- * Values for role component of FCGI_BeginRequestBody
- */
-#define FCGI_RESPONDER  1
-#define FCGI_AUTHORIZER 2
-#define FCGI_FILTER     3
-
-typedef struct {
-    unsigned char appStatusB3;
-    unsigned char appStatusB2;
-    unsigned char appStatusB1;
-    unsigned char appStatusB0;
-    unsigned char protocolStatus;
-    unsigned char reserved[3];
-} FCGI_EndRequestBody;
-
-typedef struct {
-    FCGI_Header header;
-    FCGI_EndRequestBody body;
-} FCGI_EndRequestRecord;
-
-/*
- * Values for protocolStatus component of FCGI_EndRequestBody
- */
-#define FCGI_REQUEST_COMPLETE 0
-#define FCGI_CANT_MPX_CONN    1
-#define FCGI_OVERLOADED       2
-#define FCGI_UNKNOWN_ROLE     3
-
-/*
- * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
- */
-#define FCGI_MAX_CONNS  "FCGI_MAX_CONNS"
-#define FCGI_MAX_REQS   "FCGI_MAX_REQS"
-#define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
-
-typedef struct {
-    unsigned char type;    
-    unsigned char reserved[7];
-} FCGI_UnknownTypeBody;
-
-typedef struct {
-    FCGI_Header header;
-    FCGI_UnknownTypeBody body;
-} FCGI_UnknownTypeRecord;
-
-

-

-

- 9. References -

-

- National Center for Supercomputer Applications, The Common Gateway - Interface, version CGI/1.1. -

-

- D.R.T. Robinson, The WWW - Common Gateway Interface Version 1.1, Internet-Draft, 15 February 1996. -

-

-

-

- A. Table: Properties of the record types -

-

- The following chart lists all of the record types and indicates these properties of each: -

-

-

-
    -
  • - WS->App: records of this type can only be sent by the Web server to the application. Records of - other types can only be sent by the application to the Web server. -

    -

    -
  • -
  • - management: records of this type contain information that is not specific to a Web server request, - and use the null request ID. Records of other types contain request-specific information, and cannot use - the null request ID. -

    -

    -
  • -
  • - stream: records of this type form a stream, terminated by a record with empty - contentData. Records of other types are discrete; each carries a meaningful unit of data.
    -
    -
  • -
-
-                               WS->App   management  stream
-
-        FCGI_GET_VALUES           x          x
-        FCGI_GET_VALUES_RESULT               x
-        FCGI_UNKNOWN_TYPE                    x
-
-        FCGI_BEGIN_REQUEST        x
-        FCGI_ABORT_REQUEST        x
-        FCGI_END_REQUEST
-        FCGI_PARAMS               x                    x
-        FCGI_STDIN                x                    x
-        FCGI_DATA                 x                    x
-        FCGI_STDOUT                                    x 
-        FCGI_STDERR                                    x     
-
-
-
-

-

-

- B. Typical Protocol Message Flow -

-

- Additional notational conventions for the examples: -

-
    -
  • - The contentData of stream records (FCGI_PARAMS, FCGI_STDIN, - FCGI_STDOUT, and FCGI_STDERR) is represented as a character string. A string ending in - " ... " is too long to display, so only a prefix is shown. -
  • -
  • - Messages sent to the Web server are indented with respect to messages received from the Web server. -
  • -
  • - Messages are shown in the time sequence experienced by the application. -
  • -
-

- 1. A simple request with no data on stdin, and a successful response: -

-
-{FCGI_BEGIN_REQUEST,   1, {FCGI_RESPONDER, 0}}
-{FCGI_PARAMS,          1, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
-{FCGI_PARAMS,          1, ""}
-{FCGI_STDIN,           1, ""}
-
-    {FCGI_STDOUT,      1, "Content-type: text/html\r\n\r\n<html>\n<head> ... "}
-    {FCGI_STDOUT,      1, ""}
-    {FCGI_END_REQUEST, 1, {0, FCGI_REQUEST_COMPLETE}}
-
-

- 2. Similar to example 1, but this time with data on stdin. The Web server chooses to send the - parameters using more FCGI_PARAMS records than before: -

-
-{FCGI_BEGIN_REQUEST,   1, {FCGI_RESPONDER, 0}}
-{FCGI_PARAMS,          1, "\013\002SERVER_PORT80\013\016SER"}
-{FCGI_PARAMS,          1, "VER_ADDR199.170.183.42 ... "}
-{FCGI_PARAMS,          1, ""}
-{FCGI_STDIN,           1, "quantity=100&item=3047936"}
-{FCGI_STDIN,           1, ""}
-
-    {FCGI_STDOUT,      1, "Content-type: text/html\r\n\r\n<html>\n<head> ... "}
-    {FCGI_STDOUT,      1, ""}
-    {FCGI_END_REQUEST, 1, {0, FCGI_REQUEST_COMPLETE}}
-
-

- 3. Similar to example 1, but this time the application detects an error. The application logs a message to - stderr, returns a page to the client, and returns non-zero exit status to the Web server. The - application chooses to send the page using more FCGI_STDOUT records: -

-
-{FCGI_BEGIN_REQUEST,   1, {FCGI_RESPONDER, 0}}
-{FCGI_PARAMS,          1, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
-{FCGI_PARAMS,          1, ""}
-{FCGI_STDIN,           1, ""}
-
-    {FCGI_STDOUT,      1, "Content-type: text/html\r\n\r\n<ht"}
-    {FCGI_STDERR,      1, "config error: missing SI_UID\n"}
-    {FCGI_STDOUT,      1, "ml>\n<head> ... "}
-    {FCGI_STDOUT,      1, ""}
-    {FCGI_STDERR,      1, ""}
-    {FCGI_END_REQUEST, 1, {938, FCGI_REQUEST_COMPLETE}}
-
-

- 4. Two instances of example 1, multiplexed onto a single connection. The first request is more difficult than - the second, so the application finishes the requests out of order: -

-
-{FCGI_BEGIN_REQUEST,   1, {FCGI_RESPONDER, FCGI_KEEP_CONN}}
-{FCGI_PARAMS,          1, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
-{FCGI_PARAMS,          1, ""}
-{FCGI_BEGIN_REQUEST,   2, {FCGI_RESPONDER, FCGI_KEEP_CONN}}
-{FCGI_PARAMS,          2, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
-{FCGI_STDIN,           1, ""}
-
-    {FCGI_STDOUT,      1, "Content-type: text/html\r\n\r\n"}
-
-{FCGI_PARAMS,          2, ""}
-{FCGI_STDIN,           2, ""}
-
-    {FCGI_STDOUT,      2, "Content-type: text/html\r\n\r\n<html>\n<head> ... "}
-    {FCGI_STDOUT,      2, ""}
-    {FCGI_END_REQUEST, 2, {0, FCGI_REQUEST_COMPLETE}}
-    {FCGI_STDOUT,      1, "<html>\n<head> ... "}
-    {FCGI_STDOUT,      1, ""}
-    {FCGI_END_REQUEST, 1, {0, FCGI_REQUEST_COMPLETE}}
-
-

-

-
-
- © 1995, 1996 Open Market, Inc. / mbrown@openmarket.com -
- - - diff --git a/fcgi/doc/fcgi-tcl.htm b/fcgi/doc/fcgi-tcl.htm deleted file mode 100644 index 16dd7670..00000000 --- a/fcgi/doc/fcgi-tcl.htm +++ /dev/null @@ -1,366 +0,0 @@ - - - - - Integrating FastCGI with Tcl - - - - -
- [[FastCGI]] -
-
-
-

- Integrating FastCGI with Tcl -

-
- - - -

- Michael S. Shanzer
- Open Market, Inc.
- 19 January 1995 -

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
- $Id: fcgi-tcl.htm,v 1.4 2002/02/25 00:42:59 robs Exp $
-
-
-

- 1. Introduction -

-

- Tcl (tool command language) is an embeddable scripting language that's often used for CGI programming. Tcl - is freely available as a source kit. -

-

- We've built a Tcl interpreter that runs as a FastCGI application. Our purpose in doing so was twofold: -

-
    -
  • - Create a useful artifact. Open Market has written many CGI applications using Tcl. Now we'd like - to turn them into FastCGI applications. -

    -

    -
  • -
  • - Demonstrate how easy it is to integrate FastCGI with an existing program. The Tcl interpreter is a - substantial program, so integrating FastCGI with the Tcl interpreter is a good test of the - fcgi_stdio compatability library. -
  • -
-

- We've succeeded on both counts. We now have a platform for migrating our Tcl-based CGI applications to - FastCGI. And the integration required a very small effort. The only source code change to the Tcl interpreter - was the routine addition of a handful of new commands: FCGI_Accept, FCGI_Finish, - FCGI_SetExitStatus, and FCGI_StartFilterData. -

-

- The FastCGI-integrated Tcl interpreter works as usual when run from a shell or as a CGI program. You don't - need two Tcls, one for FastCGI and one for other uses. -

-

- The remainder of this document gives a recipe you can follow to build FastCGI into Tcl, explains what's - happening in the recipe, and illustrates the use of FastCGI Tcl with an example program. -

-

-

-

- 2. Recipe -

-

- Here are the assumptions embedded in the following recipe: -

-
    -
  • - You are building Tcl 7.4p3, the current stable Tcl release as this is written. You unpack the Tcl kit into - a directory tcl7.4 that's a sibling of the FastCGI kit directory fcgi-devel-kit. -

    -

    -
  • -
  • - You have gcc version 2.7 installed on your system, and use it in the build. gcc is convenient because it - supports the -include command-line option that instructs the C preprocessor to include a specific - file before processing any other include files. This allows you to include fcgi_stdio.h without - modifying Tcl source files. (The reason for specifying gcc version 2.7 is that I have experienced bad - behavior with an earlier version and the -include flag -- the C preprocessor died with SIGABRT.) -

    -

    -
  • -
  • - You have GNU autoconf installed on your system. If you don't have GNU autoconf, you will have to make - certain edits by hand and repeat these edits for each build platform.
    -
    -
  • -
-

- If those are valid assumptions, follow these steps: -

-
    -
  1. - Build the FastCGI Developer's Kit. Tcl needs to link against libfcgi.a, so build the FastCGI Developer's Kit in order to create this library for your - platform. -

    -

    -
  2. -
  3. - Pull the Tcl 7.4p3 kit. You'll need the files tcl7.4.tar.Z, tcl7.4p1.patch.gz, tcl7.4p2.patch.gz, and tcl7.4p3.patch.gz. (Some older Netscape browsers - can't perform these retrievals because of a protocol conflict between Netscape and Sun's firewall.) -

    - Unpack the tar file in the parent directory of the FastCGI kit directory you used in the previous step, - so that the directories tcl7.4 and fcgi-devel-kit are siblings. After unpacking the - tar file, follow the directions in the README to apply the patches. -

    -

    - The Sun Labs Tcl/Tk Project Page contains a wealth - of information on Tcl, including up to date information on the latest kits. -

    -

    -

    -
  4. -
  5. - Copy the files tclFCGI.c, tclAppInit.c, Makefile.in, and - configure.in from the FastCGI kit. -
    -    > cd tcl7.4
    -    > mv tclAppInit.c tclAppInit.c.orig
    -    > mv Makefile.in.orig Makefile.in.orig.orig
    -    > mv Makefile.in Makefile.in.orig
    -    > mv configure.in configure.in.orig
    -    > cp ../fcgi-devel-kit/tcl/tcl7.4/* .
    -    > cp ../fcgi-devel-kit/tcl/common/* .
    -
    -
  6. -
  7. - Create a new configure script. -
    -    > autoconf
    -
    -
  8. -
  9. - Configure and build. -
    -    > ./configure
    -    > make
    -
    - The make creates the Tcl interpreter tclsh and library archive libtcl.a (for - embedding Tcl in your own C applications). The Tcl README file explains how you can experiment - with tclsh without installing it in a standard place.
    -
    -
  10. -
-

- 3. Recipe Explained -

-

- The recipe alone is fine if you are using Tcl 7.4p3, you have gcc version 2.7, and you have GNU autoconf. In - case one or more of these assumptions doesn't hold for you, and to illuminate how little work was involved - in integrating FastCGI, here's an explanation of how and why you would modify the files - tclAppInit.c, Makefile.in, and configure.in from the Tcl kit. -

-
    -
  • - tclAppInit.c: -

    -

    -
      -
    • - Add the following three lines of code to the function Tcl_AppInit after the call to - Tcl_Init and after the comment about calling init procedures: -
      -    if (FCGI_Init(interp) == TCL_ERROR) {
      -        return TCL_ERROR;
      -    }
      -
      - This registers four Tcl commands (FCGI_Accept, FCGI_Finish, - FCGI_SetExitStatus, and FCGI_StartFilterData), implemented in tclFCGI.c, - with the Tcl interpreter. -

      -

      -
    • -
    -
  • -
  • - Makefile.in: -

    -

    -
      -
    • - Add tclFCGI.o to the GENERIC_OBJS variable, and add tclFCGI.c to the - SRCS variable. -

      - This builds the FastCGI Tcl commands and links them into the Tcl interpreter. -

      -

      -

      -
    • -
    • - Add -I../fcgi-devel-kit/include -include ../fcgi-devel-kit/include/fcgi_stdio.h to the - CFLAGS variable. -

      - This includes fcgi_stdio.h when compiling C code for the Tcl interpreter, overriding the - normal stdio types, variables, and functions. -

      -

      -

      -
    • -
    • - Add ../fcgi-devel-kit/libfcgi/libfcgi.a before the @LIBS@ part of the LIBS - variable. -

      - This links the implementation of fcgi_stdio.h into the Tcl interpreter, for use by the - FCGI_accept command and any code that uses stdio variables or calls - stdio functions. -

      -

      -

      -
    • -
    -

    - The last two edits will vary if you use a compiler other than gcc or install the tcl7.4 - directory somewhere else in relation to the fcgi-devel-kit directory. -

    -

    -

    -
  • -
  • - configure.in: -

    -

    -
      -
    • - Replace the lines -
      -AC_C_CROSS
      -CC=${CC-cc}
      -
      - with the lines -
      -AC_PROG_CC
      -AC_C_CROSS
      -
      - This selects gcc in preference to other C compilers. -

      -

      -
    • -
    • - Add the following lines just after the AC_SUBST(CC) line: -
      -AC_CHECK_LIB(socket, main, [LIBS="$LIBS -lsocket"])
      -AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])
      -AC_SUBST(LIBS)
      -
      - This ensures that the socket libraries used by FastCGI are linked into the Tcl interpreter. -

      -

      -
    • -
    - If GNU autoconf is not available to you, you'll leave configure.in alone and perform the - following steps: -

    -

    -
      -
    • - Execute -
      -    > SETENV CC gcc
      -
      - before running configure. -

      -

      -
    • -
    • - If you are running on a SVR4-derived Unix platform, edit Makefile to add -lsocket - -lnsl to the LIBS value after running configure. -

      -

      -
    • -
    - If you ever re-run configure, you'll need to repeat these steps. -

    -

    -
  • -
-

- 4. Writing FastCGI applications in Tcl -

-

- The Tcl program tcl/tiny-tcl-fcgi performs the same function as the C program - examples/tiny-fcgi.c that's used as an example in the FastCGI - Developer's Kit document. Here's what the Tcl version looks like: -

-

-

-
-#!./tclsh
-set count 0 
-while {[FCGI_Accept] >= 0 } {
-    incr count
-    puts -nonewline "Content-type: text/html\r\n\r\n"
-    puts "<title>FastCGI Hello! (Tcl)</title>"
-    puts "<h1>FastCGI Hello! (Tcl)</h1>"
-    puts "Request number $count running on host <i>$env(SERVER_NAME)</i>"
-}
-
-

- If you've built Tcl according to the recipe and you have a Web server set up to run FastCGI applications, - load the FastCGI Developer's Kit Index Page in that server and run this Tcl application now. -

-

- The script invokes Tcl indirectly via the symbolic link examples/tclsh. It does this because HP-UX - has a limit of 32 characters for the first line of a command-interpreter file such as - examples/tiny-tcl-fcgi. If you run on HP-UX you won't want to sprinkle symbolic links to - tclsh everywhere, so you should install tclsh with a shorter pathname than - /usr/local/tcl7.4-fcgi/bin/tclsh7.4. -

-

- The Tcl command FCGI_Accept treats the initial environment differently than the C function - FCGI_Accept. The first call to the C function FCGI_Accept replaces the initial environment - with the environment of the first request. The first call to the Tcl command FCGI_Accept adds the - variable bindings of the first request to the bindings present in the initial environment. So when the first - call to FCGI_Accept returns, bindings from the initial environment are still there (unless, due to - naming conflicts, some of them have been overwritten by the first request). The next call to - FCGI_Accept removes the bindings made on the previous call before adding a new set for the request - just accepted, again preserving the initial environment. -

-

- The FastCGI-integrated tclsh also includes commands FCGI_Finish, - FCGI_SetExitStatus, and FCGI_StartFilterData that correspond to C functions in - fcgi_stdio.h; see the manpages for full information. -

-

- Converting a Tcl CGI application to FastCGI is not fundamentally different from converting a C CGI - application. You separate the portion of the application that performs one-time initialization from the - portion that performs per-request processing. You put the per-request processing into a loop controlled by - FCGI_Accept. -

-

-

-
-
- Mike Shanzer // shanzer@openmarket.com -
- - - diff --git a/fcgi/doc/omi-logo.gif b/fcgi/doc/omi-logo.gif deleted file mode 100644 index 00bda568..00000000 Binary files a/fcgi/doc/omi-logo.gif and /dev/null differ diff --git a/fcgi/doc/overview.html b/fcgi/doc/overview.html deleted file mode 100644 index 48bc42d7..00000000 --- a/fcgi/doc/overview.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - FastCGI Developer's Kit Index Page - - - - -
-

- FastCGI Developer's Kit -

-
- - - - -
    -
  • - doc -
      -
    • - FastCGI Technical White Paper Motivates FastCGI, then - explains the FastCGI interface, FastCGI application roles, the FastCGI application library, server - support for FastCGI, and FastCGI performance. -
    • -
    • - Understanding FastCGI Application Performance Why FastCGI applications - often run faster than applications coded directly to Web server APIs. -
    • -
    • - FastCGI Developer's Kit
      - -
        -
      • - How to configure and build the kit for your development platform. -
      • -
      • - How to write applications using the libraries in the kit. -
      • -
      • - Documents cgi-fcgi, a tool in the kit that allows you to develop and test FastCGI - applications using a Web server that lacks FastCGI support. -
      • -
      -
    • -
    • - Open Market FastCGI 1.0 Programmer's Guide - Programmer-oriented documentation for developers of applications that run on the Open Market's - Secure WebServer 2.0. The content overlaps considerably with Section 3 of the Developer's Kit - document. -
    • -
    • - FCGI_Accept.3, FCGI_Finish.3, FCGI_SetExitStatus.3, FCGI_StartFilterData.3, and cgi-fcgi.1 - manpages. -
    • -
    • - Integrating FastCGI with Perl How to build FastCGI support into the Perl - interpreter and how to write FastCGI applications in Perl. -
    • -
    • - Integrating FastCGI with Tcl How to build FastCGI support into the Tcl - interpreter and how to write FastCGI applications in Tcl. -
    • -
    • - Integrating FastCGI with Java How to build Web server applications in - Java using FastCGI. -
    • -
    • - FastCGI: A High-Performance Gateway Interface Position paper - presented at the workshop "Programming the Web -- a search for APIs", Fifth International - World Wide Web Conference, 6 May 1996, Paris, France. A short paper, addressed to an audience of - technical specialists. -
    • -
    • - FastCGI Specification document.
      - Defines the interface between a FastCGI application and a Web server that supports FastCGI. This is - dry stuff, not needed for writing applications! -
    • -
    -
  • -
  • - include .h files for the FastCGI libraries. -
  • -
  • - libfcgi .c files for the FastCGI libraries. -
  • -
  • - examples Several example FastCGI programs. -
  • -
  • - perl The FastCGI Perl module, FCGI.pm. -
  • -
  • - java The FastCGI Java library. -
  • -
  • - cgi-fcgi The CGI-to-FastCGI bridge source code. -
  • -
-
-
- © 1996, Open Market, Inc. -
- - - diff --git a/fcgi/doc/www5-api-workshop.html b/fcgi/doc/www5-api-workshop.html deleted file mode 100644 index 66945ae4..00000000 --- a/fcgi/doc/www5-api-workshop.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - FastCGI: A High-Performance Gateway Interface - - - - -
-

- FastCGI: A High-Performance Gateway Interface -

- Position paper for the workshop "Programming the Web - a search for APIs",
- Fifth International World Wide Web Conference, 6 May 1996, Paris, France.
-

- Mark R. Brown
- Open Market, Inc.
-

-

- 2 May 1996
-

-
-

-

-
- Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
- Tel: 617-621-9500 Fax: 617-621-1703 URL: http://www.openmarket.com/
-
-
-

- Abstract -

-

- FastCGI is a fast, open, and secure Web server interface that solves the performance problems inherent in CGI - without introducing any of the new problems associated with writing applications to lower-level Web server - APIs. Modules to support FastCGI can be plugged into Web server APIs such as Apache API, NSAPI, and ISAPI. Key - considerations in designing FastCGI included minimizing the cost of migrating CGI applications (including - applications written in popular scripting languages such as Perl), supporting both single-threaded and - multi-threaded application programming, supporting distributed configurations for scaling and high - availability, and generalizing the roles that gateway applications can play beyond CGI's - "responder" role. -

-

- For more information on FastCGI, including an interface specification and a module for the Apache server, - visit the www.fastcgi.com Web site. -

-

- 1. Introduction -

-

- The surge in the use of the Web by business has created great demand for applications that create dynamic - content. These applications allow businesses to deliver products, services, and messages whose shape and - content are influenced by interaction with and knowledge of users. -

-

- This move towards dynamic Web content has highlighted the performance limits of CGI (Common Gateway - Interface). In response there has been a proliferation of Web server APIs. These APIs address some (though not - all) of the performance problems with CGI, but are not designed to meet the need of business applications. - When applied to business applications, Web server APIs suffer from these problems: -

-
    -
  • - Complexity. Server APIs introduce a steep learning curve, with increased implementation and - maintenance costs. -
  • -
  • - Language dependence. Applications have to be written in a language supported by the server API - (usually C/C++). Perl, the most popular language for CGI programs, can't be used with any existing - server API. -
  • -
  • - No process isolation. Since the applications run in the server's address space, buggy - applications can corrupt the core server (or each other). A malicious or buggy application can compromise - server security, and bugs in the core server can corrupt applications. -
  • -
  • - Proprietary. Coding your application to a particular API locks you into a particular server. -
  • -
  • - Tie-in to server architecture. API applications have to share the same architecture as the server: - If the Web server is multi-threaded, the application has to be thread-safe. If the Web server has - single-threaded processes, multi-threaded applications don't gain any performance advantage. Also, when - the server's architecture changes, the API will usually have to change, and applications will have to - be adapted or rewritten. -
  • -
-

- Web server APIs are suitable for applications that require an intimate connection to the core Web server, such - as security protocols. But using a Web server API for a Web business application would be much like using an - old-fashioned TP monitor, which required linking applications right into the monitor, for a modern business - transaction processing application. The old-fashioned solution suffers a huge development and maintenance cost - penalty because it ignores 30 years of progress in computing technology, and may end up providing inferior - performance to boot. Nobody uses the old technology unless they are already locked into it. -

-

- FastCGI is best viewed as a new implementation of CGI, designed to overcome CGI's performance problems. - The major implementation differences are: -

-
    -
  • - FastCGI processes are persistent: after finishing a request, they wait for a new request instead of - exiting. -
  • -
  • - Instead of using operating system environment variables and pipes, the FastCGI protocol multiplexes the - environment information, standard input, output, and error over a single full-duplex connection. This - allows FastCGI programs to run on remote machines, using TCP connections between the Web server and the - FastCGI application. -
  • -
-

- FastCGI communicates the exact same information as CGI in a different way. Because FastCGI is CGI, and - like CGI runs applications in separate processes, it suffers none of the server API problems listed above. -

-

- 2. Migration from CGI -

-

- Open Market has developed a FastCGI application library that implements the FastCGI protocol, hiding the - protocol details from the developer. This library, which is freely available, makes writing FastCGI programs - as easy as writing CGI applications. -

-

- The application library provides replacements for the C language standard I/O (stdio) routines such as - printf() and gets(). The library converts references to environment variables, standard - input, standard output, and standard error to the FastCGI protocol. References to other files "fall - through" to the underlying operating system standard I/O routines. This approach has several benefits: -

-
    -
  • - Developers don't have to learn a new API to develop FastCGI applications. -
  • -
  • - Existing CGI programs can be migrated with minimal source changes. -
  • -
  • - FastCGI interpreters for Perl, Tcl, and other interpreted languages can be built without modifying the - interpreter source code. -
  • -
-

- Here's a simple FastCGI application: -

-
-
-
-    #include <fcgi_stdio.h>
-
-    void main(void)
-    {
-        int count = 0;
-        while(FCGI_Accept() >= 0) {
-            printf("Content-type: text/html\r\n");
-            printf("\r\n");
-            printf("Hello world!<br>\r\n");
-            printf("Request number %d.", count++);
-        }
-        exit(0);
-    }
-
-

- This application returns a "Hello world" HTML response to the client. It also keeps a counter of the - number of times it has been accessed, displaying the value of the counter at each request. The - fcgi_stdio.h header file provides the FastCGI replacement routines for the C standard I/O library. - The FCGI_Accept() routine accepts a new request from the Web server. -

-

- The application library was designed to make migration of existing CGI programs as simple as possible. Many - applications can be converted by adding a loop around the main request processing code and recompiling with - the FastCGI application library. To ease migration to FastCGI, executables built with the application library - can run as either CGI or FastCGI programs, depending on how they are invoked. The library detects the - execution environment and automatically selects FastCGI or regular I/O routines, as appropriate. -

-

- Applications written in Perl, Tcl, and other scripting languages can be migrated by using a language - interpreter built with the application library. FastCGI-integrated Tcl and Perl interpreters for popular Unix - platforms are available from the www.fastcgi.com Web site. The interpreters are backward-compatible: - They can run standard Tcl and Perl applications. -

-

- 3. Single-threaded and multi-threaded applications -

-

- FastCGI gives developers a free choice of whether to develop applications in a single-threaded or - multi-threaded style. The FastCGI interface supports multi-threading in two ways: -

-
    -
  • - Applications can accept concurrent Web server connections to provide concurrent requests to multiple - application threads. -
  • -
  • - Applications can accept multiplexed Web server connections, in which concurrent requests are communicated - over a single connection to multiple application threads. -
  • -
-

- Multi-threaded programming is complex -- concurrency makes programs difficult to test and debug -- so many - developers will prefer to program in the familiar single-threaded style. By having several concurrent - processes running the same application it is often possible to achieve high performance with single-threaded - programming. -

-

- The FastCGI interface allows Web servers to implement session affinity, a feature that allows - applications to maintain caches of user-related data. With session affinity, when several concurrent processes - are running the same application, the Web server routes all requests from a particular user to the same - application process. Web server APIs don't provide this functionality to single-threaded applications, so - the performance of an API-based application is often inferior to the performance of the corresponding FastCGI - application. -

-

- 4. Distributed FastCGI -

-

- Because FastCGI can communicate over TCP/IP connections, it supports configurations in which applications run - remotely from the Web server. This can provide scaling, load balancing, high availability, and connections to - systems that don't have Web servers. -

-

- Distributed FastCGI can also provide security advantages. A Web server outside a corporate firewall can - communicate through the firewall to internal databases. For instance, an application might need to - authenticate incoming users as customers in order to give access to certain documents on the external Web - site. With FastCGI this authentication can be done without replicating data and without compromising security. -

-

- 5. Roles -

-

- A problem with CGI is its limited functionality: CGI programs can only provide responses to requests. FastCGI - provides expanded functionality with support for three different application "roles": -

-
    -
  • - Responder. This is the basic FastCGI role, and corresponds to the simple functionality offered by - CGI today. -
  • -
  • - Filter. The FastCGI application filters the requested Web server file before sending it to the - client. -
  • -
  • - Authorizer. The FastCGI program performs an access control decision for the request (such as - performing a username/password database lookup). -
  • -
-

- Other roles will be defined in the future. For instance, a "logger" role would be useful, where the - FastCGI program would receive the server's log entries for real-time processing and analysis. -

-

- 6. Conclusions -

-

- Today's Web business applications need a platform that's fast, open, maintainable, straightforward, - stable, and secure. FastCGI's design meets these requirements, and provides a logical migration path from - the proven and widely deployed CGI technology. This allows developers to take advantage of FastCGI's - benefits without losing their existing investment in CGI applications. -

-

- For more information about FastCGI, visit the www.fastcgi.com Web site. -

- - - diff --git a/fcgi/examples/authorizer.mak b/fcgi/examples/authorizer.mak deleted file mode 100644 index 084b3f8a..00000000 --- a/fcgi/examples/authorizer.mak +++ /dev/null @@ -1,203 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on authorizer.dsp - -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "authorizer.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\examples\authorizer\Release -INTDIR=.\..\examples\authorizer\Release -# Begin Custom Macros -OutDir=.\..\examples\authorizer\Release -# End Custom Macros - -ALL : "$(OUTDIR)\authorizer.exe" - -CLEAN : - -@erase "$(INTDIR)\authorizer.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\authorizer.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\authorizer.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\authorizer.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\authorizer.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\authorizer.obj" \ - "..\libfcgi\Release\libfcgi.lib" - -"$(OUTDIR)\authorizer.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\..\examples/authorizer/Debug -INTDIR=.\..\examples/authorizer/Debug -# Begin Custom Macros -OutDir=.\..\examples/authorizer/Debug -# End Custom Macros - -ALL : "$(OUTDIR)\authorizer.exe" "$(OUTDIR)\authorizer.bsc" - -CLEAN : - -@erase "$(INTDIR)\authorizer.obj" - -@erase "$(INTDIR)\authorizer.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\authorizer.bsc" - -@erase "$(OUTDIR)\authorizer.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\authorizer.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\authorizer.bsc" -BSC32_SBRS= \ - "$(INTDIR)\authorizer.sbr" - -"$(OUTDIR)\authorizer.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"$(OUTDIR)\authorizer.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\authorizer.obj" \ - "..\libfcgi\Debug\libfcgi.lib" - -"$(OUTDIR)\authorizer.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -..\examples\authorizer.c : \ - "..\include\fcgi_stdio.h"\ - "..\include\fcgiapp.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\examples\authorizer.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\authorizer.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\authorizer.obj" "$(INTDIR)\authorizer.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!ENDIF - diff --git a/fcgi/examples/echo-cpp.mak b/fcgi/examples/echo-cpp.mak deleted file mode 100644 index 62910ad9..00000000 --- a/fcgi/examples/echo-cpp.mak +++ /dev/null @@ -1,203 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on echo-cpp.dsp -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "echo-cpp.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\examples\echo-cpp\Release -INTDIR=.\..\examples\echo-cpp\Release -# Begin Custom Macros -OutDir=.\..\examples\echo-cpp\Release -# End Custom Macros - -ALL : "$(OUTDIR)\echo-cpp.exe" - - -CLEAN : - -@erase "$(INTDIR)\echo-cpp.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\echo-cpp.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /GX /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\echo-cpp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echo-cpp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\echo-cpp.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\echo-cpp.obj" - -"$(OUTDIR)\echo-cpp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\../examples/echo-cpp\Debug -INTDIR=.\../examples/echo-cpp\Debug -# Begin Custom Macros -OutDir=.\../examples/echo-cpp\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\echo-cpp.exe" "$(OUTDIR)\echo-cpp.bsc" - - -CLEAN : - -@erase "$(INTDIR)\echo-cpp.obj" - -@erase "$(INTDIR)\echo-cpp.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\echo-cpp.bsc" - -@erase "$(OUTDIR)\echo-cpp.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\echo-cpp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echo-cpp.bsc" -BSC32_SBRS= \ - "$(INTDIR)\echo-cpp.sbr" - -"$(OUTDIR)\echo-cpp.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"$(OUTDIR)\echo-cpp.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\echo-cpp.obj" - -"$(OUTDIR)\echo-cpp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -"..\examples\echo-cpp.cpp" : \ - "..\include\fcgiapp.h"\ - "..\include\fcgio.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE="..\examples\echo-cpp.cpp" - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\echo-cpp.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\echo-cpp.obj" "$(INTDIR)\echo-cpp.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - - -!ENDIF - diff --git a/fcgi/examples/echo.mak b/fcgi/examples/echo.mak deleted file mode 100644 index cf3e7e63..00000000 --- a/fcgi/examples/echo.mak +++ /dev/null @@ -1,205 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on echo.dsp - -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "echo.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\examples\echo\Release -INTDIR=.\..\examples\echo\Release -# Begin Custom Macros -OutDir=.\..\examples\echo\Release -# End Custom Macros - -ALL : "$(OUTDIR)\echo.exe" - -CLEAN : - -@erase "$(INTDIR)\echo.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\echo.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\echo.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echo.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\echo.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\echo.obj" \ - "..\libfcgi\Release\libfcgi.lib" - -"$(OUTDIR)\echo.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\../examples/echo\Debug -INTDIR=.\../examples/echo\Debug -# Begin Custom Macros -OutDir=.\../examples/echo\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\echo.exe" "$(OUTDIR)\echo.bsc" - -CLEAN : - -@erase "$(INTDIR)\echo.obj" - -@erase "$(INTDIR)\echo.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\echo.bsc" - -@erase "$(OUTDIR)\echo.exe" - -@erase "$(OUTDIR)\echo.map" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\echo.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echo.bsc" -BSC32_SBRS= \ - "$(INTDIR)\echo.sbr" - -"$(OUTDIR)\echo.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /map:"$(INTDIR)\echo.map" /debug /machine:IX86 /out:"$(OUTDIR)\echo.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\echo.obj" \ - "..\libfcgi\Debug\libfcgi.lib" - -"$(OUTDIR)\echo.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -..\examples\echo.c : \ - "..\include\fcgi_config.h"\ - "..\include\fcgi_stdio.h"\ - "..\include\fcgiapp.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\examples\echo.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\echo.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\echo.obj" "$(INTDIR)\echo.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!ENDIF - diff --git a/fcgi/examples/echox.mak b/fcgi/examples/echox.mak deleted file mode 100644 index 37876e2d..00000000 --- a/fcgi/examples/echox.mak +++ /dev/null @@ -1,203 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on echox.dsp - -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "echox.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\examples\echo-x\Release -INTDIR=.\..\examples\echo-x\Release -# Begin Custom Macros -OutDir=.\..\examples\echo-x\Release -# End Custom Macros - -ALL : "$(OUTDIR)\echo-x.exe" - -CLEAN : - -@erase "$(INTDIR)\echo-x.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\echo-x.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\echox.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echox.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\echo-x.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\echo-x.obj" \ - "..\libfcgi\Release\libfcgi.lib" - -"$(OUTDIR)\echo-x.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\../examples/echo-x\Debug -INTDIR=.\../examples/echo-x\Debug -# Begin Custom Macros -OutDir=.\../examples/echo-x\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\echo-x.exe" "$(OUTDIR)\echox.bsc" - -CLEAN : - -@erase "$(INTDIR)\echo-x.obj" - -@erase "$(INTDIR)\echo-x.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\echo-x.exe" - -@erase "$(OUTDIR)\echox.bsc" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\echox.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\echox.bsc" -BSC32_SBRS= \ - "$(INTDIR)\echo-x.sbr" - -"$(OUTDIR)\echox.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"$(OUTDIR)\echo-x.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\echo-x.obj" \ - "..\libfcgi\Debug\libfcgi.lib" - -"$(OUTDIR)\echo-x.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -"..\examples\echo-x.c" : \ - "..\include\fcgi_config.h"\ - "..\include\fcgiapp.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE="..\examples\echo-x.c" - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\echo-x.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\echo-x.obj" "$(INTDIR)\echo-x.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!ENDIF - diff --git a/fcgi/examples/size.mak b/fcgi/examples/size.mak deleted file mode 100644 index 6c11177e..00000000 --- a/fcgi/examples/size.mak +++ /dev/null @@ -1,202 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on size.dsp - -!IF "$(CFG)" == "" -CFG=release -!ENDIF - -!IF "$(CFG)" != "release" && "$(CFG)" != "debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "size.mak" CFG="debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "release" - -OUTDIR=.\..\examples\size\Release -INTDIR=.\..\examples\size\Release -# Begin Custom Macros -OutDir=.\..\examples\size\Release -# End Custom Macros - -ALL : "$(OUTDIR)\size.exe" - -CLEAN : - -@erase "$(INTDIR)\size.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\size.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Gi /O2 /Ob2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\size.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\size.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /pdb:none /machine:IX86 /out:"$(OUTDIR)\size.exe" /libpath:"..\libfcgi\Release" -LINK32_OBJS= \ - "$(INTDIR)\size.obj" \ - "..\libfcgi\Release\libfcgi.lib" - -"$(OUTDIR)\size.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "debug" - -OUTDIR=.\../examples/size\Debug -INTDIR=.\../examples/size\Debug -# Begin Custom Macros -OutDir=.\../examples/size\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\size.exe" "$(OUTDIR)\size.bsc" - -CLEAN : - -@erase "$(INTDIR)\size.obj" - -@erase "$(INTDIR)\size.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\size.bsc" - -@erase "$(OUTDIR)\size.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W4 /Gm /Gi /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\size.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\size.bsc" -BSC32_SBRS= \ - "$(INTDIR)\size.sbr" - -"$(OUTDIR)\size.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=libfcgi.lib /nologo /profile /debug /machine:IX86 /out:"$(OUTDIR)\size.exe" /libpath:"..\libfcgi\Debug" -LINK32_OBJS= \ - "$(INTDIR)\size.obj" \ - "..\libfcgi\Debug\libfcgi.lib" - -"$(OUTDIR)\size.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - - -..\examples\size.c : \ - "..\include\fcgiapp.h"\ - - -!IF "$(CFG)" == "release" || "$(CFG)" == "debug" -SOURCE=..\examples\size.c - -!IF "$(CFG)" == "release" - - -"$(INTDIR)\size.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "debug" - - -"$(INTDIR)\size.obj" "$(INTDIR)\size.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -!ENDIF - diff --git a/fcgi/images/aplib-hd.gif b/fcgi/images/aplib-hd.gif deleted file mode 100644 index 81988908..00000000 Binary files a/fcgi/images/aplib-hd.gif and /dev/null differ diff --git a/fcgi/images/divider.gif b/fcgi/images/divider.gif deleted file mode 100644 index 0a8e0a4e..00000000 Binary files a/fcgi/images/divider.gif and /dev/null differ diff --git a/fcgi/images/fcgi-hd.gif b/fcgi/images/fcgi-hd.gif deleted file mode 100644 index 5eab1c4e..00000000 Binary files a/fcgi/images/fcgi-hd.gif and /dev/null differ diff --git a/fcgi/images/mail-hd.gif b/fcgi/images/mail-hd.gif deleted file mode 100644 index 4ea84d2e..00000000 Binary files a/fcgi/images/mail-hd.gif and /dev/null differ diff --git a/fcgi/images/navbar.gif b/fcgi/images/navbar.gif deleted file mode 100644 index c2ada2e4..00000000 Binary files a/fcgi/images/navbar.gif and /dev/null differ diff --git a/fcgi/images/serv-hd.gif b/fcgi/images/serv-hd.gif deleted file mode 100644 index 791c7234..00000000 Binary files a/fcgi/images/serv-hd.gif and /dev/null differ diff --git a/fcgi/images/words-hd.gif b/fcgi/images/words-hd.gif deleted file mode 100644 index bd7a0ff4..00000000 Binary files a/fcgi/images/words-hd.gif and /dev/null differ diff --git a/fcgi/java/FCGIGlobalDefs.java b/fcgi/java/FCGIGlobalDefs.java deleted file mode 100644 index 04de7450..00000000 --- a/fcgi/java/FCGIGlobalDefs.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * @(#)FCGIGlobalDefs.java - * - * - * FastCGi compatibility package Interface - * - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIGlobalDefs.java,v 1.3 2000/03/21 12:12:25 robs Exp $ - */ - -/* This class contains FCGI global definitions corresponding to - * the #defs in the C version. - */ - -package com.fastcgi; - -import java.io.PrintStream; - -public abstract class FCGIGlobalDefs -{ - private static final String RCSID = "$Id: FCGIGlobalDefs.java,v 1.3 2000/03/21 12:12:25 robs Exp $"; - - public static final int def_FCGIMaxLen = 0xffff; - /* - * Define Length of FCGI message bodies in bytes - */ - public static final int def_FCGIHeaderLen = 8; - public static final int def_FCGIEndReqBodyLen = 8; - public static final int def_FCGIBeginReqBodyLen = 8; - public static final int def_FCGIUnknownBodyTypeBodyLen = 8; - /* - * Header defines - */ - public static int def_FCGIVersion1 = 1; - /* FCGI Record Types */ - public static final int def_FCGIBeginRequest = 1; - public static final int def_FCGIAbortRequest = 2; - public static final int def_FCGIEndRequest = 3; - public static final int def_FCGIParams = 4; - public static final int def_FCGIStdin = 5; - public static final int def_FCGIStdout = 6; - public static final int def_FCGIStderr = 7; - public static final int def_FCGIData = 8; - public static final int def_FCGIGetValues = 9; - public static final int def_FCGIGetValuesResult = 10; - public static final int def_FCGIUnknownType = 11; - public static final int def_FCGIMaxType = def_FCGIUnknownType; - /* Request ID Values */ - public static final int def_FCGINullRequestID = 0; - /* - * Begin Request defines - */ - /* Mask flags */ - public static int def_FCGIKeepConn = 1; - /* Roles */ - public static final int def_FCGIResponder = 1; - public static final int def_FCGIAuthorizer = 2; - public static final int def_FCGIFilter = 3; - /* - * End Request defines - */ - /* Protocol status */ - public static final int def_FCGIRequestComplete = 0; - public static final int def_FCGICantMpxConn = 1; - public static final int def_FCGIOverload = 2; - public static final int def_FCGIUnknownRole = 3; - /* - * Get Values, Get Values Results defines - */ - public static final String def_FCGIMaxConns = "FCGI_MAX_CONNS"; - public static final String def_FCGIMaxReqs = "FCGI_MAX_REQS"; - public static final String def_FCGIMpxsConns = "FCGI_MPXS_CONNS"; - /* - * Return codes for Process* functions - */ - public static final int def_FCGIStreamRecord = 0; - public static final int def_FCGISkip = 1; - public static final int def_FCGIBeginRecord = 2; - public static final int def_FCGIMgmtRecord = 3; - /* - * Error Codes - */ - public static final int def_FCGIUnsupportedVersion = -2; - public static final int def_FCGIProtocolError = -3; - public static final int def_FCGIParamsError = -4; - public static final int def_FCGICallSeqError = -5; -} diff --git a/fcgi/java/FCGIInputStream.java b/fcgi/java/FCGIInputStream.java deleted file mode 100644 index 4d3550d6..00000000 --- a/fcgi/java/FCGIInputStream.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * @(#)FCGIInputStream.java - * - * FastCGi compatibility package Interface - * - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIInputStream.java,v 1.4 2000/03/21 12:12:25 robs Exp $ - */ -package com.fastcgi; - -import java.io.*; - -/** - * This stream manages buffered reads of FCGI messages. - */ -public class FCGIInputStream extends InputStream -{ - private static final String RCSID = "$Id: FCGIInputStream.java,v 1.4 2000/03/21 12:12:25 robs Exp $"; - - /* Stream vars */ - - public int rdNext; - public int stop; - public boolean isClosed; - - /* require methods to set, get and clear */ - private int errno; - private Exception errex; - - /* data vars */ - - public byte buff[]; - public int buffLen; - public int buffStop; - public int type; - public int contentLen; - public int paddingLen; - public boolean skip; - public boolean eorStop; - public FCGIRequest request; - - public InputStream in; - - - /** - * Creates a new input stream to manage fcgi prototcol stuff - * @param in the input stream bufLen length of buffer streamType - */ - public FCGIInputStream(FileInputStream inStream, int bufLen, - int streamType, - FCGIRequest inReq) { - - in = inStream; - buffLen = Math.min(bufLen,FCGIGlobalDefs.def_FCGIMaxLen); - buff = new byte[buffLen]; - type = streamType; - stop = rdNext = buffStop = 0; - isClosed = false; - contentLen = 0; - paddingLen = 0; - skip = false; - eorStop = false; - request = inReq; - - } - /** - * Reads a byte of data. This method will block if no input is - * available. - * @return the byte read, or -1 if the end of the - * stream is reached. - * @exception IOException If an I/O error has occurred. - */ - public int read() throws IOException { - if (rdNext != stop) { - return buff[rdNext++] & 0xff; - } - if (isClosed){ - return -1; - } - fill(); - if (rdNext != stop){ - return buff[rdNext++] & 0xff; - } - return -1; - } - /** - * Reads into an array of bytes. This method will - * block until some input is available. - * @param b the buffer into which the data is read - * @return the actual number of bytes read, -1 is - * returned when the end of the stream is reached. - * @exception IOException If an I/O error has occurred. - */ - public int read(byte b[]) throws IOException { - return read(b, 0, b.length); - } - - /** - * Reads into an array of bytes. - * Blocks until some input is available. - * @param b the buffer into which the data is read - * @param off the start offset of the data - * @param len the maximum number of bytes read - * @return the actual number of bytes read, -1 is - * returned when the end of the stream is reached. - * @exception IOException If an I/O error has occurred. - */ - public int read(byte b[], int off, int len) throws IOException { - int m, bytesMoved; - - if (len <= 0){ - return 0; - } - /* - *Fast path: len bytes already available. - */ - - if (len <= stop - rdNext){ - System.arraycopy(buff, rdNext, b, off, len); - rdNext += len; - return len; - } - /* - *General case: stream is closed or fill needs to be called - */ - bytesMoved = 0; - for(;;){ - if (rdNext != stop){ - m = Math.min(len - bytesMoved, stop - rdNext); - System.arraycopy(buff, rdNext, b, off, m); - bytesMoved += m; - rdNext += m; - if (bytesMoved == len) - return bytesMoved; - off += m; - } - if (isClosed){ - return bytesMoved; - } - fill(); - - } - } - /** - * Reads into an array of bytes. This method will - * block until some input is available. - * @param b the buffer into which the data is read - * @param off the start offset of the data - * @param len the maximum number of bytes read - * @return the actual number of bytes read, -1 is - * returned when the end of the stream is reached. - * @exception IOException If an I/O error has occurred. - */ - public void fill() throws IOException { - byte[] headerBuf = new byte[FCGIGlobalDefs.def_FCGIHeaderLen]; - int headerLen = 0; - int status = 0; - int count = 0; - for(;;) { - /* - * If buffer is empty, do a read - */ - if (rdNext == buffStop) { - try { - count = in.read(buff, 0, buffLen); - } catch (IOException e) { - setException(e); - return; - } - if (count == 0) { - setFCGIError(FCGIGlobalDefs.def_FCGIProtocolError); - return; - } - rdNext = 0; - buffStop = count; // 1 more than we read - } - /* Now buf is not empty: If the current record contains more content - * bytes, deliver all that are present in buff to callers buffer - * unless he asked for less than we have, in which case give him less - */ - if (contentLen > 0) { - count = Math.min(contentLen, buffStop - rdNext); - contentLen -= count; - if (!skip) { - stop = rdNext + count; - return; - } - else { - rdNext += count; - if (contentLen > 0) { - continue; - } - else { - skip = false; - } - } - } - /* Content has been consumed by client. - * If record was padded, skip over padding - */ - if (paddingLen > 0) { - count = Math.min(paddingLen, buffStop - rdNext); - paddingLen -= count; - rdNext += count; - if (paddingLen > 0) { - continue; // more padding to read - } - } - /* All done with current record, including the padding. - * If we are in a recursive call from Process Header, deliver EOF - */ - if (eorStop){ - stop = rdNext; - isClosed = true; - return; - } - /* - * Fill header with bytes from input buffer - get the whole header. - */ - count = Math.min(headerBuf.length - headerLen, buffStop - rdNext); - System.arraycopy(buff,rdNext, headerBuf, headerLen, count); - headerLen += count; - rdNext += count; - if (headerLen < headerBuf.length) { - continue; - } - headerLen = 0; - /* - * Interperet the header. eorStop prevents ProcessHeader from - * reading past the end of record when using stream to read content - */ - eorStop = true; - stop = rdNext; - status = 0; - status = new FCGIMessage(this).processHeader(headerBuf); - eorStop = false; - isClosed = false; - switch (status){ - case FCGIGlobalDefs.def_FCGIStreamRecord: - if (contentLen == 0) { - stop = rdNext; - isClosed = true; - return; - } - break; - case FCGIGlobalDefs.def_FCGISkip: - skip = true; - break; - case FCGIGlobalDefs.def_FCGIBeginRecord: - /* - * If this header marked the beginning of a new - * request, return role info to caller - */ - return; - case FCGIGlobalDefs.def_FCGIMgmtRecord: - break; - default: - /* - * ASSERT - */ - setFCGIError(status); - return; - - } - } - } - - /** - * Skips n bytes of input. - * @param n the number of bytes to be skipped - * @return the actual number of bytes skipped. - * @exception IOException If an I/O error has occurred. - */ - public long skip(long n) throws IOException { - byte data[] = new byte[(int)n]; - return in.read(data); - } - - /* - * An FCGI error has occurred. Save the error code in the stream - * for diagnostic purposes and set the stream state so that - * reads return EOF - */ - public void setFCGIError(int errnum) { - /* - * Preserve only the first error. - */ - if(errno == 0) { - errno = errnum; - } - isClosed = true; - } - /* - * An Exception has occurred. Save the Exception in the stream - * for diagnostic purposes and set the stream state so that - * reads return EOF - */ - public void setException(Exception errexpt) { - /* - * Preserve only the first error. - */ - if(errex == null) { - errex = errexpt; - } - isClosed = true; - } - - /* - * Clear the stream error code and end-of-file indication. - */ - public void clearFCGIError() { - errno = 0; - /* - * isClosed = false; - * XXX: should clear isClosed but work is needed to make it safe - * to do so. - */ - } - /* - * Clear the stream error code and end-of-file indication. - */ - public void clearException() { - errex = null; - /* - * isClosed = false; - * XXX: should clear isClosed but work is needed to make it safe - * to do so. - */ - } - - /* - * accessor method since var is private - */ - public int getFCGIError() { - return errno; - } - /* - * accessor method since var is private - */ - public Exception getException() { - return errex; - } - /* - * Re-initializes the stream to read data of the specified type. - */ - public void setReaderType(int streamType) { - - type = streamType; - eorStop = false; - skip = false; - contentLen = 0; - paddingLen = 0; - stop = rdNext; - isClosed = false; - } - - /* - * Close the stream. This method does not really exist for BufferedInputStream in java, - * but is implemented here for compatibility with the FCGI structures being used. It - * doent really throw any IOExceptions either, but that's there for compatiblity with - * the InputStreamInterface. - */ - public void close() throws IOException{ - isClosed = true; - stop = rdNext; - } - - /* - * Returns the number of bytes that can be read without blocking. - */ - - public int available() throws IOException { - return stop - rdNext + in.available(); - } - -} diff --git a/fcgi/java/FCGIInterface.java b/fcgi/java/FCGIInterface.java deleted file mode 100644 index 03e8caa2..00000000 --- a/fcgi/java/FCGIInterface.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * @(#)FCGIInterface.java - * - * - * FastCGi compatibility package Interface - * - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIInterface.java,v 1.4 2000/03/27 15:37:25 robs Exp $ - */ -package com.fastcgi; - -import java.net.*; -import java.io.*; -import java.util.Properties; - -/* - * This is the FastCGI interface that the application calls to communicate with the - * FastCGI web server. This version is single threaded, and handles one request at - * a time, which is why we can have a static variable for it. - */ -public class FCGIInterface -{ - private static final String RCSID = "$Id: FCGIInterface.java,v 1.4 2000/03/27 15:37:25 robs Exp $"; - - /* - * Class variables - */ - public static FCGIRequest request = null; - public static boolean acceptCalled = false; - public static boolean isFCGI = true; - public static Properties startupProps; - public static ServerSocket srvSocket; - - /* - * Accepts a new request from the HTTP server and creates - * a conventional execution environment for the request. - * If the application was invoked as a FastCGI server, - * the first call to FCGIaccept indicates that the application - * has completed its initialization and is ready to accept - * a request. Subsequent calls to FCGI_accept indicate that - * the application has completed its processing of the - * current request and is ready to accept a new request. - * If the application was invoked as a CGI program, the first - * call to FCGIaccept is essentially a no-op and the second - * call returns EOF (-1) as does an error. Application should exit. - * - * If the application was invoked as a FastCGI server, - * and this is not the first call to this procedure, - * FCGIaccept first flushes any buffered output to the HTTP server. - * - * On every call, FCGIaccept accepts the new request and - * reads the FCGI_PARAMS stream into System.props. It also creates - * streams that understand FastCGI protocol and take input from - * the HTTP server send output and error output to the HTTP server, - * and assigns these new streams to System.in, System.out and - * System.err respectively. - * - * For now, we will just return an int to the caller, which is why - * this method catches, but doen't throw Exceptions. - * - */ - public int FCGIaccept() { - int acceptResult = 0; - - /* - * If first call, mark it and if fcgi save original system properties, - * If not first call, and we are cgi, we should be gone. - */ - if (!acceptCalled){ - isFCGI = System.getProperties().containsKey("FCGI_PORT"); - acceptCalled = true; - if (isFCGI) { - /* - * save original system properties (nonrequest) - * and get a server socket - */ - startupProps = new Properties(System.getProperties()); - String str = - new String(System.getProperty("FCGI_PORT")); - if (str.length() <= 0) { - return -1; - } - int portNum = Integer.parseInt(str); - - try { - srvSocket = new ServerSocket(portNum); - } catch (IOException e) { - if (request != null) - { - request.socket = null; - } - srvSocket = null; - request = null; - return -1; - } - } - } - else { - if (!isFCGI){ - return -1; - } - } - /* - * If we are cgi, just leave everything as is, otherwise set up env - */ - if (isFCGI){ - try { - acceptResult = FCGIAccept(); - } catch (IOException e) { - return -1; - } - if (acceptResult < 0){ - return -1; - } - - /* - * redirect stdin, stdout and stderr to fcgi socket - */ - System.setIn(new BufferedInputStream(request.inStream, 8192)); - System.setOut(new PrintStream(new BufferedOutputStream( - request.outStream, 8192))); - System.setErr(new PrintStream(new BufferedOutputStream( - request.errStream, 512))); - System.setProperties(request.params); - } - return 0; - } - - /* - * Accepts a new request from the HTTP server. - * Finishes the request accepted by the previous call - * to FCGI_Accept. Sets up the FCGI environment and reads - * saved and per request environmental varaibles into - * the request object. (This is redundant on System.props - * as long as we can handle only one request object.) - */ - int FCGIAccept() throws IOException{ - - boolean isNewConnection; - boolean errCloseEx = false; - boolean outCloseEx = false; - - if (request != null) { - /* - * Complete the previous request - */ - System.err.close(); - System.out.close(); - boolean prevRequestfailed = (errCloseEx || outCloseEx || - request.inStream.getFCGIError() != 0 || - request.inStream.getException() != null); - if (prevRequestfailed || !request.keepConnection ) { - request.socket.close(); - request.socket = null; - } - if (prevRequestfailed) { - request = null; - return -1; - } - } - else { - /* - * Get a Request and initialize some variables - */ - request = new FCGIRequest(); - request.socket = null; - request.inStream = null; - } - isNewConnection = false; - - /* - * if connection isnt open accept a new connection (blocking) - */ - for(;;) { - if (request.socket == null){ - try { - request.socket = srvSocket.accept(); - } catch (IOException e) { - request.socket = null; - request = null; - return -1; - } - isNewConnection = true; - } - - /* Try reading from new connection. If the read fails and - * it was an old connection the web server probably closed it; - * try making a new connection before giving up - */ - request.isBeginProcessed = false; - request.inStream = - new FCGIInputStream((FileInputStream)request. - socket.getInputStream(), - 8192, 0, request); - request.inStream.fill(); - if (request.isBeginProcessed) { - break; - } - request.socket.close(); - - request.socket = null; - if (isNewConnection) { - return -1; - } - } - /* - * Set up the objects for the new request - */ - request.params = new Properties(startupProps); - switch(request.role) { - case FCGIGlobalDefs.def_FCGIResponder: - request.params.put("ROLE","RESPONDER"); - break; - case FCGIGlobalDefs.def_FCGIAuthorizer: - request.params.put("ROLE", "AUTHORIZER"); - break; - case FCGIGlobalDefs.def_FCGIFilter: - request.params.put("ROLE", "FILTER"); - break; - default: - return -1; - } - request.inStream.setReaderType(FCGIGlobalDefs.def_FCGIParams); - /* - * read the rest of request parameters - */ - if (new FCGIMessage(request.inStream).readParams(request.params) < 0) { - return -1; - } - request.inStream.setReaderType(FCGIGlobalDefs.def_FCGIStdin); - request.outStream - = new FCGIOutputStream((FileOutputStream)request.socket. - getOutputStream(), 8192, - FCGIGlobalDefs.def_FCGIStdout,request); - request.errStream - = new FCGIOutputStream((FileOutputStream)request.socket. - getOutputStream(), 512, - FCGIGlobalDefs.def_FCGIStderr,request); - request.numWriters = 2; - return 0; - } -} diff --git a/fcgi/java/FCGIMessage.java b/fcgi/java/FCGIMessage.java deleted file mode 100644 index 0f474a9e..00000000 --- a/fcgi/java/FCGIMessage.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * @(#)FCGIMessage.java - * - * - * FastCGi compatibility package Interface - * - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIMessage.java,v 1.4 2000/10/02 15:09:07 robs Exp $ - */ -package com.fastcgi; - -import java.io.*; -import java.util.Properties; - -/* This class handles reading and building the fastcgi messages. - * For reading incoming mesages, we pass the input - * stream as a param to the constructor rather than to each method. - * Methods that build messages use and return internal buffers, so they - * dont need a stream. - */ - -public class FCGIMessage -{ - private static final String RCSID = "$Id: FCGIMessage.java,v 1.4 2000/10/02 15:09:07 robs Exp $"; - - /* - * Instance variables - */ - /* - * FCGI Message Records - * The logical structures of the FCGI Message Records. - * Fields are originally 1 unsigned byte in message - * unless otherwise noted. - */ - /* - * FCGI Header - */ - private int h_version; - private int h_type; - private int h_requestID; // 2 bytes - private int h_contentLength; // 2 bytes - private int h_paddingLength; - /* - * FCGI BeginRequest body. - */ - private int br_role; // 2 bytes - private int br_flags; - - private FCGIInputStream in; - - /* - * constructor - Java would do this implicitly. - */ - public FCGIMessage(){ - super(); - } - /* - * constructor - get the stream. - */ - public FCGIMessage(FCGIInputStream instream){ - in = instream; - } - - /* - * Message Reading Methods - */ - - /* - * Interpret the FCGI Message Header. Processes FCGI - * BeginRequest and Management messages. Param hdr is the header. - * The calling routine has to keep track of the stream reading - * management or use FCGIInputStream.fill() which does just that. - */ - public int processHeader(byte[] hdr) throws IOException{ - processHeaderBytes(hdr); - if (h_version != FCGIGlobalDefs.def_FCGIVersion1) { - return(FCGIGlobalDefs.def_FCGIUnsupportedVersion); - } - in.contentLen = h_contentLength; - in.paddingLen = h_paddingLength; - if (h_type == FCGIGlobalDefs.def_FCGIBeginRequest) { - return processBeginRecord(h_requestID); - } - if (h_requestID == FCGIGlobalDefs.def_FCGINullRequestID) { - return processManagementRecord(h_type); - } - if (h_requestID != in.request.requestID) { - return(FCGIGlobalDefs.def_FCGISkip); - } - if (h_type != in.type) { - return(FCGIGlobalDefs.def_FCGIProtocolError); - } - return(FCGIGlobalDefs.def_FCGIStreamRecord); - } - - /* Put the unsigned bytes in the incoming FCGI header into - * integer form for Java, concatinating bytes when needed. - * Because Java has no unsigned byte type, we have to be careful - * about signed numeric promotion to int. - */ - private void processHeaderBytes(byte[] hdrBuf){ - h_version = hdrBuf[0] & 0xFF; - h_type = hdrBuf[1] & 0xFF; - h_requestID = ((hdrBuf[2] & 0xFF) << 8) | (hdrBuf[3] & 0xFF); - h_contentLength = ((hdrBuf[4] & 0xFF) << 8) | (hdrBuf[5] & 0xFF); - h_paddingLength = hdrBuf[6] & 0xFF; - } - - /* - * Reads FCGI Begin Request Record. - */ - public int processBeginRecord(int requestID) throws IOException { - byte beginReqBody[]; - byte endReqMsg[]; - if (requestID == 0 || in.contentLen - != FCGIGlobalDefs.def_FCGIEndReqBodyLen) { - return FCGIGlobalDefs.def_FCGIProtocolError; - } - /* - * If the webserver is multiplexing the connection, - * this library can't deal with it, so repond with - * FCGIEndReq message with protocolStatus FCGICantMpxConn - */ - if (in.request.isBeginProcessed) { - endReqMsg = new byte[FCGIGlobalDefs.def_FCGIHeaderLen - + FCGIGlobalDefs.def_FCGIEndReqBodyLen]; - System.arraycopy(makeHeader( - FCGIGlobalDefs.def_FCGIEndRequest, - requestID, - FCGIGlobalDefs.def_FCGIEndReqBodyLen, - 0), 0, endReqMsg, 0, - FCGIGlobalDefs.def_FCGIHeaderLen); - System.arraycopy(makeEndrequestBody(0, - FCGIGlobalDefs.def_FCGICantMpxConn), 0, - endReqMsg, - FCGIGlobalDefs.def_FCGIHeaderLen, - FCGIGlobalDefs.def_FCGIEndReqBodyLen); - /* - * since isBeginProcessed is first set below,this - * can't be out first call, so request.out is properly set - */ - try { - in.request.outStream.write(endReqMsg, 0, - FCGIGlobalDefs.def_FCGIHeaderLen - + FCGIGlobalDefs.def_FCGIEndReqBodyLen); - } catch (IOException e){ - in.request.outStream.setException(e); - return -1; - } - } - /* - * Accept this new request. Read the record body - */ - in.request.requestID = requestID; - beginReqBody = - new byte[FCGIGlobalDefs.def_FCGIBeginReqBodyLen]; - if (in.read(beginReqBody, 0, - FCGIGlobalDefs.def_FCGIBeginReqBodyLen) != - FCGIGlobalDefs.def_FCGIBeginReqBodyLen) { - return FCGIGlobalDefs.def_FCGIProtocolError; - } - br_flags = beginReqBody[2] & 0xFF; - in.request.keepConnection - = (br_flags & FCGIGlobalDefs.def_FCGIKeepConn) != 0; - br_role = ((beginReqBody[0] & 0xFF) << 8) | (beginReqBody[1] & 0xFF); - in.request.role = br_role; - in.request.isBeginProcessed = true; - return FCGIGlobalDefs.def_FCGIBeginRecord; - } - - /* - * Reads and Responds to a Management Message. The only type of - * management message this library understands is FCGIGetValues. - * The only variables that this library's FCGIGetValues understands - * are def_FCGIMaxConns, def_FCGIMaxReqs, and def_FCGIMpxsConns. - * Ignore the other management variables, and repsond to other - * management messages with FCGIUnknownType. - */ - public int processManagementRecord(int type) throws IOException { - - byte[] response = new byte[64]; - int wrndx = response[FCGIGlobalDefs.def_FCGIHeaderLen]; - int value, len, plen; - if (type == FCGIGlobalDefs.def_FCGIGetValues) { - Properties tmpProps = new Properties(); - readParams(tmpProps); - - if (in.getFCGIError() != 0 || in.contentLen != 0) { - return FCGIGlobalDefs.def_FCGIProtocolError; - } - if (tmpProps.containsKey( - FCGIGlobalDefs.def_FCGIMaxConns)) { - makeNameVal( - FCGIGlobalDefs.def_FCGIMaxConns, "1", - response, wrndx); - } - else { - if (tmpProps.containsKey( - FCGIGlobalDefs.def_FCGIMaxReqs)) { - makeNameVal( - FCGIGlobalDefs.def_FCGIMaxReqs, "1", - response, wrndx); - } - else { - if (tmpProps.containsKey( - FCGIGlobalDefs.def_FCGIMaxConns)) { - makeNameVal( - FCGIGlobalDefs.def_FCGIMpxsConns, "0", - response, wrndx); - } - } - } - plen = 64 - wrndx; - len = wrndx - FCGIGlobalDefs.def_FCGIHeaderLen; - System.arraycopy(makeHeader( - FCGIGlobalDefs.def_FCGIGetValuesResult, - FCGIGlobalDefs.def_FCGINullRequestID, - len, plen), 0, - response, 0, - FCGIGlobalDefs.def_FCGIHeaderLen); - } - else { - plen = len = - FCGIGlobalDefs.def_FCGIUnknownBodyTypeBodyLen; - System.arraycopy(makeHeader( - FCGIGlobalDefs.def_FCGIUnknownType, - FCGIGlobalDefs.def_FCGINullRequestID, - len, 0), 0, - response, 0, - FCGIGlobalDefs.def_FCGIHeaderLen); - System.arraycopy(makeUnknownTypeBodyBody(h_type), 0, - response, - FCGIGlobalDefs.def_FCGIHeaderLen, - FCGIGlobalDefs.def_FCGIUnknownBodyTypeBodyLen); - } - /* - * No guarantee that we have a request yet, so - * dont use fcgi output stream to reference socket, instead - * use the FileInputStream that refrences it. Also - * nowhere to save exception, since this is not FCGI stream. - */ - - try { - in.request.socket.getOutputStream().write(response, 0, - FCGIGlobalDefs.def_FCGIHeaderLen + - FCGIGlobalDefs.def_FCGIUnknownBodyTypeBodyLen); - - } catch (IOException e){ - return -1; - } - return FCGIGlobalDefs.def_FCGIMgmtRecord; - } - - /* - * Makes a name/value with name = string of some length, and - * value a 1 byte integer. Pretty specific to what we are doing - * above. - */ - void makeNameVal(String name, String value, byte[] dest, int pos) { - int nameLen = name.length(); - if (nameLen < 0x80) { - dest[pos++] = (byte)nameLen; - }else { - dest[pos++] = (byte)(((nameLen >> 24) | 0x80) & 0xff); - dest[pos++] = (byte)((nameLen >> 16) & 0xff); - dest[pos++] = (byte)((nameLen >> 8) & 0xff); - dest[pos++] = (byte)nameLen; - } - int valLen = value.length(); - if (valLen < 0x80) { - dest[pos++] = (byte)valLen; - }else { - dest[pos++] = (byte)(((valLen >> 24) | 0x80) & 0xff); - dest[pos++] = (byte)((valLen >> 16) & 0xff); - dest[pos++] = (byte)((valLen >> 8) & 0xff); - dest[pos++] = (byte)valLen; - } - - try { - System.arraycopy(name.getBytes("UTF-8"), 0, dest, pos, nameLen); - pos += nameLen; - - System.arraycopy(value.getBytes("UTF-8"), 0, dest, pos, valLen); - pos += valLen; - } - catch (UnsupportedEncodingException x) {} - } - - /* - * Read FCGI name-value pairs from a stream until EOF. Put them - * into a Properties object, storing both as strings. - */ - public int readParams(Properties props) throws IOException{ - int nameLen, valueLen; - byte lenBuff[] = new byte[3]; - int i = 1; - - while ((nameLen = in.read()) != -1) { - i++; - if ((nameLen & 0x80) != 0) { - if ((in.read( lenBuff, 0, 3)) != 3) { - in.setFCGIError( - FCGIGlobalDefs.def_FCGIParamsError); - return -1; - } - nameLen = ((nameLen & 0x7f) << 24) - | ((lenBuff[0] & 0xFF) << 16) - | ((lenBuff[1] & 0xFF) << 8) - | (lenBuff[2] & 0xFF); - } - - if ((valueLen = in.read()) == -1) { - in.setFCGIError( - FCGIGlobalDefs.def_FCGIParamsError); - return -1; - } - if ((valueLen & 0x80) != 0) { - if ((in.read( lenBuff, 0, 3)) != 3) { - in.setFCGIError( - FCGIGlobalDefs.def_FCGIParamsError); - return -1; - } - valueLen = ((valueLen & 0x7f) << 24) - | ((lenBuff[0] & 0xFF) << 16) - | ((lenBuff[1] & 0xFF) << 8) - | (lenBuff[2] & 0xFF); - } - - /* - * nameLen and valueLen are now valid; read the name - * and the value from the stream and construct a standard - * environmental entity - */ - byte[] name = new byte[nameLen]; - byte[] value = new byte[valueLen]; - if (in.read(name ,0, nameLen) != nameLen) { - in.setFCGIError( - FCGIGlobalDefs.def_FCGIParamsError); - return -1; - } - - if(in.read(value, 0, valueLen) != valueLen) { - in.setFCGIError( - FCGIGlobalDefs.def_FCGIParamsError); - return -1; - } - String strName = new String(name); - String strValue = new String(value); - props.put(strName, strValue); - } - return 0; - - - } - /* - * Message Building Methods - */ - - /* - * Build an FCGI Message Header - - */ - public byte[] makeHeader(int type, - int requestId, - int contentLength, - int paddingLength) { - byte[] header = new byte[FCGIGlobalDefs.def_FCGIHeaderLen]; - header[0] = (byte)FCGIGlobalDefs.def_FCGIVersion1; - header[1] = (byte)type; - header[2] = (byte)((requestId >> 8) & 0xff); - header[3] = (byte)((requestId ) & 0xff); - header[4] = (byte)((contentLength >> 8) & 0xff); - header[5] = (byte)((contentLength ) & 0xff); - header[6] = (byte)paddingLength; - header[7] = 0; //reserved byte - return header; - } - /* - * Build an FCGI Message End Request Body - */ - public byte[] makeEndrequestBody(int appStatus,int protocolStatus){ - byte body[] = new byte[FCGIGlobalDefs.def_FCGIEndReqBodyLen]; - body[0] = (byte)((appStatus >> 24) & 0xff); - body[1] = (byte)((appStatus >> 16) & 0xff); - body[2] = (byte)((appStatus >> 8) & 0xff); - body[3] = (byte)((appStatus ) & 0xff); - body[4] = (byte)protocolStatus; - for (int i = 5; i < 8; i++) { - body[i] = 0; - } - return body; - } - /* - * Build an FCGI Message UnknownTypeBodyBody - */ - public byte[] makeUnknownTypeBodyBody(int type){ - byte body[] = - new byte[FCGIGlobalDefs.def_FCGIUnknownBodyTypeBodyLen]; - body[0] = (byte)type; - for (int i = 1; - i < FCGIGlobalDefs.def_FCGIUnknownBodyTypeBodyLen; i++) { - body[i] = 0; - } - return body; - } - -} //end class diff --git a/fcgi/java/FCGIOutputStream.java b/fcgi/java/FCGIOutputStream.java deleted file mode 100644 index 503bda1c..00000000 --- a/fcgi/java/FCGIOutputStream.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * @(#)FCGIOutputStream.java - * - * FastCGi compatibility package Interface - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIOutputStream.java,v 1.3 2000/03/21 12:12:26 robs Exp $ - */ -package com.fastcgi; - -import java.io.*; - -/** - * This stream understands FCGI prototcol. - */ - -public class FCGIOutputStream - extends OutputStream -{ - private static final String RCSID = "$Id: FCGIOutputStream.java,v 1.3 2000/03/21 12:12:26 robs Exp $"; - - /* Stream vars */ - - public int wrNext; - public int stop; - public boolean isClosed; - - /* require methods to set, get and clear */ - private int errno; - private Exception errex; - - /* data vars */ - - public byte buff[]; - public int buffLen; - public int buffStop; - public int type; - public boolean isAnythingWritten; - public boolean rawWrite; - public FCGIRequest request; - - public FileOutputStream out; - - /** - * Creates a new output stream to manage fcgi prototcol stuff - * @param out the output stream buflen length of buffer streamType - */ - public FCGIOutputStream(FileOutputStream outStream, - int bufLen, int streamType, - FCGIRequest inreq) { - out = outStream; - buffLen = Math.min(bufLen, FCGIGlobalDefs.def_FCGIMaxLen); - buff = new byte[buffLen]; - type = streamType; - stop = buffStop = buffLen; - isAnythingWritten = false; - rawWrite = false; - wrNext = FCGIGlobalDefs.def_FCGIHeaderLen; - isClosed = false; - request = inreq; - } - - /** - * Writes a byte to the output stream. - */ - public void write(int c) throws IOException { - if(wrNext != stop) { - buff[wrNext++] = (byte)c; - return; - } - if(isClosed) { - throw new EOFException(); - } - empty(false); - if(wrNext != stop) { - buff[wrNext++] = (byte)c; - return; - } - /* NOTE: ASSERT(stream->isClosed); */ - /* bug in emptyBuffProc if not */ - throw new EOFException(); - } - - /** - * Writes an array of bytes. This method will block until the bytes - * are actually written. - * @param b the data to be written - */ - public void write(byte b[]) throws IOException{ - write(b, 0, b.length); - } - - /** - * Writes len consecutive bytes from off in the array b - * into the output stream. Performs no interpretation - * of the output bytes. Making the user convert the string to - * bytes is in line with current Java practice. - */ - public void write(byte b[], int off, int len) throws IOException { - int m, bytesMoved; - /* - * Fast path: room for n bytes in the buffer - */ - if(len <= (stop - wrNext)) { - System.arraycopy(b, off, buff, wrNext, len); - wrNext += len; - return; - } - /* - * General case: stream is closed or buffer empty procedure - * needs to be called - */ - bytesMoved = 0; - for (;;) { - if(wrNext != stop) { - m = Math.min(len - bytesMoved, stop - wrNext); - System.arraycopy(b, off, buff, wrNext, m); - bytesMoved += m; - wrNext += m; - if(bytesMoved == len) { - return; - } - off += m; - } - if(isClosed) { - throw new EOFException(); - } - empty(false); - } - } - - /** - * Encapsulates any buffered stream content in a FastCGI - * record. If !doClose, writes the data, making the buffer - * empty. - */ - public void empty(boolean doClose) throws IOException { - int cLen; - /* - * Alignment padding omitted in Java - */ - if (!rawWrite) { - cLen = wrNext - FCGIGlobalDefs.def_FCGIHeaderLen; - if(cLen > 0) { - System.arraycopy(new FCGIMessage().makeHeader(type, - request.requestID, cLen, 0), - 0, buff, 0, - FCGIGlobalDefs.def_FCGIHeaderLen); - } - else { - wrNext = 0; - } - } - if (doClose) { - writeCloseRecords(); - } - if (wrNext != 0) { - isAnythingWritten = true; - try { - out.write(buff, 0, wrNext); - } catch (IOException e) { - setException(e); - return; - } - wrNext = 0; - } - /* - * The buffer is empty. - */ - if(!rawWrite) { - wrNext += FCGIGlobalDefs.def_FCGIHeaderLen; - } - } - - /** - * Close the stream. - */ - public void close() throws IOException { - if (isClosed) { - return; - } - empty(true); - /* - * if isClosed, will return with EOFException from write. - */ - isClosed = true; - stop = wrNext; - return; - } - - /** - * Flushes any buffered output. - * Server-push is a legitimate application of flush. - * Otherwise, it is not very useful, since FCGIAccept - * does it implicitly. flush may reduce performance - * by increasing the total number of operating system calls - * the application makes. - */ - public void flush() throws IOException { - if (isClosed) { - return; - } - empty(false); - /* - * if isClosed, will return with EOFException from write. - */ - return; - } - - /** - * An FCGI error has occurred. Save the error code in the stream - * for diagnostic purposes and set the stream state so that - * reads return EOF - */ - public void setFCGIError(int errnum) { - /* - * Preserve only the first error. - */ - if (errno == 0) { - errno = errnum; - } - isClosed = true; - } - - /** - * An Exception has occurred. Save the Exception in the stream - * for diagnostic purposes and set the stream state so that - * reads return EOF - */ - public void setException(Exception errexpt) { - /* - * Preserve only the first error. - */ - if (errex == null) { - errex = errexpt; - } - isClosed = true; - } - - /** - * Clear the stream error code and end-of-file indication. - */ - public void clearFCGIError() { - errno = 0; - /* - * isClosed = false; - * XXX: should clear isClosed but work is needed to make it safe - * to do so. - */ - } - - /** - * Clear the stream error code and end-of-file indication. - */ - public void clearException() { - errex = null; - /* - * isClosed = false; - * XXX: should clear isClosed but work is needed to make it safe - * to do so. - */ - } - - /** - * accessor method since var is private - */ - public int etFCGIError() { - return errno; - } - - /** - * accessor method since var is private - */ - public Exception getException() { - return errex; - } - - /** - * Writes an EOF record for the stream content if necessary. - * If this is the last writer to close, writes an FCGI_END_REQUEST - * record. - */ - public void writeCloseRecords() throws IOException { - FCGIMessage msg = new FCGIMessage(); - /* - * Enter rawWrite mode so final records won't be - * encapsulated as - * stream data. - */ - rawWrite = true; - /* - * Generate EOF for stream content if needed. - */ - if(!(type == FCGIGlobalDefs.def_FCGIStderr - && wrNext == 0 - && !isAnythingWritten)) { - byte hdr[] = - new byte[FCGIGlobalDefs.def_FCGIHeaderLen]; - System.arraycopy(msg.makeHeader(type, - request.requestID, - 0, 0), - 0, hdr,0, - FCGIGlobalDefs.def_FCGIHeaderLen); - write(hdr, 0, hdr.length); - } - /* - * Generate FCGI_END_REQUEST record if needed. - */ - if(request.numWriters == 1) { - byte endReq[] = - new byte[FCGIGlobalDefs.def_FCGIHeaderLen - + FCGIGlobalDefs.def_FCGIEndReqBodyLen]; - System.arraycopy(msg.makeHeader( - FCGIGlobalDefs.def_FCGIEndRequest, - request.requestID, - FCGIGlobalDefs.def_FCGIEndReqBodyLen,0), - 0, endReq, 0, - FCGIGlobalDefs.def_FCGIHeaderLen); - System.arraycopy(msg.makeEndrequestBody( - request.appStatus, - FCGIGlobalDefs.def_FCGIRequestComplete), - 0,endReq, - FCGIGlobalDefs.def_FCGIHeaderLen, - FCGIGlobalDefs.def_FCGIEndReqBodyLen); - write(endReq,0, FCGIGlobalDefs.def_FCGIHeaderLen - + FCGIGlobalDefs.def_FCGIEndReqBodyLen); - } - request.numWriters--; - } -} - diff --git a/fcgi/java/FCGIRequest.java b/fcgi/java/FCGIRequest.java deleted file mode 100644 index 0237b3e0..00000000 --- a/fcgi/java/FCGIRequest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * @(#)FCGIRequest.java - * - * FastCGi compatibility package Interface - * - * Copyright (c) 1996 Open Market, Inc. - * - * See the file "LICENSE.TERMS" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * $Id: FCGIRequest.java,v 1.3 2000/03/21 12:12:26 robs Exp $ - */ -package com.fastcgi; - -import java.net.*; -import java.io.FileDescriptor; -import java.util.Properties; - -public class FCGIRequest -{ - private static final String RCSID = "$Id: FCGIRequest.java,v 1.3 2000/03/21 12:12:26 robs Exp $"; - - /* This class has no methods. Right now we are single threaded - * so there is only one request object at any given time which - * is refrenced by an FCGIInterface class variable . All of this - * object's data could just as easily be declared directly there. - * When we thread, this will change, so we might as well use a - * seperate class. In line with this thinking, though somewhat - * more perversely, we kept the socket here. - */ - /* - * class variables - */ - /*public static Socket socket; */ - // same for all requests - - /* - * instance variables - */ - public Socket socket; - public boolean isBeginProcessed; - public int requestID; - public boolean keepConnection; - public int role; - public int appStatus; - public int numWriters; - public FCGIInputStream inStream; - public FCGIOutputStream outStream; - public FCGIOutputStream errStream; - public Properties params; -} - - diff --git a/fcgi/ltmain.sh b/fcgi/ltmain.sh deleted file mode 100644 index 5959c479..00000000 --- a/fcgi/ltmain.sh +++ /dev/null @@ -1,4946 +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 -# 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., 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. - -# 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 "$0" --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 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -# 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" - ;; - *) - 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" - exit 0 - ;; - - --config) - sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 - exit 0 - ;; - - --debug) - echo "$progname: enabling shell trace mode" - set -x - ;; - - --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 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case $nonopt in - *cc | *++ | gcc* | *-gcc*) - 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 1 - 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= - prev= - lastarg= - srcfile="$nonopt" - suppress_output= - - user_target=no - for arg - do - case $prev in - "") ;; - xcompiler) - # Aesthetically quote the previous argument. - prev= - lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - - case $arg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - continue - ;; - esac - - # Accept any command-line options. - case $arg in - -o) - if test "$user_target" != "no"; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit 1 - fi - user_target=next - ;; - - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - IFS="${IFS= }"; 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. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - continue - ;; - esac - - case $user_target in - next) - # The next one is the -o target name - user_target=yes - continue - ;; - yes) - # We got the output file - user_target=set - libobj="$arg" - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $lastarg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - case $user_target in - set) - ;; - no) - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - *) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit 1 - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSfmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - 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 1 - ;; - esac - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $libobj" - else - removelist="$libobj" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit 1" 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 1" 1 2 15 - else - 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 "$0" "$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 1 - fi - echo $srcfile > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $srcfile $pic_flag -DPIC" - else - # Don't build PIC code - command="$base_compile $srcfile" - fi - if test "$build_old_libs" = yes; then - lo_libobj="$libobj" - dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$libobj"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - - if test -d "$dir"; then - $show "$rm $libobj" - $run $rm $libobj - else - $show "$mkdir $dir" - $run $mkdir $dir - status=$? - if test $status -ne 0 && test ! -d $dir; then - exit $status - fi - fi - fi - if test "$compiler_o_lo" = yes; then - output_obj="$libobj" - command="$command -o $output_obj" - elif test "$compiler_c_o" = yes; then - output_obj="$obj" - command="$command -o $output_obj" - fi - - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/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 1 - fi - - # Just move the object if needed, then go on to compile the next one - if test x"$output_obj" != x"$libobj"; then - $show "$mv $output_obj $libobj" - if $run $mv $output_obj $libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # If we have no pic_flag, then copy the object into place and finish. - if (test -z "$pic_flag" || test "$pic_mode" != default) && - test "$build_old_libs" = yes; then - # Rename the .lo from within objdir to obj - if test -f $obj; then - $show $rm $obj - $run $rm $obj - fi - - $show "$mv $libobj $obj" - if $run $mv $libobj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` - libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` - # Now arrange that obj and lo_libobj become the same file - $show "(cd $xdir && $LN_S $baseobj $libobj)" - if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then - exit 0 - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $srcfile" - else - # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $srcfile $pic_flag -DPIC" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - output_obj="$obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/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 1 - fi - - # Just move the object if needed - if 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 - - # Create an invalid libtool object if no PIC, so that we do not - # accidentally link it into a program. - if test "$build_libtool_libs" != yes; then - $show "echo timestamp > $libobj" - $run eval "echo timestamp > \$libobj" || exit $? - else - # Move the .lo from within objdir - $show "$mv $libobj $lo_libobj" - if $run $mv $libobj $lo_libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - fi - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $run $rm "$lockfile" - fi - - exit 0 - ;; - - # libtool link mode - link | relink) - modename="$modename: link" - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invokation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args="$nonopt" - compile_command="$nonopt" - finalize_command="$nonopt" - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then - 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 - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - fi - build_libtool_libs=no - build_old_libs=yes - prefer_static_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 1 - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - release) - release="-$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 1 - ;; - 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 - ;; - *) - 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 1 - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - 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*) - 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 - exit 1 - 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*) - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-mingw* | *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # 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 - ;; - - -o) prev=output ;; - - -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 1 - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # 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 - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - IFS="${IFS= }"; 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= - IFS="${IFS= }"; 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 - ;; - - # 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 - ;; - - *.lo | *.$objext) - # A library or standard object. - if test "$prev" = dlfiles; then - # This file was specified with -dlopen. - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $arg" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` - prev= - else - case $arg in - *.lo) libobjs="$libobjs $arg" ;; - *) objs="$objs $arg" ;; - esac - 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 1 - 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 - - # 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 - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - 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 1 - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - 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 - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - libs="$libs $deplib" - done - deplibs= - newdependency_libs= - 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" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit 1 - ;; - 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 = prog; then - # Determine which files to process - case $pass in - dlopen) - libs="$dlfiles" - save_deplibs="$deplibs" # Collect dlpreopened libraries - deplibs= - ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -l*) - if test $linkmode = oldlib && test $linkmode = obj; then - $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 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 - # Search the libtool library - lib="$searchdir/lib${name}.la" - if test -f "$lib"; then - found=yes - break - fi - 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 - 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" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 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) - if test "$deplibs_check_method" != pass_all; then - echo - echo "*** Warning: This library needs some functionality provided by $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." - 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 = 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 - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test $found = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib'" 1>&2 - exit 1 - fi - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 - 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 variable installed. - installed=yes - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test $linkmode = oldlib && test $linkmode = obj; }; then - # Add dl[pre]opened files of deplib - 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 1 - 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" - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - 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 1 - 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 1 - 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 1 - 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. - dlprefiles="$dlprefiles $lib" - 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 - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - 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 1 - 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" - 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 - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - link_static=no # Whether the deplib will be linked statically - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # Link against this shared library - - if test "$linkmode,$pass" = "prog,link" || - { 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 - if test $linkmode = prog; then - # We need to hardcode the library path - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - fi - 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 - - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - 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*) - 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'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$extract_expsyms_cmds\" - for cmd in $cmds; do - IFS="$save_ifs" - $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'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$old_archive_from_expsyms_cmds\" - for cmd in $cmds; do - IFS="$save_ifs" - $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" - 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" - 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 1 - 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" - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - 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 - 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 - - # Try to link the static library - # 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 library needs some functionality provided by $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 "*** Therefore, libtool will create a static module, that should work " - echo "*** as long as the dlopening 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 - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - 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" - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - 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="-L$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 1 - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="-L$absdir" - fi - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$deplibs $path" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $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 - test $pass != scan && dependency_libs="$newdependency_libs" - 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 - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - *) - 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 - if test "$pass" = "conv" && - { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then - libs="$deplibs" # reset libs - deplibs= - fi - done # for pass - if test $linkmode = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - 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' 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 libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - 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 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 1 - 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. - libext=al - 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' 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. - IFS="${IFS= }"; 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 1 - fi - - current="$2" - revision="$3" - age="$4" - - # 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]) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case $revision in - 0 | [1-9] | [1-9][0-9] | [1-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 - exit 1 - ;; - esac - - case $age in - 0 | [1-9] | [1-9][0-9] | [1-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 - exit 1 - ;; - 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 1 - 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` - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix) - major=`expr $current - $age + 1` - verstring="sgi$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test $loop != 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="sgi$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 != 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 1 - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - verstring="0.0" - 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. - $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" - $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* - 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. - ;; - *) - # 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 behaviour. - 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 - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $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." - 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 - 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 - 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 - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $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." - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g' -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 - - # 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" - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - 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 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 - test -z "$dlname" && dlname=$soname - - lib="$output_objdir/$realname" - for link - do - linknames="$linknames $link" - done - - # Ensure that we have .o objects for linkers which dislike .lo - # (e.g. aix) in case we are running --disable-static - for obj in $libobjs; do - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` - if test ! -f $xdir/$oldobj; then - $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" - $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? - fi - 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 - eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - 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 - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - 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 - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - 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 -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || 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 $? - exit 0 - 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 1 - 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 - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - 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 - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - 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" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $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 0 - 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 0 - 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" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - else - # Just create a symlink. - $show $rm $libobj - $run $rm $libobj - xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$libobj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` - $show "(cd $xdir && $LN_S $oldobj $baseobj)" - $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - ;; - - 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 - - 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*) - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - 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/$output.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 'mv "$nlist"T "$nlist"' - 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" | sort +2 | 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_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[] = -{\ -" - - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 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 -DPIC -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DPIC";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $CC -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}%"` - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - 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" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - 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'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - 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 $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 0 - 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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - 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" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case $0 in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --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 ;; - *) exeext= ;; - esac - $rm $output - trap "$rm $output; exit 1" 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' - -# 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 - -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 (eval \$relink_command); then : - else - $rm \"\$progdir/\$file\" - exit 1 - 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 - # win32 systems need to use the prog path for dll - # lookup to work - *-*-cygwin* | *-*-pw32*) - $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} -" - ;; - - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - 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 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - 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="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` - fi - addlibs="$old_convenience" - 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 - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` - done - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else - # Ensure that we have .o objects in place in case we decided - # not to build a shared library, and have fallen back to building - # static libs even though --disable-static was passed! - for oldobj in $oldobjs; do - if test ! -f $oldobj; then - xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$oldobj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` - obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` - $show "(cd $xdir && ${LN_S} $obj $baseobj)" - $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? - fi - done - - eval cmds=\"$old_archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - 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 $0 --mode=relink $libtool_args" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - - # 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 1 - 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 1 - 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 1 - fi - newdlprefiles="$newdlprefiles $libdir/$name" - 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) 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 - -# 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 0 - ;; - - # 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" | $Xsed | 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) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -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 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - 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 1 - 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 1 - 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 1 - ;; - 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 | egrep "^# 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 1 - 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 - $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 - continue - 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. - 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)" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || 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 1 - ;; - 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 0 - ;; - - *) - # 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 - - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - 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= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - 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-$$" - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $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" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyways - 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 "$striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $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 $SHELL $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # 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. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $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 0 - - echo "----------------------------------------------------------------------" - 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 "----------------------------------------------------------------------" - exit 0 - ;; - - # 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 1 - 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 1 - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# 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 1 - 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 - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - 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 | egrep "^# 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 enviroment 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 - - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 - 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 0 - 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 1 - fi - - rmdirs= - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$objdir" - else - objdir="$dir/$objdir" - 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 | egrep "^# 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" - test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - - if test $mode = uninstall; then - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - if test $? != 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. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - fi - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" - fi - ;; - - *) - # Do a test to see if this is a libtool program. - if test $mode = clean && - (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$file - - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - - # 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 1 - ;; - esac - - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 -fi # test -z "$show_help" - -# 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 - --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." - exit 0 - ;; - -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 - -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 - -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 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/fcgi/perl/ChangeLog b/fcgi/perl/ChangeLog deleted file mode 100644 index bb5046be..00000000 --- a/fcgi/perl/ChangeLog +++ /dev/null @@ -1,229 +0,0 @@ -Version 0.67 -- 22 December 2002 Sven Verdoolaege - - o Fixes for pure perl version based on report and patch - from "Kurtis D. Rader" - o FCGI_UndoBinding perl 5.8.0 compatibility - Reported by Marko Asplund - o Fix problem with fcgi_config.h on win32. - Reported by Igor Franchuk - o Add minimal tests - -Version 0.66 -- 5 September 2002 Sven Verdoolaege - - o perl 5.8.0 compatibility fix by Autrijus - o library fixes from Rob - -Version 0.65 -- 19 February 2002 Sven Verdoolaege - - o fix perl 5.005 compatibility problem - o fix strict warning - -Version 0.64 -- 25 September 2001 Sven Verdoolaege -Version 0.63 -- 24 September 2001 Sven Verdoolaege - - o Update build process - -Version 0.62 -- 21 September 2001 Sven Verdoolaege - - o Move version number to separate file - -Version 0.61 -- 20 September 2001 Sven Verdoolaege - - o Fix refcounting bug - o Add GetEnvironment for pure version - o Add LastCall method - o Allow filehandle for Request's socket parameter - o library fixes ("Rob Saccoccio" ) - -Version 0.60 -- 8 July 2001 Sven Verdoolaege - - o Allow specification of purity on command line - (suggested by Rob Brown ) - o Fix bug in pure perl implementation - o Don't try to compile anything on pure perl build - o Add BINMODE method - o Add comment on socket permissions - -Version 0.59 -- 31 December 2000 Sven Verdoolaege - - o preliminary pure perl implementation - o copy win32 configuration file instead of moving it - o convert echo.fpl to new interface - -Version 0.58 -- 15 November 2000 Sven Verdoolaege - - o fix bug introduced in 0.57 - -Version 0.57 -- 12 November 2000 Sven Verdoolaege - - o don't flush unbound request - -Version 0.56 -- 3 November 2000 Sven Verdoolaege - - o add example remote.fpl - o provide access to the Request parameters - o add IsFastCGI method - o fix warn handler (Andrew Pimlott ) - -Version 0.55 -- 18 October 2000 Sven Verdoolaege - - o small documentation fix - o compilation issues with older perls fixed - o library initialization when using sockets fixed - -Version 0.54 -- 8 October 2000 Sven Verdoolaege - - o library fixes ("Rob Saccoccio" ) - o compilation issues with newer gcc - o completely untested OPEN and READLINE methods - -Version 0.53 -- 10 July 2000 Sven Verdoolaege - - o sfio version compiles again - -Version 0.52 -- 12 April 2000 Sven Verdoolaege - -Version 0.51 -- 12 April 2000 Sven Verdoolaege - -Version 0.50 -- 10 April 2000 Sven Verdoolaege - -Version 0.49 -- 9 April 2000 Sven Verdoolaege - - o General clean-ups - o Allow attaching/detaching - o Changed DESTROY behaviour - o Fixed default warn/die handler of old interface - o Document new interface - -Version 0.48 -- 27 August 1999 Sven Verdoolaege - - o perl 5.005_60 compatibility - o locking on platforms that need it - o support for remote connections - -Version 0.47 -- 31 July 1999 Sven Verdoolaege - - o move PRINTF into correct package - o deprecated set_exit_status - o general cleanup, moving old non thread safe interface - from xs to perl - -Version 0.46 -- 30 July 1999 Sven Verdoolaege - - o new thread safe interface - o new threaded example program - -Version 0.45 -- 8 March 1999 Sven Verdoolaege - - o FCGI.pm now part of the devel kit - o library fixes ("Rob Saccoccio" ) - o allow bypassing of installation of handlers - o ActivePerl compatibility (Murray Nesbitt ) - -Version 0.43 -- 22 December 1998 Sven Verdoolaege - - o POST on bigendians (Paul GABORIT ) - o Some win32 changes (Monty ) - o library fixes ("Rob Saccoccio" ) - -Version 0.42 -- 28 August 1998 Sven Verdoolaege - - o environ fixes ? - o print NULLs (Ken Alexander ) - o PRINTF support - o set version in FCGI.pm - o library fixes ("Rob Saccoccio" ) - -Version 0.41 -- 29 July 1998 Sven Verdoolaege - - o Compiles with perl 5.005 - -Version 0.40 -- 15 July 1998 Sven Verdoolaege - - o Added default die hook - o Minimal documentation - -Version 0.39 -- 3 July 1998 Sven Verdoolaege - - o Fixed read bug - -Version 0.38 -- 28 June 1998 Sven Verdoolaege - - o Fixed flush bug - o Added default warn hook - -Version 0.37 -- 27 June 1998 Sven Verdoolaege - - o More support for tied handles - o Added flush function - -Version 0.36 -- 23 June 1998 Sven Verdoolaege - - o More support for tied handles (GETC and autoflushing) - -Version 0.35 -- 22 June 1998 Sven Verdoolaege - - o Added forgotten typemap - -Version 0.34 -- 17 June 1998 Sven Verdoolaege - - o No longer force sfio less compile - o Update os_unix.c from fcgi2.0b2.1 - o Small documentation changes - -Version 0.33 -- 16 June 1998 Sven Verdoolaege - - o More support for tied handles - -Version 0.32 -- 16 June 1998 Sven Verdoolaege - - o Preliminary support for tied handles (doesn't require sfio) - o Force sfio less compile - o Changed protoype of set_exit_status - -Version 0.31 -- 13 July 1997 Sven Verdoolaege - - o Applied solaris accept patch from - Chip Salzenberg - o Preliminary support glibc's cookie mechanism - -Version 0.30 -- 24 June 1997 Sven Verdoolaege - - o Added forgotten library files - -Version 0.29 -- 10 June 1997 Sven Verdoolaege - - o Updated library files from fastcgi 2.02b - o Use installed library/include file if found - -Version 0.28 -- 24 February 1997 Sven Verdoolaege - - o Intialization of %ENV did not change environ. Fixed. - Problem reported by Jan Drehmer - -Version 0.26 -- 19 February 1997 Sven Verdoolaege - - o Flush output when $| is set to eliminate a problem reported - by echo@echo.cica.fr - -Version 0.25 -- 13 October 1996 Sven Verdoolaege - - o Eliminate some warnings - o Check whether perl is compiled with sfio support - -Version 0.25 -- 25 September 1996 Sven Verdoolaege - - o First public release - o Additional bugfixes - -Version 0.21 -- 20 September 1996 Sven Verdoolaege - - o Bugfix - -Version 0.2 -- 19 September 1996 Sven Verdoolaege - - o First Version based on sfio - -Version 0.1 -- 12 June 1996 - - o Original version from Open Market's FastCGI Developer's Kit diff --git a/fcgi/perl/FCGI.PL b/fcgi/perl/FCGI.PL deleted file mode 100644 index b1b4dfc5..00000000 --- a/fcgi/perl/FCGI.PL +++ /dev/null @@ -1,570 +0,0 @@ -use Config; -use ExtUtils::MakeMaker; - -do 'FCGI.cfg' or die "no FCGI.cfg"; - -open OUT, ">FCGI.pm"; - -print "Generating FCGI.pm\n"; -print OUT <<'EOP'; -# $Id: FCGI.PL,v 1.37 2002/12/15 20:02:48 skimo Exp $ - -package FCGI; - -require Exporter; -require DynaLoader; - -@ISA = qw(Exporter DynaLoader); -# Items to export into callers namespace by default. Note: do not export -# names by default without a very good reason. Use EXPORT_OK instead. -# Do not simply export all your public functions/methods/constants. -@EXPORT = qw( - -); - -EOP - -print OUT '$VERSION = '.MM->parse_version('version.pm').";\n\n"; - -print OUT "bootstrap FCGI;\n" unless ($pure); - -print OUT <<'EOP' if ($pure); -use Symbol; -use POSIX 'ENOTCONN'; - -use constant VERSION_1 => 1; - -use constant BEGIN_REQUEST => 1; -use constant PARAMS => 4; -use constant FCGI_STDIN => 5; -use constant FCGI_STDOUT => 6; -use constant FCGI_STDERR => 7; - -use constant RESPONDER => 1; -use constant AUTHORIZER => 2; -use constant FILTER => 3; - -%FCGI::rolenames = (RESPONDER, "RESPONDER", - AUTHORIZER, "AUTHORIZER", - FILTER, "FILTER", - ); - -# This only works on Unix; anyone familiar with Windows is welcome -# to give a hand here -sub IsFastCGI { - my ($req) = @_; - $req->{isfastcgi} = - (!defined getpeername shift->{listen_sock}) && $! == ENOTCONN - unless exists $req->{isfastcgi}; - return $req->{isfastcgi}; -} - -sub GetEnvironment { - return shift->{'env'}; -} - -sub read_nv_len { - my ($stream) = @_; - my $buf; - return undef unless read $stream, $buf, 1, 0; - my ($len) = unpack("C", $buf); - if ($len & 0x80) { - $buf = pack("C", $len & 0x7F); - return undef unless read $stream, $buf, 3, 1; - $len = unpack("N", $buf); - } - $len; -} - -sub RequestX { - my $self = { - in => shift, - out => shift, - err => shift, - env => shift, - socket => shift, - flags => shift, - last => 0, - }; - open $self->{listen_sock}, "<&=0"; - bless $self, "FCGI"; -} - -my $run_once = 0; - -sub Accept { - my ($req) = @_; - - unless ($req->IsFastCGI()) { - return -1 if $run_once; - - $run_once = 1; - return 0; - } - $req->Finish(); - $req->{socket} = gensym(); - if ($req->{last} || !accept($req->{socket}, $req->{listen_sock})) { - $req->{error} = "accept"; - return -1; - } - my ($type, $id, $body) = $req->read_record(); - if ($type != BEGIN_REQUEST) { - $req->{error} = "begin request"; - return -1; - } - my ($role, $flags) = unpack("nC", $body); - $req->{role} = $role; - $req->{flags} = $flags; - $req->{id} = $id; - - %{$req->{env}} = (); - $req->{env}{FCGI_ROLE} = $FCGI::rolenames{$req->{role}}; - my $param = FCGI::Stream->new($req, PARAMS); - my ($nlen, $vlen); - while (defined($nlen = read_nv_len($param)) && - defined($vlen = read_nv_len($param))) { - my ($name, $val); - read $param, $name, $nlen; - read $param, $val, $vlen; - $req->{env}{$name} = $val; - } - $req->Bind; - $req->{accepted} = 1; - - return 0; -} - -sub UndoBindings { - my ($req) = @_; - untie ${$req->{in}}; - untie ${$req->{out}}; - untie ${$req->{err}}; - $req->{bound} = 0; -} - -sub Bind { - my ($req) = @_; - tie ${$req->{in}}, 'FCGI::Stream', $req, FCGI_STDIN; - tie ${$req->{out}}, 'FCGI::Stream', $req, FCGI_STDOUT; - tie ${$req->{err}}, 'FCGI::Stream', $req, FCGI_STDERR; - $req->{bound} = 1; -} - -sub Attach { - my ($req) = @_; - $req->Bind() if ($req->{accepted} && !$req->{bound}); -} - -sub Detach { - my ($req) = @_; - $req->UndoBindings() if ($req->{accepted} && $req->{bound}); -} - -sub Finish { - my ($req) = @_; - return unless $req->{accepted}; - if ($req->{bound}) { - $req->UndoBindings(); - # apparently these are harmful - # close ${$req->{out}}; - # close ${$req->{err}}; - } - $req->{accepted} = 0; -} - -sub LastCall { - shift->{last} = 1; -} - -sub DESTROY { - shift->Finish(); -} - -sub read_record { - my ($self) = @_; - my ($header, $body); - - read($self->{socket}, $header, 8); - my ($version, $type, $id, $clen, $plen) = unpack("CCnnC", $header); - read($self->{socket}, $body, $clen+$plen); - $body = undef if $clen == 0; - ($type, $id, $body); -} - -sub read { - my ($self, $rtype, $len) = @_; - while (length $self->{buf} < $len) { - my ($type, $id, $buf) = $self->read_record(); - return undef unless defined $buf; - if ($type != $rtype) { - $self->{error} = "unexpected stream type"; - return 0; - } - $self->{buf} .= $buf; - } - my ($newbuf, $result) = (substr($self->{buf}, $len), - substr($self->{buf}, 0, $len)); - $self->{buf} = $newbuf; - $result; -} - -sub Flush { - my ($req) = @_; -} - -sub write { - my ($self, $type, $content, $len) = @_; - return unless $len > 0; - $self->write_record($type, $content, $len); -} - -sub write_record { - my ($self, $type, $content, $length) = @_; - my $offset = 0; - while ($length > 0) { - my $len = $length > 32*1024 ? 32*1024 : $length; - my $padlen = (8 - ($len % 8)) % 8; - my $templ = "CCnnCxa${len}x$padlen"; - my $data = pack($templ, - VERSION_1, $type, $self->{id}, $len, $padlen, - substr($content, $offset, $len)); - syswrite $self->{socket}, $data; - $length -= $len; - $offset += $len; - } -} - -{ package FCGI::Stream; - -sub new { - my ($class, $src, $type) = @_; - my $handle = do { \local *FH }; - tie($$handle, $class, $src, $type); - $handle; -} - -sub TIEHANDLE { - my ($class, $src, $type) = @_; - bless { src => $src, type => $type }, $class; -} - -sub READ { - my ($stream, undef, $len, $offset) = @_; - my ($ref) = \$_[1]; - my $buf = $stream->{src}->read($stream->{type}, $len); - return undef unless defined $buf; - substr($$ref, $offset, 0, $buf); - length $buf; -} - -sub PRINT { - my ($stream) = shift; - for (@_) { - $stream->{src}->write($stream->{type}, $_, length($_)); - } -} - -sub CLOSE { - my ($stream) = @_; - $stream->{src}->write_record($stream->{type}, undef, 0); -} - -} - -EOP -print OUT while ; -close OUT; -__END__ - -# Preloaded methods go here. - -# Autoload methods go after __END__, and are processed by the autosplit program. - -*FAIL_ACCEPT_ON_INTR = sub() { 1 }; - -sub Request(;***$*$) { - my @defaults = (\*STDIN, \*STDOUT, \*STDERR, \%ENV, 0, 0); - $_[4] = fileno($_[4]) if defined($_[4]) && defined(fileno($_[4])); - splice @defaults,0,@_,@_; - RequestX(@defaults); -} - -sub accept() { - warn "accept called as a method; you probably wanted to call Accept" if @_; - if (defined %FCGI::ENV) { - %ENV = %FCGI::ENV; - } else { - %FCGI::ENV = %ENV; - } - my $rc = Accept($global_request); - for (keys %FCGI::ENV) { - $ENV{$_} = $FCGI::ENV{$_} unless exists $ENV{$_}; - } - - # not SFIO - $SIG{__WARN__} = $warn_handler if (tied (*STDIN)); - $SIG{__DIE__} = $die_handler if (tied (*STDIN)); - - return $rc; -} - -sub finish() { - warn "finish called as a method; you probably wanted to call Finish" if @_; - %ENV = %FCGI::ENV if (defined %FCGI::ENV); - - # not SFIO - if (tied (*STDIN)) { - delete $SIG{__WARN__} if ($SIG{__WARN__} == $warn_handler); - delete $SIG{__DIE__} if ($SIG{__DIE__} == $die_handler); - } - - Finish ($global_request); -} - -sub flush() { - warn "flush called as a method; you probably wanted to call Flush" if @_; - Flush($global_request); -} - -sub detach() { - warn "detach called as a method; you probably wanted to call Detach" if @_; - Detach($global_request); -} - -sub attach() { - warn "attach called as a method; you probably wanted to call Attach" if @_; - Attach($global_request); -} - -# deprecated -sub set_exit_status { -} - -sub start_filter_data() { - StartFilterData($global_request); -} - -$global_request = Request(); -$warn_handler = sub { print STDERR @_ }; -$die_handler = sub { print STDERR @_ unless $^S }; - -package FCGI::Stream; - -sub PRINTF { - shift->PRINT(sprintf(shift, @_)); -} - -sub BINMODE { -} - -sub READLINE { - my $stream = shift; - my ($s, $c); - my $rs = $/ eq '' ? "\n\n" : $/; - my $l = substr $rs, -1; - my $len = length $rs; - - $c = $stream->GETC(); - if ($/ eq '') { - while ($c eq "\n") { - $c = $stream->GETC(); - } - } - while (defined $c) { - $s .= $c; - last if $c eq $l and substr($s, -$len) eq $rs; - $c = $stream->GETC(); - } - $s; -} - -sub OPEN { - $_[0]->CLOSE; - if (@_ == 2) { - return open($_[0], $_[1]); - } else { - my $rc; - eval("$rc = open($_[0], $_[1], $_[2])"); - die $@ if $@; - return $rc; - } -} - -# Apparently some use fileno to determine if a filehandle is open, -# so we might want to return a defined, but meaningless value. -# An alternative would be to return the fcgi stream fd. -# sub FILENO { -2 } - -1; - -=pod - -=head1 NAME - -FCGI - Fast CGI module - -=head1 SYNOPSIS - - use FCGI; - - my $count = 0; - my $request = FCGI::Request(); - - while($request->Accept() >= 0) { - print("Content-type: text/html\r\n\r\n", ++$count); - } - -=head1 DESCRIPTION - -Functions: - -=over 4 - -=item FCGI::Request - -Creates a request handle. It has the following optional parameters: - -=over 8 - -=item input perl file handle (default: \*STDIN) - -=item output perl file handle (default: \*STDOUT) - -=item error perl file handle (default: \*STDERR) - -These filehandles will be setup to act as input/output/error -on succesful Accept. - -=item environment hash reference (default: \%ENV) - -The hash will be populated with the environment. - -=item socket (default: 0) - -Socket to communicate with the server. -Can be the result of the OpenSocket function. -For the moment, it's the file descriptor of the socket -that should be passed. This may change in the future. - -You should only use your own socket if your program -is not started by a process manager such as mod_fastcgi -(except for the FastCgiExternalServer case) or cgi-fcgi. -If you use the option, you have to let your FastCGI -server know which port (and possibly server) your program -is listening on. -See remote.pl for an example. - -=item flags (default: 0) - -Possible values: - -=over 12 - -=item FCGI::FAIL_ACCEPT_ON_INTR - -If set, Accept will fail if interrupted. -It not set, it will just keep on waiting. - -=back - -=back - -Example usage: - my $req = FCGI::Request; - -or: - my %env; - my $in = new IO::Handle; - my $out = new IO::Handle; - my $err = new IO::Handle; - my $req = FCGI::Request($in, $out, $err, \%env); - -=item FCGI::OpenSocket(path, backlog) - -Creates a socket suitable to use as an argument to Request. - -=over 8 - -=item path - -Pathname of socket or colon followed by local tcp port. -Note that some systems take file permissions into account -on Unix domain sockets, so you'll have to make sure that -the server can write to the created file, by changing -the umask before the call and/or changing permissions and/or -group of the file afterwards. - -=item backlog - -Maximum length of the queue of pending connections. -If a connection -request arrives with the queue full the client may receive -an error with an indication of ECONNREFUSED. - -=back - -=item FCGI::CloseSocket(socket) - -Close a socket opened with OpenSocket. - -=item $req->Accept() - -Accepts a connection on $req, attaching the filehandles and -populating the environment hash. -Returns 0 on success. -If a connection has been accepted before, the old -one will be finished first. - -Note that unlike with the old interface, no die and warn -handlers are installed by default. This means that if -you are not running an sfio enabled perl, any warn or -die message will not end up in the server's log by default. -It is advised you set up die and warn handlers yourself. -FCGI.pm contains an example of die and warn handlers. - -=item $req->Finish() - -Finishes accepted connection. -Also detaches filehandles. - -=item $req->Flush() - -Flushes accepted connection. - -=item $req->Detach() - -Temporarily detaches filehandles on an accepted connection. - -=item $req->Attach() - -Re-attaches filehandles on an accepted connection. - -=item $req->LastCall() - -Tells the library not to accept any more requests on this handle. -It should be safe to call this method from signal handlers. - -Note that this method is still experimental and everything -about it, including its name, is subject to change. - -=item $env = $req->GetEnvironment() - -Returns the environment parameter passed to FCGI::Request. - -=item ($in, $out, $err) = $req->GetHandles() - -Returns the file handle parameters passed to FCGI::Request. - -=item $isfcgi = $req->IsFastCGI() - -Returns whether or not the program was run as a FastCGI. - -=back - -=head1 AUTHOR - -Sven Verdoolaege - -=cut - -__END__ diff --git a/fcgi/perl/FCGI.XL b/fcgi/perl/FCGI.XL deleted file mode 100644 index 01742cc9..00000000 --- a/fcgi/perl/FCGI.XL +++ /dev/null @@ -1,625 +0,0 @@ -use Config; - -open OUT, ">FCGI.xs"; - -print "Generating FCGI.xs for Perl version $]\n"; -#unless (exists $Config{apiversion} && $Config{apiversion} >= 5.005) -unless ($] >= 5.005) { - for (qw(sv_undef diehook warnhook in_eval)) { - print OUT "#define PL_$_ $_\n" - } -} -print OUT while ; -close OUT; -__END__ -/* $Id: FCGI.XL,v 1.9 2002/11/11 13:51:20 skimo Exp $ */ - -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -#include "fcgi_config.h" -#include "fcgiapp.h" -#include "fastcgi.h" - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (1) -#endif - -#ifndef dTHX -#define dTHX -#endif - -#ifndef INT2PTR -#define INT2PTR(a,b) ((a) (b)) -#endif - -#ifdef USE_SFIO -typedef struct -{ - Sfdisc_t disc; - FCGX_Stream *stream; -} FCGI_Disc; - -static ssize_t -sffcgiread(f, buf, n, disc) -Sfio_t* f; /* stream involved */ -Void_t* buf; /* buffer to read into */ -size_t n; /* number of bytes to read */ -Sfdisc_t* disc; /* discipline */ -{ - return FCGX_GetStr(buf, n, ((FCGI_Disc *)disc)->stream); -} - -static ssize_t -sffcgiwrite(f, buf, n, disc) -Sfio_t* f; /* stream involved */ -const Void_t* buf; /* buffer to read into */ -size_t n; /* number of bytes to read */ -Sfdisc_t* disc; /* discipline */ -{ - n = FCGX_PutStr(buf, n, ((FCGI_Disc *)disc)->stream); - FCGX_FFlush(((FCGI_Disc *)disc)->stream); - return n; -} - -Sfdisc_t * -sfdcnewfcgi(stream) - FCGX_Stream *stream; -{ - FCGI_Disc* disc; - - New(1000,disc,1,FCGI_Disc); - if (!disc) return (Sfdisc_t *)disc; - - disc->disc.exceptf = (Sfexcept_f)NULL; - disc->disc.seekf = (Sfseek_f)NULL; - disc->disc.readf = sffcgiread; - disc->disc.writef = sffcgiwrite; - disc->stream = stream; - return (Sfdisc_t *)disc; -} - -Sfdisc_t * -sfdcdelfcgi(disc) - Sfdisc_t* disc; -{ - Safefree(disc); - return 0; -} -#endif - -#if defined(USE_LOCKING) && defined(USE_THREADS) -static perl_mutex accept_mutex; -#endif - -typedef struct FCGP_Request { - int accepted; - int bound; - SV* svin; - SV* svout; - SV* sverr; - GV* gv[3]; - HV* hvEnv; - FCGX_Request* requestPtr; -#ifdef USE_SFIO - int sfcreated[3]; - IO* io[3]; -#endif -} FCGP_Request; - -static void FCGI_Finish(FCGP_Request* request); - -static void -FCGI_Flush(FCGP_Request* request) -{ - dTHX; - - if(!request->bound) { - return; - } -#ifdef USE_SFIO - sfsync(IoOFP(GvIOp(request->gv[1]))); - sfsync(IoOFP(GvIOp(request->gv[2]))); -#else - FCGX_FFlush(INT2PTR(FCGX_Stream *, SvIV((SV*) SvRV(request->svout)))); - FCGX_FFlush(INT2PTR(FCGX_Stream *, SvIV((SV*) SvRV(request->sverr)))); -#endif -} - -static void -FCGI_UndoBinding(FCGP_Request* request) -{ - dTHX; - -#ifdef USE_SFIO - sfdcdelfcgi(sfdisc(IoIFP(request->io[0]), SF_POPDISC)); - sfdcdelfcgi(sfdisc(IoOFP(request->io[1]), SF_POPDISC)); - sfdcdelfcgi(sfdisc(IoOFP(request->io[2]), SF_POPDISC)); -#else -# ifdef USE_PERLIO - sv_unmagic((SV *)GvIOp(request->gv[0]), 'q'); - sv_unmagic((SV *)GvIOp(request->gv[1]), 'q'); - sv_unmagic((SV *)GvIOp(request->gv[2]), 'q'); -# else - sv_unmagic((SV *)request->gv[0], 'q'); - sv_unmagic((SV *)request->gv[1], 'q'); - sv_unmagic((SV *)request->gv[2], 'q'); -# endif -#endif - request->bound = FALSE; -} - -static void -FCGI_Bind(FCGP_Request* request) -{ - dTHX; - -#ifdef USE_SFIO - sfdisc(IoIFP(request->io[0]), sfdcnewfcgi(request->requestPtr->in)); - sfdisc(IoOFP(request->io[1]), sfdcnewfcgi(request->requestPtr->out)); - sfdisc(IoOFP(request->io[2]), sfdcnewfcgi(request->requestPtr->err)); -#else -# ifdef USE_PERLIO - /* For tied filehandles, we apply tiedscalar magic to the IO - slot of the GP rather than the GV itself. */ - - if (!GvIOp(request->gv[1])) - GvIOp(request->gv[1]) = newIO(); - if (!GvIOp(request->gv[2])) - GvIOp(request->gv[2]) = newIO(); - if (!GvIOp(request->gv[0])) - GvIOp(request->gv[0]) = newIO(); - - sv_magic((SV *)GvIOp(request->gv[1]), request->svout, 'q', Nullch, 0); - sv_magic((SV *)GvIOp(request->gv[2]), request->sverr, 'q', Nullch, 0); - sv_magic((SV *)GvIOp(request->gv[0]), request->svin, 'q', Nullch, 0); -# else - sv_magic((SV *)request->gv[1], request->svout, 'q', Nullch, 0); - sv_magic((SV *)request->gv[2], request->sverr, 'q', Nullch, 0); - sv_magic((SV *)request->gv[0], request->svin, 'q', Nullch, 0); -# endif -#endif - request->bound = TRUE; -} - -static void -populate_env(envp, hv) -char **envp; -HV *hv; -{ - int i; - char *p, *p1; - SV *sv; - dTHX; - - hv_clear(hv); - for(i = 0; ; i++) { - if((p = envp[i]) == NULL) { - break; - } - p1 = strchr(p, '='); - assert(p1 != NULL); - sv = newSVpv(p1 + 1, 0); - /* call magic for this value ourselves */ - hv_store(hv, p, p1 - p, sv, 0); - SvSETMAGIC(sv); - } -} - -static int -FCGI_IsFastCGI(FCGP_Request* request) -{ - static int isCGI = -1; /* -1: not checked; 0: FCGI; 1: CGI */ - - if (request->requestPtr->listen_sock == FCGI_LISTENSOCK_FILENO) { - if (isCGI == -1) - isCGI = FCGX_IsCGI(); - return !isCGI; - } - - /* A explicit socket is being used -> assume FastCGI */ - return 1; -} - -static int -FCGI_Accept(FCGP_Request* request) -{ - dTHX; - - if (!FCGI_IsFastCGI(request)) { - static int been_here = 0; - - /* - * Not first call to FCGI_Accept and running as CGI means - * application is done. - */ - if (been_here) - return EOF; - - been_here = 1; - } else { -#ifdef USE_SFIO - int i; -#endif - FCGX_Request *fcgx_req = request->requestPtr; - int acceptResult; - - FCGI_Finish(request); -#if defined(USE_LOCKING) && defined(USE_THREADS) - MUTEX_LOCK(&accept_mutex); -#endif - acceptResult = FCGX_Accept_r(fcgx_req); -#if defined(USE_LOCKING) && defined(USE_THREADS) - MUTEX_UNLOCK(&accept_mutex); -#endif - if(acceptResult < 0) { - return acceptResult; - } - - populate_env(fcgx_req->envp, request->hvEnv); - -#ifdef USE_SFIO - for (i = 0; i < 3; ++i) { - request->io[i] = GvIOn(request->gv[i]); - if (!(i == 0 ? IoIFP(request->io[i]) - : IoOFP(request->io[i]))) { - IoIFP(request->io[i]) = sftmp(0); - /*IoIFP(request->io[i]) = sfnew(NULL, NULL, SF_UNBOUND, 0, - SF_STRING | (i ? SF_WRITE : SF_READ));*/ - if (i != 0) - IoOFP(request->io[i]) = IoIFP(request->io[i]); - request->sfcreated[i] = TRUE; - } - } -#else - if (!request->svout) { - newSVrv(request->svout = newSV(0), "FCGI::Stream"); - newSVrv(request->sverr = newSV(0), "FCGI::Stream"); - newSVrv(request->svin = newSV(0), "FCGI::Stream"); - } - sv_setiv(SvRV(request->svout), INT2PTR(IV, fcgx_req->out)); - sv_setiv(SvRV(request->sverr), INT2PTR(IV, fcgx_req->err)); - sv_setiv(SvRV(request->svin), INT2PTR(IV, fcgx_req->in)); -#endif - FCGI_Bind(request); - request->accepted = TRUE; - } - return 0; -} - -static void -FCGI_Finish(FCGP_Request* request) -{ -#ifdef USE_SFIO - int i; -#endif - int was_bound; - dTHX; - - if(!request->accepted) { - return; - } - - if (was_bound = request->bound) { - FCGI_UndoBinding(request); - } -#ifdef USE_SFIO - for (i = 0; i < 3; ++i) { - if (request->sfcreated[i]) { - sfclose(IoIFP(request->io[i])); - IoIFP(request->io[i]) = IoOFP(request->io[i]) = Nullfp; - request->sfcreated[i] = FALSE; - } - } -#endif - if (was_bound) - FCGX_Finish_r(request->requestPtr); - else - FCGX_Free(request->requestPtr, 1); - request->accepted = FALSE; -} - -static int -FCGI_StartFilterData(FCGP_Request* request) -{ - return request->requestPtr->in ? - FCGX_StartFilterData(request->requestPtr->in) : -1; -} - -static FCGP_Request * -FCGI_Request(in, out, err, env, socket, flags) - GV* in; - GV* out; - GV* err; - HV* env; - int socket; - int flags; -{ - FCGX_Request* fcgx_req; - FCGP_Request* req; - - Newz(551, fcgx_req, 1, FCGX_Request); - FCGX_InitRequest(fcgx_req, socket, flags); - Newz(551, req, 1, FCGP_Request); - req->requestPtr = fcgx_req; - SvREFCNT_inc(in); - req->gv[0] = in; - SvREFCNT_inc(out); - req->gv[1] = out; - SvREFCNT_inc(err); - req->gv[2] = err; - SvREFCNT_inc(env); - req->hvEnv = env; - - return req; -} - -static void -FCGI_Release_Request(FCGP_Request *req) -{ - SvREFCNT_dec(req->gv[0]); - SvREFCNT_dec(req->gv[1]); - SvREFCNT_dec(req->gv[2]); - SvREFCNT_dec(req->hvEnv); - FCGI_Finish(req); - Safefree(req->requestPtr); - Safefree(req); -} - -static void -FCGI_Init() -{ -#if defined(USE_LOCKING) && defined(USE_THREADS) - dTHX; - - MUTEX_INIT(&accept_mutex); -#endif - - FCGX_Init(); -} - -typedef FCGX_Stream * FCGI__Stream; -typedef FCGP_Request * FCGI; -typedef GV* GLOBREF; -typedef HV* HASHREF; - -MODULE = FCGI PACKAGE = FCGI PREFIX = FCGI_ - -BOOT: - FCGI_Init(); - -SV * -RequestX(in, out, err, env, socket, flags) - GLOBREF in; - GLOBREF out; - GLOBREF err; - HASHREF env; - int socket; - int flags; - - PROTOTYPE: ***$$$ - CODE: - RETVAL = sv_setref_pv(newSV(0), "FCGI", - FCGI_Request(in, out, err, env, socket, flags)); - - OUTPUT: - RETVAL - -int -OpenSocket(path, backlog) - char* path; - int backlog; - - PROTOTYPE: $$ - CODE: - RETVAL = FCGX_OpenSocket(path, backlog); - OUTPUT: - RETVAL - -void -CloseSocket(socket) - int socket; - - PROTOTYPE: $ - CODE: - close(socket); - -int -FCGI_Accept(request) - - FCGI request; - - PROTOTYPE: $ - -void -FCGI_Finish(request) - FCGI request; - - PROTOTYPE: $ - -void -FCGI_Flush(request) - FCGI request; - - PROTOTYPE: $ - -HV * -GetEnvironment(request) - FCGI request; - - PROTOTYPE: $ - - CODE: - RETVAL = request->hvEnv; - - OUTPUT: - RETVAL - -void -GetHandles(request) - FCGI request; - - PROTOTYPE: $ - - PREINIT: - int i; - - PPCODE: - EXTEND(sp,3); - for (i = 0; i < 3; ++i) - PUSHs(sv_2mortal(newRV((SV *) request->gv[i]))); - -int -FCGI_IsFastCGI(request) - FCGI request; - - PROTOTYPE: $ - -void -Detach(request) - FCGI request; - - PROTOTYPE: $ - - CODE: - if (request->accepted && request->bound) - FCGI_UndoBinding(request); - -void -Attach(request) - FCGI request; - - PROTOTYPE: $ - - CODE: - if (request->accepted && !request->bound) - FCGI_Bind(request); - -void -LastCall(request) - FCGI request; - - PROTOTYPE: $ - - CODE: - FCGX_ShutdownPending(); - -int -FCGI_StartFilterData(request) - - FCGI request; - - PROTOTYPE: $ - -void -DESTROY(request) - FCGI request; - - CODE: - FCGI_Release_Request(request); - - - -MODULE = FCGI PACKAGE = FCGI::Stream - -#ifndef USE_SFIO - -void -PRINT(stream, ...) - FCGI::Stream stream; - - PREINIT: - int n; - - CODE: - for (n = 1; n < items; ++n) { - STRLEN len; - register char *tmps = (char *)SvPV(ST(n),len); - FCGX_PutStr(tmps, len, stream); - } - if (SvTRUEx(perl_get_sv("|", FALSE))) - FCGX_FFlush(stream); - -int -WRITE(stream, bufsv, len, ...) - FCGI::Stream stream; - SV * bufsv; - int len; - - PREINIT: - int offset; - char * buf; - STRLEN blen; - int n; - - CODE: - offset = (items == 4) ? (int)SvIV(ST(3)) : 0; - buf = SvPV(bufsv, blen); - if (offset < 0) offset += blen; - if (len > blen - offset) - len = blen - offset; - if (offset < 0 || offset >= blen || - (n = FCGX_PutStr(buf+offset, len, stream)) < 0) - ST(0) = &PL_sv_undef; - else { - ST(0) = sv_newmortal(); - sv_setpvf(ST(0), "%c", n); - } - -int -READ(stream, bufsv, len, ...) - FCGI::Stream stream; - SV * bufsv; - int len; - - PREINIT: - int offset; - char * buf; - - CODE: - offset = (items == 4) ? (int)SvIV(ST(3)) : 0; - if (! SvOK(bufsv)) - sv_setpvn(bufsv, "", 0); - buf = SvGROW(bufsv, len+offset+1); - len = FCGX_GetStr(buf+offset, len, stream); - SvCUR_set(bufsv, len+offset); - *SvEND(bufsv) = '\0'; - (void)SvPOK_only(bufsv); - SvSETMAGIC(bufsv); - RETVAL = len; - - OUTPUT: - RETVAL - -SV * -GETC(stream) - FCGI::Stream stream; - - PREINIT: - int retval; - - CODE: - if ((retval = FCGX_GetChar(stream)) != -1) { - ST(0) = sv_newmortal(); - sv_setpvf(ST(0), "%c", retval); - } else ST(0) = &PL_sv_undef; - -bool -CLOSE(stream) - FCGI::Stream stream; - -# ALIAS: -# DESTROY = 1 - - CODE: - RETVAL = FCGX_FClose(stream) != -1; - - OUTPUT: - RETVAL - -#endif diff --git a/fcgi/perl/MANIFEST b/fcgi/perl/MANIFEST deleted file mode 100644 index 07ded824..00000000 --- a/fcgi/perl/MANIFEST +++ /dev/null @@ -1,16 +0,0 @@ -ChangeLog -FCGI.PL -FCGI.XL -MANIFEST -Makefile.PL -README -configure -configure.in -configure.readme -echo.PL -fcgi_config.h.in -remote.PL -test.pl -threaded.PL -typemap -version.pm diff --git a/fcgi/perl/Makefile.PL b/fcgi/perl/Makefile.PL deleted file mode 100644 index 380e5f83..00000000 --- a/fcgi/perl/Makefile.PL +++ /dev/null @@ -1,156 +0,0 @@ -# $Id: Makefile.PL,v 1.33 2002/12/15 19:40:19 skimo Exp $ - -use ExtUtils::MakeMaker; -use IO::File; -use Config; -use Cwd 'cwd'; -use Getopt::Long; - -@h1 = qw(fastcgi.h fcgiapp.h fcgimisc.h fcgios.h); -@h = (@h1, 'fcgi_config.h'); -@o = qw(FCGI.o); -@dist1 = qw(LICENSE.TERMS); -@dist2 = qw(fcgiapp.c os_unix.c os_win32.c); -@dist3 = (@h1, qw(fcgi_config_x86.h)); - -GetOptions ("pure-perl!" => \$pure, - "use-installed:s" => \$useinstalled); -$pure = "0" unless defined $pure; -open(CFG,">FCGI.cfg"); -print CFG "\$pure = $pure;1;\n"; -close CFG; - -$libfound = 0; -@libs = (); - -if (! $pure) { - my $cwd = cwd(); - my $devkit = "$cwd/.."; - - if (defined $useinstalled) { - require ExtUtils::Liblist; - my $libspec = $useinstalled ? "-L$useinstalled/lib " : ""; - $libspec .= "-lfcgi"; - my @l = MM->ext($libspec); - if ($l[0] || $l[1] || $l[2]) { - $prefix = "$useinstalled/include" if $useinstalled; - $libfound = 1; - push @libs, $libspec; - } - } - if (!$libfound && -d "$devkit/libfcgi" && -d "$devkit/include") { - # devkit - if (grep { ! -f "$devkit/include/$_" } @dist3 - or grep { ! -f "$devkit/libfcgi/$_" } @dist2) - { - warn "This appears to be a FastCGI devkit distribution, " . - "but one or more FastCGI library files are missing. \n" . - "Please check the integrity of the distribution.\n"; - exit -1; - } - - my $extrarules = join "\n", - map { $b = $_; $b =~ s/\.c$//; my $s="$devkit/libfcgi/$b.c"; - "$b\$(OBJ_EXT): $s\n\t". - '$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) '."$s\n"; } - @dist2; - eval 'package MY; sub postamble { $extrarules; }'; - $prefix = $devkit; - } -} - -$sys = $^O eq 'MSWin32' ? 'win32' : 'unix'; -push @o, "fcgiapp.o", "os_$sys.o" unless $libfound; -$inc = '-I.' unless $libfound; -$inc .= " -I$prefix/include" if $prefix; - -push(@extras, CAPI => 'TRUE') - if ($] >= 5.005 and $^O eq 'MSWin32' - and $Config{archname} =~ /-object\b/i); - -push(@extras, - ABSTRACT => 'Fast CGI module', - AUTHOR => 'Sven Verdoolaege (skimo@kotnet.org)') - if ($ExtUtils::MakeMaker::VERSION >= 5.4301); - -$plfiles = { 'echo.PL' => 'echo.fpl', - 'remote.PL' => 'remote.fpl', - 'threaded.PL' => 'threaded.fpl', - 'FCGI.PL' => 'FCGI.pm', - }; -$plfiles->{'FCGI.XL'} = 'FCGI.xs' unless $pure; -if ($pure) { - push @extras, - LINKTYPE => ' '; -} else { - - if ("$sys" eq "win32") { - push @libs, ":nosearch -lws2_32"; - push @extras, 'DEFINE' => '-DDLLAPI=__declspec(dllexport)'; - } - - push @extras, - 'LIBS' => [ "@libs" ], - 'OBJECT' => "@o", - 'INC' => $inc; -} - -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. - -# Work around bug in previous versions of MakeMaker -WriteMakefile(NAME => 'FCGI') - if $ExtUtils::MakeMaker::VERSION <= 5.4302; - -$mm = MM->new({ - 'NAME' => 'FCGI', - 'VERSION_FROM' => 'version.pm', - 'dist' => { 'COMPRESS' => 'gzip -9f', - 'SUFFIX' => 'gz', - 'PREOP' => '$(CP) '.join(' ', - map {"../$_"} @dist1, - (map {"libfcgi/$_"} @dist2), - map {"include/$_"} @dist3).' $(DISTVNAME);'. - '$(CP) MANIFEST MANIFEST.old;'. - 'echo -e '. join('\\\n',@dist1,@dist2,@dist3) . - '>> $(DISTVNAME)/MANIFEST', - 'POSTOP' => - '$(MV) MANIFEST.old MANIFEST', - }, - 'clean' => { FILES => 'config.cache fcgi_config.h' . - ' FCGI.xs FCGI.c FCGI.cfg ' . - (join ' ', values %$plfiles)}, - 'PL_FILES' => $plfiles, - PM => {'FCGI.pm' => '$(INST_ARCHLIBDIR)/FCGI.pm'}, - @extras, -}); -# don't install oldinterface pod -delete $mm->{MAN3PODS}{oldinterface.pod}; -$mm->flush; - -exit if -f 'fcgi_config.h' or $libfound or $pure; - -# CPAN and no installed lib found -if ($sys eq "win32") { - # configure will almost certainly not run on a normal NT install, - # use the pregenerated configuration file - - use File::Copy qw(copy); - print "Using prebuilt fcgi_config.h file for Windows\n"; - unlink("fcgi_config.h"); - my $confdir = $prefix ? "$prefix/include/" : ''; - die $! unless copy("${confdir}fcgi_config_x86.h","fcgi_config.h"); - - # Win can't deal with existence of FCGI.xs or absence of FCGI.c - unlink("FCGI.xs"); - open(F, ">FCGI.c"); close(F); - $now = time; $before = $now - 600; - utime $before, $before, "FCGI.c"; - utime $now, $now, "FCGI.PL"; -} else { - print "Running ./configure for you\n"; - print "Please read configure.readme for information on how to run it yourself\n"; - - $ENV{'CC'} = $Config{'cc'}; - system("$Config{sh} configure"); -} diff --git a/fcgi/perl/README b/fcgi/perl/README deleted file mode 100644 index 50d96eeb..00000000 --- a/fcgi/perl/README +++ /dev/null @@ -1,64 +0,0 @@ -$Id: README,v 1.7 2001/10/04 08:08:34 skimo Exp $ - - Copyright (c) 1996 Open Market, Inc. - See the file "LICENSE.TERMS" for information on usage and redistribution - of this file, and for a DISCLAIMER OF ALL WARRANTIES. - - Copyright (c) 1996-1998 Sven Verdoolaege - No additional restrictions/warranties. - -This is a Fast CGI module for perl. It's based on the FCGI module -that comes with Open Market's FastCGI Developer's Kit, but does -not require you to recompile perl. - -It even no longer requires perl to be compiled with sfio. -To compile with sfio you'll need at least perl 5.003_02 and you'll have -to have configured it with eg './Configure -Duseperlio -Dusesfio'. -(See the INSTALL file that comes with the perl distribution.) -To compile without sfio you'll need an even more recent perl version. -(perl 5.004 and up should be fine.) - -See http://www.fastcgi.com/ for more information about fastcgi. -Lincoln D. Stein's perl CGI module also contains some information -about fastcgi programming. - -See echo.fpl for an example on how to use this module. - -To install, do the usual - -perl Makefile.PL -make -make install - -If you want to use the (experimental) pure perl version, that -doesn't require a compiler and currently only works on Unix, -you have to pass the --pure-perl option as in -"perl Makefile.PL --pure-perl". - -Note that the pure version does not support Window's Named Pipes. -Support for Named Pipes is not a requirement of the FastCGI specification. -Named Pipes are used by mod_fastcgi and the FastCGI application library as a -replacement for Unix sockets. mod_fastcgi uses Named Pipes on Windows (Unix -sockets on Unix) by default (see the mod_fastcgi docs for more information). - -If you want the module to use a previously installed fcgi library -instead of the included files, use the --use-installed option, -optionally followed by the name of the directory in which it can -be found. - -To configure the library Makefile.PL will run ./configure . -You may want to run it yourself beforehand because its findings -may not always be correct. -The configure.readme file describes how to run ./configure (and only that). - -If you're on a solaris system and your installed fcgi library is 2.02b -or earlier, you'll probably want to use the included files. - -The old interface of the FCGI module installs die and warn -handlers that merely print the error/warning to STDERR (the -default handlers print directly to stderr, which isn't redirected -in the non sfio case). I'm not very happy with the result. -Suggestions welcome. - -Sven Verdoolaege -skimo@kotnet.org diff --git a/fcgi/perl/aclocal.m4 b/fcgi/perl/aclocal.m4 deleted file mode 100644 index 1cdf23f2..00000000 --- a/fcgi/perl/aclocal.m4 +++ /dev/null @@ -1,472 +0,0 @@ -# aclocal.m4 generated automatically by aclocal 1.5 - -# Copyright 1996, 1997, 1998, 1999, 2000, 2001 -# 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. - -# Like AC_CONFIG_HEADER, but automatically create stamp file. - -# serial 3 - -# 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. We must strip everything past the first ":", -# and everything past the last "/". - -AC_PREREQ([2.12]) - -AC_DEFUN([AM_CONFIG_HEADER], -[ifdef([AC_FOREACH],dnl - [dnl init our file count if it isn't already - m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) - dnl prepare to store our destination file list for use in config.status - AC_FOREACH([_AM_File], [$1], - [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) - m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) - dnl and add it to the list of files AC keeps track of, along - dnl with our hook - AC_CONFIG_HEADERS(_AM_File, -dnl COMMANDS, [, INIT-CMDS] -[# update the timestamp -echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" -][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS - m4_popdef([_AM_Dest])])],dnl -[AC_CONFIG_HEADER([$1]) - AC_OUTPUT_COMMANDS( - ifelse(patsubst([$1], [[^ ]], []), - [], - [test -z "$CONFIG_HEADERS" || echo timestamp >dnl - patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl -[am_indx=1 -for am_file in $1; do - case " \$CONFIG_HEADERS " in - *" \$am_file "*) - am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` - if test -n "\$am_dir"; then - am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` - for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do - am_tmpdir=\$am_tmpdir\$am_subdir/ - if test ! -d \$am_tmpdir; then - mkdir \$am_tmpdir - fi - done - fi - echo timestamp > "\$am_dir"stamp-h\$am_indx - ;; - esac - am_indx=\`expr \$am_indx + 1\` -done]) -])]) # AM_CONFIG_HEADER - -# _AM_DIRNAME(PATH) -# ----------------- -# Like AS_DIRNAME, only do it during macro expansion -AC_DEFUN([_AM_DIRNAME], - [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, - m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, - m4_if(m4_regexp([$1], [^/.*]), -1, - [.], - m4_patsubst([$1], [^\(/\).*], [\1])), - m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), - m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl -]) # _AM_DIRNAME - -dnl $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ - -AC_DEFUN(FCGI_COMMON_CHECKS, [ - AC_CHECK_TYPE([ssize_t], [int]) - - AC_MSG_CHECKING([for sun_len in sys/un.h]) - AC_EGREP_HEADER([sun_len], [sys/un.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SOCKADDR_UN_SUN_LEN], [1], - [Define if sockaddr_un in sys/un.h contains a sun_len component])], - AC_MSG_RESULT([no])) - - AC_MSG_CHECKING([for fpos_t in stdio.h]) - AC_EGREP_HEADER([fpos_t], [stdio.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FPOS], [1], - [Define if the fpos_t typedef is in stdio.h])], - AC_MSG_RESULT([no])) - - AC_CHECK_HEADERS([sys/socket.h netdb.h netinet/in.h arpa/inet.h]) - AC_CHECK_HEADERS([sys/time.h limits.h sys/param.h unistd.h]) - - AC_MSG_CHECKING([for a fileno() prototype in stdio.h]) - AC_EGREP_HEADER([fileno], [stdio.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_FILENO_PROTO], [1], - [Define if there's a fileno() prototype in stdio.h])], - AC_MSG_RESULT([no])) - - if test "$HAVE_SYS_SOCKET_H"; then - AC_MSG_CHECKING([for socklen_t in sys/socket.h]) - AC_EGREP_HEADER([socklen_t], [sys/socket.h], - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SOCKLEN], [1], - [Define if the socklen_t typedef is in sys/socket.h])], - AC_MSG_RESULT([no])) - fi - - #-------------------------------------------------------------------- - # Do we need cross-process locking on this platform? - #-------------------------------------------------------------------- - AC_MSG_CHECKING([whether cross-process locking is required by accept()]) - case "`uname -sr`" in - IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) - AC_MSG_RESULT([yes]) - AC_DEFINE([USE_LOCKING], [1], - [Define if cross-process locking is required by accept()]) - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac - - #-------------------------------------------------------------------- - # Does va_arg(arg, long double) crash the compiler? - # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler) - #-------------------------------------------------------------------- - AC_MSG_CHECKING([whether va_arg(arg, long double) crashes the compiler]) - AC_TRY_COMPILE([#include ], - [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);], - AC_MSG_RESULT([no]), - [AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_VA_ARG_LONG_DOUBLE_BUG], [1], - [Define if va_arg(arg, long double) crashes the compiler])]) - - AC_C_CONST -]) - - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl This macro figures out how to build C programs using POSIX -dnl threads. It sets the PTHREAD_LIBS output variable to the threads -dnl library and linker flags, and the PTHREAD_CFLAGS output variable -dnl to any special C compiler flags that are needed. (The user can also -dnl force certain compiler flags/libs to be tested by setting these -dnl environment variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl If you are only building threads programs, you may wish to -dnl use these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE -dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands -dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, -dnl the default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, -dnl or if you have any other suggestions or comments. This macro was -dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org) -dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread -dnl macros posted by AFC to the autoconf macro repository. We are also -dnl grateful for the helpful feedback of numerous users. -dnl -dnl @version $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ -dnl @author Steven G. Johnson and Alejandro Forero Cuervo - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -acx_pthread_ok=no - -# First, check if the POSIX threads header, pthread.h, is available. -# If it isn't, don't bother looking for the threads libraries. -AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader) - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: threads are created detached by default - # and the JOINABLE attribute has a nonstandard name (UNDETACHED). - AC_MSG_CHECKING([for joinable pthread attribute]) - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_JOINABLE;], - ok=PTHREAD_CREATE_JOINABLE, ok=unknown) - if test x"$ok" = xunknown; then - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_UNDETACHED;], - ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) - fi - if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then - AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, - [Define to the necessary symbol if this constant - uses a non-standard name on your system.]) - fi - AC_MSG_RESULT(${ok}) - if test x"$ok" = xunknown; then - AC_MSG_WARN([we do not know how to create joinable pthreads]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; - *solaris* | alpha*-osf*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with cc_r - AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi - -])dnl ACX_PTHREAD - - - -dnl @synopsis AC_PROG_CC_WARNINGS([ANSI]) -dnl -dnl Enables a reasonable set of warnings for the C compiler. Optionally, -dnl if the first argument is nonempty, turns on flags which enforce and/or -dnl enable proper ANSI C if such flags are known to the compiler used. -dnl -dnl Currently this macro knows about GCC, Solaris C compiler, -dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C compiler, -dnl and IRIX C compiler. -dnl -dnl @version $Id: acinclude.m4,v 1.2 2001/12/21 03:12:50 robs Exp $ -dnl @author Ville Laurikari -dnl -AC_DEFUN([AC_PROG_CC_WARNINGS], [ - ansi=$1 - if test -z "$ansi"; then - msg="for C compiler warning flags" - else - msg="for C compiler warning and ANSI conformance flags" - fi - AC_CACHE_CHECK($msg, ac_cv_prog_cc_warnings, [ - if test -n "$CC"; then - cat > conftest.c <&1 | grep "Xc.*strict ANSI C" > /dev/null 2>&1 && - $CC -c -v -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-v" - else - ac_cv_prog_cc_warnings="-v -Xc" - fi - - dnl HP-UX C compiler - elif $CC > /dev/null 2>&1 && - $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="+w1" - else - ac_cv_prog_cc_warnings="+w1 -Aa" - fi - - dnl Digital Unix C compiler - elif ! $CC > /dev/null 2>&1 && - $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos" - else - ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1" - fi - - dnl C for AIX Compiler - elif $CC > /dev/null 2>&1 | grep AIX > /dev/null 2>&1 && - $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" - else - ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi" - fi - - dnl IRIX C compiler - elif $CC -fullwarn -ansi -ansiE > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - ac_cv_prog_cc_warnings="-fullwarn" - else - ac_cv_prog_cc_warnings="-fullwarn -ansi -ansiE" - fi - - fi - rm -f conftest.* - fi - if test -n "$ac_cv_prog_cc_warnings"; then - CFLAGS="$CFLAGS $ac_cv_prog_cc_warnings" - else - ac_cv_prog_cc_warnings="unknown" - fi - ]) -]) - - - diff --git a/fcgi/perl/configure b/fcgi/perl/configure deleted file mode 100755 index cdf6f468..00000000 --- a/fcgi/perl/configure +++ /dev/null @@ -1,3116 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52. -# -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# 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 - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -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='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 - -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } - -# 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 -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} - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif" - -# 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. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -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' - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_prev= -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -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 | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$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" ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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 ;; - - -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 ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - 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) - 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 ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - 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 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 path 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 -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: should be removed in autoconf 3.0. -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 - -# 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_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - 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 - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -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 - -# -# 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 < if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -EOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue - cd $ac_subdir - # A "../" for each directory in /$ac_subdir. - ac_dots=`echo $ac_subdir | - sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` - - case $srcdir in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_subdir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure.gnu; then - echo - $SHELL $ac_sub_srcdir/configure.gnu --help=recursive - elif test -f $ac_sub_srcdir/configure; then - echo - $SHELL $ac_sub_srcdir/configure --help=recursive - elif test -f $ac_sub_srcdir/configure.ac || - test -f $ac_sub_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\EOF - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -EOF - exit 0 -fi -exec 5>config.log -cat >&5 </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` -hostinfo = `(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` - -PATH = $PATH - -_ASUNAME -} >&5 - -cat >&5 <\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; - esac - # Get rid of the leading space. -done - -# 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. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "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" - ;; - esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core 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 -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# 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 -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:854: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$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:865: 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:873: 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 `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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:889: 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:893: 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:899: 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:901: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:903: 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. It doesn't matter if - # we pass some twice (in addition to the command line arguments). - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:922: 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:924: 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 - -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= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:944: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:947: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh - - ac_config_headers="$ac_config_headers fcgi_config.h" - -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:966: 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_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:981: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:989: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:992: 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:1001: 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 - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1016: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:1024: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:1027: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -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:1040: 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_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1055: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:1063: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:1066: 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:1075: 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 - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1090: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:1098: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:1101: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -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:1114: 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 - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1134: found $ac_dir/$ac_word" >&5 -break -done - -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 - set dummy "$ac_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:1156: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:1159: 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 - 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:1170: 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_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1185: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:1193: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:1196: 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 -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:1209: 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 - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1224: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:1232: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:1235: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - -test -z "$CC" && { { echo "$as_me:1247: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:1252:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1255: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:1258: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:1260: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:1263: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:1265: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:1268: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -#line 1272 "configure" -#include "confdefs.h" - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" -# 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:1288: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1291: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:1294: \$? = $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. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - a.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 --akim. - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1317: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:1323: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:1328: 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:1334: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1337: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:1344: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:1352: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:1359: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1361: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:1364: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1366: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:1369: \$? = $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 `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:1385: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:1391: 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:1397: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 1403 "configure" -#include "confdefs.h" - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1415: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1418: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1430: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:1437: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:1441: 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 -#line 1447 "configure" -#include "confdefs.h" - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1462: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1465: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1468: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1471: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_compiler_gnu=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:1483: 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:1489: 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 -#line 1495 "configure" -#include "confdefs.h" - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1507: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1510: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1513: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1516: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:1526: 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 -# 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:1553: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1556: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1559: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1562: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - ''\ - '#include ' \ - '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 -#line 1574 "configure" -#include "confdefs.h" -#include -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1587: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1590: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1593: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1596: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -continue -fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line 1606 "configure" -#include "confdefs.h" -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1618: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1621: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1624: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1627: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f 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 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext 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 - -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:1659: 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. - # 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 -#line 1680 "configure" -#include "confdefs.h" -#include - Syntax error -_ACEOF -if { (eval echo "$as_me:1685: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1691: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat 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 - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line 1714 "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:1718: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1724: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 - cat 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:1761: 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. - # 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 -#line 1771 "configure" -#include "confdefs.h" -#include - Syntax error -_ACEOF -if { (eval echo "$as_me:1776: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1782: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat 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 - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line 1805 "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:1809: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1815: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 - cat 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:1843: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&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:1854: 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 -#line 1860 "configure" -#include "confdefs.h" -#include -#include -#include -#include - -_ACEOF -if { (eval echo "$as_me:1868: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1874: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_stdc=no -fi -rm -f conftest.err 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 -#line 1896 "configure" -#include "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 -#line 1914 "configure" -#include "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 -#line 1935 "configure" -#include "confdefs.h" -#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)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:1961: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:1964: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:1966: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1969: \$? = $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 -cat conftest.$ac_ext >&5 -ac_cv_header_stdc=no -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:1982: 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 <<\EOF -#define STDC_HEADERS 1 -EOF - -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:1998: 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 $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2004 "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2013: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2016: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2019: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2029: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&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 $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line 2047 "configure" -#include "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; -} -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 -# 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__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:2096: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2099: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2102: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2105: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:2122: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:2125: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - - echo "$as_me:2130: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 -if test "${ac_cv_type_ssize_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2136 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((ssize_t *) 0) - return 0; -if (sizeof (ssize_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2151: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2154: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2157: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2160: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_ssize_t=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_ssize_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2170: result: $ac_cv_type_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 -if test $ac_cv_type_ssize_t = yes; then - : -else - -cat >>confdefs.h <&5 -echo $ECHO_N "checking for sun_len in sys/un.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line 2185 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "sun_len" >/dev/null 2>&1; then - echo "$as_me:2192: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define HAVE_SOCKADDR_UN_SUN_LEN 1 -EOF - -else - echo "$as_me:2200: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - echo "$as_me:2205: checking for fpos_t in stdio.h" >&5 -echo $ECHO_N "checking for fpos_t in stdio.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line 2208 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "fpos_t" >/dev/null 2>&1; then - echo "$as_me:2215: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define HAVE_FPOS 1 -EOF - -else - echo "$as_me:2223: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - -for ac_header in sys/socket.h netdb.h netinet/in.h arpa/inet.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:2231: 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 $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2237 "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:2241: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:2247: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:2266: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2285 "configure" -#include "confdefs.h" -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:2289: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:2295: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:2314: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for a fileno() prototype in stdio.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line 2327 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "fileno" >/dev/null 2>&1; then - echo "$as_me:2334: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define HAVE_FILENO_PROTO 1 -EOF - -else - echo "$as_me:2342: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - if test "$HAVE_SYS_SOCKET_H"; then - echo "$as_me:2348: checking for socklen_t in sys/socket.h" >&5 -echo $ECHO_N "checking for socklen_t in sys/socket.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line 2351 "configure" -#include "confdefs.h" -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "socklen_t" >/dev/null 2>&1; then - echo "$as_me:2358: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define HAVE_SOCKLEN 1 -EOF - -else - echo "$as_me:2366: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - fi - - #-------------------------------------------------------------------- - # Do we need cross-process locking on this platform? - #-------------------------------------------------------------------- - echo "$as_me:2376: checking whether cross-process locking is required by accept()" >&5 -echo $ECHO_N "checking whether cross-process locking is required by accept()... $ECHO_C" >&6 - case "`uname -sr`" in - IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) - echo "$as_me:2380: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define USE_LOCKING 1 -EOF - - ;; - *) - echo "$as_me:2389: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac - - #-------------------------------------------------------------------- - # Does va_arg(arg, long double) crash the compiler? - # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler) - #-------------------------------------------------------------------- - echo "$as_me:2398: checking whether va_arg(arg, long double) crashes the compiler" >&5 -echo $ECHO_N "checking whether va_arg(arg, long double) crashes the compiler... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -#line 2401 "configure" -#include "confdefs.h" -#include -int -main () -{ -long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2413: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2416: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2419: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2422: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:2424: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -echo "$as_me:2429: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\EOF -#define HAVE_VA_ARG_LONG_DOUBLE_BUG 1 -EOF - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - - echo "$as_me:2439: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2445 "configure" -#include "confdefs.h" - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2503: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2506: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2509: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2512: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_c_const=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2522: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\EOF -#define const -EOF - -fi - -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 overriden 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, don't put newlines in cache variables' values. -# 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. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *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" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if cmp -s $cache_file confcache; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - 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}' - -# 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 - -DEFS=-DHAVE_CONFIG_H - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:2611: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated automatically by configure. -# 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 -SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -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='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 - -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } - -exec 6>&1 - -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -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 - -cat >>$CONFIG_STATUS <<\EOF - -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, then exit - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration headers: -$config_headers - -Report bugs to ." -EOF - -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF -# 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[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift - ;; - -*);; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_need_defaults=false;; - esac - - case $1 in - # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:2778: 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 ) - debug=: ;; - --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" - ac_need_defaults=false;; - - # This is an error. - -*) { { echo "$as_me:2797: 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;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -exec 5>>config.log -cat >&5 << _ACEOF - -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## - -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` - -_ACEOF -EOF - -cat >>$CONFIG_STATUS <<\EOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "fcgi_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS fcgi_config.h" ;; - *) { { echo "$as_me:2833: 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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} -{ - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=$TMPDIR/cs$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 - { (exit 1); exit 1; } -} - -EOF - -cat >>$CONFIG_STATUS <<\EOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; 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 ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:2903: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # 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:2914: 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:2927: 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; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -EOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\EOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -EOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\EOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # egrep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\EOF - # 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 automatically by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:3044: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`$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'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } - - fi - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi - # Run the commands associated with the file. - case $ac_file in - fcgi_config.h ) # update the timestamp -echo timestamp >"./stamp-h1" - ;; - esac -done -EOF - -cat >>$CONFIG_STATUS <<\EOF - -{ (exit 0); exit 0; } -EOF -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=: - exec 5>/dev/null - $SHELL $CONFIG_STATUS || 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/fcgi/perl/configure.in b/fcgi/perl/configure.in deleted file mode 100644 index 4f5240f9..00000000 --- a/fcgi/perl/configure.in +++ /dev/null @@ -1,16 +0,0 @@ -dnl $Id: configure.in,v 1.9 2001/09/22 09:30:45 skimo Exp $ -dnl -dnl This file is an input file used by the GNU "autoconf" program to -dnl generate the file "configure", which is run during the build -dnl to configure the system for the local environment. - -AC_INIT - -AM_CONFIG_HEADER([fcgi_config.h]) - -AC_PROG_CC -AC_PROG_CPP - -FCGI_COMMON_CHECKS - -AC_OUTPUT diff --git a/fcgi/perl/echo.PL b/fcgi/perl/echo.PL deleted file mode 100644 index a8f9decf..00000000 --- a/fcgi/perl/echo.PL +++ /dev/null @@ -1,67 +0,0 @@ -use Config; - -open OUT, ">echo.fpl"; -print OUT "#!$Config{perlpath}\n"; -print OUT while ; -close OUT; -chmod 0755, "echo.fpl"; -__END__ -# -# echo-perl -- -# -# Produce a page containing all FastCGI inputs -# -# Copyright (c) 1996 Open Market, Inc. -# -# See the file "LICENSE.TERMS" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# $Id: echo.PL,v 1.2 2000/12/14 13:46:23 skimo Exp $ -# -# Changed by skimo to demostrate autoflushing 1997/02/19 -# - -use FCGI; -use strict; - -sub print_env { - my($label, $envp) = @_; - print("$label:
\n
\n");
-    my @keys = sort keys(%$envp);
-    foreach my $key (@keys) {
-        print("$key=$$envp{$key}\n");
-    }
-    print("

\n"); -} - -my %env; -my $req = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%env); -my $count = 0; -while($req->Accept() >= 0) { - print("Content-type: text/html\r\n\r\n", - "FastCGI echo (Perl)\n", - "

FastCGI echo (Perl)

\n", - "Request number ", ++$count, "

\n"); - my $len = 0 + $env{'CONTENT_LENGTH'}; - if($len == 0) { - print("No data from standard input.

\n"); - } else { - print("Standard input:
\n

\n");
-        for(my $i = 0; $i < $len; $i++) {
-            my $ch = getc(STDIN);
-            if($ch eq "") {
-                print("Error: Not enough bytes received ",
-                      "on standard input

\n"); - last; - } - print($ch); - } - print("\n

\n"); - } - print_env("Request environment", \%env); - print "More on its way ... wait a few seconds\n
\n
"; - $req->Flush(); - sleep(3); - print_env("Initial environment", \%ENV); - $req->Finish(); -} diff --git a/fcgi/perl/fcgi_config.h.in b/fcgi/perl/fcgi_config.h.in deleted file mode 100644 index c32284d1..00000000 --- a/fcgi/perl/fcgi_config.h.in +++ /dev/null @@ -1,76 +0,0 @@ -/* fcgi_config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define if there's a fileno() prototype in stdio.h */ -#undef HAVE_FILENO_PROTO - -/* Define if the fpos_t typedef is in stdio.h */ -#undef HAVE_FPOS - -/* Define if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define if sockaddr_un in sys/un.h contains a sun_len component */ -#undef HAVE_SOCKADDR_UN_SUN_LEN - -/* Define if the socklen_t typedef is in sys/socket.h */ -#undef HAVE_SOCKLEN - -/* Define if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if va_arg(arg, long double) crashes the compiler */ -#undef HAVE_VA_ARG_LONG_DOUBLE_BUG - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if cross-process locking is required by accept() */ -#undef USE_LOCKING - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `int' if does not define. */ -#undef ssize_t diff --git a/fcgi/perl/oldinterface.pod b/fcgi/perl/oldinterface.pod deleted file mode 100644 index bb288a19..00000000 --- a/fcgi/perl/oldinterface.pod +++ /dev/null @@ -1,50 +0,0 @@ -=head1 NAME - -FCGI - Fast CGI module - -=head1 SYNOPSIS - - use FCGI; - - $count = 0; - while(FCGI::accept() >= 0) { - print("Content-type: text/html\r\n\r\n", ++$count); - } - -=head1 DESCRIPTION - -Functions: - -=over 4 - -=item FCGI::accept() - -Accepts a connection. Returns 0 on success. -If a connection has been accepted before, the old -one will be finished first. - -=item FCGI::finish() - -Finishes accepted connection. - -=item FCGI::flush() - -Flushes accepted connection. - -=item FCGI::set_exit_status(status) - -Sets the exit status that finish returns to the server. - -=item FCGI::start_filter_data() - -Does anyone use this function ? - -=back - -=head1 AUTHOR - -Sven Verdoolaege - -=cut - -__END__ diff --git a/fcgi/perl/remote.PL b/fcgi/perl/remote.PL deleted file mode 100644 index bcfdd7f1..00000000 --- a/fcgi/perl/remote.PL +++ /dev/null @@ -1,36 +0,0 @@ -use Config; - -open OUT, ">remote.fpl"; -print OUT "#!$Config{perlpath}\n"; -print OUT while ; -close OUT; -chmod 0755, "remote.fpl"; -__END__ -# An example of using a remote script with an Apache webserver. -# Run this Perl program on "otherhost" to bind port 8888 and wait -# for FCGI requests from the webserver. - -## Sample Apache configuration on the webserver to refer to the -## remote script on "otherhost" -# -# AddHandler fastcgi-script fcgi -# FastCgiExternalServer /path-to/cgi-bin/external.fcgi -host otherhost:8888 -# - -# Access the URL: http://webserver/cgi-bin/external.fcgi - -# Contributed by Don Bindner - -use FCGI; - -my $socket = FCGI::OpenSocket( ":8888", 5 ); -my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, - \%ENV, $socket ); - -my $count; -while( $request->Accept() >= 0 ) { - print "Content-type: text/html\r\n\r\n"; - print ++$count; -} - -FCGI::CloseSocket( $socket ); diff --git a/fcgi/perl/threaded.PL b/fcgi/perl/threaded.PL deleted file mode 100644 index f8a8c62f..00000000 --- a/fcgi/perl/threaded.PL +++ /dev/null @@ -1,52 +0,0 @@ -use Config; - -open OUT, ">threaded.fpl"; -print OUT "#!$Config{perlpath}\n"; -print OUT while ; -close OUT; -chmod 0755, "threaded.fpl"; -__END__ - -use FCGI; -use Thread; -use IO::Handle; - -use constant THREAD_COUNT => 5; - -sub doit { - my $k = shift; - my %env; - my $in = new IO::Handle; - my $out = new IO::Handle; - my $err = new IO::Handle; - - my $request = FCGI::Request($in, $out, $err, \%env); - - while ($request->Accept() >= 0) { - print $out - "Content-type: text/html\r\n", - "\r\n", - "FastCGI Hello! (multi-threaded perl, fcgiapp library)", - "

FastCGI Hello! (multi-threaded perl, fcgiapp library)

", - "Request counts for ", THREAD_COUNT ," threads ", - "running on host $env{SERVER_NAME}

"; - - { - lock(@count); - - ++$count[$k]; - - for(my $i = 0; $i < THREAD_COUNT; ++$i) { - print $out $count[$i]; - print $out " "; - } - } - $request->Flush(); - sleep(1); - } -} - -for ($t = 1; $t < THREAD_COUNT; ++$t) { - new Thread \&doit, $t; -} -doit(0); diff --git a/fcgi/perl/typemap b/fcgi/perl/typemap deleted file mode 100644 index 62618be3..00000000 --- a/fcgi/perl/typemap +++ /dev/null @@ -1,17 +0,0 @@ -TYPEMAP -FCGI T_PTROBJ -FCGI::Stream T_PTROBJ -GLOBREF T_GLOBREF -HASHREF T_HASHREF - -INPUT -T_GLOBREF - if (SvROK($arg) && isGV(SvRV($arg))) { - $var = (GV*)SvRV($arg); - } else - croak(\"$var is not a GLOB reference\"); -T_HASHREF - if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV) { - $var = (HV*)SvRV($arg); - } else - croak(\"$var is not a reference to a hash\"); diff --git a/fcgi/perl/version.pm b/fcgi/perl/version.pm deleted file mode 100644 index 1f2ec8d3..00000000 --- a/fcgi/perl/version.pm +++ /dev/null @@ -1,3 +0,0 @@ -package FCGI; - -$VERSION = '0.67'; diff --git a/scripts/openrc/README b/scripts/openrc/README index 6f8509da..d7ed1ecc 100644 --- a/scripts/openrc/README +++ b/scripts/openrc/README @@ -1,6 +1,12 @@ Init and configuration scripts for OpenRC-based init systems +============================================================ -Copy and rename the files to the following locations: +Copy and rename (remove the .fcgi suffix) the iipsrv executable to /usr/sbin/ directory: + + src/iipsrv.fcgi -> /usr/sbin/iipsrv + +Copy and rename the OpenRC init and conf files to the following locations: + + iipsrv.initd -> /etc/init.d/iipsrv + iipsrv.confd -> /etc/conf.d/iipsrv -iipsrv.initd -> /etc/init.d/iipsrv -iipsrv.confd -> /etc/conf.d/iipsrv diff --git a/scripts/systemd/README b/scripts/systemd/README index d3a0d32e..52884b56 100644 --- a/scripts/systemd/README +++ b/scripts/systemd/README @@ -4,23 +4,27 @@ Service and configuration scripts for Systemd-based init systems Installation ------------ -Copy the files to the following locations: +Copy and rename (remove the .fcgi suffix) the iipsrv executable to the /use/sbin/ directory: + + src/iipsrv.fcgi -> /usr/sbin/iipsrv + +Copy the systemd files to the following locations: Service script: -iipsrv.service -> /lib/systemd/system/iipsrv.service + iipsrv.service -> /lib/systemd/system/iipsrv.service Environment variables for iipsrv that can be modified: -iipsrv.conf -> /etc/default/iipsrv + iipsrv.conf -> /etc/default/iipsrv Starting iipsrv --------------- -% systemctl start iipsrv + % systemctl start iipsrv To view the latest systemd messages concerning iipsrv: -% journalctl -eu iipsrv + % journalctl -eu iipsrv Modifying the scripts @@ -33,7 +37,7 @@ and adding a file "00-iipsrv.conf" to it containing the changes. For example, to change the user and group under which iipsrv runs to "daemon", add this to your 00-iipsrv.conf drop-in: -[Service] -User=daemon -Group=daemon + [Service] + User=daemon + Group=daemon