dnl $Id: config.m4,v 1.1 2007/02/24 07:09:21 gopalv Exp $
dnl config.m4 for extension hidef

PHP_ARG_ENABLE(hidef, whether to enable hidef support,
[  --enable-hidef           Enable hidef support])

if test "$PHP_HIDEF" != "no"; then
  dnl Write more examples of tests here...

  dnl # --with-hidef -> check with-path
  dnl SEARCH_PATH="/usr/local /usr"     # you might want to change this
  dnl SEARCH_FOR="/include/hidef.h"  # you most likely want to change this
  dnl if test -r $PHP_HIDEF/; then # path given as parameter
  dnl   HIDEF_DIR=$PHP_HIDEF
  dnl else # search default path list
  dnl   AC_MSG_CHECKING([for hidef files in default path])
  dnl   for i in $SEARCH_PATH ; do
  dnl     if test -r $i/$SEARCH_FOR; then
  dnl       HIDEF_DIR=$i
  dnl       AC_MSG_RESULT(found in $i)
  dnl     fi
  dnl   done
  dnl fi
  dnl
  dnl if test -z "$HIDEF_DIR"; then
  dnl   AC_MSG_RESULT([not found])
  dnl   AC_MSG_ERROR([Please reinstall the hidef distribution])
  dnl fi

  dnl # --with-hidef -> add include path
  dnl PHP_ADD_INCLUDE($HIDEF_DIR/include)

  dnl # --with-hidef -> check for lib and symbol presence
  dnl LIBNAME=hidef # you may want to change this
  dnl LIBSYMBOL=hidef # you most likely want to change this 

  dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
  dnl [
  dnl   PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $HIDEF_DIR/lib, HIDEF_SHARED_LIBADD)
  dnl   AC_DEFINE(HAVE_HIDEFLIB,1,[ ])
  dnl ],[
  dnl   AC_MSG_ERROR([wrong hidef lib version or lib not found])
  dnl ],[
  dnl   -L$HIDEF_DIR/lib -lm -ldl
  dnl ])
  dnl
  dnl PHP_SUBST(HIDEF_SHARED_LIBADD)

  PHP_NEW_EXTENSION(hidef, hidef.c, $ext_shared)
fi


syntax highlighted by Code2HTML, v. 0.9.1