cvs: presentations /slides/extending-tidy ext6.xml ext7.xml
| From: | jim winstead | Date: | Wed, 19 Nov 2003 22:23:05 +0000 |
| Subject: | cvs: presentations /slides/extending-tidy ext6.xml ext7.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-910@lists.php.net to get a copy of this message | ||
jimw Wed Nov 19 17:23:05 2003 EDT
Modified files:
/presentations/slides/extending-tidy ext6.xml ext7.xml
Log:
updates
Index: presentations/slides/extending-tidy/ext6.xml
diff -u presentations/slides/extending-tidy/ext6.xml:1.1
presentations/slides/extending-tidy/ext6.xml:1.2
--- presentations/slides/extending-tidy/ext6.xml:1.1 Fri Apr 25 08:23:37 2003
+++ presentations/slides/extending-tidy/ext6.xml Wed Nov 19 17:23:05 2003
@@ -10,6 +10,56 @@
*--enable-tidy* section.
</blurb>
+<example title="config.m4 file" type="shell"><![CDATA[dnl config.m4
for extension tidy
+
+PHP_ARG_WITH(tidy, for tidy support,
+[ --with-tidy Include tidy support])
+
+if test "$PHP_TIDY" != "no"; then
+ # --with-tidy -> check with-path
+ SEARCH_PATH="/usr/local /usr"
+ SEARCH_FOR="/include/tidy/tidy.h"
+ if test -r $PHP_TIDY/; then # path given as parameter
+ TIDY_DIR=$PHP_TIDY
+ else # search default path list
+ AC_MSG_CHECKING([for tidy files in default path])
+ for i in $SEARCH_PATH ; do
+ if test -r $i/$SEARCH_FOR; then
+ TIDY_DIR=$i
+ AC_MSG_RESULT(found in $i)
+ fi
+ done
+ fi
+ dnl
+ if test -z "$TIDY_DIR"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Please reinstall the tidy distribution])
+ fi
+
+ # --with-tidy -> add include path
+ PHP_ADD_INCLUDE($TIDY_DIR/include)
+
+ # --with-tidy -> check for lib and symbol presence
+ LIBNAME=tidy # you may want to change this
+ LIBSYMBOL=tidyReleaseDate # you most likely want to change this
+
+ PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
+ [
+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $TIDY_DIR/lib, TIDY_SHARED_LIBADD)
+ AC_DEFINE(HAVE_TIDYLIB,1,[ ])
+ ],[
+ AC_MSG_ERROR([wrong tidy lib version or lib not found])
+ ],[
+ -L$TIDY_DIR/lib -lm -ldl
+ ])
+ dnl
+ PHP_SUBST(TIDY_SHARED_LIBADD)
+
+ PHP_EXTENSION(tidy, $ext_shared)
+dnl PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared)
+fi
+]]></example>
+
<example title="Configure, build and install" type="shell"><![CDATA[%
./configure
% make
% cp modules/tidy.so /usr/local/lib/php]]></example>
Index: presentations/slides/extending-tidy/ext7.xml
diff -u presentations/slides/extending-tidy/ext7.xml:1.1
presentations/slides/extending-tidy/ext7.xml:1.2
--- presentations/slides/extending-tidy/ext7.xml:1.1 Fri Apr 25 08:23:37 2003
+++ presentations/slides/extending-tidy/ext7.xml Wed Nov 19 17:23:05 2003
@@ -14,6 +14,8 @@
<example title="function_entry" type="c"><![CDATA[function_entry
tidy_functions[] = {
PHP_FE(confirm_tidy_compiled, NULL)
+ PHP_FE(tidy_create, NULL)
+ PHP_FE(example_function, { 2, BYREF_FORCE, BYREF_NONE } )
{NULL, NULL, NULL}
};]]></example>