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