configure.ac 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.54)
  3. # Making releases on the stable branch:
  4. # GIMP_MICRO_VERSION += 1;
  5. # GIMP_INTERFACE_AGE += 1;
  6. m4_define([gimp_major_version], [2])
  7. m4_define([gimp_minor_version], [9])
  8. m4_define([gimp_micro_version], [1])
  9. m4_define([gimp_real_version],
  10. [gimp_major_version.gimp_minor_version.gimp_micro_version])
  11. m4_define([gimp_version], [gimp_real_version])
  12. m4_define([gimp_interface_age], [0])
  13. m4_define([gimp_binary_age],
  14. [m4_eval(100 * gimp_minor_version + gimp_micro_version)])
  15. # For overriding the version string. Comment out if not needed.
  16. # m4_define([gimp_version], [2.9.1])
  17. # This is the X.Y used in -lgimp-X.Y
  18. m4_define([gimp_api_version], [2.0])
  19. # Versions used for apps, plugins, tools, pkg-config files, and data,
  20. # as well as global and user prefs
  21. m4_define([gimp_app_version], [2.9])
  22. m4_define([gimp_plugin_version], [2.0])
  23. m4_define([gimp_tool_version], [2.0])
  24. m4_define([gimp_pkgconfig_version], [2.0])
  25. m4_define([gimp_data_version], [2.0])
  26. m4_define([gimp_sysconf_version], [2.0])
  27. m4_define([gimp_user_version], [2.9])
  28. m4_define([gimp_unstable],
  29. m4_if(m4_eval(gimp_minor_version % 2), [1], [yes], [no]))
  30. m4_define([gimp_stable],
  31. m4_if(m4_eval(gimp_minor_version % 2), [0], [yes], [no]))
  32. m4_define([gimp_full_name], [GNU Image Manipulation Program])
  33. # required versions of other packages
  34. m4_define([babl_required_version], [0.1.11])
  35. m4_define([gegl_required_version], [0.2.1])
  36. m4_define([glib_required_version], [2.32.0])
  37. m4_define([atk_required_version], [2.2.0])
  38. m4_define([gtk_required_version], [2.24.10])
  39. m4_define([gdk_pixbuf_required_version], [2.24.1])
  40. m4_define([cairo_required_version], [1.10.2])
  41. m4_define([cairo_pdf_required_version], [1.10.2])
  42. m4_define([pangocairo_required_version], [1.29.4])
  43. m4_define([fontconfig_required_version], [2.2.0])
  44. m4_define([gtkdoc_required_version], [1.0])
  45. m4_define([webkit_required_version], [1.6.1])
  46. m4_define([alsa_required_version], [1.0.0])
  47. m4_define([rsvg_required_version], [2.36.0])
  48. m4_define([wmf_required_version], [0.2.8])
  49. m4_define([pygtk_required_version], [2.10.4])
  50. m4_define([poppler_required_version], [0.12.4])
  51. m4_define([libcurl_required_version], [7.15.1])
  52. m4_define([dbus_glib_required_version], [0.70])
  53. m4_define([libgudev_required_version], [167])
  54. m4_define([exif_required_version], [0.6.15])
  55. m4_define([lcms_required_version], [1.16])
  56. m4_define([libpng_required_version], [1.2.37])
  57. AC_INIT([GIMP], [gimp_version],
  58. [http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP],
  59. [gimp])
  60. AC_CONFIG_HEADERS([config.h])
  61. AC_CONFIG_SRCDIR([app/core/gimp.c])
  62. AC_CONFIG_MACRO_DIR([m4macros])
  63. AM_INIT_AUTOMAKE(no-define dist-bzip2 dist-xz no-dist-gzip -Wno-portability)
  64. # Enable silent build rules by default, requires at least
  65. # Automake-1.11. Disable by either passing --disable-silent-rules to
  66. # configure or passing V=1 to make
  67. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  68. GIMP_MAJOR_VERSION=gimp_major_version
  69. GIMP_MINOR_VERSION=gimp_minor_version
  70. GIMP_MICRO_VERSION=gimp_micro_version
  71. GIMP_INTERFACE_AGE=gimp_interface_age
  72. GIMP_BINARY_AGE=gimp_binary_age
  73. GIMP_VERSION=gimp_version
  74. GIMP_REAL_VERSION=gimp_real_version
  75. GIMP_API_VERSION=gimp_api_version
  76. GIMP_APP_VERSION=gimp_app_version
  77. GIMP_PLUGIN_VERSION=gimp_plugin_version
  78. GIMP_TOOL_VERSION=gimp_tool_version
  79. GIMP_PKGCONFIG_VERSION=gimp_pkgconfig_version
  80. GIMP_DATA_VERSION=gimp_data_version
  81. GIMP_SYSCONF_VERSION=gimp_sysconf_version
  82. GIMP_USER_VERSION=gimp_user_version
  83. GIMP_UNSTABLE=gimp_unstable
  84. GIMP_FULL_NAME="gimp_full_name"
  85. AC_SUBST(GIMP_MAJOR_VERSION)
  86. AC_SUBST(GIMP_MINOR_VERSION)
  87. AC_SUBST(GIMP_MICRO_VERSION)
  88. AC_SUBST(GIMP_INTERFACE_AGE)
  89. AC_SUBST(GIMP_BINARY_AGE)
  90. AC_SUBST(GIMP_VERSION)
  91. AC_SUBST(GIMP_REAL_VERSION)
  92. AC_SUBST(GIMP_API_VERSION)
  93. AC_SUBST(GIMP_APP_VERSION)
  94. AC_SUBST(GIMP_PLUGIN_VERSION)
  95. AC_SUBST(GIMP_TOOL_VERSION)
  96. AC_SUBST(GIMP_PKGCONFIG_VERSION)
  97. AC_SUBST(GIMP_DATA_VERSION)
  98. AC_SUBST(GIMP_SYSCONF_VERSION)
  99. AC_SUBST(GIMP_USER_VERSION)
  100. AC_SUBST(GIMP_UNSTABLE)
  101. AC_SUBST(GIMP_FULL_NAME)
  102. # These are used in the .pc files
  103. GLIB_REQUIRED_VERSION=glib_required_version
  104. GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
  105. GTK_REQUIRED_VERSION=gtk_required_version
  106. CAIRO_REQUIRED_VERSION=cairo_required_version
  107. GEGL_REQUIRED_VERSION=gegl_required_version
  108. AC_SUBST(GLIB_REQUIRED_VERSION)
  109. AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
  110. AC_SUBST(GTK_REQUIRED_VERSION)
  111. AC_SUBST(CAIRO_REQUIRED_VERSION)
  112. AC_SUBST(GEGL_REQUIRED_VERSION)
  113. # The symbol GIMP_UNSTABLE is defined above for substitution in
  114. # Makefiles and conditionally defined here as a preprocessor symbol
  115. # and automake conditional.
  116. if test "x$GIMP_UNSTABLE" = "xyes"; then
  117. AC_DEFINE(GIMP_UNSTABLE, 1,
  118. [Define to 1 if this is an unstable version of GIMP])
  119. fi
  120. AM_CONDITIONAL(GIMP_UNSTABLE, test "x$GIMP_UNSTABLE" = "xyes")
  121. # libtool versioning
  122. m4_define([lt_current], [m4_eval(100 * gimp_minor_version + gimp_micro_version - gimp_interface_age)])
  123. m4_define([lt_revision], [gimp_interface_age])
  124. m4_define([lt_age], [m4_eval(gimp_binary_age - gimp_interface_age)])
  125. LT_VERSION_INFO="lt_current:lt_revision:lt_age"
  126. LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
  127. AC_SUBST(LT_VERSION_INFO)
  128. AC_SUBST(LT_CURRENT_MINUS_AGE)
  129. # gettext i18n support
  130. GETTEXT_PACKAGE=gimp20
  131. AC_SUBST(GETTEXT_PACKAGE)
  132. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
  133. [The prefix for our gettext translation domains.])
  134. # Determine a C compiler to use
  135. AC_PROG_CC
  136. AM_PROG_CC_C_O
  137. # Initialize libtool
  138. LT_PREREQ([2.2])
  139. LT_INIT([disable-static win32-dll])
  140. AM_PROG_AS
  141. # Initialize maintainer mode
  142. AM_MAINTAINER_MODE([enable])
  143. # Check for pkg-config
  144. PKG_PROG_PKG_CONFIG(0.16)
  145. ###########################
  146. # Check target architecture
  147. ###########################
  148. AC_MSG_CHECKING([for target architecture])
  149. case x"$target" in
  150. xNONE | x)
  151. target_or_host="$host" ;;
  152. *)
  153. target_or_host="$target" ;;
  154. esac
  155. AC_MSG_RESULT([$target_or_host])
  156. case "$target_or_host" in
  157. i*86-*-*)
  158. have_x86=yes
  159. AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
  160. ;;
  161. x86_64-*-*)
  162. have_x86=yes
  163. AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
  164. AC_DEFINE(ARCH_X86_64, 1, [Define to 1 if you are compiling for amd64.])
  165. ;;
  166. ppc-*-* | powerpc-*)
  167. have_ppc=yes
  168. AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
  169. ;;
  170. ppc64-*-* | powerpc64-*)
  171. have_ppc=yes
  172. AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
  173. AC_DEFINE(ARCH_PPC64, 1, [Define to 1 if you are compiling for PowerPC64.])
  174. ;;
  175. *)
  176. ;;
  177. esac
  178. #################
  179. # Check for Win32
  180. #################
  181. AC_MSG_CHECKING([for some Win32 platform])
  182. case "$target_or_host" in
  183. *-*-mingw* | *-*-cygwin*)
  184. platform_win32=yes
  185. ;;
  186. *)
  187. platform_win32=no
  188. ;;
  189. esac
  190. AC_MSG_RESULT([$platform_win32])
  191. AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
  192. AC_MSG_CHECKING([for native Win32])
  193. case "$target_or_host" in
  194. *-*-mingw*)
  195. os_win32=yes
  196. case "$host" in
  197. x86_64-*-*)
  198. ;;
  199. *)
  200. WIN32_LARGE_ADDRESS_AWARE='-Wl,--large-address-aware'
  201. ;;
  202. esac
  203. PATHSEP=';'
  204. ;;
  205. *)
  206. os_win32=no
  207. PATHSEP=':'
  208. ;;
  209. esac
  210. AC_MSG_RESULT([$os_win32])
  211. AC_SUBST(WIN32_LARGE_ADDRESS_AWARE)
  212. AC_SUBST(PATHSEP)
  213. AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
  214. AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
  215. if test "$os_win32" = "yes"; then
  216. AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
  217. AC_CHECK_TOOL(WINDRES, windres, :)
  218. else
  219. WINDRES=":"
  220. fi
  221. AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes)
  222. AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
  223. AC_SUBST(WINDRES)
  224. ###############
  225. # Generic stuff
  226. ###############
  227. # Checks for programs.
  228. AC_PROG_INSTALL
  229. AC_PROG_MAKE_SET
  230. # Large file support for the swap file
  231. AC_SYS_LARGEFILE
  232. AC_MSG_CHECKING([whether to turn on debugging])
  233. AC_ARG_ENABLE(debug,
  234. [ --enable-debug turn on debugging (default=no)],
  235. if eval "test x$enable_debug = xyes"; then
  236. DEBUGFLAG="-g"
  237. fi)
  238. if test -n "$DEBUGFLAG"; then
  239. AC_MSG_RESULT([yes])
  240. CFLAGS="$DEBUGFLAG $CFLAGS"
  241. else
  242. AC_MSG_RESULT([no])
  243. fi
  244. AC_MSG_CHECKING([whether to turn on profiling])
  245. AC_ARG_ENABLE(profile,
  246. [ --enable-profile turn on profiling (default=no)],
  247. if eval "test x$enable_profile = xyes"; then
  248. PROFFLAG="-pg"
  249. fi)
  250. if test -n "$PROFFLAG"; then
  251. AC_MSG_RESULT([yes])
  252. CFLAGS="$PROFFLAG $CFLAGS"
  253. else
  254. AC_MSG_RESULT([no])
  255. fi
  256. AC_ARG_ENABLE(ansi,
  257. [ --enable-ansi turn on strict ansi (default=no)],,
  258. enable_ansi=no)
  259. changequote(,)dnl
  260. if eval "test x$GCC = xyes"; then
  261. case " $CFLAGS " in
  262. *[\ \ ]-Wall[\ \ ]*) ;;
  263. *) CFLAGS="$CFLAGS -Wall" ;;
  264. esac
  265. if test "x$enable_ansi" = "xyes"; then
  266. case " $CFLAGS " in
  267. *[\ \ ]-ansi[\ \ ]*) ;;
  268. *) CFLAGS="$CFLAGS -ansi" ;;
  269. esac
  270. case " $CFLAGS " in
  271. *[\ \ ]-pedantic[\ \ ]*) ;;
  272. *) CFLAGS="$CFLAGS -pedantic" ;;
  273. esac
  274. fi
  275. fi
  276. changequote([,])dnl
  277. # If possible, warn if C99isms are used
  278. GIMP_DETECT_CFLAGS(extra_warnings, '-Wdeclaration-after-statement')
  279. CFLAGS="$CFLAGS $extra_warnings"
  280. GIMP_DETECT_CFLAGS(extra_warnings, '-Wmissing-prototypes')
  281. CFLAGS="$CFLAGS $extra_warnings"
  282. # We really don't want anyone using code with missing prototypes, which
  283. # can cause random behavior. If compile breaks due to the following,
  284. # come to us and we will point you to a newer version which works.
  285. GIMP_DETECT_CFLAGS(extra_warnings, '-Werror=missing-prototypes')
  286. CFLAGS="$CFLAGS $extra_warnings"
  287. GIMP_DETECT_CFLAGS(extra_warnings, '-Wstrict-prototypes')
  288. CFLAGS="$CFLAGS $extra_warnings"
  289. GIMP_DETECT_CFLAGS(extra_warnings, '-Wmissing-declarations')
  290. CFLAGS="$CFLAGS $extra_warnings"
  291. GIMP_DETECT_CFLAGS(extra_warnings, '-Winit-self')
  292. CFLAGS="$CFLAGS $extra_warnings"
  293. GIMP_DETECT_CFLAGS(extra_warnings, '-Wpointer-arith')
  294. CFLAGS="$CFLAGS $extra_warnings"
  295. GIMP_DETECT_CFLAGS(extra_warnings, '-Wold-style-definition')
  296. CFLAGS="$CFLAGS $extra_warnings"
  297. GIMP_DETECT_CFLAGS(extra_warnings, '-Wmissing-format-attribute')
  298. CFLAGS="$CFLAGS $extra_warnings"
  299. GIMP_DETECT_CFLAGS(extra_warnings, '-Wformat-security')
  300. CFLAGS="$CFLAGS $extra_warnings"
  301. GIMP_DETECT_CFLAGS(extra_warnings, '-Wformat-non-literal')
  302. CFLAGS="$CFLAGS $extra_warnings"
  303. GIMP_DETECT_CFLAGS(extra_warnings, '-fno-common')
  304. CFLAGS="$CFLAGS $extra_warnings"
  305. GIMP_DETECT_CFLAGS(extra_warnings, '-fdiagnostics-show-option')
  306. CFLAGS="$CFLAGS $extra_warnings"
  307. # Extra optimization flags for super performance
  308. GIMP_DETECT_CFLAGS(extra_warnings, '--omg-optimized')
  309. CFLAGS="$CFLAGS $extra_warnings"
  310. GIMP_DETECT_CFLAGS(extra_warnings, '--disable-instructions')
  311. CFLAGS="$CFLAGS $extra_warnings"
  312. # Ensure MSVC-compatible struct packing convention is used when
  313. # compiling for Win32 with gcc.
  314. # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
  315. # gcc2 uses "-fnative-struct".
  316. if test "x$os_win32" = xyes; then
  317. if test "x$GCC" = xyes; then
  318. msnative_struct=''
  319. AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
  320. if test -z "$ac_cv_prog_CC"; then
  321. our_gcc="$CC"
  322. else
  323. our_gcc="$ac_cv_prog_CC"
  324. fi
  325. case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
  326. 2.)
  327. if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
  328. msnative_struct='-fnative-struct'
  329. fi
  330. ;;
  331. *)
  332. if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
  333. msnative_struct='-mms-bitfields'
  334. fi
  335. ;;
  336. esac
  337. if test "x$msnative_struct" = x ; then
  338. AC_MSG_RESULT([no way])
  339. AC_MSG_WARN([build will be incompatible with GTK+ DLLs])
  340. else
  341. CFLAGS="$CFLAGS $msnative_struct"
  342. AC_MSG_RESULT([${msnative_struct}])
  343. fi
  344. fi
  345. fi
  346. AC_HEADER_STDC
  347. AC_HEADER_SYS_WAIT
  348. AC_HEADER_TIME
  349. AC_CHECK_HEADERS(sys/param.h sys/time.h sys/times.h sys/wait.h unistd.h)
  350. AC_TYPE_PID_T
  351. AC_FUNC_VPRINTF
  352. AC_FUNC_ALLOCA
  353. # check some more funcs
  354. AC_CHECK_FUNCS(fsync)
  355. AC_CHECK_FUNCS(difftime mmap)
  356. AM_BINRELOC
  357. # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
  358. AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
  359. AC_LINK_IFELSE(
  360. [AC_LANG_PROGRAM(
  361. [[#include <langinfo.h>]],
  362. [[char c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));]])],
  363. [nl_ok=yes],
  364. [nl_ok=no])
  365. AC_MSG_RESULT($nl_ok)
  366. if test "$nl_ok" = "yes"; then
  367. AC_DEFINE(HAVE__NL_MEASUREMENT_MEASUREMENT, 1,
  368. [Define to 1 if _NL_MEASUREMENT_MEASUREMENT is available])
  369. fi
  370. ######################
  371. # Internationalisation
  372. ######################
  373. IT_PROG_INTLTOOL(0.40.1)
  374. AM_GLIB_GNU_GETTEXT
  375. ###########
  376. # iso-codes
  377. ###########
  378. AC_MSG_CHECKING([for iso-codes])
  379. PKG_CHECK_EXISTS(iso-codes,
  380. have_iso_codes="yes"
  381. AC_DEFINE(HAVE_ISO_CODES, 1,
  382. [Define to 1 if the iso-codes package is available])
  383. ISO_CODES_PREFIX=`$PKG_CONFIG --variable=prefix iso-codes`
  384. ISO_CODES_LOCATION="$ISO_CODES_PREFIX/share/xml/iso-codes"
  385. ISO_CODES_LOCALEDIR="$ISO_CODES_PREFIX/$DATADIRNAME/locale",
  386. have_iso_codes="no (iso-codes package not found)")
  387. AC_MSG_RESULT($have_iso_codes)
  388. AC_SUBST(ISO_CODES_LOCATION)
  389. AC_SUBST(ISO_CODES_LOCALEDIR)
  390. ###############################
  391. # Checks for required libraries
  392. ###############################
  393. PKG_CHECK_MODULES(BABL, babl >= babl_required_version)
  394. PKG_CHECK_MODULES(GEGL, gegl-0.2 >= gegl_required_version)
  395. PKG_CHECK_MODULES(ATK, atk >= atk_required_version)
  396. AM_PATH_GLIB_2_0(glib_required_version, :,
  397. AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
  398. gobject gthread)
  399. PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
  400. PKG_CHECK_MODULES(GIO, gio-2.0)
  401. AC_MSG_CHECKING([if GLib is version 2.31.0 or newer])
  402. if $PKG_CONFIG --atleast-version=2.31.0 glib-2.0; then
  403. have_glib_2_31=yes
  404. else
  405. have_glib_2_31=no
  406. fi
  407. AC_MSG_RESULT($have_glib_2_31)
  408. # Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
  409. gimp_save_LIBS=$LIBS
  410. LIBS="$LIBS $GLIB_LIBS"
  411. AC_CHECK_FUNCS(bind_textdomain_codeset,,
  412. AC_MSG_ERROR([
  413. *** Check for bind_textdomain_codeset() failed! This is required.
  414. ]))
  415. LIBS=$gimp_save_LIBS
  416. AC_PATH_XTRA
  417. AM_PATH_GTK_2_0(gtk_required_version, :,
  418. AC_MSG_ERROR(Test for GTK+ failed. See the file 'INSTALL' for help.),
  419. gthread)
  420. # GTK+ 2.26.0 will never be released, we keep the check around anyway
  421. # because we will need it again after the switch to GTK+ 3.x
  422. AC_MSG_CHECKING([if GTK+ is version 2.26.0 or newer (bogus placeholder check)])
  423. if $PKG_CONFIG --atleast-version=2.26.0 gtk+-2.0; then
  424. have_gtk_2_26=yes
  425. else
  426. have_gtk_2_26=no
  427. fi
  428. AC_MSG_RESULT($have_gtk_2_26)
  429. PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gdk_pixbuf_required_version)
  430. AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
  431. if test "x$GDK_PIXBUF_CSOURCE" = xno; then
  432. AC_MSG_ERROR(Could not find gdk-pixbuf-csource in your PATH)
  433. fi
  434. AC_MSG_CHECKING([if GdkPixbuf is version 2.26.0 or newer])
  435. if $PKG_CONFIG --atleast-version=2.26.0 gdk-pixbuf-2.0; then
  436. have_gdk_pixbuf_2_26=yes
  437. else
  438. have_gdk_pixbuf_2_26=no
  439. fi
  440. AC_MSG_RESULT($have_gdk_pixbuf_2_26)
  441. PKG_CHECK_MODULES(CAIRO, cairo >= cairo_required_version)
  442. PKG_CHECK_MODULES(PANGOCAIRO,
  443. pangocairo >= pangocairo_required_version pangoft2, :,
  444. AC_MSG_ERROR([Test for PangoCairo failed.
  445. *** We require Pango with the optional support for Cairo compiled in.
  446. *** See the file 'INSTALL' for more help.]))
  447. gimp_save_CFLAGS=$CFLAGS
  448. CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
  449. PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
  450. AC_MSG_CHECKING([if Pango is version 1.32.0 or newer])
  451. if $PKG_CONFIG --atleast-version=1.32.0 pango; then
  452. have_pango_1_32=yes
  453. else
  454. have_pango_1_32=no
  455. fi
  456. AC_MSG_RESULT($have_pango_1_32)
  457. CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
  458. AC_MSG_CHECKING([if Pango is built with a recent fontconfig])
  459. AC_COMPILE_IFELSE(
  460. [AC_LANG_PROGRAM(
  461. [[#include <fontconfig/fontconfig.h>]],
  462. [[FcObjectSet *os; os = FcObjectSetBuild (FC_FAMILY, FC_WIDTH);]])],
  463. [fontconfig_ok=yes],
  464. [fontconfig_ok=no])
  465. AC_MSG_RESULT($fontconfig_ok)
  466. CFLAGS=$gimp_save_CFLAGS
  467. if test "x$fontconfig_ok" = xno; then
  468. AC_MSG_ERROR([
  469. *** You have a fontconfig >= fontconfig_required_version installed on your system, but your
  470. *** Pango library is using an older version. This old version is probably in
  471. *** /usr/X11R6. Look at the above output, and note that the result for
  472. *** FONTCONFIG_CFLAGS is not in the result for PANGOCAIRO_CFLAGS, and that
  473. *** there is likely an extra -I line, other than the ones for GLIB,
  474. *** Freetype, and Pango itself. That's where your old fontconfig files are.
  475. *** Rebuild pango, and make sure that it uses the newer fontconfig. The
  476. *** easiest way be sure of this is to simply get rid of the old fontconfig.
  477. *** When you rebuild pango, make sure the result for FONTCONFIG_CFLAGS is
  478. *** the same as the result here.])
  479. fi
  480. AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
  481. if test "x$FREETYPE_CONFIG" != "xno" ; then
  482. AC_MSG_CHECKING([for freetype libraries])
  483. FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
  484. AC_MSG_RESULT($FREETYPE_LIBS)
  485. fi
  486. AC_SUBST(FREETYPE_LIBS)
  487. ##########################################
  488. # Check for some special functions we need
  489. ##########################################
  490. AC_CHECK_HEADERS(math.h ieeefp.h)
  491. # DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
  492. AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
  493. gimp_save_LIBS=$LIBS
  494. LIBS="$LIBS -lm"
  495. AC_RUN_IFELSE(
  496. [AC_LANG_SOURCE([[
  497. #include <math.h>
  498. int main (void) { return (log(1) != log(1.)); }]])],
  499. [AC_MSG_RESULT(none needed)],
  500. [gimp_save_CFLAGS=$CFLAGS
  501. CFLAGS="$CFLAGS -std1"
  502. AC_RUN_IFELSE(
  503. [AC_LANG_SOURCE([[
  504. #include <math.h>
  505. int main (void) { return (log(1) != log(1.)); }]])],
  506. [AC_MSG_RESULT(-std1)],
  507. [AC_MSG_RESULT()
  508. CFLAGS=$gimp_save_CFLAGS
  509. AC_MSG_WARN([No ANSI prototypes found in library. (-std1 didn't work.)])],
  510. [AC_MSG_RESULT])],
  511. [AC_MSG_RESULT()])
  512. # Check for finite or isfinite
  513. AC_CHECK_FUNCS(finite, , [
  514. AC_MSG_CHECKING(for finite in <math.h>)
  515. AC_LINK_IFELSE(
  516. [AC_LANG_PROGRAM(
  517. [[#include <math.h>]],
  518. [[double f = 0.0; finite (f)]])],
  519. [AC_DEFINE(HAVE_FINITE, 1)
  520. AC_MSG_RESULT(yes)],
  521. [AC_MSG_RESULT(no)
  522. AC_MSG_CHECKING(for isfinite in <math.h>)
  523. AC_LINK_IFELSE(
  524. [AC_LANG_PROGRAM(
  525. [[#include <math.h>]],
  526. [[float f = 0.0; isfinite(f)]])],
  527. [AC_DEFINE([HAVE_ISFINITE],[1],[Define to 1 if you have the isfinite function.])
  528. AC_MSG_RESULT(yes)],
  529. [AC_MSG_RESULT(no)])])])
  530. AC_SUBST(HAVE_FINITE)
  531. AC_SUBST(HAVE_ISFINITE)
  532. LIBS=$gimp_save_LIBS
  533. # check for rint
  534. AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT, 1,
  535. [Define to 1 if you have the rint function.]), [
  536. AC_CHECK_LIB(m, rint, [
  537. AC_DEFINE(HAVE_RINT)])])
  538. #####################################################################
  539. # Check for extra libs needed for getaddrinfo, getnameinfo and socket
  540. #####################################################################
  541. gimp_save_LIBS=$LIBS
  542. LIBS=""
  543. AC_CHECK_FUNCS(getaddrinfo, , AC_CHECK_LIB(nsl, getaddrinfo))
  544. AC_CHECK_FUNCS(getnameinfo, , AC_CHECK_LIB(nsl, getnameinfo))
  545. AC_CHECK_LIB(socket, socket)
  546. SOCKET_LIBS="$LIBS"
  547. LIBS=$gimp_save_LIBS
  548. AC_SUBST(SOCKET_LIBS)
  549. ########################
  550. # Check for MMX assembly
  551. ########################
  552. AC_ARG_ENABLE(mmx,
  553. [ --enable-mmx enable MMX support (default=auto)],,
  554. enable_mmx=$have_x86)
  555. AC_ARG_ENABLE(sse,
  556. [ --enable-sse enable SSE support (default=auto)],,
  557. enable_sse=$enable_mmx)
  558. if test "x$enable_mmx" = xyes; then
  559. GIMP_DETECT_CFLAGS(MMX_EXTRA_CFLAGS, '-mmmx')
  560. SSE_EXTRA_CFLAGS=
  561. AC_MSG_CHECKING(whether we can compile MMX code)
  562. mmx_save_CFLAGS="$CFLAGS"
  563. CFLAGS="$mmx_save_CFLAGS $MMX_EXTRA_CFLAGS"
  564. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("movq 0, %mm0");])],
  565. AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
  566. AC_MSG_RESULT(yes)
  567. if test "x$enable_sse" = xyes; then
  568. GIMP_DETECT_CFLAGS(sse_flag, '-msse')
  569. SSE_EXTRA_CFLAGS="$MMX_EXTRA_CFLAGS $sse_flag"
  570. AC_MSG_CHECKING(whether we can compile SSE code)
  571. CFLAGS="$CFLAGS $sse_flag"
  572. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("movntps %xmm0, 0");])],
  573. AC_DEFINE(USE_SSE, 1, [Define to 1 if SSE assembly is available.])
  574. AC_MSG_RESULT(yes)
  575. ,
  576. enable_sse=no
  577. AC_MSG_RESULT(no)
  578. AC_MSG_WARN([The assembler does not support the SSE command set.])
  579. )
  580. fi
  581. ,
  582. enable_mmx=no
  583. AC_MSG_RESULT(no)
  584. AC_MSG_WARN([The assembler does not support the MMX command set.])
  585. )
  586. CFLAGS="$mmx_save_CFLAGS"
  587. AC_SUBST(MMX_EXTRA_CFLAGS)
  588. AC_SUBST(SSE_EXTRA_CFLAGS)
  589. fi
  590. ############################
  591. # Check for AltiVec assembly
  592. ############################
  593. AC_ARG_ENABLE(altivec,
  594. [ --enable-altivec enable AltiVec support (default=auto)],,
  595. enable_altivec=$have_ppc)
  596. if test "x$enable_altivec" = xyes; then
  597. GIMP_DETECT_CFLAGS(altivec_flag, '-faltivec' '-maltivec -mabi=altivec')
  598. ALTIVEC_EXTRA_CFLAGS=
  599. case "$altivec_flag" in
  600. -maltivec*)
  601. altivec_save_CPPFLAGS="$CPPFLAGS"
  602. CPPFLAGS="$altivec_save_CPPFLAGS $altivec_flag"
  603. AC_CHECK_HEADERS(altivec.h, [ALTIVEC_EXTRA_CFLAGS="$altivec_flag"])
  604. CPPFLAGS="$altivec_save_CPPFLAGS"
  605. ;;
  606. *)
  607. ALTIVEC_EXTRA_CFLAGS="$altivec_flag"
  608. ;;
  609. esac
  610. AC_SUBST(ALTIVEC_EXTRA_CFLAGS)
  611. AC_MSG_CHECKING(whether we can compile AltiVec code)
  612. can_use_altivec=no
  613. if test -z "$ALTIVEC_EXTRA_CFLAGS"; then
  614. AC_MSG_RESULT(no)
  615. AC_MSG_WARN([The compiler does not support the AltiVec command set.])
  616. else
  617. case "$target_or_host" in
  618. *-*-darwin*)
  619. can_use_altivec=yes
  620. AC_DEFINE(HAVE_ALTIVEC_SYSCTL, 1,
  621. [Define to 1 if the altivec runtime test should use a sysctl.])
  622. ;;
  623. *)
  624. AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("vand %v0, %v0, %v0");])],
  625. can_use_altivec=yes, can_use_altivec=no)
  626. ;;
  627. esac
  628. AC_MSG_RESULT($can_use_altivec)
  629. if test "x$can_use_altivec" = "xyes"; then
  630. AC_DEFINE(USE_ALTIVEC, 1, [Define to 1 if AltiVec support is available.])
  631. else
  632. enable_altivec=no
  633. AC_MSG_WARN([The assembler does not support the AltiVec command set.])
  634. fi
  635. fi
  636. enable_altivec="$can_use_altivec"
  637. fi
  638. ###################################
  639. # Checks for shared memory handling
  640. ###################################
  641. # MacOS X has broken SysV shm
  642. case "$target_or_host" in
  643. *-*-darwin* | *-*-rhapsody* | *-*-machten*)
  644. shmdefault=posix
  645. ;;
  646. *)
  647. shmdefault=sysv
  648. ;;
  649. esac
  650. shmtype=auto
  651. AC_ARG_WITH(shm, [ --with-shm=none|sysv|posix|auto shared memory transport type (default=auto)], shmtype=$with_shm)
  652. case $shmtype in
  653. none|sysv|posix) ;;
  654. auto) shmtype=$shmdefault ;;
  655. *) AC_MSG_ERROR([Invalid shared memory transport type: use none, sysv, posix, or auto.]);;
  656. esac
  657. if test "x$platform_win32" = "xyes"; then
  658. shmtype=win32
  659. elif test "x$shmtype" = "xsysv"; then
  660. AC_CHECK_HEADER(sys/ipc.h,
  661. [AC_DEFINE(HAVE_IPC_H, 1,
  662. [Define to 1 if you have the <sys/ipc.h> header file.])],
  663. no_sys_ipc=yes)
  664. AC_CHECK_HEADER(sys/shm.h,
  665. [AC_DEFINE(HAVE_SHM_H, 1,
  666. [Define to 1 if you have the <sys/shm.h> header file.])],
  667. no_sys_shm=yes)
  668. if test "$ac_cv_header_sys_shm_h" = "yes"; then
  669. AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
  670. AC_RUN_IFELSE(
  671. [AC_LANG_SOURCE([[
  672. #include <sys/types.h>
  673. #include <sys/ipc.h>
  674. #include <sys/shm.h>
  675. int main()
  676. {
  677. int id;
  678. char *shmaddr;
  679. id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
  680. if (id == -1)
  681. exit (2);
  682. shmaddr = shmat (id, 0, 0);
  683. shmctl (id, IPC_RMID, 0);
  684. if ((char*) shmat (id, 0, 0) == (char*) -1)
  685. {
  686. shmdt (shmaddr);
  687. exit (1);
  688. }
  689. shmdt (shmaddr);
  690. shmdt (shmaddr);
  691. exit (0);
  692. }
  693. ]])],
  694. [AC_DEFINE([IPC_RMID_DEFERRED_RELEASE],[1],
  695. [Define to 1 if shared memory segments are released deferred.])
  696. AC_MSG_RESULT(yes)],
  697. [AC_MSG_RESULT(no)],
  698. [AC_MSG_RESULT(assuming no)])
  699. AC_DEFINE(USE_SYSV_SHM, 1, [Define to 1 to use SYSV shared memory])
  700. else
  701. shmtype=none
  702. fi
  703. elif test "x$shmtype" = "xposix"; then
  704. have_shm_open=no
  705. AC_CHECK_FUNC(shm_open, have_shm_open=yes)
  706. RT_LIBS=
  707. if test "$have_shm_open" != "yes"; then
  708. AC_CHECK_LIB(rt, shm_open, RT_LIBS="-lrt" have_shm_open=yes)
  709. fi
  710. AC_SUBST(RT_LIBS)
  711. AC_CHECK_HEADER(sys/mman.h,
  712. [AC_DEFINE(HAVE_MMAN_H, 1,
  713. [Define to 1 if you have the <sys/mman.h> header file.])],
  714. no_sys_mman=yes)
  715. if test "$ac_cv_func_mmap" = "yes" &&
  716. test "$ac_cv_header_sys_mman_h" = "yes" &&
  717. test "$have_shm_open" = "yes"; then
  718. AC_DEFINE(USE_POSIX_SHM, 1, [Define to 1 to use POSIX shared memory])
  719. else
  720. shmtype=none
  721. fi
  722. fi
  723. AC_MSG_CHECKING(for shared memory transport type)
  724. AC_MSG_RESULT($shmtype)
  725. ########################
  726. # Define a symbol prefix
  727. ########################
  728. AC_MSG_CHECKING([whether symbols are prefixed])
  729. case "$host_os" in
  730. mingw*)
  731. case "$host_cpu" in
  732. x86_64) SYMPREFIX='' ;;
  733. *) SYMPREFIX='_' ;;
  734. esac
  735. ;;
  736. darwin* | rhapsody* | machten*)
  737. SYMPREFIX='_'
  738. ;;
  739. *)
  740. ;;
  741. esac
  742. if test -n "$SYMPREFIX"; then
  743. AC_MSG_RESULT([yes, with a $SYMPREFIX])
  744. else
  745. AC_MSG_RESULT(no)
  746. fi
  747. AC_SUBST(SYMPREFIX)
  748. ############################
  749. # Check for select and fdset
  750. ############################
  751. if test "x$os_win32" != xyes; then
  752. AC_MSG_CHECKING([fd_set and sys/select])
  753. AC_COMPILE_IFELSE(
  754. [AC_LANG_PROGRAM(
  755. [[#include <sys/types.h>]],
  756. [[fd_set readMask, writeMask;]])],
  757. [gimp_ok=yes],
  758. [gimp_ok=no])
  759. if test "x$gimp_ok" = xno; then
  760. AC_EGREP_HEADER(fd_mask, sys/select.h, gimp_ok=yes)
  761. if test "x$gimp_ok" = xyes; then
  762. AC_DEFINE(HAVE_SYS_SELECT_H, 1,
  763. [Define to 1 if you have the <sys/select.h> header.])
  764. fi
  765. fi
  766. AC_MSG_RESULT($gimp_ok)
  767. if test "x$gimp_ok" = xno; then
  768. AC_DEFINE(NO_FD_SET, 1,
  769. [Define to 1 if you don't have the fd_set typedef.])
  770. fi
  771. fi
  772. #############################
  773. # Threads and multi processor
  774. #############################
  775. AC_ARG_ENABLE(mp, [ --disable-mp disable support for multiple processors])
  776. if test "x$enable_mp" != "xno"; then
  777. AC_DEFINE(ENABLE_MP, 1,
  778. [Define to 1 to enable support for multiple processors.])
  779. fi
  780. ################################
  781. # Some plug-ins are X11 specific
  782. ################################
  783. # Check if building for GTK+-X11
  784. gdk_target=`$PKG_CONFIG --variable=target gtk+-2.0`
  785. have_libxmu="no (building for $gdk_target)"
  786. if test "$gdk_target" = x11; then
  787. # doc-shooter is X11 specific
  788. DOC_SHOOTER=doc-shooter
  789. # screenshot plug-in needs to link to X11 explicitely
  790. SCREENSHOT_LIBS="$X_LIBS -lX11"
  791. gimp_save_CFLAGS="$CFLAGS"
  792. gimp_save_LDFLAGS="$LDFLAGS"
  793. CFLAGS="$CFLAGS $GTK_CFLAGS"
  794. LDFLAGS="$LDFLAGS $X_LIBS"
  795. # Test for Xmu
  796. if test -z "$XMU_LIBS"; then
  797. AC_CHECK_LIB(Xmu, XmuClientWindow,
  798. [AC_CHECK_HEADERS(X11/Xmu/WinUtil.h,
  799. have_libxmu=yes
  800. XMU_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXmu -lXt"
  801. SCREENSHOT_LIBS="$XMU_LIBS",
  802. [have_libxmu="no (XMU header file not found)"],[#include <gdk/gdkx.h>])],
  803. [have_libxmu="no (XMU library not found)"], -lXt -lX11)
  804. fi
  805. # Check for shaped window extension
  806. AC_CHECK_LIB(Xext, XShapeGetRectangles,
  807. [AC_CHECK_HEADERS(X11/extensions/shape.h,
  808. SCREENSHOT_LIBS="$SCREENSHOT_LIBS -lXext",,[#include <gdk/gdkx.h>])],,
  809. -lX11 -lXext)
  810. CFLAGS="$gimp_save_CFLAGS"
  811. LDFLAGS="$gimp_save_LDFLAGS"
  812. # check for the XFixes extension
  813. PKG_CHECK_MODULES(XFIXES, xfixes,
  814. AC_DEFINE(HAVE_XFIXES, 1,
  815. [Define to 1 to if the XFIXES X extension is available])
  816. SCREENSHOT_LIBS="$SCREENSHOT_LIBS $XFIXES_LIBS",
  817. true)
  818. fi
  819. AC_SUBST(XMU_LIBS)
  820. AC_SUBST(SCREENSHOT_LIBS)
  821. AC_SUBST(DOC_SHOOTER)
  822. GIMP_COMMAND='gimp-gimp_app_version'
  823. AC_SUBST(GIMP_COMMAND)
  824. ############
  825. # MIME types
  826. ############
  827. # The list of MIME types that are supported by plug-ins that are compiled
  828. # unconditionally:
  829. MIME_TYPES="application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih"
  830. ###################
  831. # Check for libtiff
  832. ###################
  833. AC_ARG_WITH(libtiff, [ --without-libtiff build without TIFF support])
  834. have_libtiff=no
  835. if test "x$with_libtiff" != xno && test -z "$TIFF_LIBS"; then
  836. have_libtiff=yes
  837. AC_CHECK_LIB(tiff, TIFFReadScanline,
  838. [AC_CHECK_HEADER(tiffio.h,
  839. FILE_TIFF_LOAD='file-tiff-load$(EXEEXT)'; FILE_TIFF_SAVE='file-tiff-save$(EXEEXT)'; TIFF_LIBS='-ltiff',
  840. [have_libtiff="no (TIFF header files not found)"])],
  841. [AC_CHECK_LIB(tiff, TIFFWriteScanline,
  842. [AC_CHECK_HEADER(tiffio.h,
  843. FILE_TIFF_LOAD='file-tiff-load$(EXEEXT)'; FILE_TIFF_SAVE='file-tiff-save$(EXEEXT)'; TIFF_LIBS='-ltiff -ljpeg -lz',
  844. [have_libtiff="no (TIFF header files not found)"])],
  845. [AC_CHECK_LIB(tiff34, TIFFFlushData,
  846. [AC_CHECK_HEADER(tiffio.h,
  847. FILE_TIFF_LOAD='file-tiff-load$(EXEEXT)'; FILE_TIFF_SAVE='file-tiff-save$(EXEEXT)'; TIFF_LIBS='-ltiff34 -ljpeg -lz',
  848. [have_libtiff="no (TIFF header files not found)"])],
  849. [have_libtiff="no (TIFF library not found)"], -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
  850. fi
  851. if test "x$with_libtiff" != xno && test -z "$TIFF_LIBS"; then
  852. AC_MSG_ERROR([
  853. *** Checks for TIFF libary failed. You can build without it by passing
  854. *** --without-libtiff to configure but you won't be able to use TIFFs then.])
  855. fi
  856. if test "x$have_libtiff" = xyes; then
  857. MIME_TYPES="$MIME_TYPES;image/tiff"
  858. fi
  859. AC_SUBST(FILE_TIFF_LOAD)
  860. AC_SUBST(FILE_TIFF_SAVE)
  861. AC_SUBST(TIFF_LIBS)
  862. ###################
  863. # Check for libjpeg
  864. ###################
  865. AC_ARG_WITH(libjpeg, [ --without-libjpeg build without JPEG support])
  866. jpeg_ok=no
  867. if test "x$with_libjpeg" != xno && test -z "$JPEG_LIBS"; then
  868. AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
  869. jpeg_ok=yes,
  870. [jpeg_ok="no (JPEG library not found)"
  871. AC_MSG_WARN(*** XJT plug-in will not be built (JPEG library not found) ***)])
  872. if test "$jpeg_ok" = yes; then
  873. AC_MSG_CHECKING([for jpeglib.h])
  874. AC_PREPROC_IFELSE(
  875. [AC_LANG_SOURCE([[
  876. #include <stdio.h>
  877. #undef HAVE_STDDEF_H
  878. #undef HAVE_STDLIB_H
  879. #undef PACKAGE
  880. #undef VERSION
  881. #include <jpeglib.h>]])],
  882. [jpeg_ok=yes],
  883. [jpeg_ok="no (Can't include jpeglib.h)"])
  884. AC_MSG_RESULT($jpeg_ok)
  885. if test "$jpeg_ok" = yes; then
  886. AC_CHECK_LIB(jpeg, jpeg_save_markers,
  887. JPEG='jpeg$(EXEEXT)'; JPEG_LIBS='-ljpeg',
  888. jpeg_ok="no (JPEG library is too old)")
  889. else
  890. jpeg_ok="no (JPEG header file not found)"
  891. fi
  892. fi
  893. fi
  894. if test "x$with_libjpeg" != xno && test -z "$JPEG_LIBS"; then
  895. AC_MSG_ERROR([
  896. *** Checks for JPEG library failed. You can build without it by passing
  897. *** --without-libjpeg to configure but you won't be able to use JPEGs then.])
  898. fi
  899. if test "x$jpeg_ok" = xyes; then
  900. MIME_TYPES="$MIME_TYPES;image/jpeg"
  901. fi
  902. AM_CONDITIONAL(BUILD_JPEG, test "x$jpeg_ok" = xyes)
  903. AC_SUBST(JPEG_LIBS)
  904. ## xjt does build, but it is more confusing than useful on Win32,
  905. ## as it wants to run tar, mv and bzip2, which seldom are available
  906. AM_CONDITIONAL(BUILD_XJT, test "x$jpeg_ok" = xyes && test "x$os_win32" = xno)
  907. if test "x$jpeg_ok" != xyes; then
  908. have_xjt="no (no JPEG library)"
  909. elif test "x$os_win32" = xyes; then
  910. have_xjt="no (not built on Windows)"
  911. else
  912. have_xjt=yes
  913. fi
  914. ################
  915. # Check for libz
  916. ################
  917. have_zlib=yes
  918. if test -z "$Z_LIBS"; then
  919. AC_CHECK_LIB(z, gzsetparams,
  920. [AC_CHECK_HEADER(zlib.h,
  921. FILE_PSP='file-psp$(EXEEXT)'; Z_LIBS='-lz',
  922. [have_zlib="no (ZLIB header files not found)"])],
  923. [have_zlib="no (ZLIB library not found)"])
  924. fi
  925. if test "x$have_zlib" = xyes; then
  926. MIME_TYPES="$MIME_TYPES;image/x-psp"
  927. fi
  928. AC_SUBST(FILE_PSP)
  929. AM_CONDITIONAL(HAVE_Z, test "x$have_zlib" = xyes)
  930. AC_SUBST(Z_LIBS)
  931. ####################
  932. # Check for libbzip2
  933. ####################
  934. AC_ARG_WITH(bzip2, [ --without-bzip2 build without bzip2 support])
  935. have_libbzip2=no
  936. if test "x$with_bzip2" != xno; then
  937. have_libbzip2=yes
  938. AC_CHECK_LIB(bz2, BZ2_bzCompress,
  939. [AC_CHECK_HEADER(bzlib.h,
  940. BZIP2_LIBS='-lbz2',
  941. [have_libbzip2="no (libbzip2 header files not found)"])],
  942. [have_libbzip2="no (libbzip2 library not found)"])
  943. if test "x$have_libbzip2" != xyes -a "x$with_bzip2" = xyes; then
  944. AC_MSG_ERROR([
  945. *** Checks for bzip2 library failed. You can build without it by passing
  946. *** --without-bzip2 to configure but you won't be able to use compressed files then.])
  947. fi
  948. fi
  949. AM_CONDITIONAL(HAVE_BZIP2, test "x$have_libbzip2" = xyes)
  950. AC_SUBST(BZIP2_LIBS)
  951. have_compressor=no
  952. if test "x$have_zlib" = xyes && test "x$have_libbzip2" = xyes; then
  953. have_compressor=yes
  954. fi
  955. ###############################
  956. # Check for Ghostscript library
  957. ###############################
  958. AC_ARG_WITH(gs, [ --without-gs build without Ghostscript support])
  959. have_gs=no
  960. if test "x$with_gs" != xno; then
  961. have_gs=yes
  962. AC_CHECK_LIB(gs, gsapi_new_instance,
  963. [AC_CHECK_HEADER(ghostscript/iapi.h,
  964. FILE_PS='file-ps$(EXEEXT)'; GS_LIBS='-lgs',
  965. [have_gs="no (Ghostscript header files not found)"])],
  966. [have_gs="no (Ghostscript library not found)"])
  967. if test "x$have_gs" != xyes -a "x$with_gs" = xyes; then
  968. AC_MSG_ERROR([
  969. *** Checks for Ghostscript library failed. You can build without it by passing
  970. *** --without-gs to configure but you won't be able to use Postscript files then.])
  971. fi
  972. fi
  973. AC_SUBST(FILE_PS)
  974. AM_CONDITIONAL(HAVE_GS, test "x$have_gs" = xyes)
  975. AC_SUBST(GS_LIBS)
  976. ##################
  977. # Check for libpng
  978. ##################
  979. AC_ARG_WITH(libpng, [ --without-libpng build without PNG support])
  980. have_libpng=no
  981. if test "x$with_libpng" != xno; then
  982. have_libpng=yes
  983. PKG_CHECK_MODULES(PNG, libpng >= libpng_required_version,
  984. FILE_PNG='file-png$(EXEEXT)',
  985. [have_libpng="no (libpng not found)"
  986. AC_MSG_ERROR([
  987. *** Checks for PNG library failed. You can build without it by passing
  988. *** --without-libpng to configure but you won't be able to use PNGs then.])])
  989. fi
  990. if test "x$have_libpng" = xyes; then
  991. MIME_TYPES="$MIME_TYPES;image/png;image/x-icon"
  992. PNG_CFLAGS="$PNG_CFLAGS -DPNG_PEDANTIC_WARNINGS"
  993. fi
  994. AC_SUBST(FILE_PNG)
  995. AM_CONDITIONAL(HAVE_PNG, test "x$have_libpng" = xyes)
  996. ##################
  997. # Check for libmng
  998. ##################
  999. AC_ARG_WITH(libmng, [ --without-libmng build without MNG support])
  1000. have_libmng=no
  1001. if test "x$with_libmng" != xno && test -z "$MNG_LIBS" &&
  1002. test -n "$PNG_LIBS" && test -n "$JPEG_LIBS" && test -n "$Z_LIBS"; then
  1003. AC_CHECK_LIB(mng, mng_create,
  1004. [AC_CHECK_HEADER(libmng.h, mng_ok=yes)],
  1005. [have_libmng="no (MNG library not found)"], -lz -lm)
  1006. if test "$mng_ok" = yes; then
  1007. have_libmng=yes
  1008. FILE_MNG='file-mng$(EXEEXT)'; MNG_LIBS="-lmng $JPEG_LIBS $PNG_LIBS"; MNG_CFLAGS="$PNG_CFLAGS"
  1009. else
  1010. have_libmng="no (MNG header file not found)"
  1011. fi
  1012. fi
  1013. AC_SUBST(FILE_MNG)
  1014. AC_SUBST(MNG_LIBS)
  1015. AC_SUBST(MNG_CFLAGS)
  1016. ############################################################
  1017. # libexif: Library to allow exif tags to be read from, and
  1018. # saved to, jpeg files. Currently, this permits exif data to
  1019. # avoid destruction, but no data modification is performed.
  1020. ############################################################
  1021. AC_ARG_WITH(libexif, [ --without-libexif build without EXIF support])
  1022. have_libexif=no
  1023. if test "x$with_libexif" != xno && test -z "$EXIF_LIBS" && test -n "$JPEG_LIBS"; then
  1024. have_libexif=yes
  1025. PKG_CHECK_MODULES(EXIF, libexif >= exif_required_version,
  1026. AC_DEFINE(HAVE_LIBEXIF, 1, [Define to 1 if libexif is available]),
  1027. have_libexif="no (libexif not found or too old)")
  1028. fi
  1029. AC_SUBST(EXIF_CFLAGS)
  1030. AC_SUBST(EXIF_LIBS)
  1031. AM_CONDITIONAL(HAVE_LIBEXIF, test "x$have_libexif" = xyes)
  1032. #################
  1033. # Check for libaa
  1034. #################
  1035. AC_ARG_WITH(aa, [ --without-aa do not build the AA plug-in])
  1036. have_libaa=no
  1037. if test "x$with_aa" != xno && test -z "$AA_LIBS"; then
  1038. have_libaa=yes
  1039. AC_CHECK_LIB(aa, aa_printf,
  1040. [AC_CHECK_HEADER(aalib.h,
  1041. FILE_AA='file-aa$(EXEEXT)'; AA_LIBS='-laa',
  1042. [have_libaa="no (AA header file not found)"])],
  1043. [have_libaa="no (AA library not found)"])
  1044. fi
  1045. AC_SUBST(FILE_AA)
  1046. AC_SUBST(AA_LIBS)
  1047. ##################
  1048. # Check for libxpm
  1049. ##################
  1050. AC_ARG_WITH(libxpm, [ --without-libxpm build without XPM support])
  1051. gimp_save_CFLAGS="$CFLAGS"
  1052. CFLAGS="$CFLAGS $X_CFLAGS"
  1053. gimp_save_LDFLAGS="$LDFLAGS"
  1054. LDFLAGS="$LDFLAGS $X_LIBS"
  1055. if test "$gdk_target" = x11; then
  1056. lib_X11=-lX11
  1057. fi
  1058. have_libxpm=no
  1059. if test "x$with_libxpm" != xno && test -z "$XPM_LIBS"; then
  1060. have_libxpm=yes
  1061. AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
  1062. [AC_CHECK_HEADER(X11/xpm.h,
  1063. FILE_XPM='file-xpm$(EXEEXT)'; XPM_LIBS="$X_LIBS $X_PRE_LIBS $lib_X11 -lXpm",
  1064. [have_libxpm="no (XPM header file not found)"])],
  1065. [have_libxpm="no (XPM library not found)"], $X_PRE_LIBS $lib_X11)
  1066. fi
  1067. CFLAGS="$gimp_save_CFLAGS"
  1068. LDFLAGS="$gimp_save_LDFLAGS"
  1069. if test "x$have_libxpm" = xyes; then
  1070. MIME_TYPES="$MIME_TYPES;image/x-xpixmap"
  1071. fi
  1072. AC_SUBST(FILE_XPM)
  1073. AC_SUBST(XPM_LIBS)
  1074. ##################
  1075. # Check for webkit
  1076. ##################
  1077. AC_ARG_WITH(webkit, [ --without-webkit don't build the help-browser plug-in])
  1078. have_webkit=no
  1079. if test "x$with_webkit" != xno; then
  1080. PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= webkit_required_version,
  1081. WEB_PAGE='web-page$(EXEEXT)'
  1082. have_webkit=yes,
  1083. have_webkit="no (WebKit not found)")
  1084. else
  1085. have_webkit="no (WebKit support disabled)"
  1086. fi
  1087. AC_SUBST(WEB_PAGE)
  1088. AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = xyes)
  1089. ###################
  1090. # Check for librsvg
  1091. ###################
  1092. AC_ARG_WITH(librsvg,[ --without-librsvg build without librsvg support])
  1093. have_librsvg=no
  1094. if test "x$with_librsvg" != xno; then
  1095. have_librsvg=yes
  1096. PKG_CHECK_MODULES(SVG, librsvg-2.0 >= rsvg_required_version,
  1097. FILE_SVG='file-svg$(EXEEXT)',
  1098. have_librsvg="no (librsvg not found)")
  1099. else
  1100. have_librsvg="no (librsvg support disabled)"
  1101. fi
  1102. if test "x$have_librsvg" = xyes; then
  1103. MIME_TYPES="$MIME_TYPES;image/svg+xml"
  1104. fi
  1105. AC_SUBST(FILE_SVG)
  1106. ####################################
  1107. # Allow to disable the print plug-in
  1108. ####################################
  1109. AC_ARG_WITH(print,[ --without-print build without print support])
  1110. enable_print="no (disabled)"
  1111. if test "x$with_print" != xno; then
  1112. enable_print="yes"
  1113. fi
  1114. AM_CONDITIONAL(BUILD_PRINT, test "x$enable_print" = xyes)
  1115. ######################
  1116. # Check for libpoppler
  1117. ######################
  1118. AC_ARG_WITH(poppler,[ --without-poppler build without poppler support])
  1119. have_poppler=no
  1120. if test "x$with_poppler" != xno; then
  1121. PKG_CHECK_MODULES(POPPLER,
  1122. poppler-glib >= poppler_required_version gthread-2.0,
  1123. FILE_PDF_LOAD='file-pdf-load$(EXEEXT)'
  1124. AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if libpoppler is available])
  1125. have_poppler=yes,
  1126. have_poppler="Using PostScript plug-in (libpoppler not found)")
  1127. else
  1128. have_poppler="Using PostScript plug-in (libpoppler support disabled)"
  1129. fi
  1130. AC_SUBST(FILE_PDF_LOAD)
  1131. #####################
  1132. # Check for cairo-pdf
  1133. #####################
  1134. AC_ARG_WITH(cairo_pdf,[ --without-cairo-pdf build without cairo-pdf support])
  1135. have_cairo_pdf=no
  1136. if test "x$with_cairo_pdf" != xno; then
  1137. have_cairo_pdf=yes
  1138. PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf >= cairo_pdf_required_version,
  1139. FILE_PDF_SAVE='file-pdf-save$(EXEEXT)',
  1140. have_cairo_pdf="no (cairo-pdf not found)")
  1141. else
  1142. have_cairo_pdf="no (cairo-pdf support disabled)"
  1143. fi
  1144. AC_SUBST(FILE_PDF_SAVE)
  1145. ## If both poppler and cairo-pdf are enabled then we have complete PDF support
  1146. if test "x$have_cairo_pdf" = xyes && test "x$have_poppler" = xyes; then
  1147. MIME_TYPES="$MIME_TYPES;application/pdf"
  1148. fi
  1149. ################################
  1150. # Check for gio/gvfs and libcurl
  1151. ################################
  1152. uri_plugin=no
  1153. AC_ARG_WITH(gvfs, [ --without-gvfs build without GIO/GVfs support])
  1154. AM_CONDITIONAL(HAVE_GVFS, test "x$with_gvfs" != xno)
  1155. AC_ARG_WITH(libcurl, [ --without-libcurl build without curl support])
  1156. have_libcurl="no (disabled)"
  1157. if test "x$with_libcurl" != xno; then
  1158. PKG_CHECK_MODULES(CURL, libcurl >= libcurl_required_version,
  1159. have_libcurl=yes,
  1160. have_libcurl="no (libcurl not found)")
  1161. fi
  1162. AM_CONDITIONAL(HAVE_LIBCURL, test "x$have_libcurl" = xyes)
  1163. if test "x$with_gvfs" != xno; then
  1164. uri_plugin="yes (using GIO/GVfs)"
  1165. elif test "x$have_libcurl" = xyes; then
  1166. uri_plugin="yes (using libcurl)"
  1167. elif test "x$os_win32" = xno; then
  1168. uri_plugin="yes (using wget)"
  1169. fi
  1170. ###################
  1171. # Check for libwmf2
  1172. ###################
  1173. AC_ARG_WITH(wmf, [ --without-wmf build without WMF support])
  1174. have_libwmf=no
  1175. if test "x$with_wmf" != xno; then
  1176. AC_PATH_PROG(WMF_CONFIG, libwmf-config, no)
  1177. if test "x$WMF_CONFIG" != "xno" ; then
  1178. have_libwmf=yes
  1179. AC_MSG_CHECKING(for libwmf >= wmf_required_version)
  1180. wmf_version=`$WMF_CONFIG --version`
  1181. if expr $wmf_version \>= wmf_required_version >/dev/null; then
  1182. AC_MSG_RESULT([yes (version $wmf_version)])
  1183. FILE_WMF='file-wmf$(EXEEXT)'
  1184. WMF_LIBS=`$WMF_CONFIG --libs`
  1185. WMF_CFLAGS=`$WMF_CONFIG --cflags`
  1186. else
  1187. have_libwmf="no (libwmf is too old)"
  1188. fi
  1189. else
  1190. have_libwmf="no (libwmf not found)"
  1191. fi
  1192. fi
  1193. if test "x$have_libwmf" = xyes; then
  1194. MIME_TYPES="$MIME_TYPES;image/x-wmf"
  1195. fi
  1196. AC_SUBST(FILE_WMF)
  1197. AC_SUBST(WMF_LIBS)
  1198. AC_SUBST(WMF_CFLAGS)
  1199. #####################
  1200. # Check for libjasper
  1201. #####################
  1202. AC_ARG_WITH(libjasper, [ --without-libjasper build without JPEG-2000 support])
  1203. have_jp2=no
  1204. if test "x$with_libjasper" != xno && test -z "$JASPER_LIBS"; then
  1205. have_jp2=yes
  1206. AC_CHECK_LIB(jasper, jas_init,
  1207. FILE_JP2_LOAD='file-jp2-load$(EXEEXT)' ; JP2_LIBS=-ljasper,
  1208. [have_jp2="no (JasPer library not found)"
  1209. AC_MSG_WARN(*** JP2 plug-in will not be built (JasPer library not found) ***)])
  1210. else
  1211. have_jp2="no (JasPer support disabled)"
  1212. fi
  1213. if test "x$have_jp2" = xyes; then
  1214. MIME_TYPES="$MIME_TYPES;image/jp2;image/jpeg2000;image/jpx"
  1215. fi
  1216. AM_CONDITIONAL(BUILD_JP2, test "x$have_jp2" = xyes)
  1217. AC_SUBST(FILE_JP2_LOAD)
  1218. AC_SUBST(JP2_LIBS)
  1219. ################
  1220. # Check for lcms
  1221. ################
  1222. AC_ARG_WITH(lcms, [ --without-lcms build without lcms support])
  1223. have_lcms="no (lcms support disabled)"
  1224. if test "x$with_lcms" != xno; then
  1225. have_lcms=yes
  1226. PKG_CHECK_MODULES(LCMS, lcms >= lcms_required_version,
  1227. AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
  1228. LCMS='lcms$(EXEEXT)',
  1229. have_lcms="no (lcms not found or unusable)")
  1230. fi
  1231. AC_SUBST(LCMS)
  1232. AM_CONDITIONAL(HAVE_LCMS, test "x$have_lcms" = xyes)
  1233. ######################
  1234. # Check for libXcursor
  1235. ######################
  1236. AC_ARG_WITH(xmc,[ --without-xmc build without Xcursor support])
  1237. have_xmc=no
  1238. if test "x$with_xmc" != xno; then
  1239. have_xmc=yes
  1240. PKG_CHECK_MODULES(XMC, xcursor,
  1241. FILE_XMC='file-xmc$(EXEEXT)',
  1242. have_xmc="no (libXcursor not found)")
  1243. else
  1244. have_xmc="no (libXcursor support disabled)"
  1245. fi
  1246. if test "x$have_xmc" = xyes; then
  1247. MIME_TYPES="$MIME_TYPES;image/x-xcursor"
  1248. fi
  1249. AC_SUBST(FILE_XMC)
  1250. ################
  1251. # Check for alsa
  1252. ################
  1253. AC_ARG_WITH(alsa, [ --without-alsa disable alsa support in midi input controller])
  1254. have_alsa="no (alsa support disabled)"
  1255. if test "x$with_alsa" != xno; then
  1256. have_alsa=yes
  1257. AM_PATH_ALSA(alsa_required_version,
  1258. AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if alsa is available]),
  1259. have_alsa="no (libasound not found or unusable)")
  1260. fi
  1261. #######################
  1262. # Check for Linux Input
  1263. #######################
  1264. AC_ARG_WITH(linux-input, [ --without-linux-input don't build linux input event controller module])
  1265. have_linux_input="no (linux input support disabled)"
  1266. if test "x$with_linux_input" != "xno"; then
  1267. AC_CHECK_HEADER(linux/input.h,
  1268. AC_CHECK_DECL(KEY_OK,
  1269. have_linux_input=yes,
  1270. have_linux_input="no (needs Linux 2.6)",
  1271. [#include <linux/input.h>]))
  1272. fi
  1273. AM_CONDITIONAL(HAVE_LINUX_INPUT, test "x$have_linux_input" = xyes)
  1274. ###############################
  1275. # Check for DirectX DirectInput
  1276. ###############################
  1277. AC_ARG_WITH(directx-sdk, [ --with-directx-sdk=PFX prefix where the DirectX SDK is installed(optional)])
  1278. have_dx_dinput=no
  1279. if test "x$os_win32" = xyes; then
  1280. case "$with_directx_sdk" in
  1281. *" "*) AC_MSG_WARN([The DirectX SDK should be accessible through a path without spaces. Use MSYS mounts. Ignoring your --with-directx-sdk switch.])
  1282. with_directx_sdk=;;
  1283. *\\*) AC_MSG_WARN([Use plain (forward) slashes only in your --with-directx-sdk switch. Ignoring your --with-directx-sdk switch.])
  1284. with_directx_sdk=;;
  1285. esac
  1286. dinput_save_CPPFLAGS="$CPPFLAGS"
  1287. dinput_save_LDFLAGS="$LDFLAGS"
  1288. if test "x$with_directx_sdk" != x; then
  1289. CPPFLAGS="-I $with_directx_sdk/Include $CPPFLAGS"
  1290. LDFLAGS="-L$with_directx_sdk/Lib/x86 $LDFLAGS"
  1291. AC_CHECK_HEADER(dinput.h,
  1292. [AC_CHECK_LIB(dxguid, GUID_XAxis, have_dx_dinput=yes)])
  1293. fi
  1294. if test "x$have_dx_dinput" = xyes; then
  1295. AC_DEFINE(HAVE_DX_DINPUT, 1, [Define to 1 if you have DirectX DirectInput headers and libraries])
  1296. else
  1297. CPPFLAGS="$dinput_save_CPPFLAGS"
  1298. LDFLAGS="$dinput_save_LDFLAGS"
  1299. fi
  1300. fi
  1301. AM_CONDITIONAL(HAVE_DX_DINPUT, test "x$have_dx_dinput" = xyes)
  1302. ###############################
  1303. # Check for D-Bus GLib bindings
  1304. ###############################
  1305. AC_ARG_WITH(dbus, [ --without-dbus build without D-Bus support])
  1306. have_dbus_glib="no (disabled)"
  1307. if test "x$with_dbus" != xno; then
  1308. PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= dbus_glib_required_version,
  1309. have_dbus_glib=yes,
  1310. have_dbus_glib=no)
  1311. fi
  1312. if test "x$have_dbus_glib" = xyes; then
  1313. AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
  1314. if test "x$DBUS_BINDING_TOOL" = xno; then
  1315. AC_MSG_WARN([Could not find dbus-binding-tool in your PATH])
  1316. have_dbus_glib="no (dbus-binding-tool not found)"
  1317. fi
  1318. fi
  1319. if test "x$have_dbus_glib" = xyes; then
  1320. AC_DEFINE(HAVE_DBUS_GLIB, 1,
  1321. [Define to 1 if D-Bus GLib bindings are available])
  1322. GIMP_COMMAND='gimp-gimp_app_version'
  1323. fi
  1324. ####################
  1325. # Check for libgudev
  1326. ####################
  1327. AC_ARG_WITH(gudev, [ --without-gudev build without GUdev support])
  1328. have_libgudev=no
  1329. if test "x$with_gudev" = xno; then
  1330. have_libgudev="no (disabled)"
  1331. fi
  1332. if test "x$have_linux_input" = xyes && test "x$have_dbus_glib" = xyes &&
  1333. test "x$with_gudev" != xno; then
  1334. PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= libgudev_required_version,
  1335. have_libgudev=yes,
  1336. have_libgudev="no (libgudev not found)")
  1337. fi
  1338. if test "x$have_libgudev" = xyes; then
  1339. AC_DEFINE(HAVE_LIBGUDEV, 1, [Define to 1 if libgudev is available])
  1340. fi
  1341. ############################################################
  1342. # GIF compression: Allow builder to specify at compile time
  1343. # which compression style she wants to use for GIFs.
  1344. # LZW: Unisys patented Lempel-Ziff encoding.
  1345. # RLE: Runlength encoding (produces files about twice as big
  1346. # as the LZW compressed equivalent).
  1347. # None: Raw data.
  1348. ############################################################
  1349. AC_ARG_WITH(gif-compression,
  1350. [ --with-gif-compression=lzw|rle|none GIF compression style (default=lzw)])
  1351. case x"$with_gif_compression" in
  1352. xnone)
  1353. AC_DEFINE(GIF_UN, 1, [Define to 1 for no GIF compression]) ;;
  1354. xrle)
  1355. AC_DEFINE(GIF_RLE, 1, [Define to 1 for RLE GIF compression]) ;;
  1356. esac
  1357. ####################
  1358. # Check for sendmail
  1359. ####################
  1360. AC_ARG_WITH(sendmail,[ --with-sendmail=DIR set sendmail command location])
  1361. if test "x$with_sendmail" != "x"; then
  1362. sendmail_path=$with_sendmail
  1363. else
  1364. sendmail_path=$PATH:/usr/sbin:/usr/lib
  1365. fi
  1366. AC_PATH_PROG(SENDMAIL, sendmail, , $sendmail_path)
  1367. if test "x$SENDMAIL" != "x"; then
  1368. AC_DEFINE_UNQUOTED(SENDMAIL, "$SENDMAIL",
  1369. [The MTA used by the mail plug-in.])
  1370. fi
  1371. ################
  1372. # Check for perl
  1373. ################
  1374. AC_PATH_PROGS(PERL,perl5 perl perl5.005 perl5.004,perl)
  1375. AC_ARG_WITH(pdbgen,
  1376. [ --with-pdbgen use 'pdbgen' code generation tool],,
  1377. with_pdbgen=$USE_MAINTAINER_MODE)
  1378. AM_CONDITIONAL(WITH_PDBGEN, test "x$with_pdbgen" = xyes)
  1379. ##################
  1380. # Check for python
  1381. ##################
  1382. # Pygimp configure stuff ...
  1383. AC_ARG_ENABLE(python,
  1384. AS_HELP_STRING([--disable-python],
  1385. [do not build the python extension]))
  1386. m4_define([pycheck_error], [
  1387. *** Could not find $1.
  1388. *** Please install $2, or skip building the python scripting extension by
  1389. *** passing --disable-python to configure (but then you will not be able
  1390. *** to use scripts for GIMP that are written in Python).])
  1391. if test "x$enable_python" != xno; then
  1392. enable_python="yes"
  1393. # check for Python
  1394. AM_PATH_PYTHON(2.5.0,,
  1395. [AC_MSG_ERROR([pycheck_error([Python 2.5.0 or newer], [it])])])
  1396. AM_CHECK_PYTHON_HEADERS(,
  1397. [AC_MSG_ERROR([pycheck_error([Python headers], [them])])])
  1398. # Win32 needs all symbols resolved for linking, even for DLLs
  1399. # Assume the link library is in $exec_prefix/libs
  1400. # This might be able to be figured out from distutils, but it's
  1401. # not documented so we won't rely on internal implementation
  1402. PYLINK_LIBS=
  1403. if test "x$platform_win32" = "xyes"; then
  1404. PYBIN_PATH="$py_exec_prefix\pythonw.exe"
  1405. PYTHON_INCLUDES=`echo "$PYTHON_INCLUDES" | sed -e 's/\\\\/\\//g'`
  1406. py_exec_prefix=`echo "$py_exec_prefix" | sed -e 's/\\\\/\\//g'`
  1407. pylibversion=`echo $PYTHON_VERSION | sed -e 's/\\.//'`
  1408. PYLINK_LIBS="-L${py_exec_prefix}/libs -lpython${pylibversion}"
  1409. else
  1410. PYBIN_PATH="$PYTHON"
  1411. fi
  1412. AC_SUBST(PYLINK_LIBS)
  1413. AC_SUBST(PYBIN_PATH)
  1414. # check for PyGTK
  1415. PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version,,
  1416. [AC_MSG_ERROR([pycheck_error([PyGTK pygtk_required_version or newer], [it])])])
  1417. AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
  1418. if test "x$PYGTK_CODEGEN" = xno; then
  1419. AC_MSG_ERROR([pycheck_error([pygtk-codegen-2.0 script], [it])])
  1420. fi
  1421. AC_MSG_CHECKING(for pygtk defs)
  1422. PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
  1423. AC_SUBST(PYGTK_DEFSDIR)
  1424. AC_MSG_RESULT($PYGTK_DEFSDIR)
  1425. GIMP_DETECT_CFLAGS(PYGIMP_EXTRA_CFLAGS, '-fno-strict-aliasing')
  1426. AC_SUBST(PYGIMP_EXTRA_CFLAGS)
  1427. fi
  1428. AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno)
  1429. #########################################
  1430. # Check whether Script-Fu should be built
  1431. #########################################
  1432. have_script_fu=yes
  1433. AC_ARG_WITH(script-fu,
  1434. AS_HELP_STRING([--without-script-fu],
  1435. [do not build the script-fu extension]))
  1436. if test "x$with_script_fu" = "xno"; then
  1437. have_script_fu="no (script-fu extension disabled)"
  1438. fi
  1439. AM_CONDITIONAL(BUILD_SCRIPT_FU, test "x$with_script_fu" != "xno")
  1440. ###########################################################
  1441. # Some plug-ins don't build on Win32, others are Win32-only
  1442. ###########################################################
  1443. if test "x$os_win32" = xno; then
  1444. MAIL='mail$(EXEEXT)'
  1445. SCREENSHOT='screenshot$(EXEEXT)'
  1446. fi
  1447. AC_SUBST(MAIL)
  1448. AC_SUBST(SCREENSHOT)
  1449. ####################
  1450. # Check for Mac OS X
  1451. ####################
  1452. platform_osx=no
  1453. AC_MSG_CHECKING([if compiling for Mac OS X])
  1454. case "$target_or_host" in
  1455. *-*-darwin*)
  1456. AC_MSG_RESULT(yes)
  1457. AC_DEFINE(PLATFORM_OSX, 1, [define to 1 if compiling for Mac OS X])
  1458. platform_osx=yes
  1459. ;;
  1460. *)
  1461. AC_MSG_RESULT(no)
  1462. ;;
  1463. esac
  1464. AM_CONDITIONAL(PLATFORM_OSX, test "x$platform_osx" = xyes)
  1465. ####################################
  1466. # Check for Mac OS X TWAIN framework
  1467. ####################################
  1468. AC_ARG_WITH(mac-twain, [ --without-mac-twain don't build the Mac TWAIN plug-in])
  1469. mac_twain_ok=no
  1470. if test "x$with_mac_twain" != xno; then
  1471. AC_MSG_CHECKING([for Mac OS X TWAIN support])
  1472. AC_PREPROC_IFELSE(
  1473. [AC_LANG_SOURCE([[
  1474. #include <Carbon/Carbon.h>
  1475. #include <TWAIN/TWAIN.h>
  1476. #ifdef __x86_64__
  1477. #error Please somebody port this to non-deprecated and non-removed APIs
  1478. #endif]])],
  1479. [mac_twain_ok=yes])
  1480. AC_MSG_RESULT($mac_twain_ok)
  1481. fi
  1482. AM_CONDITIONAL(HAVE_MAC_TWAIN, test "x$mac_twain_ok" = xyes)
  1483. ##########################################################
  1484. # Determine where to install the desktop & mime info files
  1485. ##########################################################
  1486. AC_ARG_WITH(desktop-dir, [ --with-desktop-dir=PATH where to install desktop files (default=PREFIX/share)])
  1487. if test "x$with_desktop_dir" != x; then
  1488. DESKTOP_DATADIR=$with_desktop_dir
  1489. else
  1490. DESKTOP_DATADIR="$datadir"
  1491. fi
  1492. AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno)
  1493. AC_SUBST(DESKTOP_DATADIR)
  1494. #####################
  1495. # Check for XML tools
  1496. #####################
  1497. AC_PATH_PROG(XMLLINT, xmllint, no)
  1498. AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
  1499. AC_PATH_PROG(XSLTPROC, xsltproc, no)
  1500. AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
  1501. ####################
  1502. # Check for xvfb-run
  1503. ####################
  1504. AC_ARG_WITH(xvfb-run, [ --without-xvfb-run do not use xvfb-run for UI-dependent automatic tests])
  1505. have_xvfb_run="no (disabled)"
  1506. if test "x$with_xvfb_run" != "xno"; then
  1507. AC_PATH_PROG(XVFB_RUN, xvfb-run, no)
  1508. if test "x$XVFB_RUN" != "xno"; then
  1509. have_xvfb_run="yes"
  1510. else
  1511. have_xvfb_run="no (not found)"
  1512. fi
  1513. fi
  1514. AM_CONDITIONAL(HAVE_XVFB_RUN, test "x$have_xvfb_run" == "xyes")
  1515. ######################################
  1516. # Checks for gtk-doc and docbook-tools
  1517. ######################################
  1518. # Check for GTK_DOC_CHECK availability. The GTK_DOC_CHECK invocation
  1519. # must be on its own line, gtkdocize relies on it
  1520. m4_ifdef([GTK_DOC_CHECK], [
  1521. GTK_DOC_CHECK([1.0])
  1522. ])
  1523. # NOTE: We need to use a separate automake conditional for this
  1524. # to make this work with the tarballs.
  1525. AM_CONDITIONAL(ENABLE_GTK_DOC, test "x$enable_gtk_doc" = xyes)
  1526. AC_ARG_ENABLE(gtk-doc-app, [ --enable-gtk-doc-app build developer documentation for app (default=no)], , enable_gtk_doc_app=no)
  1527. AM_CONDITIONAL(ENABLE_GTK_DOC_APP, test "x$enable_gtk_doc_app" = xyes)
  1528. #########################################
  1529. # Allow to configure the GIMP environment
  1530. #########################################
  1531. AC_ARG_ENABLE(default-binary, [ --enable-default-binary install this as the default gimp binary (default=gimp_stable)], , enable_default_binary=gimp_stable)
  1532. AM_CONDITIONAL(DEFAULT_BINARY, test "x$enable_default_binary" = xyes)
  1533. AC_ARG_ENABLE(gimp-console, [ --enable-gimp-console build a console-only binary which does not link GTK+], , enable_gimp_console=yes)
  1534. AM_CONDITIONAL(ENABLE_GIMP_CONSOLE, test "x$enable_gimp_console" != xno)
  1535. # Possibly change default gimpdir from .gimp-major.minor
  1536. gimpdir=.gimp-gimp_user_version
  1537. AC_ARG_WITH(gimpdir, [ --with-gimpdir=DIR change default gimpdir from .gimp-gimp_user_version to DIR],
  1538. if eval "test x$with_gimpdir != x"; then
  1539. if eval "test x$with_gimpdir != xyes"; then
  1540. gimpdir=$with_gimpdir
  1541. fi
  1542. fi)
  1543. gimpdatadir="$datadir/$PACKAGE/gimp_data_version"
  1544. gimpplugindir="$libdir/$PACKAGE/gimp_plugin_version"
  1545. gimpsysconfdir="$sysconfdir/$PACKAGE/gimp_sysconf_version"
  1546. AC_SUBST(gimpdir)
  1547. AC_SUBST(gimpdatadir)
  1548. AC_SUBST(gimpplugindir)
  1549. AC_SUBST(gimpsysconfdir)
  1550. # GNU format message catalogs go into $datadir/locale,
  1551. # standard location is $libdir/locale. DATADIRNAME set accordingly.
  1552. gimplocaledir="$datadir/locale"
  1553. if test "$DATADIRNAME" = "lib"; then
  1554. gimplocaledir="$libdir/locale"
  1555. fi
  1556. AC_SUBST(gimplocaledir)
  1557. ############################
  1558. # Some defines for the build
  1559. ############################
  1560. AM_CONDITIONAL(STATICLIBS, test "x$enable_static" = xyes)
  1561. # a tuned version of glib-mkenums
  1562. GIMP_MKENUMS="\$(PERL) \$(top_srcdir)/tools/gimp-mkenums"
  1563. AC_SUBST(GIMP_MKENUMS)
  1564. #Add required trailing ; to list
  1565. MIME_TYPES="$MIME_TYPES;"
  1566. AC_SUBST(MIME_TYPES)
  1567. #########################
  1568. # Disable deprecated APIs
  1569. #########################
  1570. CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE"
  1571. # Make sure not to disable deprecated APIs for unreleased versions.
  1572. # We must build without problems with future releases of libraries
  1573. # and disabling deprecated API risks breaking the build
  1574. if test "x$have_glib_2_31" != "xyes"; then
  1575. CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
  1576. fi
  1577. if test "x$have_gtk_2_26" != "xyes"; then
  1578. CPPFLAGS="${CPPFLAGS} -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
  1579. fi
  1580. if test "x$have_gdk_pixbuf_2_26" != "xyes"; then
  1581. CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED"
  1582. fi
  1583. if test "x$have_pango_1_32" != "xyes"; then
  1584. CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED"
  1585. fi
  1586. ############################
  1587. # Require multihead safe API
  1588. ############################
  1589. CPPFLAGS="${CPPFLAGS} -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
  1590. ##################
  1591. # configure output
  1592. ##################
  1593. # easy way to skip the plug-in build
  1594. GIMP_PLUGINS=plug-ins
  1595. GIMP_MODULES=modules
  1596. AC_SUBST(GIMP_PLUGINS)
  1597. AC_SUBST(GIMP_MODULES)
  1598. AC_CONFIG_COMMANDS([libgimpbase/gimpversion.h], [
  1599. outfile=gimpversion.h-tmp
  1600. cat > $outfile <<\_______EOF
  1601. /* gimpversion.h
  1602. *
  1603. * This is a generated file. Please modify 'configure.ac'
  1604. */
  1605. #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
  1606. #error "Only <libgimpbase/gimpbase.h> can be included directly."
  1607. #endif
  1608. #ifndef __GIMP_VERSION_H__
  1609. #define __GIMP_VERSION_H__
  1610. G_BEGIN_DECLS
  1611. /**
  1612. * SECTION: gimpversion
  1613. * @title: gimpversion
  1614. * @short_description: Macros and constants useful for determining
  1615. * GIMP's version number and capabilities.
  1616. *
  1617. * Macros and constants useful for determining GIMP's version number and
  1618. * capabilities.
  1619. **/
  1620. _______EOF
  1621. cat >>$outfile <<_______EOF
  1622. /**
  1623. * GIMP_MAJOR_VERSION:
  1624. *
  1625. * The major GIMP version number.
  1626. **/
  1627. #define GIMP_MAJOR_VERSION ($gimp_major_ver)
  1628. /**
  1629. * GIMP_MINOR_VERSION:
  1630. *
  1631. * The minor GIMP version number.
  1632. **/
  1633. #define GIMP_MINOR_VERSION ($gimp_minor_ver)
  1634. /**
  1635. * GIMP_MICRO_VERSION:
  1636. *
  1637. * The micro GIMP version number.
  1638. **/
  1639. #define GIMP_MICRO_VERSION ($gimp_micro_ver)
  1640. /**
  1641. * GIMP_VERSION:
  1642. *
  1643. * The GIMP version as a string.
  1644. **/
  1645. #define GIMP_VERSION "$gimp_ver"
  1646. /**
  1647. * GIMP_API_VERSION:
  1648. *
  1649. * Since: GIMP 2.2
  1650. **/
  1651. #define GIMP_API_VERSION "$gimp_api_ver"
  1652. _______EOF
  1653. cat >>$outfile <<\_______EOF
  1654. #define GIMP_CHECK_VERSION(major, minor, micro) \
  1655. (GIMP_MAJOR_VERSION > (major) || \
  1656. (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
  1657. (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
  1658. GIMP_MICRO_VERSION >= (micro)))
  1659. G_END_DECLS
  1660. #endif /* __GIMP_VERSION_H__ */
  1661. _______EOF
  1662. if cmp -s $outfile libgimpbase/gimpversion.h; then
  1663. AC_MSG_NOTICE([libgimpbase/gimpversion.h is unchanged])
  1664. rm -f $outfile
  1665. else
  1666. mv $outfile libgimpbase/gimpversion.h
  1667. fi
  1668. ],[
  1669. gimp_major_ver=gimp_major_version
  1670. gimp_minor_ver=gimp_minor_version
  1671. gimp_micro_ver=gimp_micro_version
  1672. gimp_ver=gimp_version
  1673. gimp_api_ver=gimp_api_version
  1674. ])
  1675. AC_CONFIG_FILES([
  1676. tools/Makefile
  1677. tools/pdbgen/Makefile
  1678. libgimp/Makefile
  1679. libgimpbase/Makefile
  1680. libgimpconfig/Makefile
  1681. libgimpcolor/Makefile
  1682. libgimpmath/Makefile
  1683. libgimpmodule/Makefile
  1684. libgimpthumb/Makefile
  1685. libgimpwidgets/Makefile
  1686. app/Makefile
  1687. app/actions/Makefile
  1688. app/config/Makefile
  1689. app/core/Makefile
  1690. app/operations/Makefile
  1691. app/operations/tests/Makefile
  1692. app/gegl/Makefile
  1693. app/dialogs/Makefile
  1694. app/display/Makefile
  1695. app/file/Makefile
  1696. app/gui/Makefile
  1697. app/menus/Makefile
  1698. app/paint/Makefile
  1699. app/pdb/Makefile
  1700. app/plug-in/Makefile
  1701. app/text/Makefile
  1702. app/tools/Makefile
  1703. app/vectors/Makefile
  1704. app/widgets/Makefile
  1705. app/xcf/Makefile
  1706. app/tests/Makefile
  1707. app/tests/files/Makefile
  1708. app/tests/gimpdir-empty/Makefile
  1709. app/tests/gimpdir-empty/brushes/Makefile
  1710. app/tests/gimpdir-empty/gradients/Makefile
  1711. app/tests/gimpdir-empty/patterns/Makefile
  1712. app/tests/gimpdir/Makefile
  1713. app/tests/gimpdir/brushes/Makefile
  1714. app/tests/gimpdir/gradients/Makefile
  1715. app/tests/gimpdir/patterns/Makefile
  1716. build/Makefile
  1717. build/windows/Makefile
  1718. build/windows/gimp.rc
  1719. build/windows/gimp-plug-ins.rc
  1720. plug-ins/Makefile
  1721. plug-ins/color-rotate/Makefile
  1722. plug-ins/color-rotate/images/Makefile
  1723. plug-ins/file-bmp/Makefile
  1724. plug-ins/file-compressor/Makefile
  1725. plug-ins/file-faxg3/Makefile
  1726. plug-ins/file-fits/Makefile
  1727. plug-ins/file-fli/Makefile
  1728. plug-ins/file-ico/Makefile
  1729. plug-ins/file-jpeg/Makefile
  1730. plug-ins/file-psd/Makefile
  1731. plug-ins/file-sgi/Makefile
  1732. plug-ins/file-uri/Makefile
  1733. plug-ins/file-xjt/Makefile
  1734. plug-ins/flame/Makefile
  1735. plug-ins/fractal-explorer/Makefile
  1736. plug-ins/fractal-explorer/examples/Makefile
  1737. plug-ins/gfig/Makefile
  1738. plug-ins/gfig/gfig-examples/Makefile
  1739. plug-ins/gfig/images/Makefile
  1740. plug-ins/ui/Makefile
  1741. plug-ins/gimpressionist/Brushes/Makefile
  1742. plug-ins/gimpressionist/Makefile
  1743. plug-ins/gimpressionist/Paper/Makefile
  1744. plug-ins/gimpressionist/Presets/Makefile
  1745. plug-ins/gradient-flare/Makefile
  1746. plug-ins/gradient-flare/flares/Makefile
  1747. plug-ins/help-browser/Makefile
  1748. plug-ins/help/Makefile
  1749. plug-ins/ifs-compose/Makefile
  1750. plug-ins/imagemap/Makefile
  1751. plug-ins/imagemap/images/Makefile
  1752. plug-ins/lighting/Makefile
  1753. plug-ins/lighting/images/Makefile
  1754. plug-ins/map-object/Makefile
  1755. plug-ins/maze/Makefile
  1756. plug-ins/metadata/Makefile
  1757. plug-ins/pagecurl/Makefile
  1758. plug-ins/print/Makefile
  1759. plug-ins/pygimp/Makefile
  1760. plug-ins/pygimp/plug-ins/Makefile
  1761. plug-ins/script-fu/Makefile
  1762. plug-ins/script-fu/ftx/Makefile
  1763. plug-ins/script-fu/scripts/Makefile
  1764. plug-ins/script-fu/scripts/images/Makefile
  1765. plug-ins/script-fu/tinyscheme/Makefile
  1766. plug-ins/selection-to-path/Makefile
  1767. plug-ins/twain/Makefile
  1768. plug-ins/win-snap/Makefile
  1769. plug-ins/common/Makefile
  1770. modules/Makefile
  1771. devel-docs/Makefile
  1772. devel-docs/app/Makefile
  1773. devel-docs/app/version
  1774. devel-docs/libgimp/Makefile
  1775. devel-docs/libgimp/version
  1776. devel-docs/libgimpbase/Makefile
  1777. devel-docs/libgimpbase/version
  1778. devel-docs/libgimpconfig/Makefile
  1779. devel-docs/libgimpconfig/version
  1780. devel-docs/libgimpcolor/Makefile
  1781. devel-docs/libgimpcolor/version
  1782. devel-docs/libgimpmath/Makefile
  1783. devel-docs/libgimpmath/version
  1784. devel-docs/libgimpmodule/Makefile
  1785. devel-docs/libgimpmodule/version
  1786. devel-docs/libgimpthumb/Makefile
  1787. devel-docs/libgimpthumb/version
  1788. devel-docs/libgimpwidgets/Makefile
  1789. devel-docs/libgimpwidgets/version
  1790. devel-docs/tools/Makefile
  1791. docs/Makefile
  1792. menus/Makefile
  1793. cursors/Makefile
  1794. themes/Makefile
  1795. themes/Default/Makefile
  1796. themes/Default/images/Makefile
  1797. themes/Default/images/preferences/Makefile
  1798. themes/Small/Makefile
  1799. data/Makefile
  1800. data/brushes/Makefile
  1801. data/brushes/Basic/Makefile
  1802. data/brushes/gimp-obsolete-files/Makefile
  1803. data/brushes/Media/Makefile
  1804. data/brushes/Legacy/Makefile
  1805. data/brushes/Sketch/Makefile
  1806. data/brushes/Splatters/Makefile
  1807. data/brushes/Texture/Makefile
  1808. data/dynamics/Makefile
  1809. data/dynamics/Basic/Makefile
  1810. data/dynamics/FX/Makefile
  1811. data/environ/Makefile
  1812. data/gradients/Makefile
  1813. data/images/Makefile
  1814. data/interpreters/Makefile
  1815. data/palettes/Makefile
  1816. data/patterns/Makefile
  1817. data/tags/Makefile
  1818. data/tips/Makefile
  1819. data/tool-presets/Makefile
  1820. data/tool-presets/FX/Makefile
  1821. data/tool-presets/Paint/Makefile
  1822. data/tool-presets/Selection/Makefile
  1823. data/tool-presets/Sketch/Makefile
  1824. desktop/Makefile
  1825. desktop/gimp.desktop.in
  1826. etc/Makefile
  1827. m4macros/Makefile
  1828. po/Makefile.in
  1829. po-libgimp/Makefile.in
  1830. po-plug-ins/Makefile.in
  1831. po-python/Makefile.in
  1832. po-script-fu/Makefile.in
  1833. po-tips/Makefile.in
  1834. gimp-zip
  1835. Makefile
  1836. ])
  1837. # Files with versions in their names
  1838. AC_CONFIG_FILES(
  1839. docs/gimp-gimp_app_version.1:docs/gimp.1.in
  1840. docs/gimprc-gimp_app_version.5:docs/gimprc.5.in
  1841. docs/gimptool-gimp_tool_version.1:docs/gimptool.1.in
  1842. gimp-gimp_pkgconfig_version.pc:gimp.pc.in
  1843. gimpthumb-gimp_pkgconfig_version.pc:gimpthumb.pc.in
  1844. gimpui-gimp_pkgconfig_version.pc:gimpui.pc.in
  1845. )
  1846. AC_CONFIG_COMMANDS([sed-po-makefiles],
  1847. [sed -e "/POTFILES =/r po-libgimp/POTFILES" po-libgimp/Makefile.in > po-libgimp/Makefile && touch po-libgimp/stamp-it
  1848. sed -e "/POTFILES =/r po-python/POTFILES" po-python/Makefile.in > po-python/Makefile && touch po-python/stamp-it
  1849. sed -e "/POTFILES =/r po-plug-ins/POTFILES" po-plug-ins/Makefile.in > po-plug-ins/Makefile && touch po-plug-ins/stamp-it
  1850. sed -e "/POTFILES =/r po-script-fu/POTFILES" po-script-fu/Makefile.in > po-script-fu/Makefile && touch po-script-fu/stamp-it
  1851. sed -e "/POTFILES =/r po-tips/POTFILES" po-tips/Makefile.in > po-tips/Makefile && touch po-tips/stamp-it])
  1852. AC_OUTPUT
  1853. # Print a summary of features enabled/disabled:
  1854. AC_MSG_RESULT([
  1855. Building GIMP with prefix=$prefix, datarootdir=$datarootdir
  1856. Desktop files install into $DESKTOP_DATADIR
  1857. Extra Binaries:
  1858. gimp-console: $enable_gimp_console
  1859. Optional Features:
  1860. D-Bus service: $have_dbus_glib
  1861. Language selection: $have_iso_codes
  1862. Optional Plug-Ins:
  1863. Ascii Art: $have_libaa
  1864. Compressor: $have_compressor
  1865. Ghostscript: $have_gs
  1866. Help Browser: $have_webkit
  1867. LCMS: $have_lcms
  1868. JPEG: $jpeg_ok
  1869. JPEG 2000: $have_jp2
  1870. MNG: $have_libmng
  1871. PDF (import): $have_poppler
  1872. PDF (export): $have_cairo_pdf
  1873. PNG: $have_libpng
  1874. Print: $enable_print
  1875. PSP: $have_zlib
  1876. Python: $enable_python
  1877. Script-Fu: $have_script_fu
  1878. SVG: $have_librsvg
  1879. TIFF: $have_libtiff
  1880. TWAIN (MacOS X): $mac_twain_ok
  1881. TWAIN (Win32): $os_win32
  1882. URI: $uri_plugin
  1883. Webpage: $have_webkit
  1884. Windows ICO: $have_libpng
  1885. WMF: $have_libwmf
  1886. XJT: $have_xjt
  1887. X11 Mouse Cursor: $have_xmc
  1888. XPM: $have_libxpm
  1889. Plug-In Features:
  1890. EXIF support: $have_libexif
  1891. Optional Modules:
  1892. ALSA (MIDI Input): $have_alsa
  1893. Linux Input: $have_linux_input (GUdev support: $have_libgudev)
  1894. DirectInput (Win32): $have_dx_dinput
  1895. Color Correction: $have_lcms
  1896. Soft Proof: $have_lcms
  1897. Tests:
  1898. Use xvfb-run $have_xvfb_run
  1899. ]);