--- sql/oracle/Attic/configure.in 2002/02/08 08:07:54 1.7 +++ sql/oracle/Attic/configure.in 2009/11/18 01:45:13 1.27.2.1 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(parser3oracle.C) -AM_INIT_AUTOMAKE(parser3oracleclient, 3.0g, nodefine) +AM_INIT_AUTOMAKE(parser3oracle, 10.2, nodefine) AM_CONFIG_HEADER(config_auto.h) @@ -28,13 +28,26 @@ if test \! -f "$ORACLE_PUBLIC_INC/nzt.h" fi +AC_ARG_WITH(dynamic-stdcpp, [ --with-dynamic-stdcpp link libstdc++ dynamically + by default, libstdc++ is linked statically],[ + LDFLAGS="-lstdc++" +],[ + LDFLAGS="-Wl,-Bstatic -Wl,-lstdc++ -Wl,-Bdynamic" +]) + +AC_SUBST(LDFLAGS) + + dnl Checks for programs. AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_AWK - -AC_LANG_CPLUSPLUS AC_PROG_CXX +AC_PROG_CC + +dnl most tests should be compiled with C compiler [especially qsort test] +AC_LANG_C + dnl Enable building of the convenience library dnl and set LIBLTDL accordingly @@ -43,11 +56,10 @@ dnl Substitute INCLTDL and LIBLTDL in th AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) AC_SUBST(LIBADD_DL) -dnl Check for dlopen support -AC_LIBTOOL_DLOPEN dnl Configure libtool AC_DISABLE_STATIC -AM_PROG_LIBTOOL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL dnl Configure libltdl AC_CONFIG_SUBDIRS(libltdl) @@ -65,7 +77,7 @@ setjmp.h ) AC_MSG_CHECKING(for BSD setenv/getenv/unsetenv) -AC_TRY_COMPILE( +AC_TRY_LINK( #ifdef HAVE_STDLIB_H # include #endif @@ -83,35 +95,35 @@ if(strcmp(getenv_value, TEST_VALUE)!=0) return 2; unsetenv(TEST_NAME); ,[ - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SETENV,,library has BSD setenv/unsetenv) ], - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) - AC_MSG_CHECKING(for POSIX putenv/getenv) - AC_TRY_COMPILE( - #ifdef HAVE_STDLIB_H - # include - #endif - #ifdef HAVE_STRING_H - # include - #endif - , - #define TEST_NAME "oracle-configure-test-var" - #define TEST_VALUE "oracle-configure-test-value" - int result=putenv(TEST_NAME"="TEST_VALUE); - char *getenv_value=getenv(TEST_NAME); - if(!getenv_value) - return 1; - if(strcmp(getenv_value, TEST_NAME)!=0) - return 2; - ,[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PUTENV,,library has POSIX putenv) - ], - AC_MSG_RESULT(no) - AC_MSG_ERROR("there must be some function to modify environment") - ) + AC_MSG_CHECKING(for POSIX putenv/getenv) + AC_TRY_LINK( + #ifdef HAVE_STDLIB_H + # include + #endif + #ifdef HAVE_STRING_H + # include + #endif + , + #define TEST_NAME "oracle-configure-test-var" + #define TEST_VALUE "oracle-configure-test-value" + int result=putenv(TEST_NAME"="TEST_VALUE); + char *getenv_value=getenv(TEST_NAME); + if(!getenv_value) + return 1; + if(strcmp(getenv_value, TEST_NAME)!=0) + return 2; + ,[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PUTENV,,library has POSIX putenv) + ], + AC_MSG_RESULT(no) + AC_MSG_ERROR("there must be some function to modify environment") + ) ) dnl Checks for typedefs, structures, and compiler characteristics. @@ -122,4 +134,4 @@ dnl Checks for library functions. dnl Output makefiles -AC_OUTPUT(libltdl/Makefile Makefile) +AC_OUTPUT(Makefile)