xref: /PHP-7.0/ext/interbase/config.m4 (revision b54739e6)
1PHP_ARG_WITH(interbase,for Firebird support,
2[  --with-interbase[=DIR]    Include Firebird support.  DIR is the Firebird base
3                          install directory [/opt/firebird]])
4
5if test "$PHP_INTERBASE" != "no"; then
6  if test "$PHP_INTERBASE" = "yes"; then
7    IBASE_INCDIR=/opt/firebird/include
8    IBASE_LIBDIR=/opt/firebird/lib
9  else
10    IBASE_INCDIR=$PHP_INTERBASE/include
11    IBASE_LIBDIR=$PHP_INTERBASE/$PHP_LIBDIR
12  fi
13
14  PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
15  [
16    IBASE_LIBNAME=fbclient
17  ], [
18    PHP_CHECK_LIBRARY(gds, isc_detach_database,
19    [
20      IBASE_LIBNAME=gds
21    ], [
22      PHP_CHECK_LIBRARY(ib_util, isc_detach_database,
23      [
24        IBASE_LIBNAME=ib_util
25      ], [
26        AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check config.log for more information.])
27      ], [
28        -L$IBASE_LIBDIR
29      ])
30    ], [
31      -L$IBASE_LIBDIR
32    ])
33  ], [
34    -L$IBASE_LIBDIR
35  ])
36
37  PHP_ADD_LIBRARY_WITH_PATH($IBASE_LIBNAME, $IBASE_LIBDIR, INTERBASE_SHARED_LIBADD)
38  PHP_ADD_INCLUDE($IBASE_INCDIR)
39  AC_DEFINE(HAVE_IBASE,1,[ ])
40  PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
41  PHP_SUBST(INTERBASE_SHARED_LIBADD)
42fi
43