[devhelp] Update build system to make use of gnome-common
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [devhelp] Update build system to make use of gnome-common
- Date: Fri, 28 Aug 2009 14:36:37 +0000 (UTC)
commit 69c27ecdfc58c6139e5bdee38a57a78920c33f2e
Author: Frédéric Péters <fpeters 0d be>
Date: Fri Aug 28 16:29:29 2009 +0200
Update build system to make use of gnome-common
acinclude.m4 | 104 ---------------------------
autogen.sh | 158 +++--------------------------------------
build/Makefile.am.common | 9 ---
build/Makefile.am.gi18n-check | 21 ------
build/Makefile.am.marshal | 21 ------
configure.ac | 23 ++++--
src/Makefile.am | 27 +++++--
7 files changed, 45 insertions(+), 318 deletions(-)
---
diff --git a/acinclude.m4 b/acinclude.m4
index 6dce7e0..4d0d198 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,64 +1,3 @@
-dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
-
-AC_DEFUN([IMENDIO_COMPILE_WARNINGS],[
- if test -f $srcdir/autogen.sh; then
- default_compile_warnings="error"
- else
- default_compile_warnings="no"
- fi
-
- AC_ARG_WITH(compile-warnings, [ --with-compile-warnings=[no/yes/error] Compiler warnings ], [enable_compile_warnings="$withval"], [enable_compile_warnings="$default_compile_warnings"])
-
- warnCFLAGS=
- if test "x$GCC" != xyes; then
- enable_compile_warnings=no
- fi
-
- warning_flags=
- realsave_CFLAGS="$CFLAGS"
-
- case "$enable_compile_warnings" in
- no)
- warning_flags=
- ;;
- yes)
- warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations"
- ;;
- maximum|error)
- warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
- CFLAGS="$warning_flags $CFLAGS"
- for option in -Wno-sign-compare; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- CFLAGS="$SAVE_CFLAGS"
- AC_MSG_RESULT($has_option)
- if test $has_option = yes; then
- warning_flags="$warning_flags $option"
- fi
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
- if test "$enable_compile_warnings" = "error" ; then
- warning_flags="$warning_flags -Werror"
- fi
- ;;
- *)
- AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
- ;;
- esac
- CFLAGS="$realsave_CFLAGS"
- AC_MSG_CHECKING(what warning flags to pass to the C compiler)
- AC_MSG_RESULT($warning_flags)
-
- WARN_CFLAGS="$warning_flags"
- AC_SUBST(WARN_CFLAGS)
-])
-
AC_DEFUN([IGE_PLATFORM_CHECK],[
gdk_target=`$PKG_CONFIG --variable=target gtk+-2.0`
@@ -87,46 +26,3 @@ AC_DEFUN([IGE_PLATFORM_CHECK],[
AM_CONDITIONAL(HAVE_PLATFORM_X11, test $IGE_PLATFORM = x11)
])
-dnl AM_GCONF_SOURCE_2
-dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
-dnl (i.e. pass to gconftool-2
-dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
-dnl you should install foo.schemas files
-dnl
-
-AC_DEFUN([AM_GCONF_SOURCE_2],
-[
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
- else
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
- fi
-
- AC_ARG_WITH([gconf-source],
- AC_HELP_STRING([--with-gconf-source=sourceaddress],
- [Config database for installing schema files.]),
- [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
- AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
-
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
- fi
-
- AC_ARG_WITH([gconf-schema-file-dir],
- AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
- [Directory for installing schema files.]),
- [GCONF_SCHEMA_FILE_DIR="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_FILE_DIR)
- AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
-
- AC_ARG_ENABLE(schemas-install,
- [ --disable-schemas-install Disable the schemas installation],
- [case ${enableval} in
- yes|no) ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
- esac])
- AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
-])
diff --git a/autogen.sh b/autogen.sh
index 6394e59..8bb2ad0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,160 +1,22 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-CONFIGURE=configure.ac
-
-: ${AUTOCONF=autoconf}
-: ${AUTOHEADER=autoheader}
-: ${AUTOMAKE=automake}
-: ${ACLOCAL=aclocal}
-: ${INTLTOOLIZE=intltoolize}
-: ${LIBTOOLIZE=libtoolize}
-: ${GTKDOCIZE=gtkdocize}
-
-#
-# Nothing should need changing below.
-#
-
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-ORIGDIR=`pwd`
-cd $srcdir
-
-DIE=0
-
-($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile this project."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
-
-(grep "^IT_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
- ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have intltoolize installed to compile this project."
- echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.35.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
- }
-}
-
-# Check if gtk-doc is explicitly disabled.
-for option in $AUTOGEN_CONFIGURE_ARGS $@
-do
- case $option in
- -disable-gtk-doc | --disable-gtk-doc)
- enable_gtk_doc=no
- ;;
- esac
-done
-
-if test x$enable_gtk_doc != xno; then
- echo "Checking for gtkdocize ... "
- if grep "^GTK_DOC_CHECK" $CONFIGURE > /dev/null; then
- if !($GTKDOCIZE --version) < /dev/null > /dev/null 2>&1; then
- echo
- echo " You must have gtk-doc installed to compile this project."
- echo " Install the appropriate package for your distribution,"
- echo " or get the source tarball at"
- echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- echo " You can also use the option --disable-gtk-doc to skip"
- echo " this test but then you will not be able to generate a"
- echo " configure script that can build the API documentation."
- DIE=1
- fi
- fi
-fi
-
-($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have automake installed to compile this project."
- echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.11.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
-}
-
-($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have libtool installed to compile this project."
- echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.5.22.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
-}
-
-if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
- if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
- GETTEXTIZE=""
- else
- if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
- GETTEXTIZE="glib-gettextize"
- GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
- else
- GETTEXTIZE="gettextize"
- GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
- fi
-
- $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
- if test $? -ne 0; then
- echo
- echo "You must have $GETTEXTIZE installed to compile this project."
- echo "Get $GETTEXTIZE_URL"
- echo "(or a newer version if it is available)"
- DIE=1
- fi
- fi
-fi
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
+PKG_NAME="Devhelp"
-test -f $CONFIGURE || {
- echo "You must run this script in the top-level this project directory"
- exit 1
+(test -f $srcdir/src/dh-main.c) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
}
-rm -rf autom4te.cache
-
-do_cmd() {
- echo "Running '$@'"
- $@ || exit $?
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common."
+ exit 1
}
-do_cmd $ACLOCAL $ACLOCAL_FLAGS
-
-if grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
- do_cmd $INTLTOOLIZE --copy --force --automake
-fi
-
-do_cmd $LIBTOOLIZE --copy --force --automake
-
-if grep "^GTK_DOC_CHECK" $CONFIGURE > /dev/null; then
- if test x$enable_gtk_doc = xno; then
- echo "WARNING: You have disabled gtk-doc."
- echo " As a result, you will not be able to generate the API"
- echo " documentation and 'make dist' will not work."
- echo
- else
- do_cmd $GTKDOCIZE --copy --flavour no-tmpl --docdir build
- fi
-fi
-
-do_cmd $AUTOHEADER
-
-touch $srcdir/ChangeLog # required for automake
-
-do_cmd $AUTOMAKE --add-missing -Wall
-
-do_cmd $AUTOCONF
-
-cd $ORIGDIR || exit $?
+test -e $srcdir/ChangeLog || touch $srcdir/ChangeLog
-if test x$NOCONFIGURE = x; then
- echo "Running '$srcdir/configure $@'"
- $srcdir/configure "$@" && echo "Now type 'make' to compile." || exit 1
-else
- echo Skipping configure process.
-fi
+ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.9 REQUIRED_MACROS=python.m4 USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
index 86426df..b7fe5a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,21 @@
AC_PREREQ(2.60)
AC_INIT([Devhelp],[0.23.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=devhelp],[devhelp])
+# LT Version numbers, remember to change them just *before* a release.
+# (Interfaces removed: CURRENT++, AGE=0, REVISION=0)
+# (Interfaces added: CURRENT++, AGE++, REVISION=0)
+# (No interfaces changed: REVISION++)
+LIBDEVHELP_CURRENT=0
+LIBDEVHELP_AGE=0
+LIBDEVHELP_REVISION=0
+
+AC_SUBST(LIBDEVHELP_CURRENT)
+AC_SUBST(LIBDEVHELP_AGE)
+AC_SUBST(LIBDEVHELP_REVISION)
+
AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_AUX_DIR(build)
+AC_CONFIG_SRCDIR(src/dh-main.c)
+AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 no-define -Wall])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@@ -12,19 +25,15 @@ AC_PROG_LIBTOOL
# to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
-AM_PATH_GLIB_2_0
-
IT_PROG_INTLTOOL([0.40.0])
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
+PKG_PROG_PKG_CONFIG
AM_GCONF_SOURCE_2
-
-IMENDIO_COMPILE_WARNINGS
+GNOME_COMPILE_WARNINGS
dnl -----------------------------------------------------------
dnl Platform (GTK+ X11 or GTK OS X)
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/src/Makefile.am b/src/Makefile.am
index 75da20f..4988b3d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,21 @@
-include $(top_srcdir)/build/Makefile.am.common
-include $(top_srcdir)/build/Makefile.am.marshal
-include $(top_srcdir)/build/Makefile.am.gi18n-check
+dh-marshal.h: dh-marshal.list
+ $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=_dh_marshal dh-marshal.list > $@
-AM_CPPFLAGS += \
+dh-marshal.c: dh-marshal.list
+ $(AM_V_GEN) echo "#include \"dh-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --body --prefix=_dh_marshal dh-marshal.list >> $@
+
+BUILT_SOURCES = \
+ dh-marshal.h \
+ dh-marshal.c \
+ $(NULL)
+
+EXTRA_DIST = \
+ dh-marshal.list \
+ $(NULL)
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DDATADIR=\""$(datadir)"\" \
-DG_LOG_DOMAIN=\"Devhelp\" \
@@ -81,6 +94,8 @@ libdevhelp_1_la_LIBADD = \
libdevhelp_1_la_LDFLAGS = \
-no-undefined \
+ -version-info ${LIBDEVHELP_CURRENT}:${LIBDEVHELP_REVISION}:${LIBDEVHELP_AGE} \
+ -export-symbols-regex ^dh_ \
$(ZLIB_LDFLAGS)
if HAVE_PLATFORM_OSX
@@ -91,7 +106,3 @@ if HAVE_PLATFORM_X11
conf_platform_sources = ige-conf-gconf.c
endif
-MARSHAL=dh
-
-GI18N_CHECK_LIB_FILES = $(libdevhelp_1_la_SOURCES) $(devhelpinclude_HEADERS)
-GI18N_CHECK_APP_FILES = $(devhelp_SOURCES)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]