[Freeciv-Dev] (PR#2744) an FC_GTK_CLIENT autoconf macro
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2744) an FC_GTK_CLIENT autoconf macro |
From: |
"Jason Short via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Tue, 7 Jan 2003 02:18:37 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
The attached patch provides a macro FC_GTK_CLIENT. The primary
advantage is that it removes duplicated autoconf 2.13 and 2.5x code.
I've also put it in what I consider a more readable and useful form.
jason
# Try to configure the GTK+-1.2 client (gui-gtk)
# FC_GTK_CLIENT
# Test for GTK+-1.2 libraries needed for gui-gtk
AC_DEFUN(FC_GTK_CLIENT,
[
if test "$client" = gtk || test "$client" = yes ; then
AM_PATH_GTK(1.2.5,
[
AM_PATH_GDK_IMLIB(1.9.2,
[
CLIENT_CFLAGS="$GDK_IMLIB_CFLAGS"
CLIENT_LIBS="$GDK_IMLIB_LIBS"
],
[
FC_NO_CLIENT([gtk], [Imlib is needed])
])
],
[
FC_NO_CLIENT([gtk], [GTK libraries not found])
])
fi
])
Index: Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/Makefile.am,v
retrieving revision 1.27
diff -u -r1.27 Makefile.am
--- Makefile.am 2002/12/30 19:56:02 1.27
+++ Makefile.am 2003/01/07 10:15:08
@@ -75,6 +75,7 @@
m4/glibc21.m4 \
m4/gtk-2.0.m4 \
m4/gtk.m4 \
+ m4/gtk-client.m4 \
m4/iconv.m4 \
m4/imlib.m4 \
m4/isc-posix.m4 \
Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.32
diff -u -r1.32 configure.ac
--- configure.ac 2002/12/30 19:56:02 1.32
+++ configure.ac 2003/01/07 10:15:08
@@ -311,23 +311,7 @@
fi
dnl Gtk-specific overrides
- if test "$client" = gtk || test "$client" = yes ; then
- AM_PATH_GTK(1.2.5, gtk_found="yes", gtk_found="", imlib_found="")
- if test "x$gtk_found" = "xyes"; then
- AM_PATH_GDK_IMLIB(1.9.2, imlib_found="yes", imlib_found="")
- if test "x$imlib_found" = "xyes"; then
- CLIENT_CFLAGS="$GDK_IMLIB_CFLAGS"
- CLIENT_LIBS="$GDK_IMLIB_LIBS"
- found_client=yes
- fi
- fi
-
- if test "x$found_client" = "xyes"; then
- client=gtk
- elif test "$client" = "gtk"; then
- AC_MSG_ERROR(specified client 'gtk' not configurable)
- fi
- fi
+ FC_GTK_CLIENT
dnl Gtk-2.0-specific overrides
if test "$client" = "gtk-2.0" || test "$client" = yes ; then
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.210
diff -u -r1.210 configure.in
--- configure.in 2002/12/30 19:56:02 1.210
+++ configure.in 2003/01/07 10:15:08
@@ -305,23 +305,7 @@
fi
dnl Gtk-specific overrides
- if test "$client" = gtk || test "$client" = yes ; then
- AM_PATH_GTK(1.2.5, gtk_found="yes", gtk_found="", imlib_found="")
- if test "x$gtk_found" = "xyes"; then
- AM_PATH_GDK_IMLIB(1.9.2, imlib_found="yes", imlib_found="")
- if test "x$imlib_found" = "xyes"; then
- CLIENT_CFLAGS="$GDK_IMLIB_CFLAGS"
- CLIENT_LIBS="$GDK_IMLIB_LIBS"
- found_client=yes
- fi
- fi
-
- if test "x$found_client" = "xyes"; then
- client=gtk
- elif test "$client" = "gtk"; then
- AC_MSG_ERROR(specified client 'gtk' not configurable)
- fi
- fi
+ FC_CLIENT_GTK
dnl Gtk-2.0-specific overrides
if test "$client" = "gtk-2.0" || test "$client" = yes ; then
- [Freeciv-Dev] (PR#2744) an FC_GTK_CLIENT autoconf macro,
Jason Short via RT <=
|
|