Annotation of sql/oracle/configure.in, revision 1.26
1.1 parser 1: dnl Process this file with autoconf to produce a configure script.
2: AC_INIT(parser3oracle.C)
1.24 misha 3: AM_INIT_AUTOMAKE(parser3oracle, 10.0, nodefine)
1.1 parser 4:
5: AM_CONFIG_HEADER(config_auto.h)
6:
7: dnl Arguments
8:
1.2 parser 9: AC_ARG_WITH(oracleoci-inc,[ --with-oracleoci-inc[=DIR] DIR is the Oracle OCI includes directory],,
1.1 parser 10: withval="$ORACLE_HOME/rdbms/demo"
11: )
1.2 parser 12: ORACLE_OCI_INC=$withval
13: AC_SUBST(ORACLE_OCI_INC)
1.1 parser 14:
1.2 parser 15: if test \! -f "$ORACLE_OCI_INC/oci.h"; then
16: AC_MSG_ERROR($ORACLE_OCI_INC does not seem to be valid Oracle OCI includes directory)
17: fi
18:
19:
20: AC_ARG_WITH(oraclepublic-inc,[ --with-oraclepublic-inc[=DIR] DIR is the Oracle public includes directory],,
1.1 parser 21: withval="$ORACLE_HOME/network/public"
22: )
1.2 parser 23: ORACLE_PUBLIC_INC=$withval
24: AC_SUBST(ORACLE_PUBLIC_INC)
25:
26: if test \! -f "$ORACLE_PUBLIC_INC/nzt.h"; then
27: AC_MSG_ERROR($ORACLE_PUBLIC_INC does not seem to be valid Oracle public includes directory)
28: fi
1.1 parser 29:
30:
1.25 misha 31: AC_ARG_WITH(dynamic-stdcpp, [ --with-dynamic-stdcpp link libstdc++ dynamically
32: by default, libstdc++ is linked statically],[
33: LDFLAGS="-lstdc++"
34: ],[
35: LDFLAGS="-Wl,-Bstatic -Wl,-lstdc++ -Wl,-Bdynamic"
36: ])
37:
38: AC_SUBST(LDFLAGS)
39:
40:
1.1 parser 41: dnl Checks for programs.
42: AC_PROG_INSTALL
43: AC_PROG_MAKE_SET
44: AC_PROG_AWK
1.17 paf 45: AC_PROG_CXX
46: AC_PROG_CC
47:
48: dnl most tests should be compiled with C compiler [especially qsort test]
49: AC_LANG_C
1.1 parser 50:
51:
52: dnl Enable building of the convenience library
53: dnl and set LIBLTDL accordingly
54: AC_LIBLTDL_CONVENIENCE
55: dnl Substitute INCLTDL and LIBLTDL in the Makefiles
56: AC_SUBST(INCLTDL)
57: AC_SUBST(LIBLTDL)
58: AC_SUBST(LIBADD_DL)
59: dnl Configure libtool
1.7 paf 60: AC_DISABLE_STATIC
1.9 paf 61: AC_LIBTOOL_WIN32_DLL
1.13 paf 62: AC_PROG_LIBTOOL
1.1 parser 63: dnl Configure libltdl
64: AC_CONFIG_SUBDIRS(libltdl)
65:
66: dnl Checks for libraries.
67:
68: dnl Checks for header files.
69:
70: AC_CHECK_HEADERS(
71: stdio.h \
72: stdlib.h \
73: string.h \
74: setjmp.h \
1.4 paf 75: ctype.h \
76: setjmp.h
1.1 parser 77: )
78:
1.6 paf 79: AC_MSG_CHECKING(for BSD setenv/getenv/unsetenv)
1.19 paf 80: AC_TRY_LINK(
1.6 paf 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=setenv(TEST_NAME, TEST_VALUE, 1/*overwrite*/);
91: char *getenv_value=getenv(TEST_NAME);
92: if(!getenv_value)
93: return 1;
94: if(strcmp(getenv_value, TEST_VALUE)!=0)
95: return 2;
96: unsetenv(TEST_NAME);
97: ,[
1.25 misha 98: AC_MSG_RESULT(yes)
1.6 paf 99: AC_DEFINE(HAVE_SETENV,,library has BSD setenv/unsetenv)
100: ],
1.25 misha 101: AC_MSG_RESULT(no)
1.6 paf 102:
1.25 misha 103: AC_MSG_CHECKING(for POSIX putenv/getenv)
104: AC_TRY_LINK(
105: #ifdef HAVE_STDLIB_H
106: # include <stdlib.h>
107: #endif
108: #ifdef HAVE_STRING_H
109: # include <string.h>
110: #endif
111: ,
112: #define TEST_NAME "oracle-configure-test-var"
113: #define TEST_VALUE "oracle-configure-test-value"
114: int result=putenv(TEST_NAME"="TEST_VALUE);
115: char *getenv_value=getenv(TEST_NAME);
116: if(!getenv_value)
117: return 1;
118: if(strcmp(getenv_value, TEST_NAME)!=0)
119: return 2;
120: ,[
121: AC_MSG_RESULT(yes)
122: AC_DEFINE(HAVE_PUTENV,,library has POSIX putenv)
123: ],
124: AC_MSG_RESULT(no)
125: AC_MSG_ERROR("there must be some function to modify environment")
126: )
1.6 paf 127: )
128:
1.1 parser 129: dnl Checks for typedefs, structures, and compiler characteristics.
130:
131: AC_TYPE_SIZE_T
132:
133: dnl Checks for library functions.
134:
135: dnl Output makefiles
136:
1.11 paf 137: AC_OUTPUT(Makefile)
E-mail: