File: configure.in

package info (click to toggle)
guile-gtk-1.2 0.31-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,544 kB
  • ctags: 2,413
  • sloc: sh: 11,073; ansic: 3,380; lisp: 1,058; makefile: 106
file content (64 lines) | stat: -rw-r--r-- 1,865 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dnl Process this file with autoconf to produce configure.
AC_INIT(guile-gtk.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(guile-gtk-1.2, 0.31)

AC_PROG_CC
AM_PROG_LIBTOOL
AC_PROG_CPP

AM_PATH_GTK(1.2.0,,AC_ERROR(need at least Gtk+ version 1.2), gthread)

# XXX - gtk_config_*_version leaks from AM_PATH_GTK.

if test ! $gtk_config_major_version = 1 ||
   test $gtk_config_minor_version -lt 2; then
  AC_MSG_ERROR([This package needs gtk-1.2 but we found gtk-$gtk_config_major_version.$gtk_config_minor_version])
fi

GUILE_FLAGS

AC_MSG_CHECKING(whether we have at least Guile 1.5.1)
if test "`guile -c '(display (string>=? (version) "1.4.1"))'`" != "#t"; then
  AC_MSG_ERROR([Your Guile is too old.  You need Guile at least 1.5.1]) 
  else
  AC_MSG_RESULT(found)
fi

AC_CACHE_CHECK([for thread_create in GThreadFunctions],
	       ac_cv_struct_thread_create,
               [saved_CFLAGS="$CFLAGS"
		saved_LIBS="$LIBS"
		CFLAGS="$CFLAGS $GTK_CFLAGS"
		LIBS="$LIB $GTK_LIBS"
		AC_TRY_COMPILE([#include <glib.h>],
                               [GThreadFunctions g; g.thread_create;],
			       ac_cv_struct_thread_create=yes,
			       ac_cv_struct_thread_create=no)
		CFLAGS="$saved_CFLAGS"
		LIBS="$saved_LIBS"])
if test $ac_cv_struct_thread_create = yes; then
  AC_DEFINE(HAVE_THREAD_CREATE, 1,
            [Define when you have the thread_create slot in GThreadFunctions])
fi

saved_LIBS="$LIBS"
saved_CPPFLAGS="$CPPFLAGS"

# Check for bleeding edge Guile functions
LIBS="$GUILE_LDFLAGS $LIBS"
CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"

# none to check for

# Check for cutting edge Gtk functions
LIBS="$GTK_LIBS $saved_LIBS"
AC_CHECK_FUNCS(gtk_widget_peek_colormap gtk_type_get_info gtk_signal_set_class_function_full)

LIBS="$saved_LIBS"

AC_OUTPUT(Makefile
          gtk/Makefile
          gtk-1.2/Makefile
          examples/Makefile
          gtk-1.2/config.scm)