1 | AC_PREREQ(2.52) |
---|
2 | AC_INIT(ggv, 1.99.98, http://bugzilla.gnome.org/enter_bug.cgi?product=ggv) |
---|
3 | AC_CONFIG_SRCDIR(src/gtkgs.c) |
---|
4 | AM_INIT_AUTOMAKE(ggv, 1.99.98) |
---|
5 | |
---|
6 | AM_CONFIG_HEADER(config.h) |
---|
7 | |
---|
8 | AM_MAINTAINER_MODE |
---|
9 | |
---|
10 | AC_PROG_INTLTOOL |
---|
11 | |
---|
12 | AC_ISC_POSIX |
---|
13 | AC_PROG_CC |
---|
14 | AC_STDC_HEADERS |
---|
15 | AM_PROG_LIBTOOL |
---|
16 | AC_PROG_INSTALL |
---|
17 | AC_PROG_LN_S |
---|
18 | AC_PROG_MAKE_SET |
---|
19 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
20 | AM_GCONF_SOURCE_2 |
---|
21 | |
---|
22 | AC_CHECK_HEADER(paths.h) |
---|
23 | AC_PATH_PROG(LPR_PROG, lpr) |
---|
24 | AC_DEFINE_UNQUOTED(LPR_PATH, "$LPR_PROG", [Path to 'lpr' executable.]) |
---|
25 | GNOME_PLATFORM_GNOME_2(yes) |
---|
26 | |
---|
27 | dnl a switch for enabling bonobo component logging to a file |
---|
28 | AC_ARG_ENABLE(bonobo-debug, |
---|
29 | [ --bonobo-debug Enables logging of bonobo component to a file], AC_DEFINE(BONOBO_DEBUG, 1, [Whether to add log component output to a file.])) |
---|
30 | |
---|
31 | ################################################## |
---|
32 | # Checks for GhostScript package |
---|
33 | ################################################## |
---|
34 | |
---|
35 | |
---|
36 | AC_ARG_WITH(gs-pkg, |
---|
37 | [ --with-gs=dir Directory Where GhostScript package is installed.]) |
---|
38 | |
---|
39 | if test "x$with_gs" = "x"; then |
---|
40 | AC_PATH_PROG(GS_PROG, gs) |
---|
41 | if test -z "$GS_PROG"; then |
---|
42 | AC_MSG_ERROR(Unable to find GhostScript in the PATH. Provide the full path for GhostScript(--with-gs=PATH). You need to have Ghostscript installed in order to run GGV) |
---|
43 | fi |
---|
44 | else |
---|
45 | GS_PROG=$with_gs |
---|
46 | fi |
---|
47 | |
---|
48 | AC_DEFINE_UNQUOTED(GS_PATH, "$GS_PROG", [Path to the 'gs' executable.]) |
---|
49 | |
---|
50 | |
---|
51 | dnl check for GS version and define appropriate alpha parameters |
---|
52 | AC_MSG_CHECKING(for Ghostscript version...) |
---|
53 | GS_VERSION=`$GS_PROG --version | head -1` |
---|
54 | AC_MSG_RESULT(found $GS_VERSION) |
---|
55 | dnl GS tends to get a lot of BadMatch errors with the *AlphaBits parameters |
---|
56 | dnl so I've commented their use out |
---|
57 | dnl if test "$GS_VERSION" -gt "5"; then |
---|
58 | dnl AA_PARMS="-sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=4" |
---|
59 | dnl else |
---|
60 | dnl AA_PARMS="-sDEVICE=x11alpha" |
---|
61 | dnl fi |
---|
62 | AA_PARMS="-sDEVICE=x11alpha" |
---|
63 | AC_DEFINE_UNQUOTED(ALPHA_PARAMS, "$AA_PARMS", [Anti-aliasing parameters for Ghostscript.]) |
---|
64 | AC_MSG_RESULT(Antialiasing parameters for Ghostscript: $AA_PARMS) |
---|
65 | |
---|
66 | dnl check for popt. this is required for building on solaris |
---|
67 | AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"], |
---|
68 | AC_MSG_ERROR([popt is required to build ggv. |
---|
69 | You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
70 | AC_SUBST(POPT_LIBS) |
---|
71 | |
---|
72 | dnl check for libgstroke library |
---|
73 | dnl removed as we dont have a glib 2.0 based gstroke library |
---|
74 | dnl try_gstroke=true |
---|
75 | dnl gstroke= |
---|
76 | dnl have_gstroke=false |
---|
77 | dnl gstroke_CFLAGS= |
---|
78 | dnl gstroke_LIBS= |
---|
79 | dnl AC_ARG_WITH(gstroke, |
---|
80 | dnl [ --{with,without}-gstroke=PFX Compile with stroke support or without it], |
---|
81 | dnl if test x$withval = xno; then |
---|
82 | dnl try_gstroke=false |
---|
83 | dnl elif test x$withval != xyes; then |
---|
84 | dnl gstroke_CFLAGS=-I$withval/include |
---|
85 | dnl gstroke_LIBS=-L$withval/lib |
---|
86 | dnl fi |
---|
87 | dnl ) |
---|
88 | |
---|
89 | dnl if $try_gstroke; then |
---|
90 | dnl AC_CHECK_LIB(gstroke, gstroke_enable, |
---|
91 | dnl have_gstroke=true |
---|
92 | dnl AC_DEFINE(HAVE_GSTROKE) |
---|
93 | dnl gstroke_LIBS="$gstroke_LIBS -lgstroke", , |
---|
94 | dnl $gstroke_LIBS $GTK_LIBS) |
---|
95 | dnl fi |
---|
96 | dnl AM_CONDITIONAL(GSTROKE, $have_gstroke) |
---|
97 | |
---|
98 | AC_PATH_XTRA |
---|
99 | PKG_CHECK_MODULES(GGV, |
---|
100 | libgnomeui-2.0 >= 1.96.0) |
---|
101 | |
---|
102 | GGV_LIBS="$GGV_LIBS $POPT_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
---|
103 | |
---|
104 | dnl Check for Xinerama |
---|
105 | dnl have_xinerama=false |
---|
106 | dnl have_xinerama_h=false |
---|
107 | dnl AC_CHECK_HEADER(X11/extensions/Xinerama.h, |
---|
108 | dnl have_xinerama_h=true,, [#include <X11/Xlib.h>] ) |
---|
109 | dnl if test x$have_xinerama_h = xtrue; then |
---|
110 | dnl AC_CHECK_LIB(Xinerama, XineramaIsActive, |
---|
111 | dnl have_xinerama=true,, |
---|
112 | dnl $GGV_LIBS) |
---|
113 | dnl fi |
---|
114 | dnl AM_CONDITIONAL(XINERAMA, $have_xinerama) |
---|
115 | dnl if test x$have_xinerama = xtrue; then |
---|
116 | dnl AC_DEFINE(HAVE_XINERAMA) |
---|
117 | dnl fi |
---|
118 | |
---|
119 | dnl ************************************************** |
---|
120 | dnl * internationalization support |
---|
121 | dnl ************************************************** |
---|
122 | ALL_LINGUAS="am az be bg ca cs da de el es et eu fi fr ga gl he hr hu it ja ko lt lv mk mn ms nl nn no pl pt pt_BR ro ru sk sl sv ta tr uk vi zh_CN zh_TW" |
---|
123 | |
---|
124 | GETTEXT_PACKAGE=ggv |
---|
125 | AC_SUBST(GETTEXT_PACKAGE) |
---|
126 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext pacakge.]) |
---|
127 | |
---|
128 | AM_GLIB_GNU_GETTEXT |
---|
129 | |
---|
130 | dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) |
---|
131 | |
---|
132 | AC_SUBST(GGV_CFLAGS) |
---|
133 | AC_SUBST(GGV_LIBS) |
---|
134 | |
---|
135 | dnl ================================ |
---|
136 | dnl | ORBit2 |--------------------------- |
---|
137 | dnl ================================ |
---|
138 | |
---|
139 | ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`" |
---|
140 | AC_SUBST(ORBIT_IDL) |
---|
141 | |
---|
142 | BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`" |
---|
143 | AC_SUBST(BONOBO_IDLDIR) |
---|
144 | |
---|
145 | BONOBO_ACT_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`" |
---|
146 | AC_SUBST(BONOBO_ACT_IDLDIR) |
---|
147 | |
---|
148 | AC_ARG_ENABLE(install_schemas, |
---|
149 | [ --disable-install-schemas Disable installation of the gconf schemas]) |
---|
150 | AM_CONDITIONAL(INSTALL_SCHEMAS, test x$enable_install_schemas != xno) |
---|
151 | |
---|
152 | GCONF_CONFIG_SOURCE= |
---|
153 | |
---|
154 | AC_ARG_ENABLE(gconf-source, [ --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,) |
---|
155 | if test "x$GCONF_CONFIG_SOURCE" = "x"; then |
---|
156 | GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults" |
---|
157 | fi |
---|
158 | |
---|
159 | AC_SUBST(GCONF_CONFIG_SOURCE) |
---|
160 | AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE) |
---|
161 | |
---|
162 | GGV_EXTRA_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED" |
---|
163 | |
---|
164 | AC_SUBST(GGV_EXTRA_CFLAGS) |
---|
165 | AC_SUBST(CFLAGS) |
---|
166 | AC_SUBST(CPPFLAGS) |
---|
167 | AC_SUBST(LDFLAGS) |
---|
168 | |
---|
169 | AC_OUTPUT([ |
---|
170 | Makefile |
---|
171 | ggv.spec |
---|
172 | po/Makefile.in |
---|
173 | help/Makefile |
---|
174 | help/C/Makefile |
---|
175 | src/Makefile |
---|
176 | src/stock/Makefile |
---|
177 | src/cursors/Makefile |
---|
178 | bonobo/Makefile |
---|
179 | pixmaps/Makefile |
---|
180 | idl/Makefile |
---|
181 | omf-install/Makefile |
---|
182 | ]) |
---|