[15285] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
| 2 | dnl Copyright (C) 1998 John Harper <john@dcs.warwick.ac.uk> |
---|
[18403] | 3 | dnl $Id: configure.in,v 1.1.1.3 2003-01-05 00:30:19 ghudson Exp $ |
---|
[15285] | 4 | dnl |
---|
| 5 | dnl This file is part of Jade. |
---|
| 6 | dnl |
---|
| 7 | dnl Jade is free software; you can redistribute it and/or modify it |
---|
| 8 | dnl under the terms of the GNU General Public License as published by |
---|
| 9 | dnl the Free Software Foundation; either version 2, or (at your option) |
---|
| 10 | dnl any later version. |
---|
| 11 | dnl |
---|
| 12 | dnl Jade is distributed in the hope that it will be useful, but |
---|
| 13 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 15 | dnl GNU General Public License for more details. |
---|
| 16 | dnl |
---|
| 17 | dnl You should have received a copy of the GNU General Public License |
---|
| 18 | dnl along with Jade; see the file COPYING. If not, write to |
---|
| 19 | dnl the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 20 | |
---|
[18403] | 21 | AC_REVISION($Revision: 1.1.1.3 $) |
---|
[15285] | 22 | |
---|
| 23 | AC_INIT(rep-gtk.h) |
---|
| 24 | AC_CONFIG_HEADER(config.h) |
---|
| 25 | |
---|
| 26 | dnl Release versioning info |
---|
[18403] | 27 | version="0.17" |
---|
[15285] | 28 | |
---|
[18403] | 29 | OUT="gtk-2/types.la gtk-2/gtk.la" |
---|
[15285] | 30 | AC_SUBST(OUT) |
---|
| 31 | |
---|
| 32 | dnl Find the system type; this isn't crucial |
---|
| 33 | AC_CANONICAL_HOST |
---|
| 34 | |
---|
| 35 | dnl Checks for programs. |
---|
| 36 | AC_PROG_CC |
---|
| 37 | AC_PROG_CPP |
---|
| 38 | AC_PROG_INSTALL |
---|
| 39 | AC_PROG_LN_S |
---|
| 40 | AC_PROG_MAKE_SET |
---|
| 41 | AC_PROG_GCC_TRADITIONAL |
---|
| 42 | |
---|
| 43 | dnl If using GCC and it doesn't look as though the cflags have been |
---|
| 44 | dnl set explicitly, add some warning options. Turn off implicit-int |
---|
| 45 | dnl warnings since the X11 includes on Solaris generate a lot of these |
---|
| 46 | if test "x${GCC}" = "xyes" -a "x$CFLAGS" = "x-g -O2"; then |
---|
| 47 | CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes -Wno-implicit-int" |
---|
| 48 | fi |
---|
| 49 | |
---|
| 50 | dnl Check for librep |
---|
| 51 | AM_PATH_REP(0.13) |
---|
| 52 | |
---|
| 53 | dnl Check for glib |
---|
[18403] | 54 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3) |
---|
[15285] | 55 | |
---|
| 56 | dnl Check for GTK |
---|
[18403] | 57 | PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.3,,AC_ERROR(need at least Gtk+ version 1.3)) |
---|
[15285] | 58 | |
---|
[18403] | 59 | PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 1.3.11) |
---|
| 60 | |
---|
[15285] | 61 | dnl Check for libgnome |
---|
| 62 | AC_MSG_CHECKING([for GNOME libs]) |
---|
| 63 | AC_ARG_WITH(gnome, |
---|
| 64 | [ --with-gnome Build GNOME wrappers |
---|
[18403] | 65 | --without-gnome Don't wrap GNOME], [], [with_gnome=no]) |
---|
[15285] | 66 | if test "$with_gnome" != "no"; then |
---|
[18403] | 67 | GNOME_VERSION="`pkg-config --modversion libgnome-2.0`" |
---|
[15285] | 68 | if test $? -eq 0; then |
---|
[18403] | 69 | dnl XXX FIXME properly |
---|
| 70 | GNOME_LIBS="`pkg-config --libs libgnome-2.0`" |
---|
| 71 | GNOME_CFLAGS="`pkg-config --cflags libgnome-2.0`" |
---|
| 72 | GNOMEUI_LIBS="`pkg-config --libs libgnomeui-2.0`" |
---|
| 73 | GNOMEUI_CFLAGS="`pkg-config --cflags libgnomeui-2.0`" |
---|
| 74 | GNOME_CANVAS_LIBS="`pkg-config --libs libgnomecanvas-2.0`" |
---|
| 75 | GNOME_CANVAS_CFLAGS="`pkg-config --cflags libgnomecanvas-2.0`" |
---|
[15285] | 76 | AC_MSG_RESULT([$GNOME_VERSION]) |
---|
[18403] | 77 | OUT="$OUT gtk-2/gnome-lib.la gtk-2/gnome-ui.la gtk-2/gnome-canvas.la" |
---|
[15285] | 78 | with_gnome=yes |
---|
| 79 | elif test "$with_gnome" = "yes"; then |
---|
[18403] | 80 | AC_MSG_ERROR([can't run pkg-config]); |
---|
[15285] | 81 | else |
---|
| 82 | with_gnome=no |
---|
| 83 | fi |
---|
| 84 | fi |
---|
| 85 | AC_SUBST(GNOME_VERSION) |
---|
| 86 | AC_SUBST(GNOME_LIBS) |
---|
| 87 | AC_SUBST(GNOME_CFLAGS) |
---|
[18403] | 88 | AC_SUBST(GNOMEUI_LIBS) |
---|
| 89 | AC_SUBST(GNOMEUI_CFLAGS) |
---|
| 90 | AC_SUBST(GNOME_CANVAS_LIBS) |
---|
| 91 | AC_SUBST(GNOME_CANVAS_CFLAGS) |
---|
[15285] | 92 | |
---|
| 93 | dnl Check for libglade |
---|
| 94 | AC_ARG_WITH(libglade, |
---|
| 95 | [ --with-libglade Build libglade wrappers (dynamic GUI builder) |
---|
| 96 | --without-libglade Don't wrap libglade], [], [with_libglade=yes]) |
---|
| 97 | if test "$with_libglade" = "yes"; then |
---|
[18403] | 98 | PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 1.99, |
---|
| 99 | [OUT="$OUT gtk-2/libglade.la"]) |
---|
[15285] | 100 | fi |
---|
| 101 | |
---|
| 102 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
| 103 | AC_C_CONST |
---|
| 104 | AC_C_INLINE |
---|
| 105 | AC_TYPE_SIZE_T |
---|
| 106 | |
---|
| 107 | dnl Check for cutting edge Gtk functions |
---|
| 108 | saved_LIBS="$LIBS" |
---|
| 109 | LIBS="$GTK_LIBS $saved_LIBS" |
---|
| 110 | AC_CHECK_FUNCS(gdk_color_copy gtk_widget_peek_colormap gtk_type_get_info gtk_signal_set_class_function_full) |
---|
| 111 | LIBS="$saved_LIBS" |
---|
| 112 | |
---|
| 113 | dnl locale checks |
---|
| 114 | AC_CHECK_FUNCS(setlocale) |
---|
| 115 | AC_CHECK_HEADERS(locale.h) |
---|
| 116 | |
---|
| 117 | dnl Nonstandard exported symbols |
---|
| 118 | AC_SUBST(version) |
---|
| 119 | AC_SUBST(repexecdir) |
---|
| 120 | AC_SUBST(CPPFLAGS) |
---|
| 121 | AC_SUBST(CFLAGS) |
---|
| 122 | AC_SUBST(LIBS) |
---|
| 123 | |
---|
| 124 | AC_DEFINE_UNQUOTED(REP_GTK_VERSION, "${version}") |
---|
| 125 | |
---|
| 126 | AC_OUTPUT(Makefile rep-gtk.spec) |
---|
| 127 | |
---|
| 128 | dnl Local variables: |
---|
| 129 | dnl major-mode: sh-mode |
---|
| 130 | dnl End: |
---|