| 1 |
dnl $Id$ |
|---|
| 2 |
dnl config.m4 for extension swishe |
|---|
| 3 |
|
|---|
| 4 |
dnl Comments in this file start with the string 'dnl'. |
|---|
| 5 |
dnl Remove where necessary. This file will not work |
|---|
| 6 |
dnl without editing. |
|---|
| 7 |
|
|---|
| 8 |
dnl If your extension references something external, use with: |
|---|
| 9 |
|
|---|
| 10 |
PHP_ARG_WITH(swishe, for swishe support, |
|---|
| 11 |
[ --with-swishe=DIR Include swishe support]) |
|---|
| 12 |
|
|---|
| 13 |
dnl Otherwise use enable: |
|---|
| 14 |
|
|---|
| 15 |
if test "$PHP_SWISHE" != "no"; then |
|---|
| 16 |
SEARCH_FOR="libswish-e.a" # you most likely want to change this |
|---|
| 17 |
if test -r $PHP_SWISHE/; then # path given as parameter |
|---|
| 18 |
SWISHE_DIR=$PHP_SWISHE |
|---|
| 19 |
AC_MSG_RESULT(found in $SWISHE_DIR) |
|---|
| 20 |
else # search default path list |
|---|
| 21 |
AC_MSG_ERROR([correct path to swish-e must be suplied in --with-swishe]) |
|---|
| 22 |
fi |
|---|
| 23 |
dnl |
|---|
| 24 |
if test -z "$SWISHE_DIR"; then |
|---|
| 25 |
AC_MSG_RESULT([not found]) |
|---|
| 26 |
AC_MSG_ERROR([Please reinstall the swish-e distribution or fix path in --with-swishe]) |
|---|
| 27 |
else |
|---|
| 28 |
if test -z "$SWISHE_DIR/include/swish.h"; then |
|---|
| 29 |
AC_MSG_RESULT([swish.h not found]) |
|---|
| 30 |
AC_MSG_ERROR([Please install the swish-e distribution or give a proper path]) |
|---|
| 31 |
else |
|---|
| 32 |
if test -z "$SWISHE_DIR/lib/libswish-e.a"; then |
|---|
| 33 |
AC_MSG_RESULT([libswish-e.a not found]) |
|---|
| 34 |
AC_MSG_ERROR([Please build the swish-e distribution or give a proper path]) |
|---|
| 35 |
fi |
|---|
| 36 |
fi |
|---|
| 37 |
fi |
|---|
| 38 |
|
|---|
| 39 |
dnl # --with-swishe -> add include path |
|---|
| 40 |
PHP_ADD_INCLUDE($SWISHE_DIR/include) |
|---|
| 41 |
|
|---|
| 42 |
dnl # --with-swishe -> chech for lib |
|---|
| 43 |
|
|---|
| 44 |
PHP_SUBST(SWISHE_SHARED_LIBADD) |
|---|
| 45 |
PHP_ADD_LIBRARY_WITH_PATH(swish-e, $SWISHE_DIR/lib, SWISHE_SHARED_LIBADD) |
|---|
| 46 |
AC_DEFINE(HAVE_SWISHELIB,1,[ ]) |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
PHP_EXTENSION(swishe, $ext_shared) |
|---|
| 50 |
fi |
|---|