configure.ac 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. #
  2. # /*
  3. # * Copyright 2021
  4. # * This includes splay Copyright (C) 1998-2021 Free Software Foundation, Inc.
  5. # *
  6. # * This program is free software: you can redistribute it and/or modify
  7. # * it under the terms of the GNU General Public License as published by
  8. # * the Free Software Foundation, either version 3 of the License, or
  9. # * (at your option) any later version.
  10. # *
  11. # * This program is distributed in the hope that it will be useful,
  12. # * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # * GNU General Public License for more details.
  15. # *
  16. # * You should have received a copy of the GNU General Public License
  17. # * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. # *
  19. # * SPDX-License-Identifier: GPL-3.0+
  20. # * License-Filename: LICENSE
  21. # *
  22. # */
  23. #
  24. # -*- Autoconf -*-
  25. # Process this file with autoconf to produce a configure script.
  26. # Macro: AC_INIT (package, version, [bug-report], [tarname], [url])
  27. # minor version number is increased at important feature change
  28. # Process with autogen.sh or manual:
  29. # aclocal
  30. # autoheader
  31. # autoconf
  32. # libtoolize --force --automake
  33. # automake -a --gnu --include-deps
  34. # or do this all using autoreconf -fvim
  35. #
  36. # test also using scan-build from llvm clang tools
  37. #
  38. AC_PREREQ([2.69])
  39. AC_INIT([gml4gtk], [8.0], [mooigraph@gmail.com], [gml4gtk.tar.gz], [https://sourceforge.net/projects/gml4gtk])
  40. AC_CONFIG_SRCDIR([src/main.h])
  41. AC_CONFIG_HEADERS([config.h])
  42. AM_INIT_AUTOMAKE
  43. AC_COPYRIGHT([
  44. # /*
  45. # * This program is free software: you can redistribute it and/or modify
  46. # * it under the terms of the GNU General Public License as published by
  47. # * the Free Software Foundation, either version 3 of the License, or
  48. # * (at your option) any later version.
  49. # *
  50. # * This program is distributed in the hope that it will be useful,
  51. # * but WITHOUT ANY WARRANTY; without even the implied warranty of
  52. # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  53. # * GNU General Public License for more details.
  54. # *
  55. # * You should have received a copy of the GNU General Public License
  56. # * along with this program. If not, see <http://www.gnu.org/licenses/>.
  57. # *
  58. # * SPDX-License-Identifier: GPL-3.0+
  59. # * License-Filename: LICENSE
  60. # *
  61. # */
  62. ])
  63. AC_LANG(C)
  64. # Checks for programs.
  65. AC_PROG_CC
  66. AC_PROG_MAKE_SET
  67. PKG_PROG_PKG_CONFIG
  68. AM_SILENT_RULES([no])
  69. # -DFORTIFY_SOURCE=2 does add glibc extra checks, see RedHat documentation
  70. # Need c11 mode because of %llu in printf() and (long long int) datatype and unnamed unions
  71. # Upcoming c standard is c17 using GNU GCC -std=c17
  72. # or CFLAGS="$CFLAGS ..."
  73. # do not optimize away memset()
  74. #CFLAGS="$CFLAGS -g -std=c99 -fno-builtin-memset -DFORTIFY_SOURCE=2 -fdump-rtl-expand-graph"
  75. # -pg for use with gprof
  76. # -fcallgraph-info should generate graph data
  77. # using -fno-inline when testing with valgrind
  78. #CFLAGS="$CFLAGS -g -std=c99 -fno-builtin-memset -DFORTIFY_SOURCE=2"
  79. #CFLAGS="$CFLAGS -g -std=c99 -O0"
  80. # asm output: -S -fverbose-asm
  81. # asm output: -Wa,-adhln=test-O3.s -g -fverbose-asm -masm=intel
  82. # asm output: -fverbose-asm -save-temps=obj
  83. # -fplugin=$HOME/scallgraph_plugin.so.0.0.0
  84. CFLAGS="$CFLAGS -g -std=c99 "
  85. AC_MSG_RESULT($CFLAGS)
  86. # Gcc compiler options
  87. # the option -frecord-gcc-switches puts the compiler options
  88. # in the binary ro read with: readelf -p .GCC.command.line a.out
  89. # https://github.com/Barro/compiler-warnings has lists of gcc options
  90. AC_DEFUN([GCC_COMPILER_WARNING],
  91. [AC_MSG_CHECKING(whether compiler accepts $1)
  92. AC_SUBST(WARNING_CFLAGS)
  93. ac_save_CFLAGS="$CFLAGS"
  94. CFLAGS="$CFLAGS $1"
  95. AC_TRY_COMPILE(,
  96. [int x;],
  97. WARNING_CFLAGS="$WARNING_CFLAGS $1"
  98. AC_MSG_RESULT(yes),
  99. AC_MSG_RESULT(no))
  100. CFLAGS="$ac_save_CFLAGS"])
  101. # the fortify -D option needs optimizing, cannot use -O0 then.
  102. # for debug with gdb the -O0 is needed or it cannot find crashes.
  103. # prints gcc settings and include files and is very verbose
  104. # when extra warnings are enabled then -DMEMCHECK is set
  105. # extra code in dpmem.c starts checking for memory leaks.
  106. # GCC_COMPILER_WARNING(--verbose)
  107. # GCC_COMPILER_WARNING(-H)
  108. # -Wnull-dereference warns about possible NULL pointers
  109. AC_ARG_ENABLE(gcc-warnings,
  110. AC_HELP_STRING([--enable-gcc-warnings],
  111. [turn on lots of GCC warnings (not recommended)]),
  112. [case "${enableval}" in
  113. yes|no) ;;
  114. *) AC_MSG_ERROR([unknown value ${enableval} for gcc-warnings option expected yes or no]) ;;
  115. esac],
  116. [enableval=no])
  117. if test "${enableval}" = yes; then
  118. GCC_COMPILER_WARNING(-Werror)
  119. AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
  120. WARNING_CFLAGS=
  121. GCC_COMPILER_WARNING(-O0)
  122. GCC_COMPILER_WARNING(-Wall)
  123. GCC_COMPILER_WARNING(-Wextra)
  124. GCC_COMPILER_WARNING(-W)
  125. GCC_COMPILER_WARNING(-Wbad-function-cast)
  126. GCC_COMPILER_WARNING(-Wcast-align)
  127. GCC_COMPILER_WARNING(-ftrapv)
  128. GCC_COMPILER_WARNING(-fno-inlne)
  129. GCC_COMPILER_WARNING(-Wformat)
  130. GCC_COMPILER_WARNING(-Wmissing-declarations)
  131. GCC_COMPILER_WARNING(-Wmissing-prototypes)
  132. GCC_COMPILER_WARNING(-Wnested-externs)
  133. GCC_COMPILER_WARNING(-Wshadow)
  134. GCC_COMPILER_WARNING(-Wstrict-prototypes)
  135. GCC_COMPILER_WARNING(-Woverlength-strings)
  136. GCC_COMPILER_WARNING(-Wformat-nonliteral)
  137. GCC_COMPILER_WARNING(-Wformat-security)
  138. GCC_COMPILER_WARNING(-Winit-self)
  139. GCC_COMPILER_WARNING(-Winline)
  140. GCC_COMPILER_WARNING(-Wmisleading-indentation)
  141. GCC_COMPILER_WARNING(-Wlogical-op)
  142. GCC_COMPILER_WARNING(-Wduplicated-cond)
  143. GCC_COMPILER_WARNING(-Wtautological-compare)
  144. GCC_COMPILER_WARNING(-Wshift-count-negative)
  145. GCC_COMPILER_WARNING(-Wshift-count-overflow)
  146. GCC_COMPILER_WARNING(-Wshift-negative-value)
  147. GCC_COMPILER_WARNING(-Wshift-overflow)
  148. GCC_COMPILER_WARNING(-Wnull-dereference)
  149. GCC_COMPILER_WARNING(-Wnonnull)
  150. GCC_COMPILER_WARNING(-Wnnull-dereference)
  151. GCC_COMPILER_WARNING(-Woverride-init-side-effects)
  152. GCC_COMPILER_WARNING(-Wunused-const-variable)
  153. GCC_COMPILER_WARNING(-Wframe-address)
  154. GCC_COMPILER_WARNING(-ftrack-macro-expansion=1)
  155. GCC_COMPILER_WARNING(-DMEMCHECK)
  156. else
  157. WARNING_CFLAGS=
  158. GCC_COMPILER_WARNING(-Wall)
  159. GCC_COMPILER_WARNING(-Wextra)
  160. GCC_COMPILER_WARNING(-Wshadow)
  161. GCC_COMPILER_WARNING(-Wno-overlength-strings)
  162. GCC_COMPILER_WARNING(-pedantic)
  163. GCC_COMPILER_WARNING(-D_FORTIFY_SOURCE=2)
  164. GCC_COMPILER_WARNING(-fstack-protector-strong)
  165. GCC_COMPILER_WARNING(-Wl,-O1)
  166. GCC_COMPILER_WARNING(-frecord-gcc-switches)
  167. GCC_COMPILER_WARNING(-Wpointer-arith)
  168. GCC_COMPILER_WARNING(-fvar-tracking-assignments)
  169. GCC_COMPILER_WARNING(-fcompare-debug)
  170. GCC_COMPILER_WARNING(-flto)
  171. GCC_COMPILER_WARNING(-fwhole-program)
  172. GCC_COMPILER_WARNING(-Wnull-dereference)
  173. GCC_COMPILER_WARNING(-ftrivial-auto-var-init=zero)
  174. GCC_COMPILER_WARNING(-fsanitize=undefined)
  175. fi
  176. # GCC -fsanitize=undefined checks for unitialized vars
  177. # GCC 12 has -ftrivial-auto-var-init=zero to initialize stack variables
  178. # GCC compiler rtl and tree data generation
  179. # GCC_COMPILER_WARNING(-fdump-lang-all-graph)
  180. # GCC_COMPILER_WARNING(-fdump-rtl-all-graph)
  181. # GCC_COMPILER_WARNING(-fdump-tree-all-graph)
  182. # GCC_COMPILER_WARNING(-fdump-ipa-all-graph)
  183. # GCC_COMPILER_WARNING(-fcallgraph-info)
  184. #? AC_INCLUDE_DEFAULTS([stdio.h math.h])
  185. # compiler setting from airbus aerospace
  186. # see https://github.com/airbus-seclab/c-compiler-security
  187. # in src dir use make abgcc
  188. # -Wtraditional-conversion [temp turned off -- too much]
  189. AIRBUS_GCC_COMPILER_WARNING="$CFLAGS -O2 -Wtraditional-conversion -Wall -Wextra -Wpedantic -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-security -Wnull-dereference -Wstack-protector -Wtrampolines -Walloca -Wvla -Warray-bounds=2 -Wimplicit-fallthrough=3 -Wshift-overflow=2 -Wcast-qual -Wstringop-overflow=4 -Wconversion -Warith-conversion -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wformat-signedness -Wshadow -Wstrict-overflow=4 -Wundef -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wstack-usage=1000000 -Wcast-align=strict -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -fPIE -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-z,separate-code"
  190. # same for clang use make abclang
  191. AIRBUS_CLANG_COMPILER_WARNING="$CFLAGS -O2 -Walloca -Wcast-qual -Wconversion -Wformat=2 -Wformat-security -Wnull-dereference -Wstack-protector -Wstrict-overflow=3 -Wvla -Warray-bounds -Warray-bounds-pointer-arithmetic -Wassign-enum -Wbad-function-cast -Wconditional-uninitialized -Wconversion -Wfloat-equal -Wformat-type-confusion -Widiomatic-parentheses -Wimplicit-fallthrough -Wloop-analysis -Wpointer-arith -Wshift-sign-overflow -Wshorten-64-to-32 -Wswitch-enum -Wtautological-constant-in-range-compare -Wunreachable-code-aggressive -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fsanitize=safe-stack -fPIE -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-z,separate-code"
  192. AC_SUBST(AIRBUS_GCC_COMPILER_WARNING)
  193. AC_SUBST(AIRBUS_CLANG_COMPILER_WARNING)
  194. # Checks for libraries.
  195. AC_CHECK_LIB([m], [sqrt])
  196. # Checks for header files.
  197. AC_CHECK_HEADERS([limits.h stdlib.h stdint.h string.h inttypes.h unistd.h])
  198. # Checks for typedefs, structures, and compiler characteristics.
  199. # Checks for library functions.
  200. AC_CHECK_FUNCS([memset strdup sync])
  201. AC_CHECK_SIZEOF([void *])
  202. AC_CHECK_SIZEOF([uintptr_t])
  203. AC_MSG_CHECKING([math routines])
  204. # Linux math.h is perfect
  205. AC_CHECK_HEADER([math.h],
  206. AC_SEARCH_LIBS([cos],[m],[have_libm=yes],
  207. AC_CHECK_LIB([m],[cos],[have_libm=yes])))
  208. if test x"${have_libm}" != xyes; then
  209. AC_MSG_FAILURE([gml4gtk-configure.ac-ERROR: Please install Math libraries and math.h include files for libm],[1])
  210. fi
  211. AC_CHECK_FUNCS(exp, ,[AC_MSG_FAILURE([ERROR: exp() required but not found.],[1])])
  212. # actually not needed here.
  213. math_isfinite=no
  214. math_finite=no
  215. AC_CHECK_FUNCS(isfinite,
  216. [AC_DEFINE(HAVE_ISFINITE, 1)
  217. math_isfinite=true],
  218. [AC_LINK_IFELSE(
  219. [AC_LANG_PROGRAM(
  220. [[#include <math.h>]],
  221. [[double f = 0.0; isfinite(f)]])],
  222. [AC_DEFINE(HAVE_ISFINITE, 1)
  223. math_isfinite=true],
  224. [AC_CHECK_FUNCS(finite,
  225. [AC_DEFINE(HAVE_FINITE, 1)
  226. math_finite=true])])])
  227. if test x"${math_isfinite}" = xno && test x"${math_finite}" = xno; then
  228. AC_MSG_FAILURE([ERROR: isfinite() or finite() required but not found.],[1])
  229. fi
  230. AC_SUBST(HAVE_FINITE)
  231. AC_SUBST(HAVE_ISFINITE)
  232. # default to gtk+-2.0 setting to 1
  233. GTK_HAVE_API_VERSION_0=0
  234. GTK_HAVE_API_VERSION_1=0
  235. GTK_HAVE_API_VERSION_2=0
  236. GTK_HAVE_API_VERSION_3=0
  237. GTK_HAVE_API_VERSION_4=1
  238. AC_ARG_ENABLE(gtk2,
  239. [ --enable-gtk2 Use GTK 2.0 in preference to GTK 3.0 [[default=no]]],
  240. [if test "$enableval" = "yes"
  241. then
  242. prefer_gtk2=yes
  243. else
  244. prefer_gtk2=no
  245. fi])
  246. AC_MSG_CHECKING([which gtk+ version to compile against])
  247. # pkg-config uses gtk4 as name but
  248. # uses gtk+-3.0 for gtk3 etc.
  249. # this name change is set with GTK_WITH_VERSION
  250. # set [with_gtk=0] to default for gtk-0
  251. # set [with_gtk=1] to default for gtk-1
  252. # set [with_gtk=2] to default for gtk-2
  253. # set [with_gtk=3] to default for gtk-3
  254. # set [with_gtk=4] to default for gtk-4
  255. AC_ARG_WITH([gtk],
  256. [AS_HELP_STRING([--with-gtk=0|1|2|3|4],[which gtk+ version to compile against (default: 3)])],
  257. [case "$with_gtk" in
  258. 0|1|2|3|4) ;;
  259. *) AC_MSG_ERROR([unknown gtk version $with_gtk specified use 0,1,2,3 or 4]) ;;
  260. esac],
  261. [with_gtk=3])
  262. AC_MSG_RESULT([$with_gtk])
  263. case "$with_gtk" in
  264. 0) GTK_API_VERSION=0.0
  265. GTK_WITH_VERSION=gtk+-0.0
  266. GTK_REQUIRED=0.0.0
  267. GTK_HAVE_API_VERSION_0=1
  268. GTK_HAVE_API_VERSION_1=0
  269. GTK_HAVE_API_VERSION_2=0
  270. GTK_HAVE_API_VERSION_3=0
  271. GTK_HAVE_API_VERSION_4=0
  272. ;;
  273. 1) GTK_API_VERSION=1.0
  274. GTK_WITH_VERSION=gtk+-1.0
  275. GTK_REQUIRED=1.0.0
  276. GTK_HAVE_API_VERSION_0=0
  277. GTK_HAVE_API_VERSION_1=1
  278. GTK_HAVE_API_VERSION_2=0
  279. GTK_HAVE_API_VERSION_3=0
  280. GTK_HAVE_API_VERSION_4=0
  281. ;;
  282. 2) GTK_API_VERSION=2.0
  283. GTK_WITH_VERSION=gtk+-2.0
  284. GTK_REQUIRED=2.0.0
  285. GTK_HAVE_API_VERSION_0=0
  286. GTK_HAVE_API_VERSION_1=0
  287. GTK_HAVE_API_VERSION_2=1
  288. GTK_HAVE_API_VERSION_3=0
  289. GTK_HAVE_API_VERSION_4=0
  290. ;;
  291. 3) GTK_API_VERSION=3.0
  292. GTK_WITH_VERSION=gtk+-3.0
  293. GTK_REQUIRED=2.91.0
  294. GTK_HAVE_API_VERSION_0=0
  295. GTK_HAVE_API_VERSION_1=0
  296. GTK_HAVE_API_VERSION_2=0
  297. GTK_HAVE_API_VERSION_3=1
  298. GTK_HAVE_API_VERSION_4=0
  299. ;;
  300. 4) GTK_API_VERSION=4.0
  301. GTK_WITH_VERSION=gtk4
  302. GTK_REQUIRED=3.91.0
  303. GTK_HAVE_API_VERSION_0=0
  304. GTK_HAVE_API_VERSION_1=0
  305. GTK_HAVE_API_VERSION_2=0
  306. GTK_HAVE_API_VERSION_3=0
  307. GTK_HAVE_API_VERSION_4=1
  308. ;;
  309. esac
  310. #
  311. AC_SUBST([GTK_WITH_VERSION])
  312. AC_SUBST([GTK_API_VERSION])
  313. AC_SUBST([GTK_REQUIRED])
  314. #
  315. AM_CONDITIONAL([HAVE_GTK_0],[test "$with_gtk" = "0"])
  316. AM_CONDITIONAL([HAVE_GTK_1],[test "$with_gtk" = "1"])
  317. AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2"])
  318. AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3"])
  319. AM_CONDITIONAL([HAVE_GTK_4],[test "$with_gtk" = "4"])
  320. #
  321. AC_DEFINE_UNQUOTED([GTK_HAVE_API_VERSION_0], [$GTK_HAVE_API_VERSION_0], [gtk version 0])
  322. AC_DEFINE_UNQUOTED([GTK_HAVE_API_VERSION_1], [$GTK_HAVE_API_VERSION_1], [gtk version 1])
  323. AC_DEFINE_UNQUOTED([GTK_HAVE_API_VERSION_2], [$GTK_HAVE_API_VERSION_2], [gtk version 2])
  324. AC_DEFINE_UNQUOTED([GTK_HAVE_API_VERSION_3], [$GTK_HAVE_API_VERSION_3], [gtk version 3])
  325. AC_DEFINE_UNQUOTED([GTK_HAVE_API_VERSION_4], [$GTK_HAVE_API_VERSION_4], [gtk version 4])
  326. # Preliminary check for pkg-config
  327. if test -z "$PKG_CONFIG"; then
  328. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  329. fi
  330. if test "$PKG_CONFIG" = "no" ; then
  331. echo "
  332. Please install pkg-config and then reconfigure mooigraph.
  333. pkg-config is available from http://www.freedesktop.org/
  334. "
  335. exit 1
  336. fi
  337. # glib 2.0 (needed even if not building GUI; we need 2.14 for regexp functions)
  338. PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0, have_glib2="yes", have_glib2="no")
  339. if test "${have_glib2}" = "no" ; then
  340. echo "
  341. Please install glib-2.0 >= 2.14.0 and then reconfigure mooigraph.
  342. glib-2.0 is available from http://www.gtk.org/
  343. "
  344. exit 1
  345. fi
  346. dnl GTK 2.0 fallback in case preference not given
  347. if test "$prefer_gtk2" = "no" && test "$gtk_version" = "none" ; then
  348. PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.14.0,
  349. GTK_CFLAGS=$GTK2_CFLAGS
  350. GTK_LIBS=$GTK2_LIBS
  351. CFLAGS="$CFLAGS $GTK_CFLAGS"
  352. LIBS="$LIBS $GTK_LIBS"
  353. gtk_version="2.0",
  354. build_gui="no"
  355. echo "GTK 2 >= 2.14.0 not found"
  356. )
  357. fi
  358. dnl Detect Win32 compiler
  359. AC_MSG_CHECKING([for some Win32 platform])
  360. case "$host" in
  361. *-*-mingw*|*-*-cygwin*)
  362. platform_win32=yes
  363. HAVE_PLATFORM_WIN32=1
  364. ;;
  365. *)
  366. platform_win32=no
  367. HAVE_PLATFORM_WIN32=0
  368. ;;
  369. esac
  370. AC_MSG_RESULT([$platform_win32])
  371. AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
  372. AC_SUBST([PLATFORM_WIN32])
  373. AC_DEFINE_UNQUOTED([PLATFORM_WIN32], [$HAVE_PLATFORM_WIN32], [using a windows compiler])
  374. # compilation date in config.h
  375. # CONFIG_DATE=`date +"%a %x %Y"`
  376. # CONFIG_DATE=`date +"%a %d %b %Y"`
  377. # unix timestamp
  378. # date +%s
  379. # utc time
  380. CONFIG_DATE=`date -u `
  381. AC_SUBST(CONFIG_DATE)
  382. AC_DEFINE_UNQUOTED(COMPILE_DATE, ["$CONFIG_DATE"], [Year, month and day this program is compiled.])
  383. # short system name in config.h
  384. CONFIG_UNAME=`uname -s`
  385. AC_SUBST(CONFIG_UNAME)
  386. AC_DEFINE_UNQUOTED(COMPILE_UNAME, ["$CONFIG_UNAME"], [System where this is compiled.])
  387. #
  388. PKG_CHECK_MODULES([GTK],[$GTK_WITH_VERSION >= $GTK_REQUIRED])
  389. AC_SUBST(GTK_CFLAGS)
  390. AC_SUBST(GTK_LIBS)
  391. # final compiler settings
  392. AC_SUBST(PACKAGE_CFLAGS)
  393. AC_SUBST(WARNING_CFLAGS)
  394. AC_CONFIG_FILES([Makefile src/Makefile])
  395. AC_OUTPUT
  396. echo " "
  397. echo " "
  398. echo " "
  399. echo " , , "
  400. echo " / \ "
  401. echo " ((__-^^-,-^^-__)) "
  402. echo " '-__- - '--__- "
  403. echo " -O O- "
  404. echo " \ / "
  405. echo " ): :( "
  406. echo " :o_o: "
  407. echo " - "
  408. echo " "
  409. echo " "
  410. echo " "
  411. echo This system is `uname -a`;
  412. cat <<EOF
  413. $PACKAGE_NAME $VERSION is ready to be built.
  414. The following settings will be used:
  415. Use "make" to compile $PACKAGE_NAME $VERSION.
  416. use ./configure --with-gtk=0 for gtk-0
  417. use ./configure --with-gtk=1 for gtk-1
  418. use ./configure --with-gtk=2 for gtk-2
  419. use ./configure --with-gtk=3 for gtk-3
  420. use ./configure --with-gtk=4 for gtk-4
  421. use ./configure --enable-gcc-warnings to enable gcc warnings and checks
  422. EOF
  423. AC_MSG_NOTICE([
  424. Configuration:
  425. Source code location ${srcdir}
  426. Build code location ${builddir}
  427. Destination prefix ${prefix}
  428. C-Compiler ${CC}
  429. Config GTK version "${with_gtk}"
  430. Config warning flags "${WARNING_CFLAGS}"
  431. Config CFLAGS "${CFLAGS}"
  432. Config LIBS "${LIBS}"
  433. Config GTK_CFLAGS "${GTK_CFLAGS}"
  434. Config GTK_LIBS "${GTK_LIBS}"
  435. Config PACKAGE_CFLAGS "$PACKAGE_CFLAGS"
  436. Config PLATFORM_WIN32 "$platform_win32"
  437. Config COMPILE_DATE "$CONFIG_DATE"
  438. Config COMPILE_UNAME "$CONFIG_UNAME"
  439. ])