~ubuntu-branches/ubuntu/vivid/nip2/vivid-proposed

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2009-05-12 09:26:46 UTC
  • mfrom: (1.2.11 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090512092646-j8lb1w2x69pvgma4
Tags: 7.18.1-1ubuntu1
* Merge from debian unstable (LP: #375435), remaining changes:
  - debian/control: Also Recommend abrowser

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
dnl
10
10
 
11
11
m4_define([nip_major_version], [7])
12
 
m4_define([nip_minor_version], [14])
13
 
m4_define([nip_micro_version], [5])
 
12
m4_define([nip_minor_version], [18])
 
13
m4_define([nip_micro_version], [1])
14
14
m4_define([nip_version],
15
15
          [nip_major_version.nip_minor_version.nip_micro_version])
16
16
 
64
64
  AC_DEFINE(OS_DARWIN,1,[native Mac OS X])
65
65
fi
66
66
 
67
 
if test x"$nip_os_darwin" = "xyes"; then
68
 
  # need this env setting on darwin, for some reason
69
 
  export GMSGFMT=msgfmt
70
 
fi
71
 
 
72
67
# disable debugging by default for production releases
73
68
m4_define([debug_default],
74
69
  m4_if(m4_eval(nip_minor_version() % 2), [1], [yes], [minimum]))
97
92
AC_PROG_AWK
98
93
AC_PROG_CC
99
94
AM_PROG_CC_C_O
100
 
AM_PROG_LEX
101
 
IP_LIBS="$IP_LIBS $LEXLIBS"
 
95
AC_PROG_LEX
 
96
# we must have flex or lex
 
97
if test x"$LEX" = x:; then 
 
98
  AC_MSG_ERROR([lex/flex not found: $PACKAGE requires one of these])
 
99
fi
 
100
IP_LIBS="$IP_LIBS $LEXLIB"
102
101
AC_PROG_INSTALL
103
102
AC_PROG_LN_S
104
103
AC_CHECK_TOOL(WINDRES, windres)
108
107
AC_CHECK_TOOL(RANLIB, ranlib)
109
108
AC_CHECK_TOOL(STRIP, strip)
110
109
AC_CHECK_TOOL(BISON, bison)
 
110
# we have to have bison :-( maybe we could ship the generated .c/.h files? not
 
111
# clear on their portability
 
112
if test x"$BISON" = x; then 
 
113
  AC_MSG_ERROR([bison not found: $PACKAGE uses bison-only features])
 
114
fi
111
115
AC_CHECK_TOOL(AR, ar)
112
116
AC_CHECK_TOOL(AS, as)
113
117
AC_CHECK_TOOL(LD, ld)
114
118
AC_LIBTOOL_WIN32_DLL
115
119
AC_PROG_LIBTOOL
116
120
 
117
 
# FIXME ... We are bison-only: we should check that YACC is set to "bison -y"
118
121
 
119
122
# dmalloc option
120
123
AM_WITH_DMALLOC
124
127
AC_SUBST(GETTEXT_PACKAGE)
125
128
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
126
129
        [The prefix for our gettext translation domains.])
127
 
# the 'malkovich' one is there for testing only
128
 
# ALL_LINGUAS="en_GB malkovich"
129
 
ALL_LINGUAS="en_GB"
 
130
ALL_LINGUAS="en_GB malkovich"
130
131
AM_GLIB_GNU_GETTEXT
131
132
 
132
133
# check for flex ... nip needs to adjust itself a bit
133
134
if test "${LEX}" = "flex"; then
134
 
        AC_DEFINE(HAVE_FLEX,1,[using flex, rather than lex])
 
135
  AC_DEFINE(HAVE_FLEX,1,[using flex, rather than lex])
135
136
fi
136
137
 
137
138
# get packages we need
138
139
# gtk before 2.4.9 crashes with the way we use combobox :-(
139
 
PKG_CHECK_MODULES(PKGFLAGS, gthread-2.0 gtk+-2.0 >= 2.4.9 libxml-2.0 vips-7.14)
140
 
IP_CFLAGS="$PKGFLAGS_CFLAGS $IP_CFLAGS"
141
 
IP_LIBS="$PKGFLAGS_LIBS $IP_LIBS"
 
140
PKG_CHECK_MODULES(REQUIRED_PACKAGES, 
 
141
  gthread-2.0 gtk+-2.0 >= 2.4.9 libxml-2.0 vips-7.18)
 
142
IP_CFLAGS="$REQUIRED_PACKAGES_CFLAGS $IP_CFLAGS"
 
143
IP_LIBS="$REQUIRED_PACKAGES_LIBS $IP_LIBS"
 
144
 
 
145
# gdk_window_set_opacity() was added in gtk 2.12
 
146
PKG_CHECK_MODULES(SET_OPACITY, gtk+-2.0 >= 2.12,
 
147
  [nip_set_opacity=yes],
 
148
  [nip_set_opacity=no]
 
149
)
 
150
 
 
151
if test x"$nip_set_opacity" = x"yes"; then
 
152
  AC_DEFINE(HAVE_SET_OPACITY,1,[define if you have gdk_window_set_opacity()])
 
153
fi
142
154
 
143
155
# this is optional
144
156
#
156
168
 
157
169
# Check for the function strccpy in libgen
158
170
AC_CHECK_HEADER(libgen.h, 
159
 
        AC_CHECK_LIB(gen, strccpy, 
160
 
                AC_DEFINE(HAVE_STRCCPY,1,[have strccpy() in -lgen]) 
161
 
                IP_LIBS="$IP_LIBS -lgen" 
162
 
        ), 
 
171
  AC_CHECK_LIB(gen, strccpy, 
 
172
    AC_DEFINE(HAVE_STRCCPY,1,[have strccpy() in -lgen]) 
 
173
    IP_LIBS="$IP_LIBS -lgen" 
 
174
  ), 
163
175
)
164
176
 
165
177
# Checks for header files.
186
198
 
187
199
if test "x$with_fftw3" != "xno"; then
188
200
  PKG_CHECK_MODULES(FFTW3, fftw3,
189
 
    [AC_DEFINE(HAVE_FFTW3,1,[define if you have fftw3 installed.])],
190
 
    [AC_MSG_WARN([fftw3 not found; disabling fftw support])])
 
201
    [AC_DEFINE(HAVE_FFTW3,1,[define if you have fftw3 installed.])
 
202
     with_fftw3=yes
 
203
    ],
 
204
    [AC_MSG_WARN([fftw3 not found; disabling fftw support])
 
205
     with_fftw3=no
 
206
    ])
191
207
  IP_CFLAGS="$FFTW_INCLUDES $FFTW3_CFLAGS $IP_CFLAGS"
192
208
fi
193
209
 
196
212
 
197
213
if test "x$with_gsl" != "xno"; then
198
214
  PKG_CHECK_MODULES(GSL, gsl,
199
 
    [AC_DEFINE(HAVE_GSL,1,[define if you have gsl installed.])],
200
 
    [AC_MSG_WARN([gsl not found; disabling extra numerical functions])])
 
215
    [AC_DEFINE(HAVE_GSL,1,[define if you have gsl installed.])
 
216
     with_gsl=yes
 
217
    ],
 
218
    [AC_MSG_WARN([gsl not found; disabling extra numerical functions])
 
219
     with_gsl=no
 
220
    ])
201
221
  IP_CFLAGS="$GSL_CFLAGS $IP_CFLAGS"
202
222
  IP_LIBS="$GSL_LIBS $IP_LIBS"
203
223
fi
204
224
 
205
 
# optional ... can build against vips8 for testing
206
 
AC_ARG_WITH([vips8], AS_HELP_STRING([--without-vips8], [build without vips8 (default: test)]))
207
 
 
208
 
if test "x$with_vips8" != "xno"; then
209
 
  PKG_CHECK_MODULES(VIPS8, vips-8.0,
210
 
    [AC_DEFINE(HAVE_VIPS8,1,[define if you have vips8 installed.])],
211
 
    [AC_MSG_WARN([vips8 not found; disabling library testing])])
212
 
  IP_CFLAGS="$VIPS8_CFLAGS $IP_CFLAGS"
213
 
  IP_LIBS="$VIPS8_LIBS $IP_LIBS"
214
 
fi
215
 
 
216
225
# optional ... use this to open the help browser, if available
217
226
AC_PATH_PROG(XDG_OPEN, xdg-open, no)
218
227
 
225
234
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
226
235
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
227
236
 
228
 
update=no
 
237
nip_desktop_update=no
229
238
if test "x$UPDATE_MIME_DATABASE" != "xno"; then
230
239
  if test "x$UPDATE_DESKTOP_DATABASE" != "xno"; then
231
 
    update=yes
 
240
    nip_desktop_update=yes
232
241
  fi
233
242
fi
234
243
 
236
245
AC_ARG_ENABLE(update-desktop,
237
246
  AC_HELP_STRING([--disable-update-desktop],
238
247
    [disable update of desktop database]),
239
 
  [update=$enableval],)
 
248
  [nip_desktop_update=$enableval],)
240
249
 
241
 
if test x"$update" = "xyes"; then
 
250
if test x"$nip_desktop_update" = "xyes"; then
242
251
  AM_CONDITIONAL(UPDATE_DESKTOP, true)
243
252
else
244
253
  AM_CONDITIONAL(UPDATE_DESKTOP, false)
247
256
AC_SUBST(IP_CFLAGS)
248
257
AC_SUBST(IP_LIBS)
249
258
 
 
259
# needed by test/test_all.sh
 
260
# :( what's a better way to do this, argh
 
261
TOP_SRCDIR=$ac_pwd
 
262
AC_SUBST(TOP_SRCDIR)
 
263
 
250
264
AC_OUTPUT([
251
265
        nip2.desktop
252
266
        Makefile
262
276
        share/nip2/compat/7.9/Makefile
263
277
        share/nip2/compat/7.10/Makefile
264
278
        share/nip2/compat/7.12/Makefile
 
279
        share/nip2/compat/7.14/Makefile
 
280
        share/nip2/compat/7.16/Makefile
265
281
        src/BITMAPS/Makefile 
266
282
        src/Makefile
 
283
        test/Makefile
 
284
        test/test_all.sh
267
285
        po/Makefile.in
 
286
        nip2.spec
 
287
])
 
288
 
 
289
# generated script needs to be executable
 
290
chmod +x test/test_all.sh
 
291
 
 
292
AC_MSG_RESULT([
 
293
* general build options
 
294
native win32:                   $nip_os_win32
 
295
native os x:                    $nip_os_darwin
 
296
update desktop after install:   $nip_desktop_update
 
297
debug:                          $enable_debug
 
298
 
 
299
* optional packages and modules
 
300
use fftw3 for FFT:              $with_fftw3
 
301
use gsl for numeric functions:  $with_gsl
 
302
display help files with xdg:    $XDG_OPEN
268
303
])