xref: /PHP-5.6/ext/interbase/config.m4 (revision 1c3ed862)
1PHP_ARG_WITH(interbase,for InterBase support,
2[  --with-interbase[=DIR]    Include InterBase support.  DIR is the InterBase base
3                          install directory [/usr/interbase]])
4
5if test "$PHP_INTERBASE" != "no"; then
6  if test "$PHP_INTERBASE" = "yes"; then
7    IBASE_INCDIR=/usr/interbase/include
8    IBASE_LIBDIR=/usr/interbase/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([libgds, libib_util or libfbclient 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)
41  PHP_SUBST(INTERBASE_SHARED_LIBADD)
42fi
43