summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/ext_skel18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/ext_skel b/ext/ext_skel
index d1b8a2874c..09a003c92e 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -127,6 +127,24 @@ dnl [ --enable-$extname Enable $extname support])
if test "\$PHP_$EXTNAME" != "no"; then
dnl Write more examples of tests here...
+ dnl # get library FOO build options from pkg-config output
+ dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ dnl AC_MSG_CHECKING(for libfoo)
+ dnl if test -x "\$PKG_CONFIG" && \$PKG_CONFIG --exists foo; then
+ dnl if \$PKG_CONFIG foo --atleast-version 1.2.3; then
+ dnl LIBFOO_CFLAGS=\`\$PKG_CONFIG foo --cflags\`
+ dnl LIBFOO_LIBDIR=\`\$PKG_CONFIG foo --libs\`
+ dnl LIBFOO_VERSON=\`\$PKG_CONFIG foo --modversion\`
+ dnl AC_MSG_RESULT(from pkgconfig: version \$LIBFOO_VERSON)
+ dnl else
+ dnl AC_MSG_ERROR(system libfoo is too old: version 1.2.3 required)
+ dnl fi
+ dnl else
+ dnl AC_MSG_ERROR(pkg-config not found)
+ dnl fi
+ dnl PHP_EVAL_LIBLINE(\$LIBFOO_LIBDIR, ${EXTNAME}_SHARED_LIBADD)
+ dnl PHP_EVAL_INCLINE(\$LIBFOO_CFLAGS)
+
dnl # --with-$extname -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/$extname.h" # you most likely want to change this