[PATCH] 2 glib patches for auto*/Makefile



Hija,

Just stumbled about a quite some warning spew of make and automake while
trying my new toolchain here which includes autoconf 2.13 and automake
1.5.

The first patch shuts up the correct automake warnings for trying to
do += assignment on first use of variables and the incorrect use
of STRIP_BEGIN/STRIP_END on sources in Makefile.am.

2002-03-23  Daniel Egger  <degger fhm edu>

        * Makefile.am: Remove incorrect use of STRIP* macros for 
        sourcefiles and don't use += for first time assignments 
        of variables.


The second patch removes the deprecated acconfig.in file by using
the enhanced AC_DEFINE and AC_DEFINE_UNQUOTED macros of autoconf
in configure.in and acinclude.m4.

2002-03-23  Daniel Egger  <degger fhm edu>

        * acconfig.h: Remove deprecated file.
        * configure.in
        * acinclude.m4: Use the 3 argument form of AC_DEFINE
        and AC_DEFINE_UNQUOTED to define config.h templates.


Both changes were tested on:
x86 with automake (GNU automake) 1.4-p5, autoconf (GNU Autoconf) 2.52
and GNU Make version 3.79.1
ppc with automake (GNU automake) 1.5, autoconf (GNU Autoconf) 2.53
and GNU Make version 3.79.1

Ok to commit and to which branches?

-- 
Servus,
       Daniel
--- ../../glib-test/gobject/Makefile.am	Sat Mar 23 12:12:41 2002
+++ Makefile.am	Sat Mar 23 12:29:47 2002
@@ -62,7 +62,7 @@
 # setup source file variables
 #
 # GObject library header files for public installation (non-generated)
-gobject_public_h_sources = @STRIP_BEGIN@ \
+gobject_public_h_sources =	\
 	gboxed.h		\
 	gclosure.h		\
 	genums.h		\
@@ -78,13 +78,13 @@
 	gvaluearray.h		\
 	gvaluecollector.h	\
 	gvaluetypes.h		\
-	gobjectnotifyqueue.c	\
- STRIP_END@
+	gobjectnotifyqueue.c
+
 # GObject library header files that don't get installed
 gobject_private_h_sources = @STRIP_BEGIN@ \
 @STRIP_END@
 # GObject library C sources to build the library from
-gobject_c_sources = @STRIP_BEGIN@ \
+gobject_c_sources =		\
 	gboxed.c		\
 	gclosure.c		\
 	genums.c		\
@@ -99,8 +99,7 @@
 	gvalue.c		\
 	gvaluearray.c		\
 	gvaluetransform.c	\
-	gvaluetypes.c		\
- STRIP_END@
+	gvaluetypes.c
 
 # we use our own built_sources variable rules to avoid automake's
 # BUILT_SOURCES oddities
@@ -132,9 +131,9 @@
 #
 gobject_target_headers = $(gobject_public_h_sources) $(gobject_built_public_sources)
 gobject_target_sources = $(gobject_c_sources)
-MAINTAINERCLEANFILES += $(gobject_built_sources)
-EXTRA_HEADERS +=
-EXTRA_DIST += $(gobject_private_h_sources) $(gobject_extra_sources)
+MAINTAINERCLEANFILES = $(gobject_built_sources)
+EXTRA_HEADERS =
+EXTRA_DIST = $(gobject_private_h_sources) $(gobject_extra_sources)
 EXTRA_DIST += $(gobject_built_sources)
 
 #
@@ -142,7 +141,7 @@
 #
 # setup autogeneration dependancies
 gen_sources = xgen-gmh xgen-gmc xgen-gms
-CLEANFILES += $(gen_sources)
+CLEANFILES = $(gen_sources)
 
 $(libgobject_2_0_la_OBJECTS): $(gobject_built_sources)  ${gobject_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
 # initial creation of the real stamp-* files
diff -ur ../glib-test/acinclude.m4 ./acinclude.m4
--- ../glib-test/acinclude.m4	Sat Mar 23 12:12:41 2002
+++ ./acinclude.m4	Sat Mar 23 12:44:56 2002
@@ -58,7 +58,7 @@
 
 	  if test "$gt_cv_func_dgettext_libc" = "yes" \
 	    || test "$gt_cv_func_dgettext_libintl" = "yes"; then
-	    AC_DEFINE(HAVE_GETTEXT)
+	    AC_DEFINE(HAVE_GETTEXT, 1, [Define to use the gettext applications])
 	    AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  	      [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 	    if test "$MSGFMT" != "no"; then
@@ -92,7 +92,7 @@
     fi
 
     if test "$nls_cv_use_gnu_gettext" != "yes"; then
-      AC_DEFINE(ENABLE_NLS)
+      AC_DEFINE(ENABLE_NLS, 1, [Define to use internationalisation])
     else
       dnl Unset this variable since we use the non-zero value as a flag.
       CATOBJEXT=
diff -ur ../glib-test/configure.in ./configure.in
--- ../glib-test/configure.in	Sat Mar 23 12:12:41 2002
+++ ./configure.in	Sat Mar 23 12:45:57 2002
@@ -284,12 +284,14 @@
 
 GETTEXT_PACKAGE=glib20
 AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", 
+  [Define the gettext package to be used])
 
 # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
 # this is the directory where the *.{mo,gmo} files are installed
 GLIB_LOCALE_DIR="${prefix}/${DATADIRNAME}/locale"
-AC_DEFINE_UNQUOTED(GLIB_LOCALE_DIR,"$GLIB_LOCALE_DIR")
+AC_DEFINE_UNQUOTED(GLIB_LOCALE_DIR, "$GLIB_LOCALE_DIR", 
+  [Define the location where the catalogs will be installed])
 
 AC_CHECK_FUNCS(bind_textdomain_codeset)
 
@@ -431,7 +433,8 @@
     my_free_p = 0;
     my_realloc_p = 0;
   ],
-    AC_DEFINE(SANE_MALLOC_PROTOS)
+    AC_DEFINE(SANE_MALLOC_PROTOS, 1, 
+      [Define if you have correct malloc prototypes])
     SANE_MALLOC_PROTOS=yes)
 fi
 AC_MSG_RESULT($SANE_MALLOC_PROTOS)
@@ -1561,11 +1564,11 @@
 case $with_libiconv in
   gnu)
     ICONV_LIBS="-liconv"
-    AC_DEFINE(USE_LIBICONV_GNU, [Using GNU libiconv])
+    AC_DEFINE(USE_LIBICONV_GNU, 1, [Using GNU libiconv])
     ;;
   native)
     ICONV_LIBS="-liconv"
-    AC_DEFINE(USE_LIBICONV_NATIVE, [Using a native implementation of iconv in a separate library])
+    AC_DEFINE(USE_LIBICONV_NATIVE, 1, [Using a native implementation of iconv in a separate library])
     ;;
 esac
 AC_SUBST(ICONV_LIBS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]