1. Why do you include AM_PATH_GLIB in wiretap/acinclude.m4? It's
customary for acinclude.m4 to contain local macros and for
aclocal.m4 to contain acinclude.m4 and 3rd-party macros. Is
the version of AM_PATH_GLIB in wiretap/acinclude.m4 different
from that distributed in the glib tarball?
2. Any reason not to use the ACTION-IF-NOT-FOUND part of the
AC_CHECK_FUNC macro (patch below)?
3. "config.h" should be included before any other headers (patches
below to gtk/gtkclist.c, wiretap/ascend-grammar.y,
wiretap/ascend-scanner.l).
--
albert chin (china@xxxxxxxxxxxxxxxxxx)
-- snip snip
--- acinclude.m4.orig Mon Aug 20 05:58:16 2001
+++ acinclude.m4 Mon Aug 20 05:58:53 2001
@@ -209,10 +209,8 @@
# needs -lnsl.
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@xxxxxxxxx.
- AC_CHECK_FUNC(gethostbyname)
- if test $ac_cv_func_gethostbyname = no; then
- AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl")
- fi
+ AC_CHECK_FUNC(gethostbyname, ,
+ AC_CHECK_LIB(nsl, gethostbyname, NSL_LIBS="-lnsl"))
AC_SUBST(NSL_LIBS)
])
@@ -239,11 +237,9 @@
# gethostby* variants that don't use the nameserver (or something).
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
- AC_CHECK_FUNC(connect)
- if test $ac_cv_func_connect = no; then
+ AC_CHECK_FUNC(connect, ,
AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket",
- AC_MSG_ERROR(Function 'socket' not found.), $NSL_LIBS)
- fi
+ AC_MSG_ERROR(Function 'socket' not found.), $NSL_LIBS))
AC_SUBST(SOCKET_LIBS)
])
--- gtk/gtkclist.c.orig Sun Aug 19 18:51:49 2001
+++ gtk/gtkclist.c Sun Aug 19 18:51:55 2001
@@ -25,9 +25,9 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include "config.h"
#include <stdlib.h>
#include <string.h>
-#include "config.h"
#include <gtk/gtkmain.h>
#include "gtkclist.h"
#include <gtk/gtkbindings.h>
--- wiretap/ascend-grammar.y.orig Sun Aug 19 19:08:55 2001
+++ wiretap/ascend-grammar.y Sun Aug 19 19:10:16 2001
@@ -67,12 +67,13 @@
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
#include "wtap-int.h"
#include "buffer.h"
#include "ascend.h"
--- wiretap/ascend-scanner.l.orig Sun Aug 19 19:08:46 2001
+++ wiretap/ascend-scanner.l Sun Aug 19 19:09:15 2001
@@ -22,13 +22,13 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_IO_H
#include <io.h> /* for isatty() on win32 */