configure.ac 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630
  1. dnl -*- sh -*-
  2. dnl the "configure" script is made from this by running GNU "autoconf"
  3. dnl
  4. dnl "$Id: configure.ac 12626 2018-01-08 10:19:19Z manolo $"
  5. dnl
  6. dnl Configuration script for the Fast Light Tool Kit (FLTK).
  7. dnl
  8. dnl Copyright 1998-2016 by Bill Spitzak and others.
  9. dnl
  10. dnl This library is free software. Distribution and use rights are outlined in
  11. dnl the file "COPYING" which should have been included with this file. If this
  12. dnl file is missing or damaged, see the license at:
  13. dnl
  14. dnl http://www.fltk.org/COPYING.php
  15. dnl
  16. dnl Please report all bugs and problems on the following page:
  17. dnl
  18. dnl http://www.fltk.org/str.php
  19. dnl
  20. dnl We need at least autoconf 2.50...
  21. AC_PREREQ([2.50])
  22. dnl Required file in package...
  23. AC_INIT
  24. AC_CONFIG_SRCDIR([src/Fl.cxx])
  25. AC_CANONICAL_HOST
  26. dnl Do not automatically add "-g" to compiler options...
  27. dnl This must be _before_ "Find compiler commands..."
  28. ARCHFLAGS="${ARCHFLAGS:=}"
  29. CFLAGS="${CFLAGS:=}"
  30. CPPFLAGS="${CPPFLAGS:=}"
  31. CXXFLAGS="${CXXFLAGS:=}"
  32. DSOFLAGS="${DSOFLAGS:=}"
  33. LDFLAGS="${LDFLAGS:=}"
  34. OPTIM="${OPTIM:=}"
  35. dnl Find compiler commands...
  36. AC_PROG_CC
  37. AC_PROG_CXX
  38. dnl So --with-archflags option is used during "checking size of long"
  39. case $host_os in
  40. darwin*)
  41. if test "x$with_archflags" != x ; then
  42. CFLAGS="$CFLAGS $with_archflags"
  43. fi
  44. ;;
  45. esac
  46. dnl FLTK library versions...
  47. FL_MAJOR_VERSION=1
  48. FL_MINOR_VERSION=4
  49. FL_PATCH_VERSION=0
  50. FL_DSO_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
  51. FL_ABI_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.0
  52. FL_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.${FL_PATCH_VERSION}
  53. AC_SUBST(FL_MAJOR_VERSION)
  54. AC_SUBST(FL_MINOR_VERSION)
  55. AC_SUBST(FL_PATCH_VERSION)
  56. AC_SUBST(FL_DSO_VERSION)
  57. AC_SUBST(FL_ABI_VERSION)
  58. AC_SUBST(FL_VERSION)
  59. AC_SUBST(ARCHFLAGS)
  60. AC_SUBST(OPTIM)
  61. dnl FLTK build options to be used in Makefiles (defined in makeinclude)
  62. BUILD=""
  63. dnl OS-specific pre-tests...
  64. dnl host_os_gui equals $host_os unless we target Cygwin or Darwin in combination with X11.
  65. host_os_gui=$host_os
  66. case $host_os in
  67. cygwin*)
  68. # Handle Cygwin option *first*, before all other tests.
  69. AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the Cygwin libraries [[default=no]]])
  70. AC_ARG_ENABLE(x11, [ --enable-x11 with Cygwin or Mac OS, use X11 [[default=no]]])
  71. if test x$enable_cygwin = xyes; then
  72. # we target Cygwin in combination with X11
  73. if test x$enable_x11 = xyes; then
  74. host_os_gui="X11$host_os"
  75. fi
  76. fi
  77. ;;
  78. darwin*)
  79. if test x$enable_x11 = xyes; then
  80. host_os_gui="X11"
  81. OPTIM="-U__APPLE__ $OPTIM"
  82. macosversion=`sw_vers -productVersion | cut -d. -f2`
  83. if test $macosversion -ge "13" ; then
  84. CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.8"
  85. fi
  86. fi
  87. ;;
  88. *)
  89. ;;
  90. esac
  91. dnl Define the libraries and link options we will need.
  92. LINKFLTK="../lib/libfltk.a"
  93. LINKFLTKFORMS="../lib/libfltk_forms.a"
  94. LINKFLTKGL="../lib/libfltk_gl.a"
  95. LINKFLTKIMG="../lib/libfltk_images.a"
  96. GLDEMOS="gldemos"
  97. LIBEXT=".a"
  98. LIBNAME="../lib/libfltk.a"
  99. FLLIBNAME="../lib/libfltk_forms.a"
  100. GLLIBNAME="../lib/libfltk_gl.a"
  101. IMGLIBNAME="../lib/libfltk_images.a"
  102. CAIROLIBNAME="../lib/libfltk_cairo.a"
  103. LIBBASENAME="libfltk.a"
  104. FLLIBBASENAME="libfltk_forms.a"
  105. GLLIBBASENAME="libfltk_gl.a"
  106. IMGLIBBASENAME="libfltk_images.a"
  107. CAIROLIBBASENAME="libfltk_cairo.a"
  108. dnl Check for Cairo library unless disabled...
  109. CAIRODIR=""
  110. CAIROFLAGS=""
  111. LINKFLTKCAIRO=""
  112. FLTKCAIROOPTION=""
  113. CAIROLIBS=""
  114. AC_ARG_ENABLE(cairoext,[ --enable-cairoext use fltk code instrumentation for cairo extended use [[default=no]]])
  115. AC_ARG_ENABLE(cairo, [ --enable-cairo use lib Cairo [[default=no]]])
  116. if test x$enable_cairoext = xyes; then
  117. AC_DEFINE(FLTK_USE_CAIRO)
  118. AC_DEFINE(FLTK_HAVE_CAIRO)
  119. dnl FIXME This part should be fixed so configure do not depend on
  120. dnl we do not rely on pkg-config .
  121. CAIRODIR="cairo"
  122. CAIROFLAGS="`pkg-config --cflags cairo`"
  123. CAIROLIBS="-lcairo -lpixman-1"
  124. CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
  125. LINKFLTKCAIRO="../lib/libfltk_cairo.a"
  126. FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
  127. LIBS="$CAIROLIBS $LIBS"
  128. dnl $LINKFLTKCAIRO
  129. LINKFLTK+=" $LINKFLTKCAIRO"
  130. else
  131. if test x$enable_cairo = xyes; then
  132. AC_DEFINE(FLTK_HAVE_CAIRO)
  133. dnl FIXME This part should be fixed so configure do not depend on
  134. dnl we do not rely on pkg-config .
  135. CAIRODIR="cairo"
  136. CAIROFLAGS="`pkg-config --cflags cairo`"
  137. CAIROLIBS="-lcairo -lpixman-1"
  138. CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
  139. LINKFLTKCAIRO="../lib/libfltk_cairo.a"
  140. FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
  141. fi
  142. fi
  143. AC_SUBST(CAIRODIR)
  144. AC_SUBST(CAIROFLAGS)
  145. AC_SUBST(CAIROLIBS)
  146. AC_SUBST(LINKFLTKCAIRO)
  147. AC_SUBST(FLTKCAIROOPTION)
  148. AC_SUBST(FLLIBNAME)
  149. AC_SUBST(GLDEMOS)
  150. AC_SUBST(GLLIBNAME)
  151. AC_SUBST(IMGLIBNAME)
  152. AC_SUBST(CAIROLIBNAME)
  153. AC_SUBST(LIBEXT)
  154. AC_SUBST(LIBNAME)
  155. AC_SUBST(LINKFLTK)
  156. AC_SUBST(LINKFLTKFORMS)
  157. AC_SUBST(LINKFLTKGL)
  158. AC_SUBST(LINKFLTKIMG)
  159. AC_SUBST(LIBBASENAME)
  160. AC_SUBST(FLLIBBASENAME)
  161. AC_SUBST(GLLIBBASENAME)
  162. AC_SUBST(IMGLIBBASENAME)
  163. AC_SUBST(CAIROLIBBASENAME)
  164. has_abiversion=""
  165. AC_ARG_WITH(abiversion,
  166. [ --with-abiversion Build with FL_ABI_VERSION, e.g. 10304 for FLTK 1.3.4])
  167. has_abiversion="$with_abiversion"
  168. if test "$has_abiversion" = "yes" ; then
  169. has_abiversion=""
  170. else
  171. if test "$has_abiversion" = "no" ; then
  172. has_abiversion=""
  173. fi
  174. fi
  175. if test ! "$has_abiversion" = "" ; then
  176. AC_DEFINE_UNQUOTED(FL_ABI_VERSION, [$has_abiversion], [define to FL_ABI_VERSION])
  177. fi
  178. dnl Handle compile-time options...
  179. AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [[default=no]]])
  180. if test x$enable_debug = xyes; then
  181. DEBUGFLAG="-g "
  182. else
  183. DEBUGFLAG=""
  184. fi
  185. AC_ARG_ENABLE(cp936, [ --enable-cp936 turn on CP936 [[default=no]]])
  186. if test x$enable_cp936 = xyes; then
  187. CFLAGS="$CFLAGS -DCP936"
  188. fi
  189. AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [[default=yes]]])
  190. AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [[default=no]]])
  191. if test x$enable_shared = xyes; then
  192. PICFLAG=1
  193. SHAREDSUFFIX=""
  194. FLUID="fluid-shared"
  195. case $host_os in
  196. darwin*)
  197. DSONAME="libfltk.$FL_DSO_VERSION.dylib"
  198. FLDSONAME="libfltk_forms.$FL_DSO_VERSION.dylib"
  199. GLDSONAME="libfltk_gl.$FL_DSO_VERSION.dylib"
  200. IMGDSONAME="libfltk_images.$FL_DSO_VERSION.dylib"
  201. CAIRODSONAME="libfltk_cairo.$FL_DSO_VERSION.dylib"
  202. DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
  203. ;;
  204. solaris*)
  205. DSONAME="libfltk.so.$FL_DSO_VERSION"
  206. FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
  207. GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
  208. IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
  209. CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
  210. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
  211. if test "x$libdir" != "x/usr/lib"; then
  212. DSOLINK="-R$libdir"
  213. fi
  214. ;;
  215. hpux*)
  216. DSONAME="libfltk.sl.$FL_DSO_VERSION"
  217. FLDSONAME="libfltk_forms.sl.$FL_DSO_VERSION"
  218. GLDSONAME="libfltk_gl.sl.$FL_DSO_VERSION"
  219. IMGDSONAME="libfltk_images.sl.$FL_DSO_VERSION"
  220. CAIRODSONAME="libfltk_cairo.sl.$FL_DSO_VERSION"
  221. DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
  222. if test "x$libdir" != "x/usr/lib"; then
  223. DSOLINK="-Wl,-rpath,$libdir"
  224. fi
  225. ;;
  226. irix*)
  227. DSONAME="libfltk.so.$FL_DSO_VERSION"
  228. FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
  229. GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
  230. IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
  231. CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
  232. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
  233. if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
  234. DSOLINK="-Wl,-rpath,$libdir"
  235. fi
  236. ;;
  237. osf*)
  238. DSONAME="libfltk.so.$FL_DSO_VERSION"
  239. FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
  240. GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
  241. IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
  242. CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
  243. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
  244. if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
  245. DSOLINK="-Wl,-rpath,$libdir"
  246. fi
  247. ;;
  248. linux* | *bsd*)
  249. DSONAME="libfltk.so.$FL_DSO_VERSION"
  250. FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
  251. GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
  252. IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
  253. CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
  254. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
  255. # See if the compiler supports -fvisibility...
  256. AC_CACHE_CHECK([if the compiler supports -fvisibility],
  257. ac_cv_cxx_fvisibility, [
  258. OLDCXXFLAGS="$CXXFLAGS"
  259. CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
  260. AC_LANG_PUSH([C++])
  261. AC_COMPILE_IFELSE(
  262. [AC_LANG_PROGRAM([[]], [[]])],
  263. [ac_cv_cxx_fvisibility=yes],
  264. [ac_cv_cxx_fvisibility=no])
  265. CXXFLAGS="$OLDCXXFLAGS"
  266. AC_LANG_POP([])
  267. ])
  268. if test x"$ac_cv_cxx_fvisibility" = xyes; then
  269. OPTIM="$OPTIM -fvisibility=hidden"
  270. fi
  271. # See if the compiler supports -fvisibility-inlines-hidden...
  272. AC_CACHE_CHECK([if the compiler supports -fvisibility-inlines-hidden],
  273. ac_cv_cxx_fvisibility_inlines, [
  274. OLDCXXFLAGS="$CXXFLAGS"
  275. CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
  276. AC_LANG_PUSH([C++])
  277. AC_COMPILE_IFELSE(
  278. [AC_LANG_PROGRAM([[]], [[]])],
  279. [ac_cv_cxx_fvisibility_inlines=yes],
  280. [ac_cv_cxx_fvisibility_inlines=no])
  281. CXXFLAGS="$OLDCXXFLAGS"
  282. AC_LANG_POP([])
  283. ])
  284. if test x"$ac_cv_cxx_fvisibility_inlines" = xyes; then
  285. CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
  286. fi
  287. if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
  288. DSOLINK="-Wl,-rpath,$libdir"
  289. fi
  290. ;;
  291. aix*)
  292. DSONAME="libfltk_s.a"
  293. FLDSONAME="libfltk_forms_s.a"
  294. GLDSONAME="libfltk_gl_s.a"
  295. IMGDSONAME="libfltk_images_s.a"
  296. CAIRODSONAME="libfltk_cairo_s.a"
  297. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
  298. SHAREDSUFFIX="_s"
  299. ;;
  300. cygwin* | mingw*)
  301. PICFLAG=0
  302. if test x$enable_cygwin != xyes; then
  303. DSONAME="mgwfltknox-$FL_DSO_VERSION.dll"
  304. FLDSONAME="mgwfltknox_forms-$FL_DSO_VERSION.dll"
  305. GLDSONAME="mgwfltknox_gl-$FL_DSO_VERSION.dll"
  306. IMGDSONAME="mgwfltknox_images-$FL_DSO_VERSION.dll"
  307. CAIRODSONAME="mgwfltknox_cairo-$FL_DSO_VERSION.dll"
  308. else
  309. if test x$enable_x11 = xyes; then
  310. DSONAME="cygfltk-$FL_DSO_VERSION.dll"
  311. FLDSONAME="cygfltk_forms-$FL_DSO_VERSION.dll"
  312. GLDSONAME="cygfltk_gl-$FL_DSO_VERSION.dll"
  313. IMGDSONAME="cygfltk_images-$FL_DSO_VERSION.dll"
  314. CAIRODSONAME="cygfltk_cairo-$FL_DSO_VERSION.dll"
  315. else
  316. DSONAME="cygfltknox-$FL_DSO_VERSION.dll"
  317. FLDSONAME="cygfltknox_forms-$FL_DSO_VERSION.dll"
  318. GLDSONAME="cygfltknox_gl-$FL_DSO_VERSION.dll"
  319. IMGDSONAME="cygfltknox_images-$FL_DSO_VERSION.dll"
  320. CAIRODSONAME="cygfltknox_cairo-$FL_DSO_VERSION.dll"
  321. fi
  322. fi
  323. #-----------------------------------------------------------
  324. # -Wl,--enable-runtime-pseudo-reloc: See str 1585
  325. # appears to be necessary for older binutils versions < 2.16
  326. #-----------------------------------------------------------
  327. LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
  328. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -shared \
  329. -Wl,--whole-archive -Wl,--export-all-symbols \
  330. -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import \
  331. -Wl,--enable-auto-image-base -o \$@"
  332. ;;
  333. *)
  334. AC_MSG_WARN([Shared libraries may not be supported. Trying -shared option with compiler.])
  335. DSONAME="libfltk.so.$FL_DSO_VERSION"
  336. FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
  337. GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
  338. IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
  339. CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
  340. DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
  341. ;;
  342. esac
  343. LINKSHARED="-L../src $FLTKCAIROOPTION -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
  344. else
  345. DSOCOMMAND="echo"
  346. DSOLINK=""
  347. DSONAME=""
  348. FLDSONAME=""
  349. GLDSONAME=""
  350. IMGDSONAME=""
  351. CAIRODSONAME=""
  352. PICFLAG=0
  353. SHAREDSUFFIX=""
  354. FLUID="fluid"
  355. LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
  356. fi
  357. AC_SUBST(DSOCOMMAND)
  358. AC_SUBST(DSOFLAGS)
  359. AC_SUBST(DSOLINK)
  360. AC_SUBST(DSONAME)
  361. AC_SUBST(FLDSONAME)
  362. AC_SUBST(GLDSONAME)
  363. AC_SUBST(IMGDSONAME)
  364. AC_SUBST(CAIRODSONAME)
  365. AC_SUBST(SHAREDSUFFIX)
  366. AC_SUBST(LINKSHARED)
  367. AC_SUBST(FLUID)
  368. AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support [[default=yes]]])
  369. AC_ARG_WITH(optim, [ --with-optim="flags" use custom optimization flags])
  370. AC_ARG_WITH(archflags, [ --with-archflags="flags"
  371. use custom architecture flags
  372. (possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)],
  373. ARCHFLAGS="$withval")
  374. dnl Find commands...
  375. AC_PROG_INSTALL
  376. case $host_os in
  377. osf*)
  378. INSTALL="`pwd`/install-sh -c"
  379. ;;
  380. esac
  381. if test "$INSTALL" = "$ac_install_sh"; then
  382. # Use full path to install-sh script...
  383. INSTALL="`pwd`/install-sh -c"
  384. fi
  385. AC_PATH_PROG(NROFF,nroff)
  386. if test "x$NROFF" = "x:"; then
  387. # Try groff instead of nroff...
  388. AC_PATH_PROG(GROFF,groff)
  389. if test "x$GROFF" = "x:"; then
  390. NROFF="echo"
  391. else
  392. NROFF="$GROFF -T ascii"
  393. fi
  394. fi
  395. AC_PATH_PROG(DOXYDOC,doxygen)
  396. dnl How do we make libraries?
  397. AC_PROG_RANLIB
  398. AC_PATH_TOOL(AR, ar)
  399. if test "x$AR" = "x:"; then
  400. AC_MSG_ERROR([Configure could not find the library archiver, aborting.])
  401. fi
  402. if test "x$RANLIB" != "x:"; then
  403. LIBCOMMAND="$AR cr"
  404. else
  405. LIBCOMMAND="$AR crs"
  406. fi
  407. AC_SUBST(LIBCOMMAND)
  408. dnl how to compile (Windows) resource files
  409. dnl this will only be used to compile resources for Windows .exe files
  410. AC_PATH_TOOL(RC,windres)
  411. dnl Architecture checks...
  412. AC_CHECK_SIZEOF(short, 2)
  413. AC_CHECK_SIZEOF(int, 4)
  414. AC_CHECK_SIZEOF(long, 4)
  415. if test $ac_cv_sizeof_short -eq 2; then
  416. AC_DEFINE(U16,unsigned short)
  417. fi
  418. if test $ac_cv_sizeof_int -eq 4; then
  419. AC_DEFINE(U32,unsigned)
  420. else
  421. if test $ac_cv_sizeof_long -eq 4; then
  422. AC_DEFINE(U32,unsigned long)
  423. fi
  424. fi
  425. case $host_os in
  426. darwin*)
  427. ;;
  428. *)
  429. AC_C_BIGENDIAN
  430. if test $ac_cv_sizeof_int -eq 8; then
  431. AC_DEFINE(U64,unsigned)
  432. else
  433. if test $ac_cv_sizeof_long -eq 8; then
  434. AC_DEFINE(U64,unsigned long)
  435. fi
  436. fi
  437. ;;
  438. esac
  439. dnl Does the C++ compiler support the bool type?
  440. AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
  441. ac_cv_cxx_bool,[
  442. AC_LANG_PUSH([C++])
  443. AC_COMPILE_IFELSE(
  444. [AC_LANG_PROGRAM([[
  445. int f(int x){return 1;}
  446. int f(char x){return 1;}
  447. int f(bool x){return 1;}
  448. ]], [[
  449. bool b = true;
  450. return f(b);
  451. ]])],
  452. [ac_cv_cxx_bool=yes],
  453. [ac_cv_cxx_bool=no])
  454. AC_LANG_POP([])
  455. ])
  456. if test "$ac_cv_cxx_bool" != yes; then
  457. CXXFLAGS="-Dbool=char -Dfalse=0 -Dtrue=1 $CXXFLAGS"
  458. fi
  459. dnl Standard headers and functions...
  460. AC_HEADER_DIRENT
  461. AC_CHECK_HEADERS([sys/select.h sys/stdtypes.h])
  462. dnl Do we have the POSIX compatible scandir() prototype?
  463. AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
  464. ac_cv_cxx_scandir_posix,[
  465. AC_LANG_PUSH([C++])
  466. AC_COMPILE_IFELSE(
  467. [AC_LANG_PROGRAM(
  468. [[#include <dirent.h>
  469. int func (const char *d, dirent ***list, void *sort) {
  470. int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
  471. return n;
  472. }
  473. ]], [[
  474. ]])],
  475. [ac_cv_cxx_scandir_posix=yes],
  476. [ac_cv_cxx_scandir_posix=no])
  477. AC_LANG_POP([])
  478. ])
  479. dnl Define both HAVE_SCANDIR... macros, if the POSIX compatible function is
  480. dnl available. Otherwise: check, whether any scandir prototype is available,
  481. dnl but dont use it on SunOS and QNX because of an incompatibility in pre-Y2K
  482. dnl SunOS scandir versions. We assume, though, that the POSIX compatible
  483. dnl version on newer SunOS/Solaris versions works as expected.
  484. if test "$ac_cv_cxx_scandir_posix" = yes; then
  485. AC_DEFINE(HAVE_SCANDIR)
  486. AC_DEFINE(HAVE_SCANDIR_POSIX)
  487. else
  488. AC_CHECK_FUNC(scandir,[
  489. case $host_os in
  490. solaris* | *qnx*)
  491. AC_MSG_WARN([Not using $host_os scandir emulation function.])
  492. ;;
  493. *)
  494. AC_DEFINE(HAVE_SCANDIR)
  495. ;;
  496. esac])
  497. fi
  498. AC_CHECK_FUNC(vsnprintf,[
  499. case $host_os in
  500. hpux1020)
  501. AC_MSG_WARN([Not using built-in vsnprintf function because you are running HP-UX 10.20.])
  502. ;;
  503. osf4)
  504. AC_MSG_WARN([Not using built-in vsnprintf function because you are running Tru64 4.0.])
  505. ;;
  506. *)
  507. AC_DEFINE(HAVE_VSNPRINTF)
  508. ;;
  509. esac])
  510. AC_CHECK_FUNC(snprintf,[
  511. case $host_os in
  512. hpux1020)
  513. AC_MSG_WARN([Not using built-in snprintf function because you are running HP-UX 10.20.])
  514. ;;
  515. osf4)
  516. AC_MSG_WARN([Not using built-in snprintf function because you are running Tru64 4.0.])
  517. ;;
  518. *)
  519. AC_DEFINE(HAVE_SNPRINTF)
  520. ;;
  521. esac])
  522. AC_CHECK_HEADERS(strings.h)
  523. AC_CHECK_FUNCS(strcasecmp strlcat strlcpy)
  524. AC_CHECK_HEADERS(locale.h)
  525. AC_CHECK_FUNCS(localeconv)
  526. dnl FLTK library uses math library functions...
  527. AC_SEARCH_LIBS(pow, m)
  528. dnl Check for largefile support...
  529. AC_SYS_LARGEFILE
  530. dnl Define largefile options as needed...
  531. LARGEFILE=""
  532. if test x$enable_largefile != xno; then
  533. LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
  534. if test x$ac_cv_sys_large_files = x1; then
  535. LARGEFILE="$LARGEFILE -D_LARGE_FILES"
  536. fi
  537. if test x$ac_cv_sys_file_offset_bits = x64; then
  538. LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
  539. fi
  540. fi
  541. AC_SUBST(LARGEFILE)
  542. dnl Check for "long long" support...
  543. AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
  544. [if test "$GCC" = yes; then
  545. ac_cv_c_long_long=yes
  546. else
  547. AC_COMPILE_IFELSE(
  548. [AC_LANG_PROGRAM([[]],
  549. [[long long int i;]])],
  550. [ac_cv_c_long_long=yes],
  551. [ac_cv_c_long_long=no])
  552. fi])
  553. if test $ac_cv_c_long_long = yes; then
  554. AC_DEFINE(HAVE_LONG_LONG)
  555. fi
  556. dnl Check for dlopen/dlsym...
  557. AC_SEARCH_LIBS(dlsym, dl, AC_DEFINE(HAVE_DLSYM))
  558. AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(HAVE_DLFCN_H))
  559. dnl Check for audio libraries...
  560. AUDIOLIBS=""
  561. case $host_os in
  562. cygwin* | mingw*)
  563. dnl Cygwin environment...
  564. AUDIOLIBS="-lwinmm"
  565. ;;
  566. darwin*)
  567. AUDIOLIBS="-framework CoreAudio"
  568. ;;
  569. *)
  570. AC_CHECK_HEADER(alsa/asoundlib.h,
  571. AC_DEFINE(HAVE_ALSA_ASOUNDLIB_H)
  572. AUDIOLIBS="-lasound")
  573. ;;
  574. esac
  575. AC_SUBST(AUDIOLIBS)
  576. dnl Check for image libraries...
  577. SAVELIBS="$LIBS"
  578. IMAGELIBS=""
  579. STATICIMAGELIBS=""
  580. AC_SUBST(IMAGELIBS)
  581. AC_SUBST(STATICIMAGELIBS)
  582. # Handle the JPEG lib linking mode (use fltk local or system lib)
  583. # If --enable-(resp. --disable-)localjpeg parameter is not set by user
  584. # Then we check the JPEG lib usability, with result in sysjpeglib_ok variable
  585. AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library [[default=auto]]])
  586. # Check for System lib use if automatic mode or --disable-localjpeg is requested
  587. sysjpeglib_ok=no
  588. sysjpeginc_ok=no
  589. if test x$enable_localjpeg != xyes; then
  590. AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
  591. [AC_CHECK_HEADER(jpeglib.h,
  592. sysjpeginc_ok=yes)
  593. if test x$sysjpeginc_ok = xyes; then
  594. sysjpeglib_ok=yes
  595. fi])
  596. fi
  597. # Now set the jpeg lib and include flags according to the requested mode and availability
  598. if test x$enable_localjpeg = xyes -o x$sysjpeglib_ok = xno; then
  599. JPEGINC="-I../jpeg"
  600. JPEG="jpeg"
  601. IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
  602. STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
  603. AC_DEFINE(HAVE_LIBJPEG)
  604. #ac_cv_lib_jpeg_jpeg_CreateCompress=no # from ima: should not be necessary
  605. # Finally, warn user if system lib was requested but not found
  606. if test x$enable_localjpeg = xno; then
  607. AC_MSG_WARN([Cannot find system jpeg lib or header: choosing the local lib mode.])
  608. fi
  609. else
  610. JPEGINC=""
  611. JPEG=""
  612. IMAGELIBS="-ljpeg $IMAGELIBS"
  613. STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS"
  614. AC_DEFINE(HAVE_LIBJPEG)
  615. fi
  616. # Handle the ZLIB lib linking mode (use fltk local or system lib)
  617. # If --enable-(resp. --disable-)localzlib parameter is not set by user
  618. # Then we check the ZLIB lib usability, with result in syszlib_ok variable
  619. AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library [[default=auto]]])
  620. # Check for System lib use if automatic mode or --disable-localzlib is requested
  621. syszlib_ok=no
  622. syszinc_ok=no
  623. if test x$enable_localzlib != xyes; then
  624. AC_CHECK_LIB(z,gzgets,
  625. [AC_CHECK_HEADER(zlib.h,
  626. syszinc_ok=yes)
  627. if test x$syszinc_ok = xyes; then
  628. syszlib_ok=yes
  629. fi])
  630. fi
  631. # Now set the Z lib and include flags according to the requested mode and availability
  632. if test x$enable_localzlib = xyes -o x$syszlib_ok = xno ; then
  633. ZLIBINC="-I../zlib"
  634. ZLIB="zlib"
  635. LIBS="-lfltk_z $LIBS"
  636. IMAGELIBS="-lfltk_z $IMAGELIBS"
  637. STATICIMAGELIBS="\$libdir/libfltk_z.a $STATICIMAGELIBS"
  638. AC_DEFINE(HAVE_LIBZ)
  639. ac_cv_lib_z_gzgets=no # fc: is still necessary ?
  640. # Finally, warn user if system lib was requested but not found
  641. if test x$enable_localzlib = xno; then
  642. AC_MSG_WARN([Cannot find system z lib or header: choosing the local lib mode.])
  643. fi
  644. else
  645. ZLIBINC=""
  646. ZLIB=""
  647. LIBS="-lz $LIBS"
  648. IMAGELIBS="-lz $IMAGELIBS"
  649. STATICIMAGELIBS="-lz $STATICIMAGELIBS"
  650. AC_DEFINE(HAVE_LIBZ)
  651. fi
  652. # Handle the PNG lib linking mode (use fltk local or system lib)
  653. # If --enable-(resp. --disable-)localpng parameter is not set by user
  654. # Then we check the png lib usability with result in syspng_lib variable
  655. AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library [[default=auto]]])
  656. # Now check if system lib is usable, we check Lib AND include availability with inc variant,
  657. # but only, if the builtin lib is not requested
  658. syspnglib_ok=no
  659. syspnginc_ok=no
  660. if test x$enable_localpng != xyes; then
  661. AC_CHECK_LIB(png, png_read_info,
  662. [AC_CHECK_HEADER(png.h,
  663. AC_DEFINE(HAVE_PNG_H)
  664. syspnginc_ok=yes)
  665. AC_CHECK_HEADER(libpng/png.h,
  666. AC_DEFINE(HAVE_LIBPNG_PNG_H)
  667. syspnginc_ok=yes)
  668. if test x$syspnginc_ok = xyes; then
  669. syspnglib_ok=yes
  670. fi])
  671. fi
  672. # The following is executed if the lib was not found usable or if local lib is required explicitly
  673. if test x$enable_localpng = xyes -o x$syspnglib_ok = xno ; then
  674. PNGINC="-I../png"
  675. PNG="png"
  676. IMAGELIBS="-lfltk_png $IMAGELIBS"
  677. STATICIMAGELIBS="\$libdir/libfltk_png.a $STATICIMAGELIBS"
  678. AC_DEFINE(HAVE_LIBPNG)
  679. AC_DEFINE(HAVE_PNG_H)
  680. AC_DEFINE(HAVE_PNG_GET_VALID)
  681. AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)
  682. # Finally, warn user if system lib was requested but not found
  683. if test x$enable_localpng = xno; then
  684. AC_MSG_WARN([Cannot find system png lib or header: choosing the local lib mode.])
  685. fi
  686. else
  687. PNGINC=""
  688. PNG=""
  689. IMAGELIBS="-lpng $IMAGELIBS"
  690. STATICIMAGELIBS="-lpng $STATICIMAGELIBS"
  691. AC_DEFINE(HAVE_LIBPNG)
  692. AC_CHECK_LIB(png,png_get_valid, AC_DEFINE(HAVE_PNG_GET_VALID))
  693. AC_CHECK_LIB(png,png_set_tRNS_to_alpha, AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
  694. fi
  695. AC_SUBST(JPEG)
  696. AC_SUBST(JPEGINC)
  697. AC_SUBST(PNG)
  698. AC_SUBST(PNGINC)
  699. AC_SUBST(ZLIB)
  700. AC_SUBST(ZLIBINC)
  701. # Control the usage of the nanosvg lib
  702. AC_ARG_ENABLE(nanosvg, [ --enable-nanosvg use nanosvg to support SVG images [[default=yes]]])
  703. if test x$enable_nanosvg != xno; then
  704. AC_DEFINE(FLTK_USE_NANOSVG)
  705. fi
  706. dnl Restore original LIBS settings...
  707. LIBS="$SAVELIBS"
  708. dnl See if we need a .exe extension on executables...
  709. AC_EXEEXT
  710. dnl Check for pthreads for multi-threaded apps...
  711. have_pthread=no
  712. PTHREAD_FLAGS=""
  713. dnl Test whether we want to check for pthreads. We must not do it on Windows
  714. dnl unless we run under Cygwin with --enable-cygwin, since we always use
  715. dnl native threads on Windows (even if libpthread is available)
  716. check_pthread=yes
  717. case $host_os in
  718. mingw*)
  719. check_pthread=no
  720. ;;
  721. cygwin*)
  722. if test "x$enable_cygwin" != xyes; then
  723. check_pthread=no
  724. fi
  725. ;;
  726. *)
  727. ;;
  728. esac
  729. if test "x$enable_threads" != xno -a x$check_pthread = xyes; then
  730. AC_CHECK_HEADERS(pthread.h)
  731. if test x$ac_cv_header_pthread_h = xyes; then
  732. dnl Check various threading options for the platforms we support
  733. for flag in -lpthreads -lpthread -pthread; do
  734. AC_MSG_CHECKING([for pthread_create using $flag])
  735. SAVELIBS="$LIBS"
  736. LIBS="$flag $LIBS"
  737. AC_LINK_IFELSE(
  738. [AC_LANG_PROGRAM(
  739. [[#include <pthread.h>]],
  740. [[pthread_create(0, 0, 0, 0);]])],
  741. [have_pthread=yes],
  742. [LIBS="$SAVELIBS"])
  743. AC_MSG_RESULT([$have_pthread])
  744. if test $have_pthread = yes; then
  745. AC_DEFINE(HAVE_PTHREAD)
  746. PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
  747. # Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
  748. # be POSIX-compliant... :(
  749. case $host_os in
  750. solaris*)
  751. PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
  752. ;;
  753. esac
  754. break
  755. fi
  756. done
  757. fi
  758. fi
  759. AC_SUBST(PTHREAD_FLAGS)
  760. dnl Define OS-specific stuff...
  761. HLINKS=
  762. OSX_ONLY=:
  763. THREADS=
  764. AC_ARG_WITH(links, [ --with-links make header links for common misspellings [[default=no]]])
  765. INSTALL_DESKTOP=""
  766. UNINSTALL_DESKTOP=""
  767. case $host_os_gui in
  768. cygwin* | mingw*)
  769. dnl Cygwin environment, using windows GDI ...
  770. # Recent versions of Cygwin are seriously broken and the size
  771. # checks don't work because the shell puts out \r\n instead of
  772. # \n. Here we just force U32 to be defined to "unsigned"...
  773. AC_DEFINE(U32,unsigned)
  774. CFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CFLAGS"
  775. CXXFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CXXFLAGS"
  776. LDFLAGS="-mwindows $LDFLAGS"
  777. DSOFLAGS="-mwindows $DSOFLAGS"
  778. LIBS="$LIBS -lole32 -luuid -lcomctl32"
  779. BUILD="WIN"
  780. if test "x$with_optim" = x; then
  781. dnl Avoid -Os optimization on Cygwin/MinGW
  782. with_optim="-O3"
  783. fi
  784. if test x$enable_gl != xno; then
  785. AC_CHECK_HEADER(GL/gl.h,
  786. AC_DEFINE(HAVE_GL)
  787. GLLIB="-lopengl32")
  788. AC_CHECK_HEADER(GL/glu.h,
  789. AC_DEFINE(HAVE_GL_GLU_H)
  790. GLLIB="-lglu32 $GLLIB")
  791. else
  792. LINKFLTKGL=""
  793. GLLIBNAME=""
  794. GLDSONAME=""
  795. GLDEMOS=""
  796. fi
  797. if test "x$enable_threads" != xno; then
  798. if test x$have_pthread = xyes; then
  799. AC_DEFINE(HAVE_PTHREAD)
  800. fi
  801. fi
  802. THREADS="threads$EXEEXT"
  803. # Don't make symlinks since Windows is not case sensitive.
  804. if test "x$with_links" != xyes; then
  805. HLINKS="#"
  806. fi
  807. ;;
  808. darwin*)
  809. AC_DEFINE(__APPLE_QUARTZ__)
  810. BUILD="OSX"
  811. # MacOS X uses Cocoa for graphics.
  812. LIBS="$LIBS -framework Cocoa"
  813. if test x$have_pthread = xyes; then
  814. AC_DEFINE(HAVE_PTHREAD)
  815. THREADS="threads$EXEEXT"
  816. fi
  817. if test x$enable_gl != xno; then
  818. AC_DEFINE(HAVE_GL)
  819. AC_DEFINE(HAVE_GL_GLU_H)
  820. GLLIB="-framework OpenGL"
  821. else
  822. LINKFLTKGL=""
  823. GLLIBNAME=""
  824. GLDSONAME=""
  825. GLDEMOS=""
  826. fi
  827. # Don't make symlinks because HFS+ is not case sensitive...
  828. if test "x$with_links" != xyes; then
  829. HLINKS="#"
  830. fi
  831. # Some steps are only done for OS X package management
  832. OSX_ONLY=
  833. # Install/Uninstall FLUID application
  834. INSTALL_DESKTOP="install-osx"
  835. UNINSTALL_DESKTOP="uninstall-osx"
  836. ;;
  837. *)
  838. # All others are UNIX/X11...
  839. # This includes Cygwin target combined with X11
  840. if test x$have_pthread = xyes; then
  841. AC_DEFINE(HAVE_PTHREAD)
  842. THREADS="threads$EXEEXT"
  843. fi
  844. dnl Check for X11...
  845. AC_PATH_XTRA
  846. if test x$no_x = xyes; then
  847. AC_MSG_ERROR([Configure could not find required X11 libraries, aborting.])
  848. fi
  849. if test "x$X_PRE_LIBS" != x; then
  850. AC_MSG_WARN([Ignoring libraries "$X_PRE_LIBS" requested by configure.])
  851. fi
  852. LIBS="$LIBS -lX11 $X_EXTRA_LIBS"
  853. CFLAGS="$CFLAGS $X_CFLAGS"
  854. CXXFLAGS="$CXXFLAGS $X_CFLAGS"
  855. LDFLAGS="$X_LIBS $LDFLAGS"
  856. DSOFLAGS="$X_LIBS $DSOFLAGS"
  857. AC_DEFINE(USE_X11)
  858. BUILD="X11"
  859. if test "x$x_includes" != x; then
  860. ac_cpp="$ac_cpp -I$x_includes"
  861. fi
  862. dnl Check for OpenGL unless disabled...
  863. GLLIB=
  864. if test x$enable_gl != xno; then
  865. AC_SEARCH_LIBS(dlopen, dl)
  866. AC_CHECK_HEADER(GL/gl.h,
  867. AC_CHECK_LIB(GL, glXMakeCurrent,
  868. [AC_DEFINE(HAVE_GL)
  869. GLLIB="-lGL"],
  870. AC_CHECK_LIB(MesaGL, glXMakeCurrent,
  871. [AC_DEFINE(HAVE_GL)
  872. GLLIB="-lMesaGL"],,
  873. [-lm]),
  874. [-lm])
  875. AC_CHECK_LIB(GL, glXGetProcAddressARB,
  876. AC_DEFINE(HAVE_GLXGETPROCADDRESSARB),, [-lm])
  877. )
  878. AC_CHECK_HEADER(GL/glu.h,
  879. AC_DEFINE(HAVE_GL_GLU_H)
  880. if test x$ac_cv_lib_GL_glXMakeCurrent = xyes; then
  881. GLLIB="-lGLU $GLLIB"
  882. fi
  883. if test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes; then
  884. GLLIB="-lMesaGLU $GLLIB"
  885. fi
  886. )
  887. if test x$ac_cv_lib_GL_glXMakeCurrent != xyes -a x$ac_cv_lib_MesaGL_glXMakeCurrent != xyes; then
  888. LINKFLTKGL=""
  889. GLLIBNAME=""
  890. GLDSONAME=""
  891. GLDEMOS=""
  892. fi
  893. else
  894. LINKFLTKGL=""
  895. GLLIBNAME=""
  896. GLDSONAME=""
  897. GLDEMOS=""
  898. fi
  899. dnl Check whether print support was disabled...
  900. AC_ARG_ENABLE(print, [ --enable-print turn on print support (X11 platform) [[default=yes]]])
  901. if test x$enable_print = xno; then
  902. AC_DEFINE(FL_NO_PRINT_SUPPORT)
  903. fi
  904. dnl Check for Xinerama support unless disabled...
  905. AC_ARG_ENABLE(xinerama, [ --enable-xinerama turn on Xinerama support [[default=yes]]])
  906. xinerama_found=no
  907. if test x$enable_xinerama != xno; then
  908. AC_CHECK_LIB(Xinerama, XineramaIsActive,
  909. [AC_DEFINE(HAVE_XINERAMA)
  910. LIBS="-lXinerama $LIBS"
  911. xinerama_found=yes])
  912. fi
  913. dnl Check for the Xft library unless disabled...
  914. AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [[default=yes]]])
  915. xft_found=no
  916. if test x$enable_xft != xno; then
  917. AC_PATH_PROG(FTCONFIG, freetype-config)
  918. if test "x$FTCONFIG" != x; then
  919. CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS"
  920. CFLAGS="`$FTCONFIG --cflags` $CFLAGS"
  921. CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS"
  922. AC_CHECK_LIB(fontconfig, FcPatternCreate)
  923. AC_CHECK_HEADER(X11/Xft/Xft.h,
  924. AC_CHECK_LIB(Xft, XftDrawCreate,
  925. [AC_DEFINE(USE_XFT)
  926. LIBS="-lXft $LIBS"
  927. BUILD="XFT"
  928. xft_found=yes]))
  929. fi
  930. fi
  931. dnl Issue a warning message if Xft was not found, abort configure
  932. dnl if Xft was requested explicitly (but not found)
  933. if test x$enable_xft != xno -a x$xft_found != xyes; then
  934. AC_MSG_WARN([could not find the required Xft headers and/or libraries.])
  935. AC_MSG_NOTICE([please install Xft headers and libraries or use 'configure --disable-xft'.])
  936. if test x$enable_xft = xyes; then
  937. AC_MSG_ERROR([Aborting.])
  938. fi
  939. fi
  940. dnl Check for the pango library unless disabled...
  941. AC_ARG_ENABLE(pango, [ --enable-pango turn on Pango support [[default=no]]])
  942. pango_found=no
  943. if test x$enable_pango = xyes; then
  944. case $host_os in
  945. darwin*)
  946. CXXFLAGS="-I/sw/include/pango-1.0 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include $CXXFLAGS"
  947. PANGOLIBDIR="-L/sw/lib"
  948. ;;
  949. linux*)
  950. CXXFLAGS="-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include $CXXFLAGS"
  951. CXXFLAGS="-I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include $CXXFLAGS"
  952. ;;
  953. freebsd*)
  954. CXXFLAGS="-I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include $CXXFLAGS"
  955. ;;
  956. netbsd*)
  957. CXXFLAGS="-I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/lib/glib-2.0/include $CXXFLAGS"
  958. CXXFLAGS="-I/usr/pkg/include/glib/glib-2.0 $CXXFLAGS"
  959. PANGOLIBDIR="-L/usr/pkg/lib"
  960. LDFLAGS="-Wl,-rpath,/usr/pkg/lib $LDFLAGS"
  961. ;;
  962. esac
  963. CPPFLAGS="$PANGOLIBDIR $CXXFLAGS"
  964. AC_CHECK_HEADERS([pango/pango.h pango/pangoxft.h],
  965. AC_CHECK_LIB(pango-1.0, pango_layout_new,
  966. AC_CHECK_LIB(pangoxft-1.0, pango_xft_render_layout,
  967. AC_DEFINE(USE_PANGO)
  968. pango_found=yes
  969. LIBS="$PANGOLIBDIR -lpango-1.0 -lpangoxft-1.0 -lgobject-2.0 $LIBS")))
  970. CPPFLAGS=$CXXFLAGS
  971. fi
  972. dnl Check for the Xdbe extension unless disabled...
  973. AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [[default=yes]]])
  974. xdbe_found=no
  975. if test x$enable_xdbe != xno; then
  976. AC_CHECK_HEADER(
  977. [X11/extensions/Xdbe.h],
  978. [AC_CHECK_LIB(Xext, XdbeQueryExtension,
  979. [AC_DEFINE(HAVE_XDBE)
  980. LIBS="-lXext $LIBS"
  981. xdbe_found=yes])],
  982. [],
  983. [#include <X11/Xlib.h>])
  984. fi
  985. dnl Check for the Xfixes extension unless disabled...
  986. AC_ARG_ENABLE(xfixes, [ --enable-xfixes turn on Xfixes support [[default=yes]]])
  987. xfixes_found=no
  988. if test x$enable_xfixes != xno; then
  989. AC_CHECK_HEADER(
  990. [X11/extensions/Xfixes.h],
  991. [AC_CHECK_LIB(Xfixes, XFixesQueryExtension,
  992. [AC_DEFINE(HAVE_XFIXES)
  993. LIBS="-lXfixes $LIBS"
  994. xfixes_found=yes])],
  995. [],
  996. [#include <X11/Xlib.h>])
  997. fi
  998. dnl Check for the Xcursor library unless disabled...
  999. AC_ARG_ENABLE(xcursor, [ --enable-xcursor turn on Xcursor support [[default=yes]]])
  1000. xcursor_found=no
  1001. if test x$enable_xcursor != xno; then
  1002. AC_CHECK_HEADER(
  1003. [X11/Xcursor/Xcursor.h],
  1004. [AC_CHECK_LIB(Xcursor, XcursorImageCreate,
  1005. [AC_DEFINE(HAVE_XCURSOR)
  1006. LIBS="-lXcursor $LIBS"
  1007. xcursor_found=yes])],
  1008. [],
  1009. [#include <X11/Xlib.h>])
  1010. fi
  1011. dnl Check for the Xrender library unless disabled...
  1012. AC_ARG_ENABLE(xrender, [ --enable-xrender turn on Xrender support [[default=yes]]])
  1013. xrender_found=no
  1014. if test x$enable_xrender != xno; then
  1015. AC_CHECK_HEADER(
  1016. [X11/extensions/Xrender.h],
  1017. [AC_CHECK_LIB(Xrender, XRenderQueryVersion,
  1018. [AC_DEFINE(HAVE_XRENDER)
  1019. LIBS="-lXrender $LIBS"
  1020. xrender_found=yes])],
  1021. [],
  1022. [#include <X11/Xlib.h>])
  1023. fi
  1024. dnl Check for the X11/Xregion.h header file...
  1025. AC_CHECK_HEADER(X11/Xregion.h, AC_DEFINE(HAVE_X11_XREGION_H),,
  1026. [#include <X11/Xlib.h>])
  1027. dnl Check for overlay visuals...
  1028. AC_PATH_PROG(XPROP, xprop)
  1029. AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay,
  1030. if test "x$XPROP" != x; then
  1031. if $XPROP -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
  1032. ac_cv_have_overlay=yes
  1033. else
  1034. ac_cv_have_overlay=no
  1035. fi
  1036. else
  1037. ac_cv_have_overlay=no
  1038. fi)
  1039. if test x$ac_cv_have_overlay = xyes; then
  1040. AC_DEFINE(HAVE_OVERLAY)
  1041. fi
  1042. # Make symlinks since UNIX/Linux is case sensitive,
  1043. # but Cygwin in general not.
  1044. case $host_os in
  1045. cygwin*)
  1046. HLINKS="#"
  1047. ;;
  1048. *)
  1049. ;;
  1050. esac
  1051. # Make symlinks since UNIX/Linux is case sensitive,
  1052. # but only if explicitly configured (default=no)
  1053. if test "x$with_links" != xyes; then
  1054. HLINKS="#"
  1055. fi
  1056. # Install/Uninstall FLUID application support files
  1057. INSTALL_DESKTOP="install-linux"
  1058. UNINSTALL_DESKTOP="uninstall-linux"
  1059. ;;
  1060. esac
  1061. AC_SUBST(GLDEMOS)
  1062. AC_SUBST(GLLIB)
  1063. AC_SUBST(HLINKS)
  1064. AC_SUBST(OSX_ONLY)
  1065. AC_SUBST(THREADS)
  1066. AC_SUBST(INSTALL_DESKTOP)
  1067. AC_SUBST(UNINSTALL_DESKTOP)
  1068. AC_SUBST(BUILD)
  1069. dnl Figure out the appropriate formatted man page extension...
  1070. case "$host_os" in
  1071. *bsd* | darwin*)
  1072. # *BSD
  1073. CAT1EXT=0
  1074. CAT3EXT=0
  1075. CAT6EXT=0
  1076. ;;
  1077. irix*)
  1078. # SGI IRIX
  1079. CAT1EXT=z
  1080. CAT3EXT=z
  1081. CAT6EXT=z
  1082. ;;
  1083. *)
  1084. # All others
  1085. CAT1EXT=1
  1086. CAT3EXT=3
  1087. CAT6EXT=6
  1088. ;;
  1089. esac
  1090. AC_SUBST(CAT1EXT)
  1091. AC_SUBST(CAT3EXT)
  1092. AC_SUBST(CAT6EXT)
  1093. dnl Fix "mandir" variable...
  1094. if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then
  1095. case "$host_os" in
  1096. *bsd* | darwin* | linux*)
  1097. # *BSD, Darwin, and Linux
  1098. mandir="\${prefix}/share/man"
  1099. ;;
  1100. irix*)
  1101. # SGI IRIX
  1102. mandir="\${prefix}/share/catman"
  1103. ;;
  1104. esac
  1105. fi
  1106. dnl Fix "libdir" variable...
  1107. if test "$prefix" = NONE; then
  1108. prefix=/usr/local
  1109. fi
  1110. if test "$exec_prefix" = NONE; then
  1111. exec_prefix="\${prefix}"
  1112. fi
  1113. case $host_os in
  1114. irix[1-5]*)
  1115. ;;
  1116. irix*)
  1117. if test "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
  1118. libdir="/usr/lib32"
  1119. fi
  1120. ;;
  1121. esac
  1122. dnl Define the command used to update the dependencies (this option
  1123. dnl mainly for FLTK core developers - not necessary for users)
  1124. MAKEDEPEND="\$(CXX) -M"
  1125. AC_SUBST(MAKEDEPEND)
  1126. dnl Add warnings to compiler switches:
  1127. dnl do this last so messing with switches does not break tests
  1128. if test -n "$GCC"; then
  1129. # Show all standard warnings + unused variables, conversion errors,
  1130. # and inlining problems when compiling...
  1131. OPTIM="-Wall -Wunused -Wno-format-y2k $OPTIM"
  1132. # The following additional warnings are useful for tracking down problems...
  1133. #OPTIM="-Wshadow -Wconversion $OPTIM"
  1134. # We know that Carbon is deprecated on OS X 10.4. To avoid hundreds of warnings
  1135. # we will temporarily disable 'deprecated' warnings on OS X.
  1136. case $host_os in
  1137. darwin[1-7])
  1138. ;;
  1139. darwin*)
  1140. OPTIM="-Wno-deprecated-declarations $OPTIM"
  1141. ;;
  1142. esac
  1143. # Set the default compiler optimizations...
  1144. if test -z "$DEBUGFLAG"; then
  1145. #
  1146. # Note: Can't use -fomit-frame-pointer - prevents tools like
  1147. # libsafe from working!
  1148. #
  1149. # Don't use -fforce-mem, -fforce-addr, or -fcaller-saves.
  1150. # They all seem to make either no difference or enlarge
  1151. # the code by a few hundred bytes.
  1152. #
  1153. # "-Os" seems to be the best compromise between speed and
  1154. # code size. "-O3" and higher seem to make no effective
  1155. # difference in the speed of the code, but does bloat the
  1156. # library 10+%.
  1157. #
  1158. if test "x$with_optim" != x; then
  1159. OPTIM="$with_optim $OPTIM"
  1160. else
  1161. OPTIM="-Os $OPTIM"
  1162. fi
  1163. fi
  1164. # Generate position-independent code when needed...
  1165. if test $PICFLAG = 1; then
  1166. OPTIM="$OPTIM -fPIC"
  1167. fi
  1168. # See if GCC supports -fno-exceptions...
  1169. AC_MSG_CHECKING([if GCC supports -fno-exceptions])
  1170. OLDCFLAGS="$CFLAGS"
  1171. CFLAGS="$CFLAGS -fno-exceptions"
  1172. AC_COMPILE_IFELSE(
  1173. [AC_LANG_PROGRAM([[]], [[]])],
  1174. [OPTIM="$OPTIM -fno-exceptions"
  1175. AC_MSG_RESULT(yes)],
  1176. [AC_MSG_RESULT(no)])
  1177. CFLAGS="$OLDCFLAGS"
  1178. # See if GCC supports -fno-strict-aliasing...
  1179. AC_MSG_CHECKING([if GCC supports -fno-strict-aliasing])
  1180. OLDCFLAGS="$CFLAGS"
  1181. CFLAGS="$CFLAGS -fno-strict-aliasing"
  1182. AC_COMPILE_IFELSE(
  1183. [AC_LANG_PROGRAM([[]], [[]])],
  1184. [OPTIM="$OPTIM -fno-strict-aliasing"
  1185. AC_MSG_RESULT(yes)],
  1186. [AC_MSG_RESULT(no)])
  1187. CFLAGS="$OLDCFLAGS"
  1188. dnl Make sure that shared libraries don't have undefined references
  1189. # See if ld supports -no-undefined...
  1190. AC_MSG_CHECKING([if ld supports -no-undefined])
  1191. OLDLDFLAGS="$LDFLAGS"
  1192. LDFLAGS="$LDFLAGS -Wl,-no-undefined"
  1193. AC_LINK_IFELSE(
  1194. [AC_LANG_PROGRAM([[]], [[]])],
  1195. [DSOFLAGS="$DSOFLAGS -Wl,-no-undefined"
  1196. AC_MSG_RESULT(yes)],
  1197. [AC_MSG_RESULT(no)])
  1198. LDFLAGS="$OLDLDFLAGS"
  1199. # See if ld supports -Bsymbolic-functions...
  1200. AC_MSG_CHECKING([if ld supports -Bsymbolic-functions])
  1201. OLDLDFLAGS="$LDFLAGS"
  1202. LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
  1203. AC_LINK_IFELSE(
  1204. [AC_LANG_PROGRAM([[]], [[]])],
  1205. [DSOFLAGS="$DSOFLAGS -Wl,-Bsymbolic-functions"
  1206. AC_MSG_RESULT(yes)],
  1207. [AC_MSG_RESULT(no)])
  1208. LDFLAGS="$OLDLDFLAGS"
  1209. # See if toolchain supports a sectioned build...
  1210. AC_MSG_CHECKING([if toolchain supports sections])
  1211. OLDLDFLAGS="$LDFLAGS"
  1212. OLDCFLAGS="$CFLAGS"
  1213. LDFLAGS="$LDFLAGS -Wl,-gc-sections"
  1214. CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
  1215. AC_LINK_IFELSE(
  1216. [AC_LANG_PROGRAM([[]], [[]])],
  1217. [DSOFLAGS="$DSOFLAGS -Wl,-gc-sections"
  1218. OPTIM="$OPTIM -ffunction-sections -fdata-sections"
  1219. AC_MSG_RESULT(yes)],
  1220. [AC_MSG_RESULT(no)])
  1221. LDFLAGS="$OLDLDFLAGS"
  1222. CFLAGS="$OLDCFLAGS"
  1223. # See if we are running Solaris; if so, try the -fpermissive option...
  1224. # This option is required on some versions of Solaris to work around
  1225. # bugs in the X headers up through Solaris 7.
  1226. #
  1227. # Unlike the other compiler/optimization settings, this one is placed
  1228. # in CFLAGS and CXXFLAGS so that fltk-config will provide the option
  1229. # to clients - otherwise client apps will not compile properly...
  1230. case $host_os in
  1231. solaris*)
  1232. AC_MSG_CHECKING([if GCC supports -fpermissive])
  1233. OLDCFLAGS="$CFLAGS"
  1234. CFLAGS="$CFLAGS -fpermissive"
  1235. AC_COMPILE_IFELSE(
  1236. [AC_LANG_PROGRAM([[]], [[]])],
  1237. [CXXFLAGS="$CXXFLAGS -fpermissive"
  1238. AC_MSG_RESULT(yes)],
  1239. [CFLAGS="$OLDCFLAGS"
  1240. AC_MSG_RESULT(no)])
  1241. ;;
  1242. esac
  1243. else
  1244. case "$host_os" in
  1245. irix*)
  1246. # Running some flavor of IRIX; see which version and
  1247. # set things up according...
  1248. if test "$uversion" -ge 62; then
  1249. # We are running IRIX 6.2 or higher; uncomment the following
  1250. # lines if you don't have IDO 7.2 or higher:
  1251. #
  1252. # CXX="CC -n32 -mips3"
  1253. # CC="cc -n32 -mips3"
  1254. # LD="ld -n32 -mips3"
  1255. # MAKEDEPEND="CC -M"
  1256. if test "x`grep abi=n32 /etc/compiler.defaults`" = x; then
  1257. AC_MSG_WARN([FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI "-n32 -mips3"])
  1258. fi
  1259. OPTIM="-fullwarn $OPTIM"
  1260. fi
  1261. if test -z "$DEBUGFLAG"; then
  1262. if test "x$with_optim" != x; then
  1263. OPTIM="$with_optim $OPTIM"
  1264. else
  1265. OPTIM="-O2 $OPTIM"
  1266. if test $uversion -gt 62; then
  1267. OPTIM="-OPT:Olimit=4000 $OPTIM"
  1268. fi
  1269. fi
  1270. fi
  1271. ;;
  1272. hpux*)
  1273. # Running HP-UX; these options should work for the HP compilers.
  1274. if test -z "$DEBUGFLAG"; then
  1275. if test "x$with_optim" != x; then
  1276. OPTIM="$with_optim $OPTIM"
  1277. else
  1278. OPTIM="+O2 $OPTIM"
  1279. fi
  1280. fi
  1281. if test $PICFLAG = 1; then
  1282. OPTIM="+z $OPTIM"
  1283. fi
  1284. CXXFLAGS="$CXXFLAGS +W336,501,736,740,749,829"
  1285. ;;
  1286. OSF1*)
  1287. # Running Digital/Tru64 UNIX; these options should work for the
  1288. # Digital/Compaq/NewHP compilers.
  1289. if test -z "$DEBUGFLAG"; then
  1290. if test "x$with_optim" != x; then
  1291. OPTIM="$with_optim $OPTIM"
  1292. else
  1293. OPTIM="-O2 $OPTIM"
  1294. fi
  1295. fi
  1296. ;;
  1297. solaris*)
  1298. # Solaris
  1299. if test -z "$DEBUGFLAG"; then
  1300. if test "x$with_optim" != x; then
  1301. OPTIM="$with_optim $OPTIM"
  1302. else
  1303. OPTIM="-xO3 $OPTIM"
  1304. fi
  1305. fi
  1306. if test $PICFLAG = 1; then
  1307. OPTIM="-KPIC $OPTIM"
  1308. fi
  1309. ;;
  1310. aix*)
  1311. if test -z "$DEBUGFLAG"; then
  1312. if test "x$with_optim" != x; then
  1313. OPTIM="$with_optim $OPTIM"
  1314. else
  1315. OPTIM="-O2 $OPTIM"
  1316. fi
  1317. fi
  1318. AC_MSG_WARN([The AIX C and C++ compilers are known not to correctly compile the FLTK library.])
  1319. ;;
  1320. *)
  1321. # Running some other operating system; inform the user they
  1322. # should contribute the necessary options via the STR form..
  1323. AC_MSG_WARN([Building FLTK with default compiler optimizations])
  1324. AC_MSG_WARN([Send the FLTK developers your uname and compiler options via http://www.fltk.org/str.php])
  1325. ;;
  1326. esac
  1327. fi
  1328. OPTIM="$DEBUGFLAG $OPTIM"
  1329. dnl Take archflags away from CFLAGS (makefiles use ARCHFLAGS explicitly)
  1330. case $host_os in
  1331. darwin*)
  1332. if test "x$with_archflags" != x ; then
  1333. CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
  1334. fi
  1335. ;;
  1336. esac
  1337. dnl Define the FLTK documentation directory...
  1338. case $host_os in
  1339. mingw*)
  1340. # Determine the path where MSys has /usr installed
  1341. msyspath=`mount | grep '\/usr ' | cut -d ' ' -f -1 | sed -e 's/\\\/\// g'`
  1342. # Then substitute that in the WIN32 path instead of /usr
  1343. AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "$msyspath/local/share/doc/fltk")
  1344. ;;
  1345. *)
  1346. if test x$prefix = xNONE; then
  1347. AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "/usr/local/share/doc/fltk")
  1348. else
  1349. AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "$prefix/share/doc/fltk")
  1350. fi
  1351. ;;
  1352. esac
  1353. dnl Define the FLTK data directory...
  1354. if test x$prefix = xNONE; then
  1355. AC_DEFINE_UNQUOTED(FLTK_DATADIR, "/usr/local/share/fltk")
  1356. else
  1357. AC_DEFINE_UNQUOTED(FLTK_DATADIR, "$prefix/share/fltk")
  1358. fi
  1359. dnl Summarize results of configure tests...
  1360. echo ""
  1361. echo "Configuration Summary"
  1362. echo "-------------------------------------------------------------------------"
  1363. case $host_os_gui in
  1364. cygwin* | mingw*)
  1365. graphics="GDI"
  1366. ;;
  1367. darwin*)
  1368. graphics="Quartz"
  1369. ;;
  1370. *)
  1371. graphics="X11"
  1372. if test x$xft_found = xyes; then
  1373. graphics="$graphics + Xft"
  1374. fi
  1375. if test x$xdbe_found = xyes; then
  1376. graphics="$graphics + Xdbe"
  1377. fi
  1378. if test x$xfixes_found = xyes; then
  1379. graphics="$graphics + Xfixes"
  1380. fi
  1381. if test x$xinerama_found = xyes; then
  1382. graphics="$graphics + Xinerama"
  1383. fi
  1384. if test x$xcursor_found = xyes; then
  1385. graphics="$graphics + Xcursor"
  1386. fi
  1387. if test x$xrender_found = xyes; then
  1388. graphics="$graphics + Xrender"
  1389. fi
  1390. if test x$pango_found = xyes; then
  1391. graphics="$graphics + pango"
  1392. fi
  1393. ;;
  1394. esac
  1395. echo " Directories: prefix=$prefix"
  1396. echo " bindir=$bindir"
  1397. echo " datadir=$datadir"
  1398. echo " datarootdir=$datarootdir"
  1399. echo " exec_prefix=$exec_prefix"
  1400. echo " includedir=$includedir"
  1401. echo " libdir=$libdir"
  1402. echo " mandir=$mandir"
  1403. case $host_os in
  1404. mingw*)
  1405. echo " MSys docpath=$msyspath/local/share/doc/fltk"
  1406. ;;
  1407. esac
  1408. echo " Graphics: $graphics"
  1409. if test x$JPEG = x; then
  1410. echo "Image Libraries: JPEG=System"
  1411. else
  1412. echo "Image Libraries: JPEG=Builtin"
  1413. fi
  1414. if test x$PNG = x; then
  1415. echo " PNG=System"
  1416. else
  1417. echo " PNG=Builtin"
  1418. fi
  1419. if test x$ZLIB = x; then
  1420. echo " ZLIB=System"
  1421. else
  1422. echo " ZLIB=Builtin"
  1423. fi
  1424. if test x$enable_cairo = xyes; then
  1425. echo " CAIRO=lib"
  1426. fi
  1427. if test x$enable_cairoext = xyes; then
  1428. echo " CAIRO=internal_use"
  1429. fi
  1430. if test x$enable_largefile != xno; then
  1431. echo " Large Files: YES"
  1432. else
  1433. echo " Large Files: NO"
  1434. fi
  1435. if test x$GLDEMOS = x; then
  1436. echo " OpenGL: NO"
  1437. else
  1438. echo " OpenGL: YES"
  1439. fi
  1440. if test x$THREADS = x; then
  1441. echo " Threads: NO"
  1442. else
  1443. echo " Threads: YES"
  1444. fi
  1445. dnl Set empty BINARY_DIR variable for fltk-config.in (CMake compatibility)
  1446. BINARY_DIR=
  1447. AC_SUBST(BINARY_DIR)
  1448. dnl Write all of the files...
  1449. AC_CONFIG_HEADER(config.h:configh.in)
  1450. AC_CONFIG_HEADER(FL/abi-version.h:abi-version.in)
  1451. AC_CONFIG_FILES([makeinclude fltk.list fltk-config fltk.spec FL/Makefile])
  1452. AC_OUTPUT
  1453. dnl Make sure the fltk-config script is executable...
  1454. chmod +x fltk-config
  1455. dnl
  1456. dnl End of "$Id: configure.ac 12626 2018-01-08 10:19:19Z manolo $".
  1457. dnl