Skip to content

Commit 72fe2b1

Browse files
hughmcmasternikic
authored andcommitted
ext/skeleton: Update use of PHP_CHECK_LIBRARY
Closes GH-4218.
1 parent 4feddd5 commit 72fe2b1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ext/skeleton/config.m4.in

+10-10
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ if test "$PHP_%EXTNAMECAPS%" != "no"; then
6262
dnl LIBNAME=%EXTNAMECAPS% # you may want to change this
6363
dnl LIBSYMBOL=%EXTNAMECAPS% # you most likely want to change this
6464

65-
dnl If you need to check for a particular library function
66-
dnl and you are using pkg-config:
65+
dnl If you need to check for a particular library function (e.g. a conditional
66+
dnl or version-dependent feature) and you are using pkg-config:
6767
dnl PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL,
6868
dnl [
69-
dnl PHP_EVAL_INCLINE($LIBFOO_CFLAGS)
70-
dnl PHP_EVAL_LIBLINE($LIBFOO_LIBS, %EXTNAMECAPS%_SHARED_LIBADD)
71-
dnl AC_DEFINE(HAVE_%EXTNAMECAPS%LIB, 1, [ ])
69+
dnl AC_DEFINE(HAVE_%EXTNAMECAPS%_FEATURE, 1, [ ])
7270
dnl ],[
73-
dnl AC_MSG_ERROR([wrong %EXTNAME% lib version or lib not found])
71+
dnl AC_MSG_ERROR([FEATURE not supported by your %EXTNAME% library.])
72+
dnl ], [
73+
dnl $LIBFOO_LIBS
7474
dnl ])
7575

76-
dnl If you need to check for a particular library function
77-
dnl and you are not using pkg-config:
76+
dnl If you need to check for a particular library function (e.g. a conditional
77+
dnl or version-dependent feature) and you are not using pkg-config:
7878
dnl PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL,
7979
dnl [
8080
dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $%EXTNAMECAPS%_DIR/$PHP_LIBDIR, %EXTNAMECAPS%_SHARED_LIBADD)
81-
dnl AC_DEFINE(HAVE_%EXTNAMECAPS%LIB,1,[ ])
81+
dnl AC_DEFINE(HAVE_%EXTNAMECAPS%_FEATURE, 1, [ ])
8282
dnl ],[
83-
dnl AC_MSG_ERROR([wrong %EXTNAME% lib version or lib not found])
83+
dnl AC_MSG_ERROR([FEATURE not supported by your %EXTNAME% library.])
8484
dnl ],[
8585
dnl -L$%EXTNAMECAPS%_DIR/$PHP_LIBDIR -lm
8686
dnl ])

0 commit comments

Comments
 (0)