25
25
# Versions used for apps, plugins, tools, pkg-config files, and data,
26
26
# as well as global and user prefs
27
m4_define([gimp_app_version], [2.2])
27
m4_define([gimp_app_version], [2.3])
28
28
m4_define([gimp_plugin_version], [2.0])
29
29
m4_define([gimp_tool_version], [2.0])
30
30
m4_define([gimp_pkgconfig_version], [2.0])
31
31
m4_define([gimp_data_version], [2.0])
32
32
m4_define([gimp_sysconf_version], [2.0])
33
m4_define([gimp_user_version], [2.2])
33
m4_define([gimp_user_version], [2.3])
35
35
m4_define([gimp_unstable],
36
36
m4_if(m4_eval(gimp_minor_version % 2), [1], [yes], [no]))
37
37
m4_define([gimp_stable],
38
38
m4_if(m4_eval(gimp_minor_version % 2), [0], [yes], [no]))
40
m4_define([gimp_full_name], [The GIMP])
40
m4_define([gimp_full_name], [GNU Image Manipulation Program])
42
42
# required versions of other packages
43
m4_define([glib_required_version], [2.4.5])
44
m4_define([gtk_required_version], [2.4.4])
43
m4_define([glib_required_version], [2.12.3])
44
m4_define([gtk_required_version], [2.10.6])
45
45
m4_define([gdk_pixbuf_required_version], [gtk_required_version])
46
m4_define([pangoft2_required_version], [1.4.0])
46
m4_define([pangoft2_required_version], [1.12.2])
47
47
m4_define([fontconfig_required_version], [2.2.0])
48
48
m4_define([gtkdoc_required_version], [1.0])
49
49
m4_define([gtkhtml2_required_version], [2.0.0])
50
m4_define([gimpprint_required_version], [4.2.0])
51
m4_define([gimpprint_suggested_version], [4.2.6])
52
m4_define([gimpprint_toonew_version], [4.3.0])
53
50
m4_define([alsa_required_version], [1.0.0])
54
m4_define([rsvg_required_version], [2.2.0])
51
m4_define([rsvg_required_version], [2.8.0])
55
52
m4_define([wmf_required_version], [0.2.8])
56
m4_define([pygtk_required_version], [1.99.15])
53
m4_define([pygtk_required_version], [2.10.4])
54
m4_define([poppler_required_version], [0.3.1])
55
m4_define([gnome_vfs_required_version], [2.10.0])
56
m4_define([gnomeui_required_version], [2.10.0])
57
m4_define([gnome_keyring_required_version], [0.4.5])
58
m4_define([libcurl_required_version], [7.15.1])
59
m4_define([dbus_glib_required_version], [0.70])
60
m4_define([libhal_required_version], [0.5.7])
58
63
AC_INIT([GIMP], [gimp_version],
59
64
[http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP],
365
383
dnl check some more funcs
366
384
AC_CHECK_FUNCS(difftime putenv mmap)
389
# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
390
AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
391
AC_TRY_LINK([#include <langinfo.h>], [
392
char c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
393
], nl_ok=yes, nl_ok=no)
394
AC_MSG_RESULT($nl_ok)
395
if test "$nl_ok" = "yes"; then
396
AC_DEFINE(HAVE__NL_MEASUREMENT_MEASUREMENT, 1,
397
[Define to 1 if _NL_MEASUREMENT_MEASUREMENT is available])
369
401
######################
370
402
# Internationalisation
371
403
######################
373
dnl Note to translators: you MUST have .po files in all 4 directories: po,
374
dnl po-libgimp, po-plug-ins, and po-script-fu before adding you language
375
dnl code to ALL_LINGUAS
376
ALL_LINGUAS="bg ca cs da de el en_CA en_GB es eu fi fr ga gl he hu hr id it ja ko lt mk ms nb nl no pa pl pt pt_BR ro ru sk sr sr@Latn sv tr uk vi yi zh_CN zh_TW"
405
dnl Note to translators: you MUST have .po files in all 5 directories: po,
406
dnl po-libgimp, po-plug-ins, po-python and po-script-fu before adding your
407
dnl language code to ALL_LINGUAS.
408
ALL_LINGUAS="ar bg ca cs da de dz el en_CA en_GB eo es et eu fi fr ga gl gu he hu hr id it ja km ko lt mk ms nb ne nl pa pl pt pt_BR ro ru rw sk sr sr@Latn sv tr tt uk vi xh yi zh_CN zh_TW"
379
411
AM_GLIB_GNU_GETTEXT
620
647
############################
621
# Check for Altivec assembly
648
# Check for AltiVec assembly
622
649
############################
624
651
AC_ARG_ENABLE(altivec,
625
[ --enable-altivec enable Altivec support (default=auto)],,
652
[ --enable-altivec enable AltiVec support (default=auto)],,
626
653
enable_altivec=$have_ppc)
628
655
if test "x$enable_altivec" = xyes; then
630
AC_MSG_CHECKING(whether we can compile Altivec code)
632
AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
633
AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if Altivec assembly is available.])
657
GIMP_DETECT_CFLAGS(altivec_flag, '-faltivec' '-maltivec -mabi=altivec')
659
ALTIVEC_EXTRA_CFLAGS=
660
case "$altivec_flag" in
662
altivec_save_CPPFLAGS="$CPPFLAGS"
663
CPPFLAGS="$altivec_save_CPPFLAGS $altivec_flag"
664
AC_CHECK_HEADERS(altivec.h, [ALTIVEC_EXTRA_CFLAGS="$altivec_flag"])
665
CPPFLAGS="$altivec_save_CPPFLAGS"
668
ALTIVEC_EXTRA_CFLAGS="$altivec_flag"
671
AC_SUBST(ALTIVEC_EXTRA_CFLAGS)
673
AC_MSG_CHECKING(whether we can compile AltiVec code)
676
if test -z "$ALTIVEC_EXTRA_CFLAGS"; then
637
677
AC_MSG_RESULT(no)
638
AC_MSG_WARN([The assembler does not support the Altivec command set.])
678
AC_MSG_WARN([The compiler does not support the AltiVec command set.])
680
case "$target_or_host" in
683
AC_DEFINE(HAVE_ALTIVEC_SYSCTL, 1,
684
[Define to 1 if the altivec runtime test should use a sysctl.])
687
AC_COMPILE_IFELSE([asm ("vand %v0, %v0, %v0");],
688
can_use_altivec=yes, can_use_altivec=no)
691
AC_MSG_RESULT($can_use_altivec)
693
if test "x$can_use_altivec" = "xyes"; then
694
AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if AltiVec support is available.])
697
AC_MSG_WARN([The assembler does not support the AltiVec command set.])
701
enable_altivec="$can_use_altivec"
820
881
# Threads and multi processor
821
882
#############################
823
dnl AC_ARG_ENABLE(threads, [ --enable-threads support POSIX threading (default=no)])
824
dnl if test "x$enable_threads" = "xyes"; then
825
dnl AC_CHECK_LIB(pthread, pthread_attr_init,
826
dnl [AC_DEFINE(USE_PTHREADS)
827
dnl GIMP_THREAD_LIBS="-lpthread"
828
dnl GIMP_THREAD_FLAGS="-D_REENTRANT"],
829
dnl # AIX has libpthreads, cause they're special. Special friends (TM)
830
dnl AC_CHECK_LIB(pthreads, pthread_attr_init,
831
dnl [AC_DEFINE(USE_PTHREADS)
832
dnl GIMP_THREAD_LIBS="-lpthreads"
833
dnl GIMP_THREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE"]))
836
AC_SUBST(GIMP_THREAD_FLAGS)
837
AC_SUBST(GIMP_THREAD_LIBS)
840
AC_ARG_ENABLE(mp, [ --enable-mp support multiple processors (default=no)])
841
if test "x$enable_mp" = "xyes"; then
842
AC_CHECK_LIB(pthread, pthread_attr_init,
884
AC_ARG_ENABLE(mp, [ --disable-mp disable support for multiple processors])
885
if test "x$enable_mp" != "xno"; then
886
PKG_CHECK_MODULES(GTHREAD, gthread-2.0,
843
887
[AC_DEFINE(ENABLE_MP, 1,
844
[Define to 1 to enable support for multiple processors.])
845
GIMP_MP_LIBS="-lpthread"
846
GIMP_MP_FLAGS="-D_REENTRANT"],
847
# AIX has libpthreads, cause they're special. Special friends (TM)
848
AC_CHECK_LIB(pthreads, pthread_attr_init,
849
[AC_DEFINE(ENABLE_MP)
850
GIMP_MP_LIBS="-lpthreads"
851
GIMP_MP_FLAGS="-D_REENTRANT -D_THREAD_SAFE"]))
888
[Define to 1 to enable support for multiple processors.])]
854
AC_SUBST(GIMP_MP_FLAGS)
855
AC_SUBST(GIMP_MP_LIBS)
858
893
################################
859
894
# Some plug-ins are X11 specific
860
895
################################
897
GIMP_COMMAND='gimp-gimp_app_version'
862
899
dnl Check if building for GTK+-X11
863
900
gdk_target=`$PKG_CONFIG --variable=target gtk+-2.0`
864
901
if test "$gdk_target" = x11; then
866
if test -z "$LIBXMU"; then
867
gimp_save_CFLAGS="$CFLAGS"
868
gimp_save_LDFLAGS="$LDFLAGS"
869
CFLAGS="$CFLAGS $GTK_CFLAGS"
870
LDFLAGS="$LDFLAGS $X_LIBS"
902
dnl screenshot plug-in needs to link to X11 explicitely
903
LIBSCREENSHOT="$X_LIBS -lX11"
905
dnl doc-shooter is X11 specific
906
DOC_SHOOTER=doc-shooter
908
gimp_save_CFLAGS="$CFLAGS"
909
gimp_save_LDFLAGS="$LDFLAGS"
910
CFLAGS="$CFLAGS $GTK_CFLAGS"
911
LDFLAGS="$LDFLAGS $X_LIBS"
914
enable_gimp_remote=yes
915
if test -z "$LIBXMU"; then
871
916
AC_CHECK_LIB(Xmu, XmuClientWindow,
872
917
[AC_CHECK_HEADERS(X11/Xmu/WinUtil.h,
873
918
GIMP_REMOTE='gimp-remote-gimp_app_version$(EXEEXT)';
919
GIMP_COMMAND='gimp-remote-gimp_app_version'
875
921
LIBXMU="$X_LIBS $X_PRE_LIBS -lX11 -lXmu -lXt",
876
[AC_MSG_WARN(*** gimp-remote will not be built (XMU header file not found) ***)],[#include <gdk/gdkx.h>])],
877
[AC_MSG_WARN(*** gimp-remote will not be built (XMU library not found) ***)], -lXt -lX11)
878
CFLAGS="$gimp_save_CFLAGS"
879
LDFLAGS="$gimp_save_LDFLAGS"
882
dnl screenshot plug-in needs to link to X11 explicitely
883
LIBSCREENSHOT="$X_LIBS -lX11"
922
[enable_gimp_remote="no (XMU header file not found)"],[#include <gdk/gdkx.h>])],
923
[enable_gimp_remote="no (XMU library not found)"], -lXt -lX11)
924
LIBSCREENSHOT="$LIBXMU"
927
dnl Check for shaped window extension
928
AC_CHECK_LIB(Xext, XShapeGetRectangles,
929
[AC_CHECK_HEADERS(X11/extensions/shape.h,
930
LIBSCREENSHOT="$LIBSCREENSHOT -lXext",,[#include <gdk/gdkx.h>])],,
933
CFLAGS="$gimp_save_CFLAGS"
934
LDFLAGS="$gimp_save_LDFLAGS"
936
enable_gimp_remote="no (building for $gdk_target)"
887
940
AC_SUBST(LIBSCREENSHOT)
942
AC_SUBST(DOC_SHOOTER)
888
944
AC_SUBST(GIMP_REMOTE)
945
AC_SUBST(GIMP_COMMAND)
891
948
###################
892
949
# Check for libtiff
893
950
###################
895
953
AC_ARG_WITH(libtiff, [ --without-libtiff build without TIFF support])
896
954
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
897
956
AC_CHECK_LIB(tiff, TIFFReadScanline,
898
957
[AC_CHECK_HEADER(tiffio.h,
899
958
TIFF='tiff$(EXEEXT)'; LIBTIFF='-ltiff',
900
[AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF header files not found) ***)])],
959
[have_libtiff="no (TIFF header files not found)"])],
901
960
[AC_CHECK_LIB(tiff, TIFFWriteScanline,
902
961
[AC_CHECK_HEADER(tiffio.h,
903
962
TIFF='tiff$(EXEEXT)'; LIBTIFF='-ltiff -ljpeg -lz',
904
[AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF header files not found) ***)])],
963
[have_libtiff="no (TIFF header files not found)"])],
905
964
[AC_CHECK_LIB(tiff34, TIFFFlushData,
906
965
[AC_CHECK_HEADER(tiffio.h,
907
966
TIFF='tiff$(EXEEXT)'; LIBTIFF='-ltiff34 -ljpeg -lz',
908
[AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF header files not found) ***)])],
909
[AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***)], -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
967
[have_libtiff="no (TIFF header files not found)"])],
968
[have_libtiff="no (TIFF library not found)"], -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
912
971
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
989
1052
# Check for libpng
990
1053
##################
992
1056
AC_ARG_WITH(libpng, [ --without-libpng build without PNG support])
993
if test x$with_libpng != xno && test -z "$LIBPNG" && test -n "$LIBZ"; then
994
AC_CHECK_LIB(png, png_read_info,
995
[AC_CHECK_HEADER(png.h,
998
[AC_MSG_WARN(*** PNG plug-in will not be built (PNG library not found) ***)], -lz -lm)
999
if test "$png_ok" = yes; then
1000
AC_MSG_CHECKING([for png_structp in png.h])
1001
AC_TRY_COMPILE([#include <png.h>],
1002
[png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
1005
AC_MSG_RESULT($png_ok)
1006
if test "$png_ok" = yes; then
1007
PNG='png$(EXEEXT)'; LIBPNG="-lpng $LIBZ"
1009
AC_MSG_WARN(*** PNG plug-in will not be built (PNG library is too old) ***)
1012
AC_MSG_WARN(*** PNG plug-in will not be built (PNG header file not found) ***)
1016
if test x$with_libpng != xno && test -z "$LIBPNG"; then
1057
if test x$with_libpng != xno; then
1059
PKG_CHECK_MODULES(PNG, libpng,
1062
[have_libpng="no (libpng not found)"
1018
*** Checks for PNG library failed. You can build without it by passing
1019
*** --without-libpng to configure but you won't be able to use PNGs then.])
1064
*** Checks for PNG library failed. You can build without it by passing
1065
*** --without-libpng to configure but you won't be able to use PNGs then.])])
1023
1069
AC_SUBST(LIBPNG)
1071
AM_CONDITIONAL(HAVE_PNG, test x$have_libpng = xyes)
1026
1074
##################
1027
1075
# Check for libmng
1028
1076
##################
1030
1079
AC_ARG_WITH(libmng, [ --without-libmng build without MNG support])
1031
1081
if test x$with_libmng != xno && test -z "$LIBMNG" &&
1032
1082
test -n "$LIBPNG" && test -n "$LIBJPEG" && test -n "$LIBZ"; then
1033
1083
AC_CHECK_LIB(mng, mng_create,
1034
1084
[AC_CHECK_HEADER(libmng.h, mng_ok=yes)],
1035
[AC_MSG_WARN(*** MNG plug-in will not be built (MNG library not found) ***)], -lz -lm)
1085
[have_libmng="no (MNG library not found)"], -lz -lm)
1036
1086
if test "$mng_ok" = yes; then
1037
1087
MNG='mng$(EXEEXT)'; LIBMNG="-lmng $LIBJPEG $LIBPNG"
1039
AC_MSG_WARN(*** MNG plug-in will not be built (MNG header file not found) ***)
1089
have_libmng="no (MNG header file not found)"
1050
1100
# avoid destruction, but no data modification is performed.
1051
1101
############################################################
1053
1104
AC_ARG_WITH(libexif, [ --without-libexif build without EXIF support])
1054
1105
if test x$with_libexif != xno && test -z "$LIBEXIF" && test -n "$LIBJPEG"; then
1055
1107
PKG_CHECK_MODULES(EXIF, libexif,
1056
AC_DEFINE(HAVE_EXIF, 1, "Define to 1 if libexif is available"),
1057
AC_MSG_WARN([libexif not found!
1058
EXIF support will not be built into the JPEG plug-in.
1059
libexif is available from http://www.sourceforge.net/projects/libexif]))
1108
AC_DEFINE(HAVE_EXIF, 1, [Define to 1 if libexif is available]),
1109
have_libexif="no (libexif not found)")
1110
AC_MSG_CHECKING([if libexif is version 0.6.0 or newer])
1111
if $PKG_CONFIG --atleast-version=0.6.0 libexif; then
1116
AC_MSG_RESULT($have_exif_0_6)
1117
if test x$have_exif_0_6 == xyes; then
1118
AC_DEFINE(HAVE_EXIF_0_6, 1,
1119
[Define to 1 if libexif is at least version 0.6.0])
1062
1123
AC_SUBST(EXIF_CFLAGS)
1063
1124
AC_SUBST(EXIF_LIBS)
1065
1127
#################
1066
1128
# Check for libaa
1067
1129
#################
1070
1133
AC_ARG_WITH(aa, [ --without-aa do not build the AA plug-in])
1071
1134
if test x$with_aa != xno && test -z "$LIBAA"; then
1072
1136
AC_CHECK_LIB(aa, aa_printf,
1073
1137
[AC_CHECK_HEADER(aalib.h,
1074
1138
AA='aa$(EXEEXT)'; LIBAA='-laa',
1075
[AC_MSG_WARN(*** AA plug-in will not be built (AA header file not found) ***)])],
1076
[AC_MSG_WARN(*** AA plug-in will not be built (AA library not found) ***)])
1139
[have_libaa="no (AA header file not found)"])],
1140
[have_libaa="no (AA library not found)"])
1133
1196
AC_ARG_WITH(librsvg,[ --without-librsvg build without librsvg support])
1135
1199
if test "x$with_librsvg" != xno; then
1136
1201
PKG_CHECK_MODULES(SVG, librsvg-2.0 >= rsvg_required_version,
1137
1202
SVG='svg$(EXEEXT)'
1138
1203
LIBSVG=$SVG_LIBS,
1139
AC_MSG_WARN([*** SVG import plug-in will not be built (librsvg not found) ***]))
1205
have_librsvg="no (librsvg not found)")
1141
AC_MSG_WARN([*** SVG import plug-in will not be built (librsvg support disabled) ***])
1207
have_librsvg="no (librsvg support disabled)"
1145
AC_SUBST(SVG_CFLAGS)
1146
1211
AC_SUBST(LIBSVG)
1149
######################
1150
# Check for gimp-print
1151
######################
1153
AC_ARG_ENABLE(print, [ --disable-print build without print support (requires libgimpprint)])
1156
if test "x$enable_print" != "xno"; then
1157
AM_PATH_GIMPPRINT(gimpprint_required_version,
1158
[print_version=`$GIMPPRINT_CONFIG --version`
1159
if expr $print_version \>= gimpprint_toonew_version >/dev/null; then
1161
*** libgimpprint version $print_version is too new.
1162
*** It is likely an unstable development version.
1163
*** You need a version before gimpprint_toonew_version.])
1166
dnl sanity check to avoid bug #125283
1167
if expr $print_version \< gimpprint_suggested_version >/dev/null; then
1169
*** libgimpprint version $print_version causes problems under certain locales.
1170
*** We strongly suggest you upgrade to version gimpprint_suggested_version.])
1176
if test x$enable_print != xno && test x$have_gimp_print != xyes; then
1178
*** Check for libgimpprint failed. You can download it from
1179
*** http://gimp-print.sourceforge.net/ or you can build without it by passing
1180
*** --disable-print to configure (but you won't be able to print then).])
1183
AC_SUBST(PRINT_LIBS)
1184
AC_SUBST(PRINT_CFLAGS)
1185
AM_CONDITIONAL(BUILD_PRINT,
1186
test x$enable_print != xno && test x$have_gimp_print = xyes)
1214
####################################
1215
# Allow to disable the print plug-in
1216
####################################
1218
enable_print="no (disabled)"
1219
AC_ARG_WITH(print,[ --without-print build without print support])
1221
if test "x$with_print" != xno; then
1224
AM_CONDITIONAL(BUILD_PRINT, test "x$enable_print" == xyes)
1227
######################
1228
# Check for libpoppler
1229
######################
1232
AC_ARG_WITH(poppler,[ --without-poppler build without poppler support])
1234
if test "x$with_poppler" != xno; then
1235
PKG_CHECK_MODULES(POPPLER,
1236
poppler-glib >= poppler_required_version gthread-2.0,
1237
POPPLER='poppler$(EXEEXT)'
1238
LIBPOPPLER=$POPPLER_LIBS
1239
AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if libpoppler is available])
1242
have_poppler="Using PostScript plug-in (libpoppler not found)")
1244
have_poppler="Using PostScript plug-in (libpoppler support disabled)"
1248
AC_SUBST(LIBPOPPLER)
1250
if test "x$have_poppler" = xyes; then
1251
if $PKG_CONFIG --atleast-version=0.4 poppler-glib; then
1252
AC_DEFINE(HAVE_POPPLER_0_4, 1,
1253
[Define to 1 if libpoppler >= 0.4 is available])
1256
if $PKG_CONFIG --atleast-version=0.4.1 poppler-glib; then
1257
AC_DEFINE(HAVE_POPPLER_0_4_1, 1,
1258
[Define to 1 if libpoppler >= 0.4.1 is available])
1263
###############################################################################
1264
# Check for gnome-vfs and libcurl (and optionally libgnomeui and gnome-keyring)
1265
###############################################################################
1268
gnome_vfs_modules="gnome-vfs-2.0 >= gnome_vfs_required_version"
1270
AC_ARG_WITH(gnomevfs, [ --without-gnomevfs build without gnomevfs support])
1272
have_gnomeui="no (disabled)"
1273
have_gnome_keyring="no (disabled)"
1274
have_gnomevfs="no (disabled)"
1276
if test x$with_gnomevfs != xno; then
1278
if $PKG_CONFIG --atleast-version=gnomeui_required_version libgnomeui-2.0; then
1280
gnome_vfs_modules="$gnome_vfs_modules libgnomeui-2.0"
1282
have_gnomeui="no (libgnomeui-2.0 not found)"
1285
if $PKG_CONFIG --atleast-version=gnome_keyring_required_version gnome-keyring-1; then
1286
have_gnome_keyring=yes
1287
gnome_vfs_modules="$gnome_vfs_modules gnome-keyring-1"
1289
have_gnome_keyring="no (gnome-keyring-1 not found)"
1292
PKG_CHECK_MODULES(URI_GNOME_VFS, $gnome_vfs_modules,
1295
have_gnomevfs="no (gnome-vfs-2.0 not found)")
1299
AM_CONDITIONAL(HAVE_GNOMEVFS, test x"$have_gnomevfs" = xyes)
1301
libcurl_modules="libcurl >= libcurl_required_version"
1303
AC_ARG_WITH(libcurl, [ --without-libcurl build without curl support])
1305
have_libcurl="no (disabled)"
1307
if test x$with_libcurl != xno; then
1309
PKG_CHECK_MODULES(URI_LIBCURL, $libcurl_modules,
1312
have_libcurl="no (libcurl not found)")
1316
AM_CONDITIONAL(HAVE_LIBCURL, test "x$have_libcurl" = xyes)
1318
if test "x$have_gnomevfs" = xyes; then
1319
uri_plugin="yes (using gnome-vfs)"
1320
elif test x"$have_libcurl" = xyes; then
1321
uri_plugin="yes (using libcurl)"
1322
elif test x"$os_win32" = xno; then
1323
uri_plugin="yes (using wget)"
1326
if test "x$have_gnomeui" = xyes; then
1327
AC_DEFINE(HAVE_GNOMEUI, 1, [Define to 1 if libgnomeui is available])
1330
if test "x$have_gnome_keyring" = xyes; then
1331
AC_DEFINE(HAVE_GNOME_KEYRING, 1, [Define to 1 if gnome-keyring is available])
1189
1337
###################
1190
1338
# Check for libwmf2
1191
1339
###################
1193
1342
AC_PATH_PROG(WMF_CONFIG, libwmf-config, no)
1194
1343
if test "x$WMF_CONFIG" != "xno" ; then
1195
1345
AC_MSG_CHECKING(for libwmf >= wmf_required_version)
1196
1346
wmf_version=`$WMF_CONFIG --version`
1197
1347
if expr $wmf_version \>= wmf_required_version >/dev/null; then
1263
1421
AM_CONDITIONAL(HAVE_LINUX_INPUT, test $have_linux_input = yes)
1424
###############################
1425
# Check for DirectX DirectInput
1426
###############################
1428
AC_ARG_WITH(directx-sdk, [ --with-directx-sdk=PFX prefix where the DirectX SDK is installed(optional)])
1431
if test x"$os_win32" = xyes; then
1432
case "$with_directx_sdk" in
1433
*" "*) AC_MSG_WARN([The DirectX SDK should be accessible through a path without spaces. Use MSYS mounts. Ignoring your --with-directx-sdk switch.])
1435
*\\*) AC_MSG_WARN([Use plain (forward) slashes only in your --with-directx-sdk switch. Ignoring your --with-directx-sdk switch.])
1439
dinput_save_CPPFLAGS="$CPPFLAGS"
1440
dinput_save_LDFLAGS="$CPPFLAGS"
1441
if test "x$with_directx_sdk" != x; then
1442
CPPFLAGS="-I $with_directx_sdk/Include $CPPFLAGS"
1443
LDFLAGS="-L$with_directx_sdk/Lib/x86 $LDFLAGS"
1444
AC_CHECK_HEADER(dinput.h,
1445
[AC_CHECK_LIB(dxguid, GUID_XAxis, have_dx_dinput=yes)])
1448
if test "x$have_dx_dinput" = xyes; then
1449
AC_DEFINE(HAVE_DX_DINPUT, 1, [Define to 1 if you have DirectX DirectInput headers and libraries])
1451
CPPFLAGS="$dinput_save_CPPFLAGS"
1452
LDFLAGS="$dinput_save_LDFLAGS"
1456
AM_CONDITIONAL(HAVE_DX_DINPUT, test $have_dx_dinput = yes)
1459
###############################
1460
# Check for D-Bus GLib bindings
1461
###############################
1463
AC_ARG_WITH(dbus, [ --without-dbus build without D-Bus support])
1465
have_dbus_glib="no (disabled)"
1467
if test x$with_dbus != xno; then
1469
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_required_version,
1476
if test "x$have_dbus_glib" = xyes; then
1477
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
1478
if test x$DBUS_BINDING_TOOL = xno; then
1479
AC_MSG_WARN([Could not find dbus-binding-tool in your PATH])
1480
have_dbus_glib="no (dbus-binding-tool not found)"
1484
if test "x$have_dbus_glib" = xyes; then
1485
AC_DEFINE(HAVE_DBUS_GLIB, 1,
1486
[Define to 1 if D-Bus GLib bindings are available])
1487
GIMP_COMMAND='gimp-gimp_app_version'
1491
###############################################
1492
# Check for libhal (Hardware Abstraction Layer)
1493
###############################################
1497
if test "x$have_linux_input" = xyes && test "x$have_dbus_glib" = xyes; then
1498
PKG_CHECK_MODULES(HAL, hal >= libhal_required_version,
1501
have_libhal="no (libhal not found)"
1505
if test "x$have_libhal" = xyes; then
1506
AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if libhal is available])
1266
1510
############################################################
1267
1511
# GIF compression: Allow builder to specify at compile time
1268
1512
# which compression style she wants to use for GIFs.
1323
1567
dnl Pygimp configure stuff ...
1324
1568
AC_ARG_ENABLE(python,
1325
AC_HELP_STRING([--enable-python],
1326
[build python extension (by default disabled)]),,
1569
AC_HELP_STRING([--disable-python],
1570
[do not build the python extension]))
1572
m4_define([pycheck_error], [
1573
*** Could not find $1.
1574
*** Please install $2, or skip building the python scripting extension by
1575
*** passing --disable-python to configure (but then you will not be able
1576
*** to use scripts for GIMP that are written in Python).])
1330
1578
if test "x$enable_python" != xno; then
1331
1580
dnl check for Python
1333
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
1581
AM_PATH_PYTHON(2.3.5,,
1582
[AC_MSG_ERROR([pycheck_error([Python 2.3.5 or better], [it])])])
1583
AM_CHECK_PYTHON_HEADERS(,
1584
[AC_MSG_ERROR([pycheck_error([Python headers], [them])])])
1586
dnl Win32 needs all symbols resolved for linking, even for DLLs
1587
dnl Assume the link library is in $exec_prefix/libs
1588
dnl This might be able to be figured out from distutils, but it's
1589
dnl not documented so we won't rely on internal implementation
1591
if test "x$platform_win32" = "xyes"; then
1592
PYBIN_PATH="$py_exec_prefix\pythonw.exe"
1593
PYTHON_INCLUDES=`$echo "$PYTHON_INCLUDES" | sed -e 's/\\\\/\\//g'`
1594
py_exec_prefix=`echo "$py_exec_prefix" | sed -e 's/\\\\/\\//g'`
1595
pylibversion=`echo $PYTHON_VERSION | sed -e 's/\\.//'`
1596
PYLINK_LIBS="-L${py_exec_prefix}/libs -lpython${pylibversion}"
1598
PYBIN_PATH="$PYTHON"
1600
AC_SUBST(PYLINK_LIBS)
1601
AC_SUBST(PYBIN_PATH)
1335
1603
dnl check for PyGTK
1336
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version)
1337
AC_SUBST(PYGTK_CFLAGS)
1604
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version,,
1605
[AC_MSG_ERROR([pycheck_error([PyGTK], [it])])])
1607
AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
1608
if test "x$PYGTK_CODEGEN" = xno; then
1609
AC_MSG_ERROR([pycheck_error([pygtk-codegen-2.0 script], [it])])
1612
AC_MSG_CHECKING(for pygtk defs)
1613
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
1614
AC_SUBST(PYGTK_DEFSDIR)
1615
AC_MSG_RESULT($PYGTK_DEFSDIR)
1339
1617
GIMP_DETECT_CFLAGS(PYGIMP_EXTRA_CFLAGS, '-fno-strict-aliasing')
1340
1618
AC_SUBST(PYGIMP_EXTRA_CFLAGS)
1342
1620
AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno)
1623
#########################################
1624
# Check whether script_fu should be built
1625
#########################################
1628
AC_ARG_WITH(script-fu,
1629
AC_HELP_STRING([--without-script-fu],
1630
[do not build the script-fu extension]))
1632
if test "x$with_script_fu" = "xno"; then
1633
have_script_fu="no (script-fu extension disabled)"
1635
AM_CONDITIONAL(BUILD_SCRIPT_FU, test "x$with_script_fu" != "xno")
1345
1638
###########################################################
1346
1639
# Some plug-ins don't build on Win32, others are Win32-only
1347
1640
###########################################################
1349
if test x"$os_win32" = xyes; then
1350
WINCLIPBOARD='winclipboard$(EXEEXT)'
1351
WINPRINT='winprint$(EXEEXT)'
1642
if test x"$os_win32" = xno; then
1353
1643
MAIL='mail$(EXEEXT)'
1354
1644
SCREENSHOT='screenshot$(EXEEXT)'
1359
1648
AC_SUBST(SCREENSHOT)
1361
AC_SUBST(WINCLIPBOARD)
1366
1651
############################################################
1367
1652
# Check for Mac OS X TWAIN framework (can't build on Darwin)
1368
1653
############################################################
1370
1656
AC_MSG_CHECKING([checking for Mac OS X TWAIN support])
1372
1658
#include <Carbon/Carbon.h>
1373
1659
#include <TWAIN/TWAIN.h>
1377
AC_MSG_RESULT($twain_ok)
1378
AM_CONDITIONAL(HAVE_MAC_TWAIN, test x$twain_ok = xyes)
1660
], mac_twain_ok=yes)
1661
AC_MSG_RESULT($mac_twain_ok)
1662
AM_CONDITIONAL(HAVE_MAC_TWAIN, test x$mac_twain_ok = xyes)
1381
1665
##########################################################
1477
1761
AC_SUBST(GIMP_MKENUMS)
1480
#############################
1481
# Disable deprecated GIMP API
1482
#############################
1764
#########################
1765
# Disable deprecated APIs
1766
#########################
1484
1768
CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED"
1486
##############################################################
1487
# Default to disable deprecated GTK+ stuff for 2.4.x and 2.6.x
1488
##############################################################
1490
if test "x$have_glib_2_7" != "xyes"; then
1770
if test "x$have_glib_2_13" != "xyes"; then
1491
1771
CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
1494
if test "x$have_gtk_2_7" != "xyes"; then
1774
if test "x$have_gtk_2_11" != "xyes"; then
1495
1775
CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
1498
if test "x$have_pango_1_9" != "xyes"; then
1778
if test "x$have_pango_1_15" != "xyes"; then
1499
1779
CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED"
1502
1783
############################
1503
1784
# Require multihead safe API
1504
1785
############################
1710
2001
AC_CONFIG_COMMANDS([sed-po-makefiles],
1711
2002
[sed -e "/POTFILES =/r po-libgimp/POTFILES" po-libgimp/Makefile.in > po-libgimp/Makefile
2003
sed -e "/POTFILES =/r po-python/POTFILES" po-python/Makefile.in > po-python/Makefile
1712
2004
sed -e "/POTFILES =/r po-plug-ins/POTFILES" po-plug-ins/Makefile.in > po-plug-ins/Makefile
1713
sed -e "/POTFILES =/r po-script-fu/POTFILES" po-script-fu/Makefile.in > po-script-fu/Makefile])
2005
sed -e "/POTFILES =/r po-script-fu/POTFILES" po-script-fu/Makefile.in > po-script-fu/Makefile
2006
sed -e "/POTFILES =/r po-tips/POTFILES" po-tips/Makefile.in > po-tips/Makefile])
2010
dnl Print a summary of features enabled/disabled:
2012
Building GIMP with prefix=$prefix, datarootdir=$datarootdir
2013
Desktop files install into $DESKTOP_DATADIR
2016
gimp-console: $enable_gimp_console
2017
gimp-remote: $enable_gimp_remote
2020
D-Bus service: $have_dbus_glib
2023
Ascii Art: $have_libaa
2024
Help Browser: $have_gtkhtml2
2030
Print: $enable_print
2032
Python: $enable_python
2033
Script-Fu: $have_script_fu
2036
TWAIN (MacOS X): $mac_twain_ok
2037
TWAIN (Win32): $os_win32
2039
Windows ICO $have_libpng
2045
EXIF support: $have_libexif
2046
GNOME UI: $have_gnomeui
2047
GNOME keyring: $have_gnome_keyring
2050
ALSA (MIDI Input): $have_alsa
2051
Linux Input: $have_linux_input (HAL support: $have_libhal)
2052
DirectInput (Win32): $have_dx_dinput
2053
Color Correction: $have_lcms
2054
Soft Proof: $have_lcms