File: configure.in

package info (click to toggle)
gtkgo 0.0.10-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,836 kB
  • ctags: 617
  • sloc: ansic: 8,552; sh: 327; makefile: 221
file content (93 lines) | stat: -rw-r--r-- 2,301 bytes parent folder | download | duplicates (3)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
dnl Process this file with autoconf to produce a configure script.

AC_INIT(src)
AM_INIT_AUTOMAKE(gtkgo, 0.0.10)

AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S

missing=""
AC_CHECK_LIB(m, pow)
AC_PATH_PROG(sedpath, sed)
if test "_$sedpath" = _; then
  AC_MSG_ERROR("Cannot find sed: I need it\!")
fi
AM_PATH_GTK(1.2.0, , missing="${missing} gtk+")
AC_CHECK_LIB(gdk_imlib,gdk_imlib_load_image,,missing="${missing} imlib",[
	$GTK_LIBS])
AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_STRUCT_TM

if test "x${missing}" != x; then
  echo
  for missing_pkg in ${missing}; do
    echo "Can't find libraries (or headers) of \"${missing_pkg}\"."
    case "$missing_pkg" in
      gtk+)  echo "  Fetch it from <URL:ftp://ftp.gtk.org/>"
	;;
      imlib) echo "  Fetch it from <URL:http://www.labs.redhat.com/imlib/>"
	;;
    esac
  done
  AC_MSG_ERROR(Can't find all necessary libraries / headers)
fi

AC_ARG_ENABLE(gnome,
[  --disable-gnome         disable use of gnome],
        gnome=$enableval, gnome=yes)

AM_CONDITIONAL(USE_GNOME, test "x$gnome" = "xyes")

dnl
dnl I ripped the next test from X-Chat 0.9.4
dnl

if test "$gnome" = yes; then
  AC_PATH_PROG(gnomepath, gnome-config)
  AC_MSG_CHECKING(for Gnome compile flags)
  GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null`
  GNOME_VER=`$gnomepath --version |$sedpath 's/gnome-libs //'`
  GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([[0-9]*]*\).\([[0-9]*]*\).\([[0-9]*]*\)/\1/'`
  if test "_$GNOME_MAJOR" = "_0"; then
    gnome=no
    AC_MSG_RESULT([old Gnome found, building without it.])
    LIBS="$LIBS $GTK_LIBS"
    CFLAGS="$CFLAGS $GTK_CFLAGS"
  else
    if test "_$GNOME_CFLAGS" = _ ; then
      gnome=no
      AC_MSG_RESULT([not found, building without Gnome.])
      LIBS="$LIBS $GTK_LIBS"
      CFLAGS="$CFLAGS $GTK_CFLAGS"
    else
      AC_MSG_RESULT(ok)
      LIBS="$LIBS `$gnomepath zvt gnomeui --libs`"
      CFLAGS="$CFLAGS $GNOME_CFLAGS"
      AC_DEFINE(USE_GNOME)
    fi
  fi
else
  LIBS="$LIBS $GTK_LIBS"
  CFLAGS="$CFLAGS $GTK_CFLAGS"
fi

AC_OUTPUT(Makefile \
	computers/Makefile \
	help/Makefile \
	mp3/Makefile \
	pix/Makefile \
	skins/Makefile \
	src/Makefile \
	)

rm -f ~/.gtkgo
echo
if test "$gnome" = "yes"; then
  echo ...building gtkgo $VERSION with Gnome $GNOME_VER!
else
  echo ...building gtkgo $VERSION without Gnome!
fi
echo