]> matita.cs.unibo.it Git - helm.git/commitdiff
* added pkg-config stuff
authorLuca Padovani <luca.padovani@unito.it>
Thu, 19 Jun 2003 15:11:38 +0000 (15:11 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Thu, 19 Jun 2003 15:11:38 +0000 (15:11 +0000)
helm/DEVEL/gdome_xslt/.cvsignore
helm/DEVEL/gdome_xslt/Makefile.am
helm/DEVEL/gdome_xslt/configure.ac
helm/DEVEL/gdome_xslt/gdome2-xslt-cpp-smart.pc.in [new file with mode: 0644]
helm/DEVEL/gdome_xslt/gdome2-xslt.pc.in [new file with mode: 0644]

index 033d4d2baadf04d83912928106181b43b77f5fd2..3d4d30a44b1266adf320f48571db1aa3668d9dab 100644 (file)
@@ -1,4 +1,6 @@
 gdome_xslt_cpp_smart-config
+gdome2-xslt-cpp-smart.pc
+gdome2-xslt.pc
 autom4te.cache
 Makefile
 Makefile.in
index c9d6afc97f6d1554c69935cfc64acc8d4680f989..5c36bb5ff8cdf0f08f2a0aff2fe365fbcd38edca 100644 (file)
@@ -1,12 +1,13 @@
 DISTDIR = @PACKAGE@-@VERSION@
 
-EXTRA_DIST = BUGS LICENSE aclocal.m4 debian/
+EXTRA_DIST = BUGS LICENSE aclocal.m4 debian/ gdome2-xslt.pc.in gdome2-xslt-cpp-smart.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gdome2-xslt.pc gdome2-xslt-cpp-smart.pc
 
 ## SUBDIRS = C C++ test_files
 SUBDIRS = C C++ ocaml test_files
 
-bin_SCRIPTS = gdome_xslt_cpp_smart-config
-
 deb: dist
        if [ -d $(DISTDIR)/ ]; then rm -rf $(DISTDIR); else true; fi
        tar xvzf $(DISTDIR).tar.gz
index 651875dd8de883001a16f03515d99e809bf5bd92..82f1506a35e4033d56f252b4f8c63f1601b5ef76 100644 (file)
@@ -7,30 +7,6 @@ VERSION=0.0.4
 VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
 AC_SUBST(VERSION_INFO)
 
-AC_ARG_WITH(
-        gmetadom-prefix,
-        [  --with-gmetadom-prefix=PFX prefix dir where gmetadom is installed],
-        [
-                with_gmetadom_prefix=yes
-                GMETADOM_PREFIX=$withval
-        ],
-        [
-                with_gmetadom_prefix=no
-        ]
-)
-
-AC_ARG_WITH(
-        gdome-prefix,
-        [  --with-gdome-prefix=PFX prefix dir where gdome is installed],
-        [
-                with_gdome_prefix=yes
-                GDOME_PREFIX=$withval
-        ],
-        [
-                with_gdome_prefix=no
-        ]
-)
-
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
@@ -39,87 +15,15 @@ AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 AM_PROG_LIBTOOL
 
-GDOME_CONFIG="gdome-config"
-GDOME_MIN_VERSION=0.7.0
-AC_MSG_CHECKING(for Gdome2 libraries >= $GDOME_MIN_VERSION) 
-if test "x$GDOME_PREFIX" != "x"
-then
-       if ${GDOME_PREFIX}/bin/$GDOME_CONFIG --version > /dev/null 2>&1
-       then
-               GDOME_CONFIG=${GDOME_PREFIX}/bin/$GDOME_CONFIG
-       elif ! $GDOME_CONFIG --version > /dev/null 2>&1
-       then
-               AC_MSG_ERROR(Could not find Gdome2 anywhere (see config.log for details).)
-       fi
-fi
-
-vers=`$GDOME_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-minvers=`echo $GDOME_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-if test "$vers" -ge "$minvers"
-then
-        GDOME_LIBS="`$GDOME_CONFIG --libs`"
-        GDOME_CFLAGS="`$GDOME_CONFIG --cflags`"
-        AC_MSG_RESULT(found)
-else
-        AC_MSG_ERROR(You need at least Gdome2 $GDOME_MIN_VERSION for this version of $PACKAGE)
-fi
-
+PKG_CHECK_MODULES(GDOME, gdome2 >= 0.7.0,, AC_MSG_ERROR(could not find Gdome2))
 AC_SUBST(GDOME_CFLAGS)
 AC_SUBST(GDOME_LIBS)
 
-GMETADOM_CONFIG="gmetadom-config"
-GMETADOM_MIN_VERSION=0.1.4
-AC_MSG_CHECKING(for GMetaDOM libraries >= $GMETADOM_MIN_VERSION) 
-if test "x$GMETADOM_PREFIX" != "x"
-then
-       if ${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG --version > /dev/null 2>&1
-       then
-               GMETADOM_CONFIG=${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG
-        elif ! $GMETADOM_CONFIG --version > /dev/null 2>&1
-        then
-               AC_MSG_ERROR(Could not find GMetaDOM anywhere (see config.log for details).)
-       fi
-fi
-
-vers=`$GMETADOM_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-minvers=`echo $GMETADOM_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-if test "$vers" -ge "$minvers"
-then
-        GMETADOM_LIBS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --libs`"
-        GMETADOM_CFLAGS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --cflags`"
-        AC_MSG_RESULT(found)
-else
-        AC_MSG_ERROR(You need at least GMetaDOM $GMETADOM_MIN_VERSION for this version of $PACKAGE)
-fi
-
+PKG_CHECK_MODULES(GMETADOM, gdome2-cpp-smart >= 0.1.8,, AC_MSG_ERROR(could not find GMetaDOM))
 AC_SUBST(GMETADOM_CFLAGS)
 AC_SUBST(GMETADOM_LIBS)
 
-LIBXSLT_CONFIG="xslt-config"
-LIBXSLT_MIN_VERSION=1.0.16
-AC_MSG_CHECKING(for libxslt libraries >= $LIBXSLT_MIN_VERSION) 
-if test "x$LIBXSLT_PREFIX" != "x"
-then
-       if ${LIBXSLT_PREFIX}/bin/$LIBXSLT_CONFIG --version > /dev/null 2>&1
-       then
-               LIBXSLT_CONFIG=${LIBXSLT_PREFIX}/bin/$LIBXSLT_CONFIG
-        elif ! $LIBXSLT_CONFIG --version > /dev/null 2>&1
-        then
-               AC_MSG_ERROR(Could not find libxslt anywhere (see config.log for details).)
-       fi
-fi
-
-vers=`$LIBXSLT_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-minvers=`echo $LIBXSLT_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-if test "$vers" -ge "$minvers"
-then
-        LIBXSLT_LIBS="`$LIBXSLT_CONFIG --libs`"
-        LIBXSLT_CFLAGS="`$LIBXSLT_CONFIG --cflags`"
-        AC_MSG_RESULT(found)
-else
-        AC_MSG_ERROR(You need at least libxslt $LIBXSLT_MIN_VERSION for this version of $PACKAGE)
-fi
-
+PKG_CHECK_MODULES(LIBXSLT, libxslt,, AC_MSG_ERROR(could not find libxslt))
 AC_SUBST(LIBXSLT_CFLAGS)
 AC_SUBST(LIBXSLT_LIBS)
 
@@ -197,7 +101,7 @@ AC_CONFIG_FILES([
   ocaml/gdome_xslt/Makefile
   ocaml/gdome_xslt/META
   ocaml/test/Makefile
-  gdome_xslt_cpp_smart-config
+  gdome2-xslt.pc
+  gdome2-xslt-cpp-smart.pc
   test_files/Makefile])
-AC_CONFIG_COMMANDS([default],[[chmod +x gdome_xslt_cpp_smart-config]],[[]])
 AC_OUTPUT
diff --git a/helm/DEVEL/gdome_xslt/gdome2-xslt-cpp-smart.pc.in b/helm/DEVEL/gdome_xslt/gdome2-xslt-cpp-smart.pc.in
new file mode 100644 (file)
index 0000000..0046f27
--- /dev/null
@@ -0,0 +1,14 @@
+# This is a comment
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datadir=@datadir@
+
+Name: Gdome2/XSLT C++ Binding
+Description: API for applying XSLT stylesheets to Gdome2 documents
+Version: @VERSION@
+Requires: gdome2 libxslt
+Libs: @LIBXSLT_LIBS@ -L${libdir} -lgdome_xslt_cpp_smart
+Cflags: @LIBXSLT_CFLAGS@ -I${includedir}/@PACKAGE@
+
diff --git a/helm/DEVEL/gdome_xslt/gdome2-xslt.pc.in b/helm/DEVEL/gdome_xslt/gdome2-xslt.pc.in
new file mode 100644 (file)
index 0000000..88df34a
--- /dev/null
@@ -0,0 +1,14 @@
+# This is a comment
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datadir=@datadir@
+
+Name: Gdome2/XSLT C Binding
+Description: API for applying XSLT stylesheets to Gdome2 documents
+Version: @VERSION@
+Requires: gdome2 libxslt
+Libs: @LIBXSLT_LIBS@ -L${libdir} -lgdome_xslt
+Cflags: @LIBXSLT_CFLAGS@ -I${includedir}/@PACKAGE@
+