File: configure.in

package info (click to toggle)
gnome-iconedit 1.2.0-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,340 kB
  • ctags: 990
  • sloc: ansic: 10,364; sh: 2,643; makefile: 341; sed: 93
file content (159 lines) | stat: -rw-r--r-- 3,629 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
dnl Process this file with autoconf to produce a configure script.

AC_INIT(src/iconedit.h)

AM_INIT_AUTOMAKE(gnome-iconedit,1.2.0)
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

dnl Pick up GNOME macros
AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_PROG_RANLIB

AC_C_BIGENDIAN

dnl Check for gnome-libs 1.2.x
CFLAGS_save=$CFLAGS
LIBS_save=$LIBS
CFLAGS=`gnome-config --cflags gnomeui`
LIBS=`gnome-config --libs gnomeui`

AC_CHECK_LIB(gnomeui, gnome_window_icon_set_default_from_file, ,[
AC_MSG_ERROR(gnome-libs 1.0.59 or higher is required.)])

CFLAGS=$CFLAGS_save
LIBS=$LIBS_save

dnl Test for libz
AC_CHECK_LIB(z, inflate,
	AC_CHECK_HEADER(zlib.h,
		Z_LIBS="-lz"))
AC_CHECK_LIB(z, compress, Z_LIBS="-lz",
	AC_MSG_ERROR([[
*** Incorrect libz version found. Please make sure you do not have
*** an outdated libz.a or libz.so hiding in your X11 distribution or
*** elsewhere on your system. Versions of libz with the "compress" and
*** "uncompress" symbols are sufficiently recent to build GNOME Icon-Edit.]]))

dnl Test for libpng
AC_CHECK_LIB(png, png_write_info,
	AC_CHECK_HEADER(png.h,
	png_ok=yes,
	png_ok=no),,$Z_LIBS -lm)
if test "$png_ok" = yes; then
	AC_MSG_CHECKING([for png_structp in png.h])
	AC_TRY_COMPILE([#include <png.h>],
		[png_structp pp; png_infop info; png_colorp cmap; png_create_write_struct;],
		png_ok=yes,
		png_ok=no)
	AC_CHECK_LIB(png, png_set_IHDR,
			png_ok=yes, png_ok=no,$Z_LIBS -lm)
fi
if test "$png_ok" = no; then
	AC_MSG_ERROR([[
*** Cannot find the correct version of libpng.
*** libpng is needed for compilation of GNOME Icon-Edit.]])
fi

AM_PATH_GDK_PIXBUF(0.7.0, gdk_pixbuf_ok=true, gdk_pixbuf_ok=false)

if $gdk_pixbuf_ok; then
	AC_MSG_RESULT(found)
else
	AC_MSG_RESULT(not found)
	AC_MSG_ERROR("gdk-pixbuf >= 0.5.0 not found")
fi

dnl Checking for Gnome-Print
AC_ARG_WITH(gnome-print,
[  --with-gnome-print=PREFIX  Specify gnome-print prefix],[
    GNOME_PRINT_PREFIX="$with_gnome_print"], [
    GNOME_PRINT_PREFIX=`$GNOME_CONFIG --prefix`])
AC_SUBST(GNOME_PRINT_PREFIX)

help_yes_print=no

AC_MSG_CHECKING(for static libgnomeprint)
if test -e $GNOME_PRINT_PREFIX/lib/libgnomeprint.a ; then
	AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_GNOME_PRINT)
	help_yes_print=yes
else
	AC_MSG_RESULT(no)
fi

AM_CONDITIONAL(USE_GNOME_PRINT, test x$help_yes_print = xyes)

dnl Whether to use OAF

AC_MSG_CHECKING(if Bonobo uses OAF)
if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1; then
	enable_oaf="yes"
else
	enable_oaf="no"
fi

AC_MSG_RESULT("$enable_oaf")

if test "x$enable_oaf" = "xyes"; then
	AC_PATH_PROG(OAF_CONFIG,oaf-config,no)
	if test x$OAF_CONFIG = xno; then
		AC_MSG_ERROR("Bonobo was compiled with OAF support but oaf-config was not found")
	else
		OAF_LIBS=`$OAF_CONFIG --libs`
		OAF_CFLAGS=`$OAF_CONFIG --cflags`
		AC_DEFINE(USING_OAF)
		GNORBA_LIBNAME=
	fi
else
	OAF_LIBS=
	OAF_CFLAGS=
	GNORBA_LIBNAME=gnorba
fi

AM_CONDITIONAL(BONOBO, test x$enable_oaf = xyes)
AC_SUBST(OAF_LIBS)
AC_SUBST(OAF_CFLAGS)

dnl Check for recent enough libart.
AC_CHECK_LIB(art_lgpl, art_rgba_run_alpha, art_rgba="no", art_rgba="yes")
if test "$art_rgba" = yes; then
	AC_DEFINE(USE_LOCAL_ART_RGBA)
fi

ALL_LINGUAS="de en_GB fr ko ru sv tr wa"
AM_GNOME_GETTEXT

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT([
Makefile
gnome-iconedit.spec
intl/Makefile
po/Makefile.in
idl/Makefile
src/Makefile
src/widgets/Makefile
pixmaps/Makefile
macros/Makefile] 
)

echo "

Configuration:

	Source code location:	${srcdir}
	Compiler:		${CC}

	Print Support:		${help_yes_print}
	Libart extensions:	${art_rgba}
	Bonobo Support:		${enable_oaf}
"