summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2003-03-18 18:10:53 +0000
committerDom Lachowicz <doml@src.gnome.org>2003-03-18 18:10:53 +0000
commit7d65fff4081a25bdfe62d09ba2588263e41347e3 (patch)
treea1a2a3b18985bf9d2b47c5646040f712592aca7c
parent669b4d2481225bdea22fb9ea1e6f01cbfb91d299 (diff)
downloadlibcroco-7d65fff4081a25bdfe62d09ba2588263e41347e3.tar.gz
update autogen.sh to build libtool
better libxml2 checks, seleng checks disable test5 until a better solution is found
-rw-r--r--ChangeLog11
-rwxr-xr-xautogen.sh31
-rw-r--r--configure.in87
-rw-r--r--tests/Makefile.am8
4 files changed, 59 insertions, 78 deletions
diff --git a/ChangeLog b/ChangeLog
index 2867735..c0e4c3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-03-18 Dom Lachowicz <cinamod@hotmail.com>
+
+ * autogen.sh: Use gnome-autogen (cvs co gnome-common). Creates libtool
+ and other things properly
+
+ * configure.in: better check for LIBXML2, conditional compilation of
+ the SELENG module
+
+ * tests/Makefile.am: disable test5 until I can think of a better
+ work-around
+
2003-03-16 dodji <dodji@seketeli.org>
* src/cr-style.c (set_border_x_style_from_value):
diff --git a/autogen.sh b/autogen.sh
index 965661a..e5cea42 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,20 +1,21 @@
#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
-#Author: Dodji Seketeli.
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+PKG_NAME="libcroco"
-echo "autogen.sh: Running aclocal ..."
-aclocal
-echo "autogen.sh: aclocal: done"
+(test -f $srcdir/configure.in \
+ && test -f $srcdir/README \
+ && test -f $srcdir/src/cr-parser.h) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
-echo "autogen.sh: Running autoconf -f ..."
-autoconf
-echo "autogen.sh: autoconf: done"
-
-echo "autogen.sh: Running automake -a -c ..."
-automake --gnu -a -c
-echo "autogen.sh: automake: done"
-
-echo "autogen.sh: Running configure ..."
-./configure $@
-echo "autogen.sh: configure: done"
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from the GNOME CVS"
+ exit 1
+}
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/configure.in b/configure.in
index b7a01b8..2a7dc8d 100644
--- a/configure.in
+++ b/configure.in
@@ -12,9 +12,6 @@ LIBCROCO_VERSION_INFO=$LIBCROCO_MAJOR_VERSION:$LIBCROCO_MINOR_VERSION:$LIBCROCO_
LIBCROCO_VERSION_NUMBER=`expr "$LIBCROCO_MAJOR_VERSION \* 10000 +$LIBCROCO_MINOR_VERSION \* 100 + $LIBCROCO_MICRO_VERSION"`
VERSION=$LIBCROCO_VERSION
-USE_LIBXML2=no
-WITH_SELENG=no
-
AC_SUBST(LIBCROCO_MAJOR_VERSION)
AC_SUBST(LIBCROCO_MINOR_VERSION)
AC_SUBST(LIBCROCO_MICRO_VERSION)
@@ -26,6 +23,8 @@ AC_SUBST(VERSION)
AM_INIT_AUTOMAKE($PACKAGE, $LIBCROCO_VERSION)
AM_CONFIG_HEADER(libcroco-config.h)
+AM_MAINTAINER_MODE
+
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
@@ -47,20 +46,6 @@ dnl check for the different --enable-option=val
dnl messages issued by the user
dnl ***************************************************************
-dnl -
-dnl --enable-seleng
-dnl this option enables compilation of the selection engine
-AC_ARG_ENABLE(seleng,
- AC_HELP_STRING([--enable-seleng=yes|no],
- [Enables the css2 selector engine based on libxml2. Default=yes]),
- WITH_SELENG=$enableval,
- WITH_SELENG="yes")
-
-if test "$WITH_SELENG" = "yes" ; then
- USE_LIBXML2=yes
- AC_DEFINE(WITH_SELENG, 1, [use css2 selection engine])
-fi
-
AC_ARG_ENABLE(checks,
AC_HELP_STRING([--enable-checks=yes|no],
[enables runtime safety checks. Default=yes]),
@@ -71,8 +56,6 @@ if test "$WITH_CHECKS" = "no" ; then
AC_DEFINE(G_DISABLE_CHECKS, 1, [disable runtime asserts])
fi
-AC_SUBST(WITH_SELENG)
-
dnl ************************************************
dnl end of check of the different --enable-feature options
dnl *************************************************
@@ -86,49 +69,35 @@ if test x$PKG_CONFIG = xno ; then
AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
fi
-
dnl check libxml2 version
-if test "$USE_LIBXML2" = "yes" ; then
- dnl
- dnl Find awk
- dnl
-
- AC_PROG_AWK
-
- AC_MSG_CHECKING([checking for libxml2])
-
- LIBXML_MAJOR=2
- LIBXML_MINOR=5
- LIBXML_MICRO=1
- LIBXML=`pkg-config --list-all|grep libxml-2.0`
- if test "empty$LIBXML" = "empty" ; then
- AC_MSG_ERROR([*** libxml2 not found. See http://xmlsoft.org. Make sure "pkg-config --modversion libxml2" prints at least $LIBXML_MAJOR.$LIBXML_MINOR.$LIBXML_MICRO]) ;
- fi
- LIBXML_VERSION=`pkg-config --modversion libxml-2.0`
-
- MAJOR=`echo $LIBXML_VERSION |awk 'BEGIN {FS="."} {print $1}'`
- MINOR=`echo $LIBXML_VERSION |awk 'BEGIN {FS="."} {print $2}'`
- MICRO=`echo $LIBXML_VERSION |awk 'BEGIN {FS="."} {print $3}'`
- LIBXML_VERSION=$MAJOR.$MINOR.$MICRO
-
- if test "$LIBXML_MAJOR" -lt "2" ; then
- AC_MSG_ERROR([libxml2 version at least $LIBXML_MAJOR.$LIBXML_MINOR.$LIBXML_MICRO required. Found version $LIBXML_VERSION])
- fi
-
- if test "$LIBXML_MINOR" -gt "$MINOR" ; then
- AC_MSG_ERROR([libxml2 version at least $LIBXML_MAJOR.$LIBXML_MINOR.$LIBXML_MICRO required. Found version $LIBXML_VERSION])
- fi
-
- if test "$LIBXML_MICRO" -gt "$MICRO" ; then
- AC_MSG_ERROR([libxml2 version at least $LIBXML_MAJOR.$LIBXML_MINOR.$LIBXML_MICRO required]. Found version $LIBXML_VERSION)
- fi
-
- AC_DEFINE(HAVE_LIBXML2, 1, [use libxml2])
- AC_MSG_RESULT([yes])
+have_libxml2=no
+PKG_CHECK_MODULES(LIBXML2, [libxml2 >= 2.5.1],
+ [have_libxml2=yes
+ AC_DEFINE(HAVE_LIBXML2, 1, [use libxml2])], have_libxml2=no)
+
+dnl -
+dnl --enable-seleng
+dnl this option enables compilation of the selection engine
+WITH_SELENG=no
+AC_ARG_ENABLE(seleng,
+ AC_HELP_STRING([--enable-seleng=yes|no|auto],
+ [Enables the css2 selector engine based on libxml2. Default=auto]),
+ WITH_SELENG=$enableval,
+ WITH_SELENG="auto")
+
+if test "$WITH_SELENG" != no ; then
+ if test "$have_libxml2" != no; then
+ AC_DEFINE(WITH_SELENG, 1, [use css2 selection engine])
+ else
+ WITH_SELENG=no
+ fi
fi
+AC_SUBST(WITH_SELENG)
+AM_CONDITIONAL(HAVE_SELENG, test $WITH_SELENG != no)
+
dnl By default compile in debug mode
-CFLAGS="-g -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls "
+CFLAGS="-Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls "
#-pedantic -Wshadow -0 -Wuninitialized
CROCO_LIBS="-L${libdir} -lcroco `pkg-config --libs glib-2.0`"
@@ -160,4 +129,4 @@ libcroco.pc
croco-config
src/Makefile
tests/Makefile
-]) \ No newline at end of file
+])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2bad091..7f17dd2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,12 @@
-#SUBDIRS=test-inputs
+#TODO: conditionally compile test5
+noinst_PROGRAMS=test0 test1 test2 test3 test4 #test5
-noinst_PROGRAMS=test0 test1 test2 test3 test4 test5
test0_SOURCES=test0-main.c
test1_SOURCES=test1-main.c
test2_SOURCES=test2-main.c cr-test-utils.c cr-test-utils.h
test3_SOURCES=test3-main.c cr-test-utils.c cr-test-utils.h
test4_SOURCES=test4-main.c cr-test-utils.c cr-test-utils.h
-test5_SOURCES=test5-main.c cr-test-utils.c cr-test-utils.h
+#test5_SOURCES=test5-main.c cr-test-utils.c cr-test-utils.h
LDADD=$(top_srcdir)/src/libcroco.la
@@ -15,4 +15,4 @@ INCLUDES=-I$(top_srcdir)/intl \
`pkg-config --cflags glib-2.0`
LDFLAGS=`pkg-config --libs glib-2.0` @LIBXML2_LIBS@
-AM_CFLAGS=-Wall -I. @LIBXML2_CFLAGS@ \ No newline at end of file
+AM_CFLAGS=-Wall -I. @LIBXML2_CFLAGS@