source: trunk/third/rep-gtk/configure.in @ 15765

Revision 15765, 5.3 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15764, which included commits to RCS files with non-trunk default branches.
Line 
1dnl  Process this file with autoconf to produce a configure script.
2dnl  Copyright (C) 1998 John Harper <john@dcs.warwick.ac.uk>
3dnl  $Id: configure.in,v 1.1.1.2 2001-03-13 16:47:31 ghudson Exp $
4dnl
5dnl  This file is part of Jade.
6dnl
7dnl  Jade is free software; you can redistribute it and/or modify it
8dnl  under the terms of the GNU General Public License as published by
9dnl  the Free Software Foundation; either version 2, or (at your option)
10dnl  any later version.
11dnl
12dnl  Jade is distributed in the hope that it will be useful, but
13dnl  WITHOUT ANY WARRANTY; without even the implied warranty of
14dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15dnl  GNU General Public License for more details.
16dnl
17dnl  You should have received a copy of the GNU General Public License
18dnl  along with Jade; see the file COPYING.  If not, write to
19dnl  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21AC_REVISION($Revision: 1.1.1.2 $)
22
23AC_INIT(rep-gtk.h)
24AC_CONFIG_HEADER(config.h)
25
26dnl Release versioning info
27version="0.15"
28
29OUT="gtk/types.la gtk/gtk.la"
30AC_SUBST(OUT)
31
32dnl Find the system type; this isn't crucial
33AC_CANONICAL_HOST
34
35dnl Checks for programs.
36AC_PROG_CC
37AC_PROG_CPP
38AC_PROG_INSTALL
39AC_PROG_LN_S
40AC_PROG_MAKE_SET
41AC_PROG_GCC_TRADITIONAL
42
43dnl If using GCC and it doesn't look as though the cflags have been
44dnl set explicitly, add some warning options. Turn off implicit-int
45dnl warnings since the X11 includes on Solaris generate a lot of these
46if test "x${GCC}" = "xyes" -a "x$CFLAGS" = "x-g -O2"; then
47  CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes -Wno-implicit-int"
48fi
49
50dnl Check for librep
51AM_PATH_REP(0.13)
52
53dnl Check for glib
54AM_PATH_GLIB
55
56dnl Check for GTK
57AM_PATH_GTK(1.2.0,,AC_ERROR(need at least Gtk+ version 1.2))
58
59dnl Check for libgnome
60AC_MSG_CHECKING([for GNOME libs])
61AC_ARG_WITH(gnome,
62 [  --with-gnome            Build GNOME wrappers
63  --without-gnome         Don't wrap GNOME], [], [with_gnome=maybe])
64if test "$with_gnome" != "no"; then
65  GNOME_VERSION="`gnome-config --version`"
66  if test $? -eq 0; then
67    GNOME_LIBS="`gnome-config --libs gnome`"
68    GNOMEUI_LIBS="`gnome-config --libs gnomeui`"
69    GNOME_CFLAGS="`gnome-config --cflags gnomeui`"
70    AC_MSG_RESULT([$GNOME_VERSION])
71    OUT="$OUT gnome/lib.la gnome/ui.la gnome/canvas.la"
72    with_gnome=yes
73  elif test "$with_gnome" = "yes"; then
74    AC_MSG_ERROR([can't run gnome-config]);
75  else
76    with_gnome=no
77  fi
78fi
79AC_SUBST(GNOME_VERSION)
80AC_SUBST(GNOME_LIBS)
81AC_SUBST(GNOMEUI_LIBS)
82AC_SUBST(GNOME_CFLAGS)
83
84dnl Check for libglade
85AC_ARG_WITH(libglade,
86 [  --with-libglade         Build libglade wrappers (dynamic GUI builder)
87  --without-libglade      Don't wrap libglade], [], [with_libglade=yes])
88if test "$with_libglade" = "yes"; then
89  AM_PATH_LIBGLADE([OUT="$OUT gtk/libglade.la"])
90fi
91
92if test "$with_libglade" = "yes" -a "$with_gnome" = "yes"; then
93  AC_MSG_CHECKING([for libglade GNOME support])
94  if $LIBGLADE_CONFIG --check gnome; then
95    AC_MSG_RESULT(yes)
96    GNOME_LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags gnome`
97    GNOME_LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs gnome`
98    AC_SUBST(GNOME_LIBGLADE_LIBS)
99    AC_SUBST(GNOME_LIBGLADE_CFLAGS)
100    AC_MSG_CHECKING([whether <glade/glade-xml.h> has "txtdomain" field])
101    _cppflags=${CPPFLAGS}
102    CPPFLAGS="${CPPFLAGS} ${LIBGLADE_CFLAGS}"
103    AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
104                    [AC_MSG_RESULT(yes)
105                     AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
106                    [AC_MSG_RESULT(no)])
107    CPPFLAGS="${_cppflags}"
108    OUT="$OUT gnome/libglade.la"
109  else
110    AC_MSG_ERROR([libglade wasn't compiled with GNOME support])
111  fi
112fi
113
114AC_ARG_WITH(gdk-pixbuf,
115 [  --with-gdk-pixbuf     Build gdk-pixbuf wrappers],
116 [], [with_gdk_pixbuf=maybe])
117if test "$with_gdk_pixbuf" != "no"; then
118  AM_PATH_GDK_PIXBUF(,
119    [with_gdk_pixbuf="yes"; OUT="$OUT gtk/gdk-pixbuf.la"],
120    [with_gdk_pixbuf=no])
121fi
122
123if test "$with_gdk_pixbuf" = "yes" -a "$with_gnome" = "yes"; then
124  AC_MSG_CHECKING([for GNOME canvas pixbuf support])
125  AC_ARG_WITH(gnome-canvas-pixbuf,
126   [  --with-gnome-canvas-pixbuf
127  --without-gnome-canvas-pixbuf],
128   [], [with_gnome_canvas_pixbuf=maybe])
129  if test "$with_gnome_canvas_pixbuf" != "no"; then
130    GNOME_CANVAS_PIXBUF_VERSION="`gnome-config --modversion gnomecanvaspixbuf`"
131    if test $? -eq 0; then
132      GNOME_CANVAS_PIXBUF_LIBS="`gnome-config --libs gnomecanvaspixbuf`"
133      GNOME_CANVAS_PIXBUF_CFLAGS="`gnome-config --cflags gnomecanvaspixbuf`"
134      AC_MSG_RESULT([$GNOME_CANVAS_PIXBUF_VERSION])
135      OUT="$OUT gnome/canvas-pixbuf.la"
136    elif test "$with_gnome_canvas_pixbuf" = "yes"; then
137      AC_MSG_ERROR([can't run gnome-config]);
138    fi
139  fi
140fi
141AC_SUBST(GNOME_CANVAS_PIXBUF_VERSION)
142AC_SUBST(GNOME_CANVAS_PIXBUF_LIBS)
143AC_SUBST(GNOME_CANVAS_PIXBUF_CFLAGS)
144
145dnl Checks for typedefs, structures, and compiler characteristics.
146AC_C_CONST
147AC_C_INLINE
148AC_TYPE_SIZE_T
149
150dnl Check for cutting edge Gtk functions
151saved_LIBS="$LIBS"
152LIBS="$GTK_LIBS $saved_LIBS"
153AC_CHECK_FUNCS(gdk_color_copy gtk_widget_peek_colormap gtk_type_get_info gtk_signal_set_class_function_full)
154LIBS="$saved_LIBS"
155
156dnl locale checks
157AC_CHECK_FUNCS(setlocale)
158AC_CHECK_HEADERS(locale.h)
159
160dnl Nonstandard exported symbols
161AC_SUBST(version)
162AC_SUBST(repexecdir)
163AC_SUBST(CPPFLAGS)
164AC_SUBST(CFLAGS)
165AC_SUBST(LIBS)
166
167AC_DEFINE_UNQUOTED(REP_GTK_VERSION, "${version}")
168
169AC_OUTPUT(Makefile rep-gtk.spec)
170
171dnl Local variables:
172dnl major-mode: sh-mode
173dnl End:
Note: See TracBrowser for help on using the repository browser.