[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> |
---|
| 3 | dnl $Id: configure.in,v 1.1.1.1 2000-11-12 06:16:40 ghudson Exp $ |
---|
| 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 | |
---|
| 21 | AC_REVISION($Revision: 1.1.1.1 $) |
---|
| 22 | |
---|
| 23 | AC_INIT(rep-gtk.h) |
---|
| 24 | AC_CONFIG_HEADER(config.h) |
---|
| 25 | |
---|
| 26 | dnl Release versioning info |
---|
| 27 | version="0.14" |
---|
| 28 | |
---|
| 29 | OUT="gtk/types.la gtk/gtk.la" |
---|
| 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 |
---|
| 54 | AM_PATH_GLIB |
---|
| 55 | |
---|
| 56 | dnl Check for GTK |
---|
| 57 | AM_PATH_GTK(1.2.0,,AC_ERROR(need at least Gtk+ version 1.2)) |
---|
| 58 | |
---|
| 59 | dnl Check for libgnome |
---|
| 60 | AC_MSG_CHECKING([for GNOME libs]) |
---|
| 61 | AC_ARG_WITH(gnome, |
---|
| 62 | [ --with-gnome Build GNOME wrappers |
---|
| 63 | --without-gnome Don't wrap GNOME], [], [with_gnome=maybe]) |
---|
| 64 | if 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 |
---|
| 78 | fi |
---|
| 79 | AC_SUBST(GNOME_VERSION) |
---|
| 80 | AC_SUBST(GNOME_LIBS) |
---|
| 81 | AC_SUBST(GNOMEUI_LIBS) |
---|
| 82 | AC_SUBST(GNOME_CFLAGS) |
---|
| 83 | |
---|
| 84 | dnl Check for libglade |
---|
| 85 | AC_ARG_WITH(libglade, |
---|
| 86 | [ --with-libglade Build libglade wrappers (dynamic GUI builder) |
---|
| 87 | --without-libglade Don't wrap libglade], [], [with_libglade=yes]) |
---|
| 88 | if test "$with_libglade" = "yes"; then |
---|
| 89 | AM_PATH_LIBGLADE([OUT="$OUT gtk/libglade.la"]) |
---|
| 90 | fi |
---|
| 91 | |
---|
| 92 | if 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 |
---|
| 112 | fi |
---|
| 113 | |
---|
| 114 | AC_ARG_WITH(gdk-pixbuf, |
---|
| 115 | [ --with-gdk-pixbuf Build gdk-pixbuf wrappers], |
---|
| 116 | [], [with_gdk_pixbuf=maybe]) |
---|
| 117 | if 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]) |
---|
| 121 | fi |
---|
| 122 | |
---|
| 123 | if 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 |
---|
| 140 | fi |
---|
| 141 | AC_SUBST(GNOME_CANVAS_PIXBUF_VERSION) |
---|
| 142 | AC_SUBST(GNOME_CANVAS_PIXBUF_LIBS) |
---|
| 143 | AC_SUBST(GNOME_CANVAS_PIXBUF_CFLAGS) |
---|
| 144 | |
---|
| 145 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
| 146 | AC_C_CONST |
---|
| 147 | AC_C_INLINE |
---|
| 148 | AC_TYPE_SIZE_T |
---|
| 149 | |
---|
| 150 | dnl Check for cutting edge Gtk functions |
---|
| 151 | saved_LIBS="$LIBS" |
---|
| 152 | LIBS="$GTK_LIBS $saved_LIBS" |
---|
| 153 | AC_CHECK_FUNCS(gdk_color_copy gtk_widget_peek_colormap gtk_type_get_info gtk_signal_set_class_function_full) |
---|
| 154 | LIBS="$saved_LIBS" |
---|
| 155 | |
---|
| 156 | dnl locale checks |
---|
| 157 | AC_CHECK_FUNCS(setlocale) |
---|
| 158 | AC_CHECK_HEADERS(locale.h) |
---|
| 159 | |
---|
| 160 | dnl Nonstandard exported symbols |
---|
| 161 | AC_SUBST(version) |
---|
| 162 | AC_SUBST(repexecdir) |
---|
| 163 | AC_SUBST(CPPFLAGS) |
---|
| 164 | AC_SUBST(CFLAGS) |
---|
| 165 | AC_SUBST(LIBS) |
---|
| 166 | |
---|
| 167 | AC_DEFINE_UNQUOTED(REP_GTK_VERSION, "${version}") |
---|
| 168 | |
---|
| 169 | AC_OUTPUT(Makefile rep-gtk.spec) |
---|
| 170 | |
---|
| 171 | dnl Local variables: |
---|
| 172 | dnl major-mode: sh-mode |
---|
| 173 | dnl End: |
---|