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