wxwin.m4 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045
  1. dnl ---------------------------------------------------------------------------
  2. dnl Author: wxWidgets development team,
  3. dnl Francesco Montorsi,
  4. dnl Bob McCown (Mac-testing)
  5. dnl Creation date: 24/11/2001
  6. dnl ---------------------------------------------------------------------------
  7. dnl ===========================================================================
  8. dnl Table of Contents of this macro file:
  9. dnl -------------------------------------
  10. dnl
  11. dnl SECTION A: wxWidgets main macros
  12. dnl - WX_CONFIG_OPTIONS
  13. dnl - WX_CONFIG_CHECK
  14. dnl - WXRC_CHECK
  15. dnl - WX_STANDARD_OPTIONS
  16. dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
  17. dnl - WX_DETECT_STANDARD_OPTION_VALUES
  18. dnl
  19. dnl SECTION B: wxWidgets-related utilities
  20. dnl - WX_LIKE_LIBNAME
  21. dnl - WX_ARG_ENABLE_YESNOAUTO
  22. dnl - WX_ARG_WITH_YESNOAUTO
  23. dnl
  24. dnl SECTION C: messages to the user
  25. dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG
  26. dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
  27. dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END
  28. dnl - WX_BOOLOPT_SUMMARY
  29. dnl
  30. dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra
  31. dnl debug output on stdout from these macros.
  32. dnl ===========================================================================
  33. dnl ---------------------------------------------------------------------------
  34. dnl Macros for wxWidgets detection. Typically used in configure.in as:
  35. dnl
  36. dnl AC_ARG_ENABLE(...)
  37. dnl AC_ARG_WITH(...)
  38. dnl ...
  39. dnl WX_CONFIG_OPTIONS
  40. dnl ...
  41. dnl ...
  42. dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1])
  43. dnl if test "$wxWin" != 1; then
  44. dnl AC_MSG_ERROR([
  45. dnl wxWidgets must be installed on your system
  46. dnl but wx-config script couldn't be found.
  47. dnl
  48. dnl Please check that wx-config is in path, the directory
  49. dnl where wxWidgets libraries are installed (returned by
  50. dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
  51. dnl equivalent variable and wxWidgets version is 2.3.4 or above.
  52. dnl ])
  53. dnl fi
  54. dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
  55. dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
  56. dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
  57. dnl
  58. dnl LIBS="$LIBS $WX_LIBS"
  59. dnl
  60. dnl If you want to support standard --enable-debug/unicode/shared options, you
  61. dnl may do the following:
  62. dnl
  63. dnl ...
  64. dnl AC_CANONICAL_SYSTEM
  65. dnl
  66. dnl # define configure options
  67. dnl WX_CONFIG_OPTIONS
  68. dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
  69. dnl
  70. dnl # basic configure checks
  71. dnl ...
  72. dnl
  73. dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE
  74. dnl WX_DEBUG=$DEBUG
  75. dnl WX_UNICODE=$UNICODE
  76. dnl
  77. dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
  78. dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS])
  79. dnl WX_DETECT_STANDARD_OPTION_VALUES
  80. dnl
  81. dnl # write the output files
  82. dnl AC_CONFIG_FILES([Makefile ...])
  83. dnl AC_OUTPUT
  84. dnl
  85. dnl # optional: just to show a message to the user
  86. dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
  87. dnl
  88. dnl ---------------------------------------------------------------------------
  89. dnl ---------------------------------------------------------------------------
  90. dnl WX_CONFIG_OPTIONS
  91. dnl
  92. dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and
  93. dnl --wx-config command line options
  94. dnl ---------------------------------------------------------------------------
  95. AC_DEFUN([WX_CONFIG_OPTIONS],
  96. [
  97. AC_ARG_WITH(wxdir,
  98. [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH],
  99. [ wx_config_name="$withval/wx-config"
  100. wx_config_args="--inplace"])
  101. AC_ARG_WITH(wx-config,
  102. [ --with-wx-config=CONFIG wx-config script to use (optional)],
  103. wx_config_name="$withval" )
  104. AC_ARG_WITH(wx-prefix,
  105. [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)],
  106. wx_config_prefix="$withval", wx_config_prefix="")
  107. AC_ARG_WITH(wx-exec-prefix,
  108. [ --with-wx-exec-prefix=PREFIX
  109. Exec prefix where wxWidgets is installed (optional)],
  110. wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
  111. ])
  112. dnl Helper macro for checking if wx version is at least $1.$2.$3, set's
  113. dnl wx_ver_ok=yes if it is:
  114. AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
  115. [
  116. wx_ver_ok=""
  117. if test "x$WX_VERSION" != x ; then
  118. if test $wx_config_major_version -gt $1; then
  119. wx_ver_ok=yes
  120. else
  121. if test $wx_config_major_version -eq $1; then
  122. if test $wx_config_minor_version -gt $2; then
  123. wx_ver_ok=yes
  124. else
  125. if test $wx_config_minor_version -eq $2; then
  126. if test $wx_config_micro_version -ge $3; then
  127. wx_ver_ok=yes
  128. fi
  129. fi
  130. fi
  131. fi
  132. fi
  133. fi
  134. ])
  135. dnl ---------------------------------------------------------------------------
  136. dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
  137. dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]])
  138. dnl
  139. dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
  140. dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME
  141. dnl environment variable to override the default name of the wx-config script
  142. dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this
  143. dnl case the macro won't even waste time on tests for its existence.
  144. dnl
  145. dnl Optional WX-LIBS argument contains comma- or space-separated list of
  146. dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS
  147. dnl and WX_LIBS_STATIC will contain flags to link with all of the core
  148. dnl wxWidgets libraries.
  149. dnl
  150. dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
  151. dnl invocation command in present. It can be used to fine-tune lookup of
  152. dnl best wxWidgets build available.
  153. dnl
  154. dnl Example use:
  155. dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
  156. dnl [--unicode --debug])
  157. dnl ---------------------------------------------------------------------------
  158. dnl
  159. dnl Get the cflags and libraries from the wx-config script
  160. dnl
  161. AC_DEFUN([WX_CONFIG_CHECK],
  162. [
  163. dnl do we have wx-config name: it can be wx-config or wxd-config or ...
  164. if test x${WX_CONFIG_NAME+set} != xset ; then
  165. WX_CONFIG_NAME=wx-config
  166. fi
  167. if test "x$wx_config_name" != x ; then
  168. WX_CONFIG_NAME="$wx_config_name"
  169. fi
  170. dnl deal with optional prefixes
  171. if test x$wx_config_exec_prefix != x ; then
  172. wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
  173. WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
  174. fi
  175. if test x$wx_config_prefix != x ; then
  176. wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
  177. WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
  178. fi
  179. if test "$cross_compiling" = "yes"; then
  180. wx_config_args="$wx_config_args --host=$host_alias"
  181. fi
  182. dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
  183. if test -x "$WX_CONFIG_NAME" ; then
  184. AC_MSG_CHECKING(for wx-config)
  185. WX_CONFIG_PATH="$WX_CONFIG_NAME"
  186. AC_MSG_RESULT($WX_CONFIG_PATH)
  187. else
  188. AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
  189. fi
  190. if test "$WX_CONFIG_PATH" != "no" ; then
  191. WX_VERSION=""
  192. min_wx_version=ifelse([$1], ,2.2.1,$1)
  193. if test -z "$5" ; then
  194. AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version])
  195. else
  196. AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
  197. fi
  198. dnl don't add the libraries ($4) to this variable as this would result in
  199. dnl an error when it's used with --version below
  200. WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5"
  201. WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
  202. wx_config_major_version=`echo $WX_VERSION | \
  203. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  204. wx_config_minor_version=`echo $WX_VERSION | \
  205. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  206. wx_config_micro_version=`echo $WX_VERSION | \
  207. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  208. wx_requested_major_version=`echo $min_wx_version | \
  209. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  210. wx_requested_minor_version=`echo $min_wx_version | \
  211. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  212. wx_requested_micro_version=`echo $min_wx_version | \
  213. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  214. _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version],
  215. [$wx_requested_minor_version],
  216. [$wx_requested_micro_version])
  217. if test -n "$wx_ver_ok"; then
  218. AC_MSG_RESULT(yes (version $WX_VERSION))
  219. WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`
  220. dnl is this even still appropriate? --static is a real option now
  221. dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
  222. dnl what the user actually wants, making this redundant at best.
  223. dnl For now keep it in case anyone actually used it in the past.
  224. AC_MSG_CHECKING([for wxWidgets static library])
  225. WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null`
  226. if test "x$WX_LIBS_STATIC" = "x"; then
  227. AC_MSG_RESULT(no)
  228. else
  229. AC_MSG_RESULT(yes)
  230. fi
  231. dnl starting with version 2.2.6 wx-config has --cppflags argument
  232. wx_has_cppflags=""
  233. if test $wx_config_major_version -gt 2; then
  234. wx_has_cppflags=yes
  235. else
  236. if test $wx_config_major_version -eq 2; then
  237. if test $wx_config_minor_version -gt 2; then
  238. wx_has_cppflags=yes
  239. else
  240. if test $wx_config_minor_version -eq 2; then
  241. if test $wx_config_micro_version -ge 6; then
  242. wx_has_cppflags=yes
  243. fi
  244. fi
  245. fi
  246. fi
  247. fi
  248. dnl starting with version 2.7.0 wx-config has --rescomp option
  249. wx_has_rescomp=""
  250. if test $wx_config_major_version -gt 2; then
  251. wx_has_rescomp=yes
  252. else
  253. if test $wx_config_major_version -eq 2; then
  254. if test $wx_config_minor_version -ge 7; then
  255. wx_has_rescomp=yes
  256. fi
  257. fi
  258. fi
  259. if test "x$wx_has_rescomp" = x ; then
  260. dnl cannot give any useful info for resource compiler
  261. WX_RESCOMP=
  262. else
  263. WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp`
  264. fi
  265. if test "x$wx_has_cppflags" = x ; then
  266. dnl no choice but to define all flags like CFLAGS
  267. WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
  268. WX_CPPFLAGS=$WX_CFLAGS
  269. WX_CXXFLAGS=$WX_CFLAGS
  270. WX_CFLAGS_ONLY=$WX_CFLAGS
  271. WX_CXXFLAGS_ONLY=$WX_CFLAGS
  272. else
  273. dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS
  274. WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4`
  275. WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4`
  276. WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
  277. WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
  278. WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
  279. fi
  280. ifelse([$2], , :, [$2])
  281. else
  282. if test "x$WX_VERSION" = x; then
  283. dnl no wx-config at all
  284. AC_MSG_RESULT(no)
  285. else
  286. AC_MSG_RESULT(no (version $WX_VERSION is not new enough))
  287. fi
  288. WX_CFLAGS=""
  289. WX_CPPFLAGS=""
  290. WX_CXXFLAGS=""
  291. WX_LIBS=""
  292. WX_LIBS_STATIC=""
  293. WX_RESCOMP=""
  294. if test ! -z "$5"; then
  295. wx_error_message="
  296. The configuration you asked for $PACKAGE_NAME requires a wxWidgets
  297. build with the following settings:
  298. $5
  299. but such build is not available.
  300. To see the wxWidgets builds available on this system, please use
  301. 'wx-config --list' command. To use the default build, returned by
  302. 'wx-config --selected-config', use the options with their 'auto'
  303. default values."
  304. fi
  305. wx_error_message="
  306. The requested wxWidgets build couldn't be found.
  307. $wx_error_message
  308. If you still get this error, then check that 'wx-config' is
  309. in path, the directory where wxWidgets libraries are installed
  310. (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
  311. or equivalent variable and wxWidgets version is $1 or above."
  312. ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3])
  313. fi
  314. else
  315. WX_CFLAGS=""
  316. WX_CPPFLAGS=""
  317. WX_CXXFLAGS=""
  318. WX_LIBS=""
  319. WX_LIBS_STATIC=""
  320. WX_RESCOMP=""
  321. ifelse([$3], , :, [$3])
  322. fi
  323. AC_SUBST(WX_CPPFLAGS)
  324. AC_SUBST(WX_CFLAGS)
  325. AC_SUBST(WX_CXXFLAGS)
  326. AC_SUBST(WX_CFLAGS_ONLY)
  327. AC_SUBST(WX_CXXFLAGS_ONLY)
  328. AC_SUBST(WX_LIBS)
  329. AC_SUBST(WX_LIBS_STATIC)
  330. AC_SUBST(WX_VERSION)
  331. AC_SUBST(WX_RESCOMP)
  332. dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols
  333. dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness):
  334. WX_VERSION_MAJOR="$wx_config_major_version"
  335. WX_VERSION_MINOR="$wx_config_minor_version"
  336. WX_VERSION_MICRO="$wx_config_micro_version"
  337. AC_SUBST(WX_VERSION_MAJOR)
  338. AC_SUBST(WX_VERSION_MINOR)
  339. AC_SUBST(WX_VERSION_MICRO)
  340. ])
  341. dnl ---------------------------------------------------------------------------
  342. dnl Get information on the wxrc program for making C++, Python and xrs
  343. dnl resource files.
  344. dnl
  345. dnl AC_ARG_ENABLE(...)
  346. dnl AC_ARG_WITH(...)
  347. dnl ...
  348. dnl WX_CONFIG_OPTIONS
  349. dnl ...
  350. dnl WX_CONFIG_CHECK(2.6.0, wxWin=1)
  351. dnl if test "$wxWin" != 1; then
  352. dnl AC_MSG_ERROR([
  353. dnl wxWidgets must be installed on your system
  354. dnl but wx-config script couldn't be found.
  355. dnl
  356. dnl Please check that wx-config is in path, the directory
  357. dnl where wxWidgets libraries are installed (returned by
  358. dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
  359. dnl equivalent variable and wxWidgets version is 2.6.0 or above.
  360. dnl ])
  361. dnl fi
  362. dnl
  363. dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0])
  364. dnl if test "x$HAVE_WXRC" != x1; then
  365. dnl AC_MSG_ERROR([
  366. dnl The wxrc program was not installed or not found.
  367. dnl
  368. dnl Please check the wxWidgets installation.
  369. dnl ])
  370. dnl fi
  371. dnl
  372. dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
  373. dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
  374. dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
  375. dnl
  376. dnl LDFLAGS="$LDFLAGS $WX_LIBS"
  377. dnl ---------------------------------------------------------------------------
  378. dnl ---------------------------------------------------------------------------
  379. dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  380. dnl
  381. dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS
  382. dnl resources. The variable WXRC will be set and substituted in the configure
  383. dnl script and Makefiles.
  384. dnl
  385. dnl Example use:
  386. dnl WXRC_CHECK([wxrc=1], [wxrc=0])
  387. dnl ---------------------------------------------------------------------------
  388. dnl
  389. dnl wxrc program from the wx-config script
  390. dnl
  391. AC_DEFUN([WXRC_CHECK],
  392. [
  393. AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler])
  394. if test "x$WX_CONFIG_NAME" = x; then
  395. AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.])
  396. else
  397. AC_MSG_CHECKING([for wxrc])
  398. if test "x$WXRC" = x ; then
  399. dnl wx-config --utility is a new addition to wxWidgets:
  400. _WX_PRIVATE_CHECK_VERSION(2,5,3)
  401. if test -n "$wx_ver_ok"; then
  402. WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc`
  403. fi
  404. fi
  405. if test "x$WXRC" = x ; then
  406. AC_MSG_RESULT([not found])
  407. ifelse([$2], , :, [$2])
  408. else
  409. AC_MSG_RESULT([$WXRC])
  410. ifelse([$1], , :, [$1])
  411. fi
  412. AC_SUBST(WXRC)
  413. fi
  414. ])
  415. dnl ---------------------------------------------------------------------------
  416. dnl WX_LIKE_LIBNAME([output-var] [prefix], [name])
  417. dnl
  418. dnl Sets the "output-var" variable to the name of a library named with same
  419. dnl wxWidgets rule.
  420. dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets
  421. dnl the $lib variable to:
  422. dnl 'mine_gtk2ud_test-2.8'
  423. dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28
  424. dnl ---------------------------------------------------------------------------
  425. AC_DEFUN([WX_LIKE_LIBNAME],
  426. [
  427. wx_temp="$2""_""$WX_PORT"
  428. dnl add the [u][d] string
  429. if test "$WX_UNICODE" = "1"; then
  430. wx_temp="$wx_temp""u"
  431. fi
  432. if test "$WX_DEBUG" = "1"; then
  433. wx_temp="$wx_temp""d"
  434. fi
  435. dnl complete the name of the lib
  436. wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"
  437. dnl save it in the user's variable
  438. $1=$wx_temp
  439. ])
  440. dnl ---------------------------------------------------------------------------
  441. dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO
  442. dnl
  443. dnl Two little custom macros which define the ENABLE/WITH configure arguments.
  444. dnl Macro arguments:
  445. dnl $1 = the name of the --enable / --with feature
  446. dnl $2 = the name of the variable associated
  447. dnl $3 = the description of that feature
  448. dnl $4 = the default value for that feature
  449. dnl $5 = additional action to do in case option is given with "yes" value
  450. dnl ---------------------------------------------------------------------------
  451. AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
  452. [AC_ARG_ENABLE($1,
  453. AC_HELP_STRING([--enable-$1], [$3 (default is $4)]),
  454. [], [enableval="$4"])
  455. dnl Show a message to the user about this option
  456. AC_MSG_CHECKING([for the --enable-$1 option])
  457. if test "$enableval" = "yes" ; then
  458. AC_MSG_RESULT([yes])
  459. $2=1
  460. $5
  461. elif test "$enableval" = "no" ; then
  462. AC_MSG_RESULT([no])
  463. $2=0
  464. elif test "$enableval" = "auto" ; then
  465. AC_MSG_RESULT([will be automatically detected])
  466. $2=""
  467. else
  468. AC_MSG_ERROR([
  469. Unrecognized option value (allowed values: yes, no, auto)
  470. ])
  471. fi
  472. ])
  473. AC_DEFUN([WX_ARG_WITH_YESNOAUTO],
  474. [AC_ARG_WITH($1,
  475. AC_HELP_STRING([--with-$1], [$3 (default is $4)]),
  476. [], [withval="$4"])
  477. dnl Show a message to the user about this option
  478. AC_MSG_CHECKING([for the --with-$1 option])
  479. if test "$withval" = "yes" ; then
  480. AC_MSG_RESULT([yes])
  481. $2=1
  482. $5
  483. dnl NB: by default we don't allow --with-$1=no option
  484. dnl since it does not make much sense !
  485. elif test "$6" = "1" -a "$withval" = "no" ; then
  486. AC_MSG_RESULT([no])
  487. $2=0
  488. elif test "$withval" = "auto" ; then
  489. AC_MSG_RESULT([will be automatically detected])
  490. $2=""
  491. else
  492. AC_MSG_ERROR([
  493. Unrecognized option value (allowed values: yes, auto)
  494. ])
  495. fi
  496. ])
  497. dnl ---------------------------------------------------------------------------
  498. dnl WX_STANDARD_OPTIONS([options-to-add])
  499. dnl
  500. dnl Adds to the configure script one or more of the following options:
  501. dnl --enable-[debug|unicode|shared|wxshared|wxdebug]
  502. dnl --with-[gtk|msw|motif|x11|mac|dfb]
  503. dnl --with-wxversion
  504. dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED,
  505. dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values.
  506. dnl
  507. dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the
  508. dnl --enable-unicode option (in boolean format) while the second indicates
  509. dnl if wxWidgets was built in Unicode mode (and still is in boolean format).
  510. dnl ---------------------------------------------------------------------------
  511. AC_DEFUN([WX_STANDARD_OPTIONS],
  512. [
  513. dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if
  514. dnl the $1 argument contains respectively the debug,unicode or shared options.
  515. dnl be careful here not to set debug flag if only "wxdebug" was specified
  516. ifelse(regexp([$1], [\bdebug]), [-1],,
  517. [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])])
  518. ifelse(index([$1], [unicode]), [-1],,
  519. [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])])
  520. ifelse(regexp([$1], [\bshared]), [-1],,
  521. [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])])
  522. dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option
  523. dnl which must be able to accept the auto|gtk1|gtk2|msw|... values
  524. ifelse(index([$1], [toolkit]), [-1],,
  525. [
  526. AC_ARG_WITH([toolkit],
  527. AC_HELP_STRING([--with-toolkit],
  528. [Build against a specific wxWidgets toolkit (default is auto)]),
  529. [], [withval="auto"])
  530. dnl Show a message to the user about this option
  531. AC_MSG_CHECKING([for the --with-toolkit option])
  532. if test "$withval" = "auto" ; then
  533. AC_MSG_RESULT([will be automatically detected])
  534. TOOLKIT=""
  535. else
  536. TOOLKIT="$withval"
  537. dnl PORT must be one of the allowed values
  538. if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a "$TOOLKIT" != "gtk3" -a \
  539. "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \
  540. "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \
  541. "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then
  542. AC_MSG_ERROR([
  543. Unrecognized option value (allowed values: auto, gtk1, gtk2, gtk3, msw, motif, osx_carbon, osx_cocoa, dfb, x11)
  544. ])
  545. fi
  546. AC_MSG_RESULT([$TOOLKIT])
  547. fi
  548. ])
  549. dnl ****** IMPORTANT *******
  550. dnl Unlike for the UNICODE setting, you can build your program in
  551. dnl shared mode against a static build of wxWidgets. Thus we have the
  552. dnl following option which allows these mixtures. E.g.
  553. dnl
  554. dnl ./configure --disable-shared --with-wxshared
  555. dnl
  556. dnl will build your library in static mode against the first available
  557. dnl shared build of wxWidgets.
  558. dnl
  559. dnl Note that's not possible to do the viceversa:
  560. dnl
  561. dnl ./configure --enable-shared --without-wxshared
  562. dnl
  563. dnl Doing so you would try to build your library in shared mode against a static
  564. dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) !
  565. dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES
  566. dnl (where we know what 'auto' should be expanded to).
  567. dnl
  568. dnl If you try to build something in ANSI mode against a UNICODE build
  569. dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets,
  570. dnl then at best you'll get ton of linking errors !
  571. dnl ************************
  572. ifelse(index([$1], [wxshared]), [-1],,
  573. [
  574. WX_ARG_WITH_YESNOAUTO(
  575. [wxshared], [WX_SHARED],
  576. [Force building against a shared build of wxWidgets, even if --disable-shared is given],
  577. [auto], [], [1])
  578. ])
  579. dnl Just like for SHARED and WX_SHARED it may happen that some adventurous
  580. dnl peoples will want to mix a wxWidgets release build with a debug build of
  581. dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables.
  582. ifelse(index([$1], [wxdebug]), [-1],,
  583. [
  584. WX_ARG_WITH_YESNOAUTO(
  585. [wxdebug], [WX_DEBUG],
  586. [Force building against a debug build of wxWidgets, even if --disable-debug is given],
  587. [auto], [], [1])
  588. ])
  589. dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option
  590. dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values
  591. ifelse(index([$1], [wxversion]), [-1],,
  592. [
  593. AC_ARG_WITH([wxversion],
  594. AC_HELP_STRING([--with-wxversion],
  595. [Build against a specific version of wxWidgets (default is auto)]),
  596. [], [withval="auto"])
  597. dnl Show a message to the user about this option
  598. AC_MSG_CHECKING([for the --with-wxversion option])
  599. if test "$withval" = "auto" ; then
  600. AC_MSG_RESULT([will be automatically detected])
  601. WX_RELEASE=""
  602. else
  603. wx_requested_major_version=`echo $withval | \
  604. sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
  605. wx_requested_minor_version=`echo $withval | \
  606. sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
  607. dnl both vars above must be exactly 1 digit
  608. if test "${#wx_requested_major_version}" != "1" -o \
  609. "${#wx_requested_minor_version}" != "1" ; then
  610. AC_MSG_ERROR([
  611. Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0)
  612. ])
  613. fi
  614. WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version"
  615. AC_MSG_RESULT([$WX_RELEASE])
  616. fi
  617. ])
  618. if test "$WX_DEBUG_CONFIGURE" = "1"; then
  619. echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG"
  620. echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE"
  621. echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED"
  622. echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT"
  623. echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE"
  624. fi
  625. ])
  626. dnl ---------------------------------------------------------------------------
  627. dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
  628. dnl
  629. dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
  630. dnl which were specified.
  631. dnl Thus this macro needs to be called only once all options have been set.
  632. dnl ---------------------------------------------------------------------------
  633. AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],
  634. [
  635. if test "$WX_SHARED" = "1" ; then
  636. WXCONFIG_FLAGS="--static=no "
  637. elif test "$WX_SHARED" = "0" ; then
  638. WXCONFIG_FLAGS="--static=yes "
  639. fi
  640. if test "$WX_DEBUG" = "1" ; then
  641. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes "
  642. elif test "$WX_DEBUG" = "0" ; then
  643. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no "
  644. fi
  645. dnl The user should have set WX_UNICODE=UNICODE
  646. if test "$WX_UNICODE" = "1" ; then
  647. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes "
  648. elif test "$WX_UNICODE" = "0" ; then
  649. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
  650. fi
  651. if test -n "$TOOLKIT" ; then
  652. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
  653. fi
  654. if test -n "$WX_RELEASE" ; then
  655. WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
  656. fi
  657. dnl strip out the last space of the string
  658. WXCONFIG_FLAGS=${WXCONFIG_FLAGS% }
  659. if test "$WX_DEBUG_CONFIGURE" = "1"; then
  660. echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS"
  661. fi
  662. ])
  663. dnl ---------------------------------------------------------------------------
  664. dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG])
  665. dnl
  666. dnl Sets WX_$RESULTVAR to the value of $RESULTVAR if it's defined. Otherwise,
  667. dnl auto-detect the value by checking for the presence of STRING in
  668. dnl $WX_SELECTEDCONFIG (which is supposed to be set by caller) and set
  669. dnl WX_$RESULTVAR to either 0 or 1, also outputting "yes" or "no" after MSG.
  670. dnl ---------------------------------------------------------------------------
  671. AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],
  672. [
  673. if test -z "$$1" ; then
  674. dnl The user does not have particular preferences for this option;
  675. dnl so we will detect the wxWidgets relative build setting and use it
  676. AC_MSG_CHECKING([$3])
  677. dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2
  678. dnl string or to 0 otherwise.
  679. dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it
  680. dnl doesn't work; we use 'expr STRING : REGEXP' instead
  681. WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*")
  682. if test "$WX_$1" != "0"; then
  683. WX_$1=1
  684. AC_MSG_RESULT([yes])
  685. else
  686. WX_$1=0
  687. AC_MSG_RESULT([no])
  688. fi
  689. else
  690. dnl Use the setting given by the user
  691. WX_$1=$$1
  692. fi
  693. ])
  694. dnl ---------------------------------------------------------------------------
  695. dnl WX_DETECT_STANDARD_OPTION_VALUES
  696. dnl
  697. dnl Detects the values of the following variables:
  698. dnl 1) WX_RELEASE
  699. dnl 2) WX_UNICODE
  700. dnl 3) WX_DEBUG
  701. dnl 4) WX_SHARED (and also WX_STATIC)
  702. dnl 5) WX_PORT
  703. dnl from the previously selected wxWidgets build; this macro in fact must be
  704. dnl called *after* calling the WX_CONFIG_CHECK macro.
  705. dnl
  706. dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set
  707. dnl by WX_CONFIG_CHECK macro
  708. dnl ---------------------------------------------------------------------------
  709. AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],
  710. [
  711. dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits,
  712. dnl while WX_RELEASE only the major.minor ones.
  713. WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR"
  714. if test $WX_RELEASE -lt 26 ; then
  715. AC_MSG_ERROR([
  716. Cannot detect the wxWidgets configuration for the selected wxWidgets build
  717. since its version is $WX_VERSION < 2.6.0; please install a newer
  718. version of wxWidgets.
  719. ])
  720. fi
  721. dnl The wx-config we are using understands the "--selected_config"
  722. dnl option which returns an easy-parseable string !
  723. WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config)
  724. if test "$WX_DEBUG_CONFIGURE" = "1"; then
  725. echo "[[dbg]] Using wx-config --selected-config"
  726. echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
  727. fi
  728. dnl we could test directly for WX_SHARED with a line like:
  729. dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],
  730. dnl [if wxWidgets was built in SHARED mode])
  731. dnl but wx-config --selected-config DOES NOT outputs the 'shared'
  732. dnl word when wx was built in shared mode; it rather outputs the
  733. dnl 'static' word when built in static mode.
  734. if test "$WX_SHARED" = "1"; then
  735. STATIC=0
  736. elif test "$WX_SHARED" = "0"; then
  737. STATIC=1
  738. fi
  739. dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
  740. _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode],
  741. [if wxWidgets was built with UNICODE enabled])
  742. _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug],
  743. [if wxWidgets was built in DEBUG mode])
  744. _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static],
  745. [if wxWidgets was built in STATIC mode])
  746. dnl init WX_SHARED from WX_STATIC
  747. if test "$WX_STATIC" != "0"; then
  748. WX_SHARED=0
  749. else
  750. WX_SHARED=1
  751. fi
  752. AC_SUBST(WX_UNICODE)
  753. AC_SUBST(WX_DEBUG)
  754. AC_SUBST(WX_SHARED)
  755. dnl detect the WX_PORT to use
  756. if test -z "$TOOLKIT" ; then
  757. dnl The user does not have particular preferences for this option;
  758. dnl so we will detect the wxWidgets relative build setting and use it
  759. AC_MSG_CHECKING([which wxWidgets toolkit was selected])
  760. WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")
  761. WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")
  762. WX_GTKPORT3=$(expr "$WX_SELECTEDCONFIG" : ".*gtk3.*")
  763. WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")
  764. WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")
  765. WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")
  766. WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*")
  767. WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")
  768. WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")
  769. WX_PORT="unknown"
  770. if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi
  771. if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
  772. if test "$WX_GTKPORT3" != "0"; then WX_PORT="gtk3"; fi
  773. if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
  774. if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
  775. if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
  776. if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi
  777. if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi
  778. if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi
  779. dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac
  780. dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above)
  781. WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*")
  782. if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi
  783. dnl check at least one of the WX_*PORT has been set !
  784. if test "$WX_PORT" = "unknown" ; then
  785. AC_MSG_ERROR([
  786. Cannot detect the currently installed wxWidgets port !
  787. Please check your 'wx-config --cxxflags'...
  788. ])
  789. fi
  790. AC_MSG_RESULT([$WX_PORT])
  791. else
  792. dnl Use the setting given by the user
  793. WX_PORT=$TOOLKIT
  794. fi
  795. AC_SUBST(WX_PORT)
  796. if test "$WX_DEBUG_CONFIGURE" = "1"; then
  797. echo "[[dbg]] Values of all WX_* options after final detection:"
  798. echo "[[dbg]] WX_DEBUG: $WX_DEBUG"
  799. echo "[[dbg]] WX_UNICODE: $WX_UNICODE"
  800. echo "[[dbg]] WX_SHARED: $WX_SHARED"
  801. echo "[[dbg]] WX_RELEASE: $WX_RELEASE"
  802. echo "[[dbg]] WX_PORT: $WX_PORT"
  803. fi
  804. dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when
  805. dnl the user gives the options:
  806. dnl ./configure --enable-shared --without-wxshared
  807. dnl or just do
  808. dnl ./configure --enable-shared
  809. dnl but there is only a static build of wxWidgets available.
  810. if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then
  811. AC_MSG_ERROR([
  812. Cannot build shared library against a static build of wxWidgets !
  813. This error happens because the wxWidgets build which was selected
  814. has been detected as static while you asked to build $PACKAGE_NAME
  815. as shared library and this is not possible.
  816. Use the '--disable-shared' option to build $PACKAGE_NAME
  817. as static library or '--with-wxshared' to use wxWidgets as shared library.
  818. ])
  819. fi
  820. dnl now we can finally update the options to their final values if they
  821. dnl were not already set
  822. if test -z "$UNICODE" ; then
  823. UNICODE=$WX_UNICODE
  824. fi
  825. if test -z "$SHARED" ; then
  826. SHARED=$WX_SHARED
  827. fi
  828. if test -z "$TOOLKIT" ; then
  829. TOOLKIT=$WX_PORT
  830. fi
  831. dnl respect the DEBUG variable adding the optimize/debug flags and also
  832. dnl define a BUILD variable in case the user wants to use it
  833. dnl
  834. dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we
  835. dnl don't need to set them, too
  836. if test "$DEBUG" = "1"; then
  837. BUILD="debug"
  838. CXXFLAGS="$CXXFLAGS -g -O0"
  839. CFLAGS="$CFLAGS -g -O0"
  840. elif test "$DEBUG" = "0"; then
  841. BUILD="release"
  842. CXXFLAGS="$CXXFLAGS -O2"
  843. CFLAGS="$CFLAGS -O2"
  844. fi
  845. ])
  846. dnl ---------------------------------------------------------------------------
  847. dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for],
  848. dnl [what to print when var is 1],
  849. dnl [what to print when var is 0])
  850. dnl
  851. dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0.
  852. dnl This macro mainly exists just to make configure.ac scripts more readable.
  853. dnl
  854. dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments
  855. dnl if you want that m4 avoid to throw away the spaces prefixed to the
  856. dnl argument value.
  857. dnl ---------------------------------------------------------------------------
  858. AC_DEFUN([WX_BOOLOPT_SUMMARY],
  859. [
  860. if test "x$$1" = "x1" ; then
  861. echo $2
  862. elif test "x$$1" = "x0" ; then
  863. echo $3
  864. else
  865. echo "$1 is $$1"
  866. fi
  867. ])
  868. dnl ---------------------------------------------------------------------------
  869. dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
  870. dnl
  871. dnl Shows a summary message to the user about the WX_* variable contents.
  872. dnl This macro is used typically at the end of the configure script.
  873. dnl ---------------------------------------------------------------------------
  874. AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG],
  875. [
  876. echo
  877. echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION"
  878. echo " has the following settings:"
  879. WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"])
  880. WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
  881. WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"])
  882. echo " - VERSION: $WX_VERSION"
  883. echo " - PORT: $WX_PORT"
  884. ])
  885. dnl ---------------------------------------------------------------------------
  886. dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END
  887. dnl
  888. dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info
  889. dnl about the configuration of the package which used the wxpresets.
  890. dnl
  891. dnl Typical usage:
  892. dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
  893. dnl echo " - Package setting 1: $SETTING1"
  894. dnl echo " - Package setting 2: $SETTING1"
  895. dnl ...
  896. dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END
  897. dnl
  898. dnl ---------------------------------------------------------------------------
  899. AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN],
  900. [
  901. echo
  902. echo " ----------------------------------------------------------------"
  903. echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
  904. echo " Summary of main configuration settings for $PACKAGE_NAME:"
  905. WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"])
  906. WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"])
  907. WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"])
  908. ])
  909. AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END],
  910. [
  911. WX_STANDARD_OPTIONS_SUMMARY_MSG
  912. echo
  913. echo " Now, just run make."
  914. echo " ----------------------------------------------------------------"
  915. echo
  916. ])
  917. dnl ---------------------------------------------------------------------------
  918. dnl Deprecated macro wrappers
  919. dnl ---------------------------------------------------------------------------
  920. AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS])
  921. AC_DEFUN([AM_PATH_WXCONFIG], [
  922. WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5])
  923. ])
  924. AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])])