File: configure.in

package info (click to toggle)
penguineyes 0.10-22
  • links: PTS
  • area: main
  • in suites: woody
  • size: 736 kB
  • ctags: 219
  • sloc: ansic: 1,928; sh: 346; makefile: 124
file content (60 lines) | stat: -rw-r--r-- 1,411 bytes parent folder | download
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
AC_INIT(src/penguineyes.h)

AM_INIT_AUTOMAKE(Penguineyes, 0.10)

AC_LANG_C
AC_PROG_CC

#LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11/lib -lX11"
LDFLAGS="-L/usr/X11/lib -lX11"

AM_PATH_GTK(1.2.6,, AC_MSG_ERROR(Can't find GTK 1.2.6 or better) )

AC_ARG_ENABLE(gnome, [  --disable-gnome         Disable use of GNOME],
[
	if test "$enableval" = "no"; then
		DONT_USE_GNOME=yes;
	fi
])

if test "x$DONT_USE_GNOME" != "xyes"; then
	AC_CHECK_PROG(TEST_GNOME, gnome-config, yes, no)

	AM_CONDITIONAL(install_gnome, test ${TEST_GNOME} = "yes")

	if test "${TEST_GNOME}" = "yes"; then
		gnome_dir=`gnome-config --datadir`
		gnome_prefix=`gnome-config --prefix`
		AC_DEFINE(HAVE_GNOME)
		CFLAGS="${CFLAGS} `gnome-config --cflags applets`"
		LDFLAGS="${LDFLAGS} `gnome-config --libs applets`"
	fi
else
	AC_CHECK_PROG(TEST_IMLIB, imlib-config, yes, no)

	if test "${TEST_IMLIB}" = "no"; then
		AC_MSG_ERROR("imlib-config not found in path!")
	else
	    LDFLAGS="${LDFLAGS} `imlib-config --libs-gdk`"
	    CFLAGS="${CFLAGS} `imlib-config --cflags-gdk`"
	    AC_CHECK_LIB(gdk_imlib, gdk_imlib_init,,
		AC_MSG_ERROR(Can't find imlib)
	    )
	fi
	AM_CONDITIONAL(install_gnome, false)
fi

penguindatadir=$datadir/penguineyes

CPPFLAGS="${CFLAGS} -DDATADIR=\\\"$penguindatadir\\\""

AC_SUBST(penguindatadir)
AC_SUBST(HAVE_GNOME)
AC_SUBST(gnome_dir)
AC_SUBST(gnome_prefix)

AC_OUTPUT([
	Makefile
	src/Makefile
	data/Makefile
])