cvs: php-gtk-doc / configure.in
| From: | James Moore | Date: | Sat, 31 Aug 2002 08:28:54 +0000 |
| Subject: | cvs: php-gtk-doc / configure.in | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-560@lists.php.net to get a copy of this message | ||
jmoore Sat Aug 31 04:28:54 2002 EDT
Modified files:
/php-gtk-doc configure.in
Log:
Changes to get configure to automatically update stylesheets if they are
out of date.
# new location of stylesheets is
# http://www.phpuk.org/~james/gtkss.tar.gz
not .zip. Please remember to
# run autoconf once you have cvs update'd
Index: php-gtk-doc/configure.in
diff -u php-gtk-doc/configure.in:1.12 php-gtk-doc/configure.in:1.13
--- php-gtk-doc/configure.in:1.12 Tue Oct 16 17:08:46 2001
+++ php-gtk-doc/configure.in Sat Aug 31 04:28:53 2002
@@ -15,7 +15,7 @@
# +----------------------------------------------------------------------+
#
-# $Id: configure.in,v 1.12 2001/10/16 21:08:46 jimw Exp $
+# $Id: configure.in,v 1.13 2002/08/31 08:28:53 jmoore Exp $
#
AC_INIT(global.ent)
@@ -23,6 +23,63 @@
AC_PATH_PROG(XSLTPROC, xsltproc, no)
AC_PATH_PROG(PHP, php, no)
+AC_DEFUN(FetchSS, [
+AC_PATH_PROG(WGET, wget, no)
+if test "$WGET" = "no";
+then
+ AC_MSG_ERROR(Cannot find wget -
+ **********************************************
+ * Please get the stylesheets from *
+ * http://www.phpuk.org/~james/gtkss.tar.gz *
+ * and extract them in the php-gtk-doc dir *
+ **********************************************)
+
+fi
+
+AC_PATH_PROG(TAR, tar, no)
+if test "$TAR" = "no";
+then
+ AC_MSG_ERROR(Cannot find tar -
+ **********************************************
+ * Please get the stylesheets from *
+ * http://www.phpuk.org/~james/gtkss.tar.gz *
+ * and extract them in the php-gtk-doc dir *
+ **********************************************)
+fi
+
+AC_MSG_CHECKING(For stylesheets dir)
+if test ! -f "stylesheets/README";
+then
+ AC_MSG_RESULT(not found)
+else
+ AC_MSG_RESULT(found)
+ echo "Backing up Stylesheet dir"
+ mv stylesheets stylesheets.old
+fi
+
+if test -f "gtkss.tar.gz";
+then
+ echo "Backing up gtkss.tar.gz"
+ mv gtkss.tar.gz gtkss.tar.gz.old
+fi
+
+echo "Downloading Stylesheets"
+$WGET http://www.phpuk.org/~james/gtkss.tar.gz
+
+if(test ! -f gtkss.tar.gz)
+then
+ AC_MSG_ERROR(Download failed -
+ **********************************************
+ * Please get the stylesheets from *
+ * http://www.phpuk.org/~james/gtkss.tar.gz *
+ * and extract them in the php-gtk-doc dir *
+ **********************************************)
+fi
+
+echo "Unpacking Stylesheets"
+tar -xvzf gtkss.tar.gz
+])
+
if test "$XSLTPROC" = "no";
then
AC_MSG_ERROR(cannot find xsltproc)
@@ -32,18 +89,35 @@
then
AC_MSG_ERROR(unable to locate php exectuable)
fi
+
AC_MSG_CHECKING(for the stylesheets)
if test ! -f "stylesheets/README";
then
AC_MSG_RESULT(not found)
- AC_MSG_ERROR(-
- *******************************************
- * Please get the stylesheets from *
- * http://www.phpuk.org/~james/gtkss.zip *
- * and extract them in the php-gtk-doc dir *
- *******************************************)
+ FetchSS()
fi
AC_MSG_RESULT(found)
+
+AC_MSG_CHECKING(Stylesheet Version)
+
+if test ! -f "stylesheets/GTKVERSION";
+then
+ AC_MSG_RESULT(No Version Information)
+ AC_MSG_WARN(No Version information found.
+ Persuming old version.
+ Updating Stylesheets)
+
+ FetchSS()
+fi
+
+if test ! "0.1" = "
cat stylesheets/GTKVERSION"
+then
+ AC_MSG_RESULT(Incorrect Version)
+ echo "Automatically updating stylesheets"
+ FetchSS()
+fi
+
+AC_MSG_RESULT(Correct Verison)
DOCBOOK_DOCTYPE="-//PHP Group//DTD DocBk XML V3.1.7-Based Extension//EN"
AC_SUBST(DOCBOOK_DOCTYPE)