From fab889b14d4c71cc3d45aee2f610fdad0aa16ab1 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 7 Jun 2001 16:39:54 +0000 Subject: [PATCH] subst GLIB_GENMARSHAL, GOBJECT_QUERY, GLIB_MKENUMS variables 2001-06-07 Havoc Pennington * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, GLIB_MKENUMS variables * gmodule-2.0.pc.in: add gmodule_supported variable * glib-2.0.pc.in: add glib_genmarshal, gobject_query, glib_mkenums variables * configure.in: put G_MODULE_SUPPORTED value into .pc files * autogen.sh: support AUTOGEN_SUBDIR_MODE * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the other libs * configure.in: use AM_PATH_GLIB_2_0 * autogen.sh: support AUTOGEN_SUBDIR_MODE * Makefile.am: dist the .pc.in files 2001-06-07 Havoc Pennington * atk/Makefile.am: use @GLIB_GENMARSHAL@ so we can use uninstalled glib-genmarshal * configure.in: rearrange the library checks to support uninstalled linking * autogen.sh: add support for AUTOGEN_SUBDIR_MODE * atk-uninstalled.pc.in: new file, allows linking to uninstalled ATK in giant GTK tarball 2001-06-07 Havoc Pennington * tests/Makefile.am: add missing -I flag * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc. * configure.in: use pkg-config to see if GModule is supported; fix to properly turn on included loaders when GModule isn't supported; don't use AC_CHECK_LIB when libs are not installed yet * autogen.sh: add support for AUTOGEN_SUBDIR_MODE * Makefile.am (SUBDIRS): add m4macros subdir * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in dependencies also. --- ChangeLog | 17 ++++++++++++ ChangeLog.pre-2-0 | 17 ++++++++++++ ChangeLog.pre-2-10 | 17 ++++++++++++ ChangeLog.pre-2-12 | 17 ++++++++++++ ChangeLog.pre-2-2 | 17 ++++++++++++ ChangeLog.pre-2-4 | 17 ++++++++++++ ChangeLog.pre-2-6 | 17 ++++++++++++ ChangeLog.pre-2-8 | 17 ++++++++++++ Makefile.am | 4 +++ autogen.sh | 16 +++++++----- configure.in | 10 ++++++- docs/reference/glib/tmpl/macros_misc.sgml | 1 - glib-2.0-uninstalled.pc.in | 9 +++++++ glib-2.0.pc.in | 4 +++ glib/Makefile.am | 4 +++ gmodule-2.0-uninstalled.pc.in | 8 ++++++ gmodule-2.0.pc.in | 2 ++ gobject-2.0-uninstalled.pc.in | 7 +++++ gthread-2.0-uninstalled.pc.in | 6 +++++ m4macros/glib-2.0.m4 | 32 +++++++++++++++++++---- 20 files changed, 226 insertions(+), 13 deletions(-) create mode 100644 glib-2.0-uninstalled.pc.in create mode 100644 gmodule-2.0-uninstalled.pc.in create mode 100644 gobject-2.0-uninstalled.pc.in create mode 100644 gthread-2.0-uninstalled.pc.in diff --git a/ChangeLog b/ChangeLog index 83a31df22..bba287446 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 83a31df22..bba287446 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,20 @@ +2001-06-07 Havoc Pennington + + * m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY, + GLIB_MKENUMS variables + + * gmodule-2.0.pc.in: add gmodule_supported variable + + * glib-2.0.pc.in: add glib_genmarshal, gobject_query, + glib_mkenums variables + + * configure.in: put G_MODULE_SUPPORTED value into + .pc files + + * autogen.sh: support AUTOGEN_SUBDIR_MODE + + * Makefile.am: add -uninstalled.pc.in to EXTRA_DIST + 2001-06-07 Sebastian Wilhelmi * configure.in: Look for nanosleep function. diff --git a/Makefile.am b/Makefile.am index a532aebff..11b4e82d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,10 @@ EXTRA_DIST = \ gobject-2.0.pc.in \ gmodule-2.0.pc.in \ gthread-2.0.pc.in \ + glib-2.0-uninstalled.pc.in \ + gobject-2.0-uninstalled.pc.in \ + gmodule-2.0-uninstalled.pc.in \ + gthread-2.0-uninstalled.pc.in \ gen-unicode-tables.pl # These may be in the builddir too diff --git a/autogen.sh b/autogen.sh index e9ac688c6..cfa06d972 100755 --- a/autogen.sh +++ b/autogen.sh @@ -65,9 +65,11 @@ test $TEST_TYPE $FILE || { exit 1 } -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." +if test -z "$AUTOGEN_SUBDIR_MODE"; then + if test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish " + echo "to pass any to it, please specify them on the $0 command line." + fi fi case $CC in @@ -83,7 +85,9 @@ automake -a $am_opt autoconf cd $ORIGDIR -$srcdir/configure --enable-maintainer-mode "$@" +if test -z "$AUTOGEN_SUBDIR_MODE"; then + $srcdir/configure --enable-maintainer-mode "$@" -echo -echo "Now type 'make' to compile $PROJECT." + echo + echo "Now type 'make' to compile $PROJECT." +fi \ No newline at end of file diff --git a/configure.in b/configure.in index 58c33abda..319372727 100644 --- a/configure.in +++ b/configure.in @@ -806,6 +806,9 @@ fi dnl *** done, have we got an implementation? if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=0 + G_MODULE_SUPPORTED=false +else + G_MODULE_SUPPORTED=true fi AC_MSG_CHECKING(for the suffix of shared libraries) @@ -822,6 +825,7 @@ case "$host_os" in esac AC_MSG_RESULT(.$glib_gmodule_suffix) +AC_SUBST(G_MODULE_SUPPORTED) AC_SUBST(G_MODULE_IMPL) AC_SUBST(G_MODULE_LIBS) AC_SUBST(G_MODULE_LIBS_EXTRA) @@ -2023,10 +2027,14 @@ esac AC_OUTPUT([ glib-2.0.pc -glib-config-2.0 +glib-2.0-uninstalled.pc gmodule-2.0.pc +gmodule-2.0-uninstalled.pc gthread-2.0.pc +gthread-2.0-uninstalled.pc gobject-2.0.pc +gobject-2.0-uninstalled.pc +glib-config-2.0 glib.spec Makefile build/Makefile diff --git a/docs/reference/glib/tmpl/macros_misc.sgml b/docs/reference/glib/tmpl/macros_misc.sgml index cd71ee73b..7b93d0a7e 100644 --- a/docs/reference/glib/tmpl/macros_misc.sgml +++ b/docs/reference/glib/tmpl/macros_misc.sgml @@ -71,7 +71,6 @@ arrays or arrays on the stack. Portable way to copy va_list variables. - @ap1: the va_list variable to place a copy of @ap2 in. @ap2: a va_list. diff --git a/glib-2.0-uninstalled.pc.in b/glib-2.0-uninstalled.pc.in new file mode 100644 index 000000000..f3c808f6f --- /dev/null +++ b/glib-2.0-uninstalled.pc.in @@ -0,0 +1,9 @@ +glib_genmarshal=${pc_top_builddir}/${pcfiledir}/gobject/glib-genmarshal +gobject_query=${pc_top_builddir}/${pcfiledir}/gobject/gobject-query +glib_mkenums=${pc_top_builddir}/${pcfiledir}/@srcdir@/gobject/glib-mkenums + +Name: GLib Uninstalled +Description: C Utility Library, Not Installed +Version: @VERSION@ +Libs: ${pc_top_builddir}/${pcfiledir}/libglib-1.3.la @ICONV_LIBS@ @INTLLIBS@ +Cflags: -I${pc_top_builddir}/${pcfiledir} -I${pc_top_builddir}/${pcfiledir}/@srcdir@ diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in index b615d72a9..7b0d47c1c 100644 --- a/glib-2.0.pc.in +++ b/glib-2.0.pc.in @@ -3,6 +3,10 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +glib_genmarshal=glib-genmarshal +gobject_query=gobject-query +glib_mkenums=glib-mkenums + Name: GLib Description: C Utility Library Version: @VERSION@ diff --git a/glib/Makefile.am b/glib/Makefile.am index a532aebff..11b4e82d0 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -26,6 +26,10 @@ EXTRA_DIST = \ gobject-2.0.pc.in \ gmodule-2.0.pc.in \ gthread-2.0.pc.in \ + glib-2.0-uninstalled.pc.in \ + gobject-2.0-uninstalled.pc.in \ + gmodule-2.0-uninstalled.pc.in \ + gthread-2.0-uninstalled.pc.in \ gen-unicode-tables.pl # These may be in the builddir too diff --git a/gmodule-2.0-uninstalled.pc.in b/gmodule-2.0-uninstalled.pc.in new file mode 100644 index 000000000..a4cd0e8f3 --- /dev/null +++ b/gmodule-2.0-uninstalled.pc.in @@ -0,0 +1,8 @@ +gmodule_supported=@G_MODULE_SUPPORTED@ + +Name: GModule Uninstalled +Description: Dynamic module loader for GLib, Not Installed +Requires: glib-2.0-uninstalled +Version: @VERSION@ +Libs: @G_MODULE_LDFLAGS@ ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-1.3.la @G_MODULE_LIBS@ +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule diff --git a/gmodule-2.0.pc.in b/gmodule-2.0.pc.in index bca8fdea5..113237030 100644 --- a/gmodule-2.0.pc.in +++ b/gmodule-2.0.pc.in @@ -3,6 +3,8 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +gmodule_supported=@G_MODULE_SUPPORTED@ + Name: GModule Description: Dynamic module loader for GLib Requires: glib-2.0 diff --git a/gobject-2.0-uninstalled.pc.in b/gobject-2.0-uninstalled.pc.in new file mode 100644 index 000000000..c00f4604d --- /dev/null +++ b/gobject-2.0-uninstalled.pc.in @@ -0,0 +1,7 @@ +Name: GObject Uninstalled +Description: Object/type system for GLib, Not Installed +Requires: glib-2.0-uninstalled +Version: @VERSION@ +Libs: ${pc_top_builddir}/${pcfiledir}/gobject/libgobject-1.3.la +## cflags contains builddir in addition to srcdir because of gmarshal.h +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir} diff --git a/gthread-2.0-uninstalled.pc.in b/gthread-2.0-uninstalled.pc.in new file mode 100644 index 000000000..a57673a0d --- /dev/null +++ b/gthread-2.0-uninstalled.pc.in @@ -0,0 +1,6 @@ +Name: GThread Uninstalled +Description: Thread support for GLib, Not Installed +Requires: glib-2.0-uninstalled +Version: @VERSION@ +Libs: ${pc_top_builddir}/${pcfiledir}/gthread/libgthread-1.3.la @G_THREAD_LIBS@ +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ diff --git a/m4macros/glib-2.0.m4 b/m4macros/glib-2.0.m4 index 646c7950c..a69cd9c71 100644 --- a/m4macros/glib-2.0.m4 +++ b/m4macros/glib-2.0.m4 @@ -30,22 +30,38 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and ru AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - min_glib_version=ifelse([$1], ,1.3.3,$1) - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) - no_glib="" if test x$PKG_CONFIG != xno ; then - if pkg-config --atleast-pkgconfig-version 0.5 ; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then : else - echo *** pkg-config too old; version 0.5 or better required. + echo *** pkg-config too old; version 0.7 or better required. no_glib=yes PKG_CONFIG=no fi fi + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" + enable_glibtest=no + fi + + min_glib_version=ifelse([$1], ,1.3.3,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then + : + else + no_glib = yes + fi + if test x"$no_glib" = x ; then + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ @@ -178,9 +194,15 @@ main () fi GLIB_CFLAGS="" GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) rm -f conf.glibtest ])