]> git.pld-linux.org Git - packages/expat.git/commitdiff
This commit was manufactured by cvs2git to create branch 'AC-branch'. AC-branch
authorcvs2git <feedback@pld-linux.org>
Mon, 20 Aug 2007 18:45:28 +0000 (18:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Sprout from master 2007-08-20 18:45:28 UTC witekfl <witekfl@pld-linux.org> '- added bcond_without static_libs'
Cherrypick from master 2004-07-24 21:38:53 UTC Jakub Bogusz <qboosh@pld-linux.org> '- updated for 1.95.8':
    expat-DESTDIR.patch -> 1.3
    expat.m4 -> 1.2

expat-DESTDIR.patch [new file with mode: 0644]
expat.m4 [new file with mode: 0644]

diff --git a/expat-DESTDIR.patch b/expat-DESTDIR.patch
new file mode 100644 (file)
index 0000000..9d18c0b
--- /dev/null
@@ -0,0 +1,23 @@
+--- expat-1.95.8/Makefile.in.orig      2004-05-07 22:00:48.000000000 +0200
++++ expat-1.95.8/Makefile.in   2004-07-24 23:24:29.522051752 +0200
+@@ -73,14 +73,14 @@
+       tests/runtests
+ install: xmlwf/xmlwf installlib
+-      $(mkinstalldirs) $(bindir) $(man1dir)
+-      $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
+-      $(INSTALL_DATA) $(MANFILE) $(man1dir)
++      $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
++      $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
++      $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
+ installlib: $(LIBRARY) $(APIHEADER)
+-      $(mkinstalldirs) $(libdir) $(includedir)
+-      $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
+-      $(INSTALL_DATA) $(APIHEADER) $(includedir)
++      $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
++      $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
++      $(INSTALL_DATA) $(APIHEADER) $(DESTDIR)$(includedir)
+ uninstall: uninstalllib
+       $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
diff --git a/expat.m4 b/expat.m4
new file mode 100644 (file)
index 0000000..47d5f7f
--- /dev/null
+++ b/expat.m4
@@ -0,0 +1,130 @@
+dnl AM_PATH_EXPAT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for EXPAT, and define EXPAT_CFLAGS and EXPAT_LIBS
+dnl
+AC_DEFUN([AM_PATH_EXPAT],
+[dnl 
+dnl Get the cflags and libraries from the expat-config script
+dnl
+AC_ARG_WITH(expat-prefix,[  --with-expat=PFX   Prefix where EXPAT is installed (optional)])
+AC_ARG_ENABLE(expattest, [  --disable-expattest       Do not try to compile and run a test EXPAT program],
+                   , enable_expattest=yes)
+
+  if test x$with_expat != x ; then
+    EXPAT_CFLAGS="-I$with_expat/include"
+    EXPAT_LIBS="-L$with_expat/lib"
+  fi
+
+  min_expat_version=ifelse([$1], ,1.95.1, $1)
+  AC_MSG_CHECKING(for EXPAT - version >= $min_expat_version)
+
+  EXPAT_CFLAGS="$EXPAT_CFLAGS"
+  EXPAT_LIBS="$EXPAT_LIBS -lexpat"
+
+  if test "x$enable_expattest" = "xyes" ; then
+    ac_save_CFLAGS="$CFLAGS"
+    ac_save_LIBS="$LIBS"
+    CFLAGS="$CFLAGS $EXPAT_CFLAGS"
+    LIBS="$EXPAT_LIBS $LIBS"
+dnl
+dnl Now check if the installed EXPAT is sufficiently new. (Also sanity
+dnl checks the results of expat-config to some extent
+dnl
+    rm -f conf.expattest
+    AC_TRY_RUN([
+#include <expat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int 
+main ()
+{
+   int expat_major, expat_minor, expat_micro;
+   int major, minor, micro;
+   char *tmp_expat_version;
+   char *tmp_version;
+
+   system ("touch conf.expattest");
+
+   /* HP/UX 9 (%@#!) writes to sscanf strings */
+   tmp_expat_version = strdup(XML_ExpatVersion());
+   if (sscanf(tmp_expat_version, "expat_%d.%d.%d", &expat_major, &expat_minor, &expat_micro) != 3) {
+     printf("%s, bad expat version string\n", XML_ExpatVersion());
+     exit(1);
+   }
+
+   /* HP/UX 9 (%@#!) writes to sscanf strings */
+   tmp_version = strdup("$min_expat_version");
+   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_expat_version");
+     exit(1);
+   }
+
+   if ((expat_major > major) ||
+      ((expat_major == major) && (expat_minor > minor)) ||
+      ((expat_major == major) && (expat_minor == minor) && (expat_micro >= micro)))
+   {
+        return 0;
+   }
+   else
+   {
+        printf("\n*** An old version of EXPAT (%d.%d.%d) was found.\n",
+               expat_major, expat_minor, expat_micro);
+        printf("*** You need a version of EXPAT newer than %d.%d.%d. The latest version of\n",
+              major, minor, micro);
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the expat-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of EXPAT, but you can also set the EXPAT_CONFIG environment to point to the\n");
+        printf("*** correct copy of expat-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+   }
+   return 1;
+}
+],, no_expat=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+  fi
+
+  if test "x$no_expat" = x ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test -f conf.expattest ; then
+        :
+     else
+          echo "*** Could not run EXPAT test program, checking why..."
+          CFLAGS="$CFLAGS $EXPAT_CFLAGS"
+          LIBS="$LIBS $EXPAT_LIBS"
+          AC_TRY_LINK([
+#include <expat.h>
+#include <stdio.h>
+],      [ return (XML_ExpatVersion()); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding EXPAT or finding the wrong"
+          echo "*** version of EXPAT. If it is not finding EXPAT, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+         echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+          echo "***" ],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means EXPAT was incorrectly installed"
+          echo "*** or that you have moved EXPAT since it was installed. In the latter case, you"
+          echo "*** may want to edit the expat-config script: $EXPAT_CONFIG" ])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+     fi
+     EXPAT_CFLAGS=""
+     EXPAT_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(EXPAT_CFLAGS)
+  AC_SUBST(EXPAT_LIBS)
+  rm -f conf.expattest
+])
This page took 0.063773 seconds and 4 git commands to generate.