[gs-cvs] gs/src

Ralph Giles giles at ghostscript.com
Thu May 20 00:41:26 PDT 2004


Update of /cvs/ghostscript/gs/src
In directory casper:/tmp/cvs-serv14349/src

Modified Files:
	configure.ac 
Log Message:
Apply a recursive 'configure' step to the autoconf build to generate
required code for the jasper library.

DETAILS:

The jasper library also ships with an autoconf build framework for POSIX
systems. Unfortunately, it relies on this framework to generate a header
file with defines describing the local system. This header, located in
jasper/src/libjasper/include/jas_config.h can be generated by hand from
the jas_config.h.in template, but it must be available when we're directly
compiling the source as part of Ghostscript.

We could attempt to construct one of our own, but within the confines
of an autoconf build, using jasper's native configure is more robust.
We could also go ahead and use recursive make to build the library
natively, but we would need a static makefile for non-autoconf builds.

Jasper provides an alternate header, jas_config2.h for use with MSVC.


Index: configure.ac
===================================================================
RCS file: /cvs/ghostscript/gs/src/configure.ac,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- a/configure.ac	27 Apr 2004 06:04:03 -0000	1.45
+++ b/configure.ac	20 May 2004 07:41:23 -0000	1.46
@@ -312,6 +312,46 @@
   done
   if test "x$JASPERDIR" != xsrc; then
     AC_MSG_RESULT([$JASPERDIR])
+    AC_MSG_CHECKING([for local jasper config header])
+    if test -r $JASPERDIR/src/libjasper/include/jasper/jas_config.h; then
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+      AC_MSG_CHECKING([for local jasper configure script])
+      if test -x $JASPERDIR/configure; then
+        AC_MSG_RESULT([yes])
+        echo
+        echo "Running jasper configure script..."
+	olddir=`pwd`
+        cd $JASPERDIR && ./configure
+        cd $olddir
+        echo
+        echo "Continuing with Ghostscript configuration..."
+      else
+        AC_MSG_RESULT([no])
+        AC_MSG_CHECKING([for local jasper autogen.sh script])
+        if test -x $JASPERDIR/autogen.sh; then
+          AC_MSG_RESULT([yes])
+          echo
+          echo "Running jasper autogen script..."
+	  olddir=`pwd`
+          cd $JASPERDIR && ./autogen.sh
+          cd $olddir
+          echo
+          echo "Continuing with Ghostscript configuration..."
+        else
+          AC_MSG_ERROR([
+Unable to find $JASPERDIR/src/libjasper/include/jas_config.h,
+or generate generate such a file for this system. You will
+have to build one by hand, or configure, build and install
+the jasper library separately.
+
+You can also pass --without-jasper to configure to disable
+JPEG 2000 PDF image support entirely.
+])
+        fi
+      fi
+    fi
   else
     AC_MSG_RESULT([no])
     AC_CHECK_LIB([jasper], [jas_image_create], [



More information about the gs-cvs mailing list