4 [AS_HELP_STRING([--with-ion],
8 if test "$PHP_ION" != "no"; then
10 SEARCH_PATH="/usr/local /usr" # you might want to change this
11 SEARCH_FOR="/include/ionc/ion.h" # you most likely want to change this
12 if test -r $PHP_ION/$SEARCH_FOR; then # path given as parameter
14 else # search default path list
15 AC_MSG_CHECKING([for ion files in default path])
16 for i in $SEARCH_PATH ; do
17 if test -r $i/$SEARCH_FOR; then
19 AC_MSG_RESULT(found in $i)
24 if test -z "$ION_DIR"; then
25 AC_MSG_RESULT([not found])
26 AC_MSG_ERROR([Please reinstall the ion distribution])
29 PHP_ADD_INCLUDE($ION_DIR/include)
32 LIBSYMBOL=ion_error_to_str
33 PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL,
35 PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $ION_DIR/$PHP_LIBDIR, ION_SHARED_LIBADD)
37 AC_MSG_ERROR([could not link with ionc library.])
39 -L$ION_DIR/$PHP_LIBDIR -lm
42 LIBSYMBOL=decQuadFromInt32
43 PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL,
45 PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $ION_DIR/$PHP_LIBDIR, ION_SHARED_LIBADD)
47 AC_MSG_ERROR([could not link with ionc library.])
49 -L$ION_DIR/$PHP_LIBDIR -lm
52 PHP_SUBST(ION_SHARED_LIBADD)
53 AC_DEFINE(HAVE_ION, 1, [ Have ion support ])
55 PHP_NEW_EXTENSION(ion, ion.c, $ext_shared)