xref: /PHP-8.3/ext/oci8/config.m4 (revision 02b3fb1f)
1if test -z "$SED"; then
2  PHP_OCI8_SED="sed";
3else
4  PHP_OCI8_SED="$SED";
5fi
6
7PHP_OCI8_TAIL1=`echo a | tail -n1 2>/dev/null`
8if test "$PHP_OCI8_TAIL1" = "a"; then
9    PHP_OCI8_TAIL1="tail -n1"
10else
11    PHP_OCI8_TAIL1="tail -1"
12fi
13
14AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[
15  AC_MSG_CHECKING([ORACLE_HOME library validity])
16  if test ! -d "$OCI8_DIR"; then
17    AC_MSG_ERROR([${OCI8_DIR} is not a directory])
18  fi
19  if test -d "$OCI8_DIR/lib" && test ! -d "$OCI8_DIR/lib32"; then
20    OCI8_LIB_DIR=lib
21  elif test ! -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then
22    OCI8_LIB_DIR=lib32
23  elif test -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then
24    OCI8_LIB_DIR=$PHP_OCI8_OH_LIBDIR
25  else
26    dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help
27    dnl the user.
28    if test -f "$OCI8_DIR/libociei.$SHLIB_SUFFIX_NAME"; then
29      AC_MSG_ERROR([Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}])
30    else
31      AC_MSG_ERROR([Oracle library directory not found in ${OCI8_DIR}])
32    fi
33  fi
34  AC_MSG_RESULT($OCI8_LIB_DIR)
35])
36
37AC_DEFUN([AC_OCI8IC_VERSION],[
38  AC_MSG_CHECKING([Oracle Instant Client library version compatibility])
39  OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
40  dnl Oracle 10g, 11g etc
41  OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1`
42  OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1`
43  if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
44    if test ! -f "$OCI8_LCS_BASE"; then
45      AC_MSG_ERROR([Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found])
46    fi
47    OCI8_ORACLE_VERSION=`echo $OCI8_LCS | $PHP_OCI8_SED -e 's/.*\.\(.*\)\.1$/\1.1/'`
48  else
49    AC_MSG_ERROR([Oracle Instant Client libraries libnnz.$SHLIB_SUFFIX_NAME and libclntsh.$SHLIB_SUFFIX_NAME not found])
50  fi
51  AC_MSG_RESULT([$OCI8_ORACLE_VERSION])
52])
53
54AC_DEFUN([AC_OCI8_ORACLE_VERSION],[
55  AC_MSG_CHECKING([Oracle library version compatibility])
56  OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
57  dnl Oracle 10g, 11g etc
58  OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1`
59  if test -s "$OCI8_DIR/orainst/unix.rgs"; then
60    OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
61    test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
62  elif test -f "$OCI8_LCS"; then
63    dnl Oracle 10g, 11g etc. The x.2 version libraries are named x.1 for drop in
64    dnl compatibility
65    OCI8_ORACLE_VERSION=`echo $OCI8_LCS | $PHP_OCI8_SED -e 's/.*\.\(.*\)\.1$/\1.1/'`
66  elif test -f $OCI8_LCS_BASE.9.0; then
67    dnl There is no case for Oracle 9.2. Oracle 9.2 libraries have a 9.0 suffix
68    dnl for drop-in compatibility with Oracle 9.0
69    OCI8_ORACLE_VERSION=9.0
70  elif test -f $OCI8_LCS_BASE.8.0; then
71    OCI8_ORACLE_VERSION=8.1
72  elif test -f $OCI8_LCS_BASE.1.0; then
73    OCI8_ORACLE_VERSION=8.0
74  elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.a; then
75    if test -f $OCI8_DIR/$OCI8_LIB_DIR/libcore4.a; then
76      OCI8_ORACLE_VERSION=8.0
77    else
78      OCI8_ORACLE_VERSION=8.1
79    fi
80  else
81    AC_MSG_ERROR(Oracle libclntsh.$SHLIB_SUFFIX_NAME client library not found)
82  fi
83  AC_MSG_RESULT($OCI8_ORACLE_VERSION)
84])
85
86dnl
87dnl OCI8_INIT_DTRACE(providerdesc, header-file, sources)
88dnl This mimics PHP_INIT_DTRACE from build/php.m4. It is necessarily different
89dnl from PHP_INIT_DTRACE which doesn't currently support DTrace for extensions.
90dnl Creating OCI8_INIT_DTRACE independently instead of using a refactored
91dnl PHP_INIT_DTRACE allows OCI8 to be DTraced on versions of PHP where core PHP
92dnl DTrace support isn't available.
93dnl
94AC_DEFUN([OCI8_INIT_DTRACE],[
95  ac_srcdir=[]PHP_EXT_SRCDIR([oci8])/
96  ac_bdir=[]PHP_EXT_BUILDDIR([oci8])/
97
98dnl providerdesc
99  ac_provsrc=$1
100
101dnl header-file
102  ac_hdrobj=$2
103
104dnl DTrace objects
105  old_IFS=[$]IFS
106  for ac_src in $3; do
107    IFS=.
108    set $ac_src
109    ac_obj=[$]1
110    IFS=$old_IFS
111
112    OCI8_DTRACE_OBJS="[$]OCI8_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
113  done;
114
115  for ac_lo in $OCI8_DTRACE_OBJS; do
116    dtrace_oci8_objs="[$]dtrace_oci8_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
117  done;
118
119dnl Generate Makefile.objects entry. The empty $ac_provsrc command stops an
120dnl implicit circular dependency in GNU Make which causes the .d file to be
121dnl overwritten (Bug 61268).
122  cat>>Makefile.objects<<EOF
123
124PHP_EXT_SRCDIR([oci8])/$ac_provsrc:;
125
126$ac_bdir[$]ac_hdrobj: $ac_srcdir[$]ac_provsrc
127	CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHPOCI_,DTRACE_,g' \$[]@.bak > \$[]@
128
129\$(OCI8_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
130
131EOF
132
133  case $host_alias in
134  *solaris*|*linux*)
135    dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"
136    dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#'`/.libs"
137    dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#'`.o"
138    dtrace_nolib_objs='$(OCI8_DTRACE_OBJS:.lo=.o)'
139    for ac_lo in $OCI8_DTRACE_OBJS; do
140      dtrace_oci8_lib_objs="[$]dtrace_oci8_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
141    done;
142
143    dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)
144    cat>>Makefile.objects<<EOF
145$ac_bdir[$]ac_provsrc.lo: \$(OCI8_DTRACE_OBJS)
146	echo "[#] Generated by Makefile for libtool" > \$[]@
147	@test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
148	if CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
149	  echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
150	else [\\]
151	  echo "pic_object='none'" >> \$[]@ [;\\]
152	fi
153	if CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $ac_srcdir[$]ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
154	  echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
155	else [\\]
156	  echo "non_pic_object='none'" >> \$[]@ [;\\]
157	fi
158
159EOF
160    ;;
161  *)
162    AC_MSG_WARN([OCI8 extension: OCI8 DTrace support is not confirmed on this platform])
163cat>>Makefile.objects<<EOF
164$ac_bdir[$]ac_provsrc.o: \$(OCI8_DTRACE_OBJS)
165	CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_objs
166
167EOF
168    ;;
169  esac
170])
171
172dnl --with-oci8=shared,instantclient,/path/to/client/dir/lib
173dnl or
174dnl --with-oci8=shared,/path/to/oracle/home
175PHP_ARG_WITH([oci8],
176  [for Oracle Database OCI8 support],
177  [AS_HELP_STRING([[--with-oci8[=DIR]]],
178    [Include Oracle Database OCI8 support. DIR defaults to $ORACLE_HOME. Use
179    --with-oci8=instantclient,/path/to/instant/client/lib to use an Oracle
180    Instant Client installation])])
181
182if test "$PHP_OCI8" != "no"; then
183
184  if test -z "$PHP_OCI8"; then
185    dnl --with-oci8=$ORACLE_HOME where ORACLE_HOME isn't set (or is mistyped)
186    dnl will match this case.
187    AC_MSG_ERROR([Empty parameter value passed to --with-oci8])
188  fi
189
190  dnl Check PHP version is compatible with this extension.
191  AC_MSG_CHECKING([PHP version])
192
193  tmp_version=$PHP_VERSION
194  if test -z "$tmp_version"; then
195    if test -z "$PHP_CONFIG"; then
196      AC_MSG_ERROR([php-config not found])
197    fi
198    php_version=`$PHP_CONFIG --version 2>/dev/null|head -n 1|$PHP_OCI8_SED -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'`
199  else
200    php_version=`echo "$tmp_version"|$PHP_OCI8_SED -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'`
201  fi
202
203  if test -z "$php_version"; then
204    AC_MSG_ERROR([failed to detect PHP version, please report])
205  fi
206
207  ac_IFS=$IFS
208  IFS="."
209  set $php_version
210  IFS=$ac_IFS
211  oci8_php_version=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
212
213  if test "$oci8_php_version" -lt "5002000"; then
214    AC_MSG_ERROR([You need at least PHP 8.1.0 to be able to use this version of OCI8. Use OCI8 1.4 for PHP $php_version])
215  elif test "$oci8_php_version" -lt "7000000"; then
216    AC_MSG_ERROR([You need at least PHP 8.1.0 to be able to use this version of OCI8. Use OCI8 2.0 for PHP $php_version])
217  elif test "$oci8_php_version" -lt "8000000"; then
218    AC_MSG_ERROR([You need at least PHP 8.1.0 to be able to use this version of OCI8. Use OCI8 2.2 for PHP $php_version])
219  elif test "$oci8_php_version" -lt "8001000"; then
220    AC_MSG_ERROR([You need at least PHP 8.1.0 to be able to use this version of OCI8. Use OCI8 3.0 for PHP $php_version])
221  else
222    AC_MSG_RESULT([$php_version, ok])
223  fi
224
225  dnl Check whether --enable-dtrace was set. To use DTrace with a PECL install,
226  dnl extract the OCI8 archive, phpize it, and set PHP_DTRACE=yes before running
227  dnl configure.
228  AC_MSG_CHECKING([OCI8 DTrace support])
229  oci8_do_dtrace="`echo $PHP_OCI8 | cut -d, -f3`"
230  if test "$PHP_DTRACE" = "yes" -o "$oci8_do_dtrace" = "dtrace" ; then
231    AC_MSG_RESULT([yes])
232    if test "$ext_shared" = "no"; then
233      AC_MSG_ERROR([For DTrace support OCI8 must be configured as a shared extension])
234    else
235      AC_CHECK_HEADERS([sys/sdt.h], [
236	 OCI8_INIT_DTRACE([oci8_dtrace.d],[oci8_dtrace_gen.h],[oci8.c oci8_statement.c])
237
238       ], [
239	 AC_MSG_ERROR(
240	   [Cannot find sys/sdt.h which is required for DTrace support])
241       ])
242      PHP_SUBST(OCI8_DTRACE_OBJS)
243      AC_DEFINE(HAVE_OCI8_DTRACE,1,[Defined to 1 if PHP OCI8 DTrace support was enabled during configuration])
244      dnl Developer warning: hard coded extension is OK for the known supported
245      dnl environments.
246      shared_objects_oci8="$shared_objects_oci8 PHP_EXT_BUILDDIR(oci8)/oci8_dtrace.d.lo"
247    fi
248  else
249    AC_MSG_RESULT([no])
250  fi
251
252  dnl Set some port specific directory components for use later.
253  AC_CHECK_SIZEOF([long])
254  AC_MSG_CHECKING([if we're at 64-bit platform])
255  AS_IF([test "$ac_cv_sizeof_long" -eq 4],[
256    AC_MSG_RESULT([no])
257    PHP_OCI8_OH_LIBDIR=lib32
258    PHP_OCI8_IC_LIBDIR_SUFFIX=""
259  ],[
260    AC_MSG_RESULT([yes])
261    PHP_OCI8_OH_LIBDIR=lib
262    PHP_OCI8_IC_LIBDIR_SUFFIX=64
263  ])
264
265  dnl Determine if the user wants to use Oracle Instant Client libraries.
266
267  PHP_OCI8_INSTANT_CLIENT="no"
268
269  dnl PECL Bug 14268 (Allow "pecl install oci8" command to "autodetect" an
270  dnl Instant Client RPM install).  This also has a benefit for non
271  dnl "pecl install" builds: if the user does --with-oci8 or --with-oci8=shared
272  dnl but the ORACLE_HOME environment variable is not actually set, the install
273  dnl tries to locate the Instant Client RPM.
274  if test "$PHP_OCI8" = "yes" && test -z "$ORACLE_HOME"; then
275    AC_MSG_WARN([OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead])
276    PHP_OCI8=instantclient
277  fi
278
279  if test "`echo $PHP_OCI8`" = "instantclient"; then
280    PHP_OCI8_INSTANT_CLIENT="yes"
281  elif test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
282    PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`"
283    PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`"
284    if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then
285	PHP_OCI8_INSTANT_CLIENT="yes"
286    fi
287    if test -z "$PHP_OCI8"; then
288	PHP_OCI8=yes
289    fi
290  elif test "`echo $PHP_OCI8 | cut -d, -f1`" = "instantclient"; then
291    PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f2`"
292    PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f3,4`"
293    if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then
294	PHP_OCI8_INSTANT_CLIENT="yes"
295    fi
296    if test -z "$PHP_OCI8"; then
297	PHP_OCI8=yes
298    fi
299  fi
300
301  if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
302    dnl ***************************************
303    dnl Branch for using an ORACLE_HOME install
304    dnl ***************************************
305
306    AC_MSG_CHECKING([Oracle ORACLE_HOME install directory])
307
308    if test "$PHP_OCI8" = "yes"; then
309      OCI8_DIR=$ORACLE_HOME
310    else
311      OCI8_DIR=$PHP_OCI8
312    fi
313    AC_MSG_RESULT($OCI8_DIR)
314
315    AC_OCI8_CHECK_LIB_DIR($OCI8_DIR)
316
317    if test -d "$OCI8_DIR/rdbms/public"; then
318      PHP_ADD_INCLUDE($OCI8_DIR/rdbms/public)
319      OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/public"
320    fi
321    if test -d "$OCI8_DIR/rdbms/demo"; then
322      PHP_ADD_INCLUDE($OCI8_DIR/rdbms/demo)
323      OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/demo"
324    fi
325    if test -d "$OCI8_DIR/network/public"; then
326      PHP_ADD_INCLUDE($OCI8_DIR/network/public)
327      OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/network/public"
328    fi
329    if test -d "$OCI8_DIR/plsql/public"; then
330      PHP_ADD_INCLUDE($OCI8_DIR/plsql/public)
331      OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/plsql/public"
332    fi
333
334    if test -f "$OCI8_DIR/$OCI8_LIB_DIR/sysliblist"; then
335      PHP_EVAL_LIBLINE(`cat $OCI8_DIR/$OCI8_LIB_DIR/sysliblist`, OCI8_SYSLIB)
336    elif test -f "$OCI8_DIR/rdbms/$OCI8_LIB_DIR/sysliblist"; then
337      PHP_EVAL_LIBLINE(`cat $OCI8_DIR/rdbms/$OCI8_LIB_DIR/sysliblist`, OCI8_SYSLIB)
338    fi
339
340    AC_OCI8_ORACLE_VERSION($OCI8_DIR)
341
342    case $OCI8_ORACLE_VERSION in
343      7.3|8.0|8.1|9.0|10.1)
344	AC_MSG_ERROR([Oracle Client libraries < 11.2 are not supported])
345	;;
346    esac
347
348    PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
349    PHP_ADD_LIBPATH($OCI8_DIR/$OCI8_LIB_DIR, OCI8_SHARED_LIBADD)
350    PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c, $ext_shared)
351    AC_DEFINE(HAVE_OCI8,1,[Defined to 1 if the PHP OCI8 extension for Oracle Database is configured])
352
353    PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
354    PHP_SUBST_OLD(OCI8_DIR)
355    PHP_SUBST_OLD(OCI8_ORACLE_VERSION)
356
357    dnl Fix Bug #46623
358    AC_DEFINE_UNQUOTED(PHP_OCI8_DEF_DIR, "$OCI8_DIR", [ ])
359    AC_DEFINE_UNQUOTED(PHP_OCI8_DEF_SHARED_LIBADD, "$OCI8_SHARED_LIBADD", [ ])
360
361  else
362    dnl ***************************************************
363    dnl Branch for using an Oracle Instant Client directory
364    dnl ***************************************************
365
366    AC_MSG_CHECKING([Oracle Instant Client directory])
367
368    if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
369      dnl Find the directory if user specified "instantclient" but did not give
370      dnl a dir. Generally the Instant Client can be anywhere so the user must
371      dnl pass in the library directory.  But on Linux we default to the most
372      dnl recent version in /usr/lib which is where the Oracle Instant Client
373      dnl RPM gets installed.
374      PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
375      if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
376	AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR])
377      fi
378    fi
379    AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT)
380
381    OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
382
383    AC_MSG_CHECKING([Oracle Instant Client SDK header directory])
384
385    dnl Header directory for Instant Client SDK RPM install
386    OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'`
387
388    dnl Header directory for Instant Client SDK zip file install
389    OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include
390
391    dnl Header directory for manual installation
392    OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib[/]*$!\1/include!'`
393
394    if test -f "$OCISDKRPMINC/oci.h"; then
395      AC_MSG_RESULT($OCISDKRPMINC)
396      PHP_ADD_INCLUDE($OCISDKRPMINC)
397      OCI8INCDIR=$OCISDKRPMINC
398    elif test -f "$OCISDKZIPINC/oci.h"; then
399      AC_MSG_RESULT($OCISDKZIPINC)
400      PHP_ADD_INCLUDE($OCISDKZIPINC)
401      OCI8INCDIR=$OCISDKZIPINC
402    elif test -f "$OCISDKMANINC/oci.h"; then
403      AC_MSG_RESULT($OCISDKMANINC)
404      PHP_ADD_INCLUDE($OCISDKMANINC)
405      OCI8INCDIR=$OCISDKMANINC
406    else
407      AC_MSG_ERROR([Oracle Instant Client SDK header files not found])
408    fi
409
410    OCISYSLIBLIST=`echo "$OCI8INCDIR" | $PHP_OCI8_SED -e 's!\(.*\)/include$!\1/demo/sysliblist!'`
411    if test -f "$OCISYSLIBLIST"; then
412      PHP_EVAL_LIBLINE(`cat $OCISYSLIBLIST`, OCI8_SYSLIB)
413    fi
414
415    AC_OCI8IC_VERSION($PHP_OCI8_INSTANT_CLIENT)
416    case $OCI8_ORACLE_VERSION in
417      10.1)
418	AC_MSG_ERROR([Oracle Client libraries < 11.2 are not supported])
419      ;;
420    esac
421    PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
422    PHP_ADD_LIBPATH($PHP_OCI8_INSTANT_CLIENT, OCI8_SHARED_LIBADD)
423
424    AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[Defined to 1 if OCI8 configuration located Oracle's Instant Client libraries])
425
426    PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c, $ext_shared)
427    AC_DEFINE(HAVE_OCI8,1,[Defined to 1 if the PHP OCI8 extension for Oracle Database is configured])
428
429    PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
430    PHP_SUBST_OLD(OCI8_DIR)
431    PHP_SUBST_OLD(OCI8_ORACLE_VERSION)
432
433  fi
434fi
435