Annotation of sql/oracle/configure.in, revision 1.28

1.28    ! moko        1: dnl Autoconf initialisation
1.1       parser      2: 
1.28    ! moko        3: AC_PREREQ(2.59)
        !             4: AC_INIT(parser3, 10.2)
        !             5: AC_CONFIG_SRCDIR(parser3oracle.C)
1.1       parser      6: AM_CONFIG_HEADER(config_auto.h)
                      7: 
1.28    ! moko        8: dnl Automake Initialisation
        !             9: 
        !            10: AM_INIT_AUTOMAKE
        !            11: 
1.1       parser     12: dnl Arguments
                     13: 
1.2       parser     14: AC_ARG_WITH(oracleoci-inc,[  --with-oracleoci-inc[=DIR]      DIR is the Oracle OCI includes directory],,
1.1       parser     15:        withval="$ORACLE_HOME/rdbms/demo"
                     16: )
1.28    ! moko       17: 
1.2       parser     18: ORACLE_OCI_INC=$withval
                     19: AC_SUBST(ORACLE_OCI_INC)
1.1       parser     20: 
1.2       parser     21: if test \! -f "$ORACLE_OCI_INC/oci.h"; then
                     22:        AC_MSG_ERROR($ORACLE_OCI_INC does not seem to be valid Oracle OCI includes directory)
                     23: fi
                     24: 
                     25: AC_ARG_WITH(oraclepublic-inc,[  --with-oraclepublic-inc[=DIR]      DIR is the Oracle public includes directory],,
1.1       parser     26:        withval="$ORACLE_HOME/network/public"
                     27: )
1.28    ! moko       28: 
1.2       parser     29: ORACLE_PUBLIC_INC=$withval
                     30: AC_SUBST(ORACLE_PUBLIC_INC)
                     31: 
                     32: if test \! -f "$ORACLE_PUBLIC_INC/nzt.h"; then
                     33:        AC_MSG_ERROR($ORACLE_PUBLIC_INC does not seem to be valid Oracle public includes directory)
                     34: fi
1.1       parser     35: 
1.25      misha      36: AC_ARG_WITH(dynamic-stdcpp, [  --with-dynamic-stdcpp   link libstdc++ dynamically
                     37:                           by default, libstdc++ is linked statically],[
                     38:                LDFLAGS="-lstdc++"
                     39: ],[
                     40:                LDFLAGS="-Wl,-Bstatic -Wl,-lstdc++ -Wl,-Bdynamic"
                     41: ])
                     42: 
                     43: AC_SUBST(LDFLAGS)
                     44: 
1.28    ! moko       45: dnl Checks for programs
1.25      misha      46: 
1.1       parser     47: AC_PROG_INSTALL
1.17      paf        48: AC_PROG_CXX
                     49: AC_PROG_CC
                     50: 
1.28    ! moko       51: dnl Enable building of the convenience library
1.1       parser     52: 
1.28    ! moko       53: LT_CONFIG_LTDL_DIR(libltdl)
        !            54: LT_INIT(dlopen win32-dll)
        !            55: LTDL_INIT
1.1       parser     56: 
                     57: dnl Configure libtool
1.28    ! moko       58: 
1.7       paf        59: AC_DISABLE_STATIC
1.1       parser     60: 
1.28    ! moko       61: dnl Checks for libraries
1.1       parser     62: 
1.28    ! moko       63: dnl Checks for header files
1.1       parser     64: 
                     65: AC_CHECK_HEADERS(
                     66: stdio.h \
                     67: stdlib.h \
                     68: string.h \
                     69: setjmp.h \
1.4       paf        70: ctype.h \
                     71: setjmp.h
1.1       parser     72: )
                     73: 
1.6       paf        74: AC_MSG_CHECKING(for BSD setenv/getenv/unsetenv)
1.19      paf        75: AC_TRY_LINK(
1.6       paf        76: #ifdef HAVE_STDLIB_H
                     77: #      include <stdlib.h>
                     78: #endif
                     79: #ifdef HAVE_STRING_H
                     80: #      include <string.h>
                     81: #endif
                     82: ,
                     83: #define TEST_NAME "oracle-configure-test-var"
                     84: #define TEST_VALUE "oracle-configure-test-value"
                     85: int result=setenv(TEST_NAME, TEST_VALUE, 1/*overwrite*/);
                     86: char *getenv_value=getenv(TEST_NAME);
                     87: if(!getenv_value)
                     88:        return 1;
                     89: if(strcmp(getenv_value, TEST_VALUE)!=0)
                     90:        return 2;
                     91: unsetenv(TEST_NAME);
                     92: ,[
1.25      misha      93:        AC_MSG_RESULT(yes)
1.6       paf        94:        AC_DEFINE(HAVE_SETENV,,library has BSD setenv/unsetenv)
                     95: ],             
1.25      misha      96:        AC_MSG_RESULT(no)
1.6       paf        97: 
1.25      misha      98:        AC_MSG_CHECKING(for POSIX putenv/getenv)
                     99:        AC_TRY_LINK(
                    100:        #ifdef HAVE_STDLIB_H
                    101:        #       include <stdlib.h>
                    102:        #endif
                    103:        #ifdef HAVE_STRING_H
                    104:        #       include <string.h>
                    105:        #endif
                    106:        ,
                    107:        #define TEST_NAME "oracle-configure-test-var"
                    108:        #define TEST_VALUE "oracle-configure-test-value"
                    109:        int result=putenv(TEST_NAME"="TEST_VALUE);
                    110:        char *getenv_value=getenv(TEST_NAME);
                    111:        if(!getenv_value)
                    112:                return 1;
                    113:        if(strcmp(getenv_value, TEST_NAME)!=0)
                    114:                return 2;
                    115:        ,[
                    116:                AC_MSG_RESULT(yes)
                    117:                AC_DEFINE(HAVE_PUTENV,,library has POSIX putenv)
                    118:        ],              
                    119:                AC_MSG_RESULT(no)
                    120:                AC_MSG_ERROR("there must be some function to modify environment")
                    121:        )
1.6       paf       122: )
                    123: 
1.28    ! moko      124: dnl Checks for typedefs, structures, and compiler characteristics
1.1       parser    125: 
                    126: AC_TYPE_SIZE_T
                    127: 
1.28    ! moko      128: dnl Checks for library functions
1.1       parser    129: 
                    130: dnl Output makefiles
                    131: 
1.11      paf       132: AC_OUTPUT(Makefile)

E-mail: