config.m4

28   PHP_ADD_INCLUDE($MY_EXT_NAME_DIR/include)
29 
30   LIBNAME=my_ext_name       # you may want to change this
31   LIBSYMBOL=aa_init   # you most likely want to change this 
32 
33   PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
34   [
35     PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $MY_EXT_NAME_DIR/lib, MY_EXT_NAME_SHARED_LIBADD)
36     AC_DEFINE(HAVE_MY_EXT_NAMELIB,1,[ ])
37   ],[
38     AC_MSG_ERROR([wrong my_ext_name lib version or lib not found])
39   ],[
40     -L$MY_EXT_NAME_DIR/lib -lm -ldl
41   ])
42  
43   PHP_SUBST(MY_EXT_NAME_SHARED_LIBADD)
44 
45   PHP_NEW_EXTENSION(my_ext_name, my_ext_name.c, $ext_shared)
46 fi