Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] Re: (PR#9393) error in ./configure after ./autogen.sh
Home

[Freeciv-Dev] Re: (PR#9393) error in ./configure after ./autogen.sh

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9393) error in ./configure after ./autogen.sh
From: "Jason Dorje Short" <jdorje@xxxxxxxxxxx>
Date: Thu, 15 Jul 2004 08:07:45 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9393 >

Mateusz Stefek wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9393 >
> 
> 
> ./configure: line 6880: syntax error near unexpected token  
> `HAVE_LIBX11,'
> ./configure: line 6880: `    AH_TEMPLATE(HAVE_LIBX11, Define if the X11  
> lib is available)'
> 
> 
> This is probably related to PR#9342 which adds xaw-client.m4.
> I am using autoconf 2.13 and automake 1.4-p6

Yes.  I wasn't able to test the change in autoconf2.13 and nobody else 
bothered.

I think this patch should fix it.

jason

Index: m4/x.252
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/x.252,v
retrieving revision 1.2
diff -u -r1.2 x.252
--- m4/x.252    31 Jan 2004 17:49:52 -0000      1.2
+++ m4/x.252    15 Jul 2004 15:06:17 -0000
@@ -54,8 +54,28 @@
     ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
     changequote([, ])dnl
-    AC_DEFINE_UNQUOTED($ac_tr_lib)
-    X_EXTRA_LIBS="-l$1 $X_EXTRA_LIBS"
+
+    # The HAVE_LIBX** values are defined in FC_CHECK_X_LIB, but we need an
+    # AH_TEMPLATE for them so that autoheader will know about them.
+    AH_TEMPLATE([HAVE_LIBX11], [Define if the X11 lib is available])
+    AH_TEMPLATE([HAVE_LIBXEXT], [Define if the Xext lib is available])
+    AH_TEMPLATE([HAVE_LIBXT], [Define if the Xt lib is available])
+    AH_TEMPLATE([HAVE_LIBXMU], [Define if the Xmu lib is available])
+    AH_TEMPLATE([HAVE_LIBXPM], [Define if the Xpm lib is available])
+    AH_TEMPLATE([HAVE_LIBXAW], [Define if the Xaw lib is to be used])
+    AH_TEMPLATE([HAVE_LIBXAW3D], [Define if the Xaw3d lib is to be used])
+    if (test $ac_tr_lib == HAVE_LIBX11     \
+        || test $ac_tr_lib == HAVE_LIBXEXT \
+        || test $ac_tr_lib == HAVE_LIBXT   \
+        || test $ac_tr_lib == HAVE_LIBXMU  \
+        || test $ac_tr_lib == HAVE_LIBXPM  \
+        || test $ac_tr_lib == HAVE_LIBXAW  \
+        || test $ac_tr_lib == HAVE_LIBXAW3D); then
+      AC_DEFINE_UNQUOTED($ac_tr_lib)
+      X_EXTRA_LIBS="-l$1 $X_EXTRA_LIBS"
+    else
+      AC_MSG_ERROR([Invalid define of $ac_tr_lib in $1])
+    fi
    ], [$3])
  else
   AC_MSG_RESULT(no)
Index: m4/xaw-client.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/xaw-client.m4,v
retrieving revision 1.1
diff -u -r1.1 xaw-client.m4
--- m4/xaw-client.m4    13 Jul 2004 15:29:51 -0000      1.1
+++ m4/xaw-client.m4    15 Jul 2004 15:06:17 -0000
@@ -47,30 +47,21 @@
     fi
 
     dnl Checks for X libs:
-    # The HAVE_LIBX** values are defined in FC_CHECK_X_LIB, but we need an
-    # AH_TEMPLATE for them so that autoheader will know about them.
     fc_save_X_LIBS="$X_LIBS"
     X_LIBS="$X_LIBS $X_PRE_LIBS"
-    AH_TEMPLATE([HAVE_LIBX11], [Define if the X11 lib is available])
     FC_CHECK_X_LIB(X11, XOpenDisplay, , haveX11=no)
     if test "x$haveX11" != "xno"; then
-      AH_TEMPLATE([HAVE_LIBXEXT], [Define if the Xext lib is available])
       FC_CHECK_X_LIB(Xext, XShapeCombineMask)
 
       dnl Insert X_PRE_LIBS (eg -lSM -lICE) into X_EXTRA_LIBS here:
       X_EXTRA_LIBS="$X_PRE_LIBS $X_EXTRA_LIBS"
       X_LIBS="$fc_save_X_LIBS"
 
-      AH_TEMPLATE([HAVE_LIBXT], [Define if the Xt lib is available])
       FC_CHECK_X_LIB(Xt, main)
-      AH_TEMPLATE([HAVE_LIBXMU], [Define if the Xmu lib is available])
       FC_CHECK_X_LIB(Xmu, main)
-      AH_TEMPLATE([HAVE_LIBXPM], [Define if the Xpm lib is available])
       FC_CHECK_X_LIB(Xpm, XpmReadFileToPixmap, , haveXpm=no)
       if test "x$haveXpm" != "xno"; then
        dnl Xaw or Xaw3d:
-        AH_TEMPLATE([HAVE_LIBXAW], [Define if the Xaw lib is to be used])
-        AH_TEMPLATE([HAVE_LIBXAW3D], [Define if the Xaw3d lib is to be used])
        if test -n "$WITH_XAW3D"; then
          FC_CHECK_X_LIB(Xaw3d, main, , AC_MSG_ERROR(did not find Xaw3d 
library))
        elif test "$client" = "xaw"; then

[Prev in Thread] Current Thread [Next in Thread]