configure.in 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_INIT(rAthena)
  4. AC_REVISION($Revision$)
  5. AC_PREREQ([2.59])
  6. AC_CONFIG_SRCDIR([src/common/cbasetypes.h])
  7. AC_CONFIG_FILES([Makefile src/common/Makefile])
  8. AC_CONFIG_FILES([3rdparty/mt19937ar/Makefile 3rdparty/libconfig/Makefile])
  9. AC_CONFIG_FILES([src/char/Makefile src/login/Makefile])
  10. AC_CONFIG_FILES([src/map/Makefile src/tool/Makefile])
  11. AC_GNU_SOURCE
  12. #
  13. # Memory managers
  14. #
  15. AC_ARG_ENABLE(
  16. [manager],
  17. AC_HELP_STRING(
  18. [--enable-manager=ARG],
  19. [memory managers: no, builtin, memwatch, dmalloc, gcollect, bcheck (defaults to builtin)]
  20. ),
  21. [
  22. enable_manager="$enableval"
  23. case $enableval in
  24. "no");;
  25. "builtin");;
  26. "memwatch");;
  27. "dmalloc");;
  28. "gcollect");;
  29. "bcheck");;
  30. *) AC_MSG_ERROR([[unknown memory manager '$enableval'... stopping]]);;
  31. esac
  32. ],
  33. [enable_manager="builtin"]
  34. )
  35. #
  36. # packetver
  37. #
  38. AC_ARG_ENABLE(
  39. [packetver],
  40. AC_HELP_STRING(
  41. [--enable-packetver=ARG],
  42. [Sets the PACKETVER define. (see src/common/mmo.h)]
  43. ),
  44. [enable_packetver="$enableval"],
  45. [enable_packetver=""]
  46. )
  47. #
  48. # debug
  49. #
  50. AC_ARG_ENABLE(
  51. [debug],
  52. AC_HELP_STRING(
  53. [--enable-debug@<:@=ARG@:>@],
  54. [
  55. Compiles extra debug code. (disabled by default)
  56. (available options: yes, no, gdb)
  57. ]
  58. ),
  59. [
  60. enable_debug="$enableval"
  61. case $enableval in
  62. "no");;
  63. "yes");;
  64. "gdb");;
  65. *) AC_MSG_ERROR([[invalid argument --enable-debug=$enableval... stopping]]);;
  66. esac
  67. ],
  68. [enable_debug="no"]
  69. )
  70. #
  71. # renewal
  72. #
  73. AC_ARG_ENABLE(
  74. [prere],
  75. AC_HELP_STRING(
  76. [--enable-prere@<:@=ARG@:>@],
  77. [
  78. Compiles serv in prere mode. (disabled by default)
  79. (available options: yes, no)
  80. ]
  81. ),
  82. [
  83. enable_prere="$enableval"
  84. case $enableval in
  85. "no");;
  86. "yes");;
  87. *) AC_MSG_ERROR([[invalid argument --enable-prere=$enableval... stopping]]);;
  88. esac
  89. ],
  90. [enable_prere="no"]
  91. )
  92. #
  93. # VIP
  94. #
  95. AC_ARG_ENABLE(
  96. [vip],
  97. AC_HELP_STRING(
  98. [--enable-vip@<:@=ARG@:>@],
  99. [
  100. Compiles serv with vip features. (disabled by default)
  101. (available options: yes, no)
  102. ]
  103. ),
  104. [
  105. enable_vip="$enableval"
  106. case $enableval in
  107. "no");;
  108. "yes");;
  109. *) AC_MSG_ERROR([[invalid argument --enable-vip=$enableval... stopping]]);;
  110. esac
  111. ],
  112. [enable_vip="no"]
  113. )
  114. #
  115. # warn
  116. #
  117. AC_ARG_ENABLE(
  118. [warn],
  119. AC_HELP_STRING(
  120. [--enable-warn@<:@=ARG@:>@],
  121. [
  122. Compiles with warnings. (disabled by default)
  123. (available options: yes, no, extra)
  124. ]
  125. ),
  126. [
  127. enable_warn="$enableval"
  128. case $enableval in
  129. "no");;
  130. "yes");;
  131. "extra");;
  132. *) AC_MSG_ERROR([[invalid argument --enable-warn=$enableval... stopping]]);;
  133. esac
  134. ],
  135. [enable_warn="no"]
  136. )
  137. #
  138. # Buildbot
  139. #
  140. AC_ARG_ENABLE(
  141. [buildbot],
  142. AC_HELP_STRING(
  143. [--enable-buildbot@<:@=ARG@:>@],
  144. [(available options: yes, no)]
  145. ),
  146. [
  147. enable_buildbot="$enableval"
  148. case $enableval in
  149. "no");;
  150. "yes");;
  151. *) AC_MSG_ERROR([[invalid argument --enable-buildbot=$enableval... stopping]]);;
  152. esac
  153. ],
  154. [enable_buildbot="no"]
  155. )
  156. #
  157. # RDTSC as Tick Source
  158. #
  159. AC_ARG_ENABLE(
  160. [rdtsc],
  161. AC_HELP_STRING(
  162. [--enable-rdtsc],
  163. [
  164. Uses rdtsc as timing source (disabled by default)
  165. Enable it when you've timing issues.
  166. (For example: in conjunction with XEN or Other Virtualization mechanisms)
  167. Note:
  168. Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving options.
  169. (On the most modern Dedicated Servers cpufreq is preconfigured, see your distribution's manual
  170. how to disable it)
  171. ]
  172. ),
  173. [
  174. enable_rdtsc=1
  175. ],
  176. [enable_rdtsc=0]
  177. )
  178. #
  179. # Profiler
  180. #
  181. AC_ARG_ENABLE(
  182. [profiler],
  183. AC_HELP_STRING(
  184. [--enable-profiler=ARG],
  185. [Profilers: no, gprof (disabled by default)]
  186. ),
  187. [
  188. enable_profiler="$enableval"
  189. case $enableval in
  190. "no");;
  191. "gprof");;
  192. *) AC_MSG_ERROR([[invalid argument --enable-profiler=$enableval... stopping]]);;
  193. esac
  194. ],
  195. [enable_profiler="no"]
  196. )
  197. #
  198. # 64bit
  199. #
  200. AC_ARG_ENABLE(
  201. [64bit],
  202. AC_HELP_STRING(
  203. [--disable-64bit],
  204. [
  205. Enforce 32bit output on x86_64 systems.
  206. ]
  207. ),
  208. [
  209. enable_64bit="$enableval"
  210. case $enableval in
  211. "no");;
  212. "yes");;
  213. *) AC_MSG_ERROR([[invalid argument --enable-64bit=$enableval... stopping]]);;
  214. esac
  215. ],
  216. [enable_64bit="yes"]
  217. )
  218. #
  219. # LTO
  220. #
  221. AC_ARG_ENABLE(
  222. [lto],
  223. AC_HELP_STRING(
  224. [--enable-lto],
  225. [
  226. Enables or Disables Linktime Code Optimization (LTO is enabled by default)
  227. ]
  228. ),
  229. [
  230. enable_lto="$enableval"
  231. case $enableval in
  232. "no");;
  233. "yes");;
  234. *) AC_MSG_ERROR([[invalid argument --enable-lto=$disableval... stopping]]);;
  235. esac
  236. ],
  237. [enable_lto="yes"]
  238. )
  239. #
  240. # Optionally set the max number of network conenctions
  241. # the core will be support
  242. #
  243. AC_ARG_WITH(
  244. [maxconn],
  245. AC_HELP_STRING(
  246. [--with-maxconn@<:@=ARG@:>@],
  247. [optionally set the maximum connections the core can handle (default: 16384) NOT USED YET - EXPERIMENTAL]
  248. ),
  249. [
  250. if test "$withval" == "no"; then
  251. CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
  252. else
  253. if ! test "$withval" -ge 0 -o "$withval" -lt 0 2>&- ; then
  254. AC_MSG_ERROR([Invalid argument --with-maxconn=$withval ... stopping])
  255. else
  256. CPPFLAGS="$CPPFLAGS -DMAXCONN=$withval"
  257. fi
  258. fi
  259. ],
  260. [
  261. CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
  262. ]
  263. )
  264. #
  265. # output bin name
  266. #
  267. AC_ARG_WITH(
  268. [outputlogin],
  269. AC_HELP_STRING(
  270. [--with-outputlogin@<:@=ARG@:>@],
  271. [Specify the login-serv output name (defaults to login-server)]
  272. ),
  273. [output_login="$withval"],
  274. [output_login="login-server"]
  275. )
  276. AC_SUBST([OLOG],$output_login)
  277. AC_ARG_WITH(
  278. [outputchar],
  279. AC_HELP_STRING(
  280. [--with-outputchar@<:@=ARG@:>@],
  281. [Specify the char-serv output name (defaults to char-server)]
  282. ),
  283. [output_char="$withval"],
  284. [output_char="char-server"]
  285. )
  286. AC_SUBST([OCHR],$output_char)
  287. AC_ARG_WITH(
  288. [outputmap],
  289. AC_HELP_STRING(
  290. [--with-outputmap@<:@=ARG@:>@],
  291. [Specify the map-serv output name (defaults to map-server)]
  292. ),
  293. [output_map="$withval"],
  294. [output_map="map-server"]
  295. )
  296. AC_SUBST([OMAP],$output_map)
  297. #
  298. # Optionally specify the path to mysql_config
  299. #
  300. AC_ARG_WITH(
  301. [mysql],
  302. AC_HELP_STRING(
  303. [--with-mysql@<:@=ARG@:>@],
  304. [optionally specify the path to the mysql_config executable]
  305. ),
  306. [
  307. if test "$withval" != "no" ; then
  308. if test ! -x "$withval" ; then
  309. AC_MSG_ERROR([$withval is not an executable file])
  310. fi
  311. MYSQL_CONFIG_HOME="$withval"
  312. fi
  313. ]
  314. )
  315. #
  316. # Manual MYSQL_CFLAGS (optional)
  317. #
  318. AC_ARG_WITH(
  319. [MYSQL_CFLAGS],
  320. AC_HELP_STRING(
  321. [--with-MYSQL_CFLAGS=ARG],
  322. [specify MYSQL_CFLAGS manually (instead of using "mysql_config --include")]
  323. ),
  324. [
  325. manual_MYSQL_CFLAGS="yes"
  326. MYSQL_CFLAGS="$withval"
  327. ],
  328. [manual_MYSQL_CFLAGS="no"]
  329. )
  330. #
  331. # Manual MYSQL_LIBS (optional)
  332. #
  333. AC_ARG_WITH(
  334. [MYSQL_LIBS],
  335. AC_HELP_STRING(
  336. [--with-MYSQL_LIBS=ARG],
  337. [specify MYSQL_LIBS manually (instead of using "mysql_config --libs")]
  338. ),
  339. [
  340. manual_MYSQL_LIBS="yes"
  341. MYSQL_LIBS="$withval"
  342. ],
  343. [manual_MYSQL_LIBS="no"]
  344. )
  345. #
  346. # Enable/disable PCRE and optionally specify the path (optional library)
  347. #
  348. AC_ARG_WITH(
  349. [pcre],
  350. AC_HELP_STRING(
  351. [--with-pcre@<:@=ARG@:>@],
  352. [use PCRE library, optionally specify the full path of pcre installation directory (by default pcre is used if found)]
  353. ),
  354. [
  355. if test "$withval" = "no" ; then
  356. want_pcre="no"
  357. else
  358. want_pcre="yes"
  359. require_pcre="yes"
  360. if test "$withval" != "yes" ; then
  361. if test ! -d "$withval" ; then
  362. AC_MSG_ERROR([$withval is not a directoy])
  363. fi
  364. PCRE_HOME="$withval"
  365. fi
  366. fi
  367. ],
  368. [want_pcre="yes" require_pcre="no"]
  369. )
  370. #
  371. # Specify the path of the zlib library (required library)
  372. #
  373. AC_ARG_WITH(
  374. [zlib],
  375. AC_HELP_STRING(
  376. [--with-zlib=DIR],
  377. [root directory path of zlib installation (defaults to /usr/local or /usr if not found in /usr/local).
  378. Assumes that the header files are in DIR/include and the library files are in DIR/lib]
  379. ),
  380. [
  381. test -n "$withval" && ZLIB_HOME="$withval"
  382. ],
  383. [
  384. ZLIB_HOME=/usr/local
  385. test ! -f "${ZLIB_HOME}/include/zlib.h" && ZLIB_HOME=/usr
  386. ]
  387. )
  388. ###############################################################################
  389. # Check for programs and types.
  390. #
  391. AC_PROG_MAKE_SET
  392. AC_PROG_CC
  393. AC_PROG_CPP
  394. AC_PATH_PROG(AR, ar)
  395. AC_LANG([C])
  396. CFLAGS="$CFLAGS -pipe -ffast-math -Wall"
  397. CPPFLAGS="$CPPFLAGS -I../common"
  398. AC_C_BIGENDIAN(
  399. [AC_MSG_ERROR([[bigendian is not supported... stopping]])],
  400. ,
  401. [AC_MSG_WARN([[unable to determine endianess, only little endian is supported]])]
  402. )
  403. if test "$enable_64bit" = "no" ; then
  404. AC_MSG_CHECKING([whether pointers can be stored in ints (old code)])
  405. pointers_fit_in_ints="no"
  406. AC_COMPILE_IFELSE(
  407. [AC_LANG_PROGRAM([[static int test_array[((long int)sizeof(int)) == ((long int)sizeof(void*)) ? 1 : -1];]])],
  408. [pointers_fit_in_ints="yes"],
  409. []
  410. )
  411. if test "$pointers_fit_in_ints" = "no" ; then
  412. CFLAGS="$CFLAGS -m32"
  413. LDFLAGS="$LDFLAGS -m32"
  414. AC_COMPILE_IFELSE(
  415. [AC_LANG_PROGRAM([[static int test_array[((long int)sizeof(int)) == ((long int)sizeof(void *)) ? 1 : -1];]])],
  416. [pointers_fit_in_ints="yes (with -m32)"],
  417. []
  418. )
  419. fi
  420. AC_MSG_RESULT($pointers_fit_in_ints)
  421. if test "$pointers_fit_in_ints" = "no" ; then
  422. AC_MSG_ERROR([pointers cannot be stored in ints, required for old code... stopping])
  423. fi
  424. fi
  425. #
  426. # check if we're producing 32bit code - so well produce binarys for at least i686 (speedup: cmovs, and cmpchg8 support)
  427. #
  428. AC_MSG_CHECKING([whether $CC produces 32bit code])
  429. AC_RUN_IFELSE(
  430. [AC_LANG_SOURCE([
  431. int main(int argc, char **argv){
  432. if(sizeof(void*) == 4) return 0;
  433. else return 1;
  434. }
  435. ])],
  436. [
  437. AC_MSG_RESULT([yes])
  438. AC_MSG_CHECKING([whether $CC supports -march=i686 (and we can run it)])
  439. OLD_CFLAGS="$CFLAGS"
  440. OLD_LDFLAGS="$LDFLAGS"
  441. CFLAGS="$CFLAGS -march=i686"
  442. LDFLAGS="$LDFLAGS -march=i686"
  443. AC_RUN_IFELSE(
  444. [AC_LANG_SOURCE([
  445. int main(int argc, char **argv) { return 0; }
  446. ])],
  447. [
  448. AC_MSG_RESULT([yes])
  449. ],
  450. [
  451. AC_MSG_RESULT([no])
  452. CFLAGS="$OLD_CFLAGS"
  453. LDFLAGS="$OLD_LDFLAGS"
  454. ],
  455. [
  456. AC_MSG_RESULT([guessing no])
  457. CFLAGS="$OLD_CFLAGS"
  458. LDFLAGS="$OLD_LDFLAGS"
  459. ]
  460. )
  461. ],
  462. [
  463. AC_MSG_RESULT([no])
  464. ],
  465. [
  466. AC_MSG_RESULT([guessing no])
  467. ]
  468. )
  469. #
  470. # Check if CC supports __thread attribute (Thread Local Storage)
  471. # (Usually our OSX friends 're lacking support of it in older llvm versions ..)
  472. #
  473. AC_MSG_CHECKING([whether $CC supports __thread specifier (TLS)])
  474. AC_RUN_IFELSE(
  475. [AC_LANG_SOURCE([
  476. __thread int g_Test = -1;
  477. int main(int argc, char **argv){
  478. g_Test = 0;
  479. return g_Test;
  480. }
  481. ])],
  482. [
  483. AC_MSG_RESULT([yes])
  484. CPPFLAGS="$CPPFLAGS -DHAS_TLS"
  485. ],
  486. [
  487. AC_MSG_RESULT([no])
  488. ]
  489. )
  490. #
  491. # LTO Support test
  492. #
  493. if test "$enable_lto" != "no" ; then
  494. OPT_LTO_AR=""
  495. OPT_LTO=""
  496. OLD_CFLAGS="$CFLAGS"
  497. CFLAGS="$CFLAGS -flto -fuse-linker-plugin -ffat-lto-objects"
  498. OLD_LDFLAGS="$LDFLAGS"
  499. LDFLAGS="$LDFLAGS -flto -fuse-linker-plugin -ffat-lto-objects"
  500. AC_MSG_CHECKING([whether $CC supports -ffat-lto-objects])
  501. AC_RUN_IFELSE(
  502. [AC_LANG_SOURCE([
  503. int main(int argc, char **argv){
  504. return 0;
  505. }
  506. ])],
  507. [
  508. AC_MSG_RESULT([yes])
  509. OPT_LTO_AR="-ffat-lto-objects"
  510. ],
  511. [
  512. AC_MSG_RESULT([no])
  513. ],
  514. [
  515. AC_MSG_RESULT([guessing no])
  516. ]
  517. )
  518. CFLAGS="$OLD_CFLAGS"
  519. LDFLAGS="$OLD_LDFLAGS"
  520. CFLAGS="$CFLAGS -flto -fuse-linker-plugin"
  521. LDFLAGS="$LDFLAGS -flto -fuse-linker-plugin"
  522. AC_MSG_CHECKING([whether $CC supports -flto -fuse-linker-plugin])
  523. AC_RUN_IFELSE(
  524. [AC_LANG_SOURCE([
  525. int main(int argc, char **argv){
  526. return 0;
  527. }
  528. ])],
  529. [
  530. AC_MSG_RESULT([yes])
  531. OPT_LTO_AR="-flto -fuse-linker-plugin $OPT_LTO_AR"
  532. OPT_LTO="-flto -fuse-linker-plugin"
  533. ],
  534. [
  535. AC_MSG_RESULT([no])
  536. ],
  537. [
  538. AC_MSG_RESULT([guessing no])
  539. ]
  540. )
  541. CFLAGS="$OLD_CFLAGS"
  542. LDFLAGS="$OLD_LDFLAGS"
  543. fi
  544. AC_DEFUN(AC_CHECK_COMPILER_WFLAG,
  545. [
  546. AC_MSG_CHECKING([whether $CC supports -W$1])
  547. OLD_CFLAGS="$CFLAGS"
  548. CFLAGS="$CFLAGS -Werror -W$1"
  549. AC_COMPILE_IFELSE(
  550. [AC_LANG_SOURCE([int foo;])],
  551. [
  552. AC_MSG_RESULT([yes])
  553. CFLAGS="$OLD_CFLAGS -W$1"
  554. # Optionally, run a test
  555. if test "x$2" != "x"; then
  556. AC_MSG_CHECKING([whether $CC can actually use -W$1])
  557. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  558. AC_COMPILE_IFELSE(
  559. [AC_LANG_SOURCE([$2])],
  560. [
  561. AC_MSG_RESULT([no])
  562. CFLAGS="$OLD_CFLAGS"
  563. ]
  564. [
  565. AC_MSG_RESULT([yes])
  566. CFLAGS="$OLD_CFLAGS -W$1"
  567. ],
  568. )
  569. fi
  570. ],
  571. [
  572. AC_MSG_RESULT([no])
  573. CFLAGS="$OLD_CFLAGS"
  574. ]
  575. )
  576. ]
  577. )
  578. AC_DEFUN(AC_CHECK_COMPILER_WNOFLAG,
  579. [
  580. AC_MSG_CHECKING([whether $CC supports -Wno-$1])
  581. OLD_CFLAGS="$CFLAGS"
  582. CFLAGS="$CFLAGS -Werror -Wno-$1"
  583. AC_COMPILE_IFELSE(
  584. [AC_LANG_SOURCE([int foo;])],
  585. [
  586. # Recent versions of gcc don't fail if -Wno-foo is not recognized
  587. # (unless there are also other warnings), so we also check for -Wfoo
  588. # which always fails if not supported
  589. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  590. AC_COMPILE_IFELSE(
  591. [AC_LANG_SOURCE([int foo;])],
  592. [
  593. AC_MSG_RESULT([yes])
  594. CFLAGS="$OLD_CFLAGS -Wno-$1"
  595. # Optionally, run a test
  596. if test "x$2" != "x"; then
  597. AC_MSG_CHECKING([whether $CC can actually use -Wno-$1])
  598. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  599. AC_COMPILE_IFELSE(
  600. [AC_LANG_SOURCE([$2])],
  601. [
  602. AC_MSG_RESULT([not needed but enabled])
  603. CFLAGS="$OLD_CFLAGS"
  604. ],
  605. [
  606. CFLAGS="$OLD_CFLAGS -Werror -Wno-$1"
  607. AC_COMPILE_IFELSE(
  608. [AC_LANG_SOURCE([$2])],
  609. [
  610. AC_MSG_RESULT([yes])
  611. CFLAGS="$OLD_CFLAGS -Wno-$1"
  612. ],
  613. [
  614. AC_MSG_RESULT([no])
  615. CFLAGS="$OLD_CFLAGS"
  616. ]
  617. )
  618. ]
  619. )
  620. fi
  621. ],
  622. [
  623. AC_MSG_RESULT([no])
  624. CFLAGS="$OLD_CFLAGS"
  625. ]
  626. )
  627. ],
  628. [
  629. AC_MSG_RESULT([no])
  630. CFLAGS="$OLD_CFLAGS"
  631. ]
  632. )
  633. ]
  634. )
  635. AC_CHECK_COMPILER_WNOFLAG(unused-parameter, [int foo(int bar) { return 0; }])
  636. AC_CHECK_COMPILER_WNOFLAG(maybe-uninitialized)
  637. AC_CHECK_COMPILER_WNOFLAG(clobbered)
  638. AC_CHECK_COMPILER_WFLAG(empty-body)
  639. AC_CHECK_COMPILER_WFLAG(newline-eof)
  640. AC_CHECK_COMPILER_WFLAG(int-conversion)
  641. AC_CHECK_COMPILER_WFLAG(enum-conversion)
  642. AC_CHECK_COMPILER_WFLAG(shorten-64-to-32)
  643. AC_CHECK_COMPILER_WFLAG(constant-conversion)
  644. AC_CHECK_COMPILER_WFLAG(bool-conversion)
  645. AC_CHECK_COMPILER_WNOFLAG(switch)
  646. AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers)
  647. # Certain versions of gcc make -Wshadow completely useless by making it flood
  648. # you with unnecessary warnings <https://lkml.org/lkml/2006/11/28/239>
  649. # Let's check if we can really use it
  650. SAVED_OLD_CFLAGS="$CFLAGS"
  651. AC_CHECK_COMPILER_WFLAG(shadow)
  652. if test "x$CFLAGS" != "x$SAVED_OLD_CFLAGS"; then
  653. AC_MSG_CHECKING([whether $CC can efficiently use -Wshadow])
  654. NEW_CFLAGS="$CFLAGS"
  655. CFLAGS="$CFLAGS -Werror -Wshadow"
  656. AC_COMPILE_IFELSE(
  657. [AC_LANG_SOURCE([
  658. int foo(void) {
  659. return 0;
  660. }
  661. int bar(void) {
  662. int foo = 0;
  663. return foo + 1;
  664. }
  665. ])],
  666. [
  667. AC_MSG_RESULT([yes])
  668. CFLAGS="$NEW_CFLAGS"
  669. ],
  670. [
  671. AC_MSG_RESULT([no])
  672. CFLAGS="$SAVED_OLD_CFLAGS"
  673. ]
  674. )
  675. fi
  676. AC_MSG_CHECKING([whether $CC supports -fPIC])
  677. OLD_CFLAGS="$CFLAGS"
  678. CFLAGS="$CFLAGS -fPIC"
  679. AC_COMPILE_IFELSE(
  680. [AC_LANG_SOURCE([int foo;])],
  681. [
  682. AC_MSG_RESULT([yes])
  683. compiler_supports_pic="yes"
  684. ],
  685. [
  686. AC_MSG_RESULT([no])
  687. compiler_supports_pic="no"
  688. ]
  689. )
  690. CFLAGS="$OLD_CFLAGS"
  691. #
  692. # option for shared objects
  693. #
  694. AC_MSG_CHECKING([how to make shared objects])
  695. OLD_CFLAGS="$CFLAGS"
  696. compiler_shared_objects=""
  697. compiler_supports_shared_objects="no"
  698. if test "$compiler_supports_pic" = "yes" ; then
  699. my_shared_test_flags="$CFLAGS -fPIC"
  700. fi
  701. # default
  702. CFLAGS="$my_shared_test_flags -shared"
  703. AC_LINK_IFELSE(
  704. [AC_LANG_SOURCE([
  705. int bar = 0;
  706. int foo(void)
  707. {
  708. return bar;
  709. }
  710. ])],
  711. [
  712. compiler_shared_objects="-shared"
  713. compiler_supports_shared_objects="yes"
  714. ]
  715. )
  716. # BeOS specific
  717. CFLAGS="$my_shared_test_flags -nostart"
  718. AC_LINK_IFELSE(
  719. [AC_LANG_SOURCE([
  720. int bar = 0;
  721. int foo(void)
  722. {
  723. return bar;
  724. }
  725. ])],
  726. [
  727. compiler_shared_objects="-nostart"
  728. compiler_supports_shared_objects="yes"
  729. ]
  730. )
  731. CFLAGS="$OLD_CFLAGS"
  732. if test "$compiler_supports_shared_objects" = "no" ; then
  733. AC_MSG_RESULT([not supported])
  734. AC_MSG_NOTICE([compiler is unable to generate shared objects, disabled plugins (optional)])
  735. WITH_PLUGINS="no"
  736. else
  737. AC_MSG_RESULT([$compiler_shared_objects $compiler_supports_shared_objects])
  738. SOFLAGS="$SOFLAGS $compiler_shared_objects"
  739. AC_SUBST([SOFLAGS])
  740. #
  741. # On certain platforms, undefined references on shared libraries won't be checked
  742. # unless explicitly required with the --no-undefined linker option
  743. #
  744. AC_MSG_CHECKING([whether $CC needs -Wl,--no-undefined to check for undefined references in shared objects])
  745. OLD_CFLAGS="$CFLAGS"
  746. CFLAGS="$SOFLAGS"
  747. AC_LINK_IFELSE(
  748. [AC_LANG_SOURCE([
  749. void foo(void) {
  750. foobar();
  751. }
  752. ])],
  753. [
  754. CFLAGS="$SOFLAGS -Wl,--no-undefined"
  755. AC_LINK_IFELSE(
  756. [AC_LANG_SOURCE([
  757. int bar = 0;
  758. int foo(void) {
  759. return bar;
  760. }
  761. ])],
  762. [
  763. AC_MSG_RESULT([yes])
  764. SOFLAGS="$SOFLAGS -Wl,--no-undefined"
  765. ],
  766. [
  767. AC_MSG_RESULT([unsupported (undefined references check will be ignored)])
  768. ]
  769. )
  770. ],
  771. [
  772. AC_MSG_RESULT([no])
  773. ]
  774. )
  775. CFLAGS="$OLD_CFLAGS"
  776. #
  777. # shared objects need position independent code; some platforms emit
  778. # it always, others need -fPIC
  779. #
  780. AC_MSG_CHECKING([whether $CC needs -fPIC for shared objects])
  781. OLD_CFLAGS="$CFLAGS"
  782. CFLAGS="$CFLAGS $SOFLAGS"
  783. WITH_PLUGINS="yes"
  784. AC_LINK_IFELSE(
  785. [AC_LANG_SOURCE([
  786. int bar = 0;
  787. int foo(void)
  788. {
  789. return bar;
  790. }
  791. ])],
  792. [
  793. AC_MSG_RESULT([no])
  794. CFLAGS="$OLD_CFLAGS"
  795. ],
  796. [
  797. if test "$compiler_supports_pic" = "yes" ; then
  798. # Verify if -shared really fails due to lack of -fPIC or something else
  799. CFLAGS="$CFLAGS -fPIC"
  800. AC_LINK_IFELSE(
  801. [AC_LANG_SOURCE([
  802. int bar = 0;
  803. int foo(void)
  804. {
  805. return bar;
  806. }
  807. ])],
  808. [
  809. AC_MSG_RESULT([yes])
  810. CFLAGS="$OLD_CFLAGS -fPIC"
  811. ],
  812. [
  813. AC_MSG_RESULT([no, but fails for another reason])
  814. AC_MSG_ERROR([compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping])
  815. ]
  816. )
  817. else
  818. # Disable compilation of plugins (optional), so 'make all' does not fail
  819. AC_MSG_RESULT([yes, but unsupported])
  820. AC_MSG_NOTICE([compiler is unable to generate position independent code, disabled plugins (optional)])
  821. WITH_PLUGINS="no"
  822. fi
  823. ]
  824. )
  825. fi
  826. my_shared_test_flags=""
  827. AC_SUBST([WITH_PLUGINS])
  828. #
  829. # -O2 implies -fstrict-aliasing, but the code is not safe for that
  830. #
  831. AC_MSG_CHECKING([whether $CC supports -fno-strict-aliasing])
  832. OLD_CFLAGS="$CFLAGS"
  833. CFLAGS="$CFLAGS -fno-strict-aliasing"
  834. AC_COMPILE_IFELSE(
  835. [AC_LANG_SOURCE([int foo;])],
  836. [AC_MSG_RESULT([yes])],
  837. [
  838. AC_MSG_RESULT([no])
  839. CFLAGS="$OLD_CFLAGS"
  840. ]
  841. )
  842. ###############################################################################
  843. # Check for libraries and header files.
  844. #
  845. #
  846. # setrlimit - used to set the socket limit
  847. #
  848. AC_CHECK_FUNC([setrlimit],[CPPFLAGS="$CPPFLAGS -DHAVE_SETRLIMIT"])
  849. #
  850. # strnlen - string length with upper scan bound
  851. #
  852. AC_CHECK_FUNC([strnlen],[CPPFLAGS="$CPPFLAGS -DHAVE_STRNLEN"])
  853. # libconfig
  854. AC_CHECK_FUNCS([uselocale])
  855. AC_CHECK_FUNCS([newlocale])
  856. AC_CHECK_FUNCS([freelocale])
  857. AC_CHECK_HEADERS([xlocale.h], [], [], [
  858. AC_LANG_SOURCE([#ifdef HAVE_XLOCALE_H
  859. # include <xlocale.h>
  860. #endif
  861. ])])
  862. #
  863. # Memory manager
  864. #
  865. case $enable_manager in
  866. "no")
  867. CPPFLAGS="$CPPFLAGS -DNO_MEMMGR"
  868. ;;
  869. "builtin")
  870. # enabled by default
  871. ;;
  872. "memwatch")
  873. CPPFLAGS="$CPPFLAGS -DMEMWATCH"
  874. AC_CHECK_HEADER([memwatch.h], , [AC_MSG_ERROR([memwatch header not found... stopping])])
  875. ;;
  876. "dmalloc")
  877. CPPFLAGS="$CPPFLAGS -DDMALLOC -DDMALLOC_FUNC_CHECK"
  878. LIBS="$LIBS -ldmalloc"
  879. AC_CHECK_HEADER([dmalloc.h], , [AC_MSG_ERROR([dmalloc header not found... stopping])])
  880. ;;
  881. "gcollect")
  882. CPPFLAGS="$CPPFLAGS -DGCOLLECT"
  883. LIBS="$LIBS -lgc"
  884. AC_CHECK_HEADER([gc.h], , [AC_MSG_ERROR([gcollect header not found... stopping])])
  885. ;;
  886. "bcheck")
  887. CPPFLAGS="$CPPFLAGS -DBCHECK"
  888. ;;
  889. esac
  890. #
  891. # Packetver
  892. #
  893. if test -n "$enable_packetver" ; then
  894. CPPFLAGS="$CPPFLAGS -DPACKETVER=$enable_packetver"
  895. fi
  896. #
  897. # Debug
  898. #
  899. case $enable_debug in
  900. "no")
  901. # default value
  902. CPPFLAGS="$CPPFLAGS"
  903. ;;
  904. "yes")
  905. if test $ac_cv_prog_cc_g = yes; then
  906. CPPFLAGS="$CPPFLAGS -g -DDEBUG"
  907. LDFLAGS="$LDFLAGS -g"
  908. else
  909. echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
  910. exit 1
  911. fi
  912. ;;
  913. "gdb")
  914. if test $ac_cv_prog_cc_g = yes; then
  915. CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG"
  916. LDFLAGS="$LDFLAGS -g"
  917. else
  918. echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
  919. exit 1
  920. fi
  921. ;;
  922. esac
  923. #
  924. # Renewal
  925. #
  926. case $enable_prere in
  927. "no")
  928. # default value
  929. CPPFLAGS="$CPPFLAGS"
  930. ;;
  931. "yes")
  932. CPPFLAGS="$CPPFLAGS -DPRERE"
  933. ;;
  934. esac
  935. #
  936. # VIP
  937. #
  938. case $enable_vip in
  939. "no")
  940. # default value
  941. CPPFLAGS="$CPPFLAGS"
  942. ;;
  943. "yes")
  944. CPPFLAGS="$CPPFLAGS -DVIP_ENABLE"
  945. ;;
  946. esac
  947. #
  948. # Warnings
  949. #
  950. case $enable_warn in
  951. "no") #default
  952. CPPFLAGS="$CPPFLAGS $PROD_WARN"
  953. ;;
  954. "yes")
  955. CPPFLAGS="$CPPFLAGS"
  956. ;;
  957. "extra")
  958. CPPFLAGS="$CPPFLAGS $EXTRA_WARN"
  959. ;;
  960. esac
  961. #
  962. # Buildbot
  963. #
  964. case $enable_buildbot in
  965. "no")
  966. # default value
  967. ;;
  968. "yes")
  969. CPPFLAGS="$CPPFLAGS -DBUILDBOT"
  970. ;;
  971. esac
  972. #
  973. # RDTSC
  974. #
  975. case $enable_rdtsc in
  976. 0)
  977. #default value
  978. ;;
  979. 1)
  980. CPPFLAGS="$CPPFLAGS -DENABLE_RDTSC"
  981. ;;
  982. esac
  983. #
  984. # Profiler
  985. #
  986. case $enable_profiler in
  987. "no")
  988. # default value
  989. ;;
  990. "gprof")
  991. CFLAGS="$CFLAGS -pg"
  992. LDFLAGS="$LDFLAGS -pg"
  993. ;;
  994. esac
  995. #
  996. # zlib library (required)
  997. #
  998. if test -n "${ZLIB_HOME}" ; then
  999. LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
  1000. CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
  1001. fi
  1002. AC_SEARCH_LIBS([inflateEnd], [z], [],[AC_MSG_ERROR([zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping])])
  1003. AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please specify the correct path with --with-zlib=DIR... stopping])],
  1004. [AC_LANG_SOURCE([#ifdef HAVE_ZLIB_H
  1005. # include <zlib.h>
  1006. #endif
  1007. ])])
  1008. #
  1009. # math library (required)
  1010. #
  1011. AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([math library not found... stopping])])
  1012. #
  1013. # clock_gettime (optional, rt on Debian)
  1014. #
  1015. AC_SEARCH_LIBS([clock_gettime], [rt])
  1016. #
  1017. # CLOCK_MONOTONIC clock for clock_gettime
  1018. # Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix
  1019. # compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD
  1020. # >= 5.1.0, which does not have the posix defines (ref. r11983)) would be
  1021. # checked but some systems define them even when they do not support it
  1022. # (ref. bugreport:1003).
  1023. #
  1024. if test "$ac_cv_search_clock_gettime" != "no" ; then
  1025. AC_MSG_CHECKING([whether CLOCK_MONOTONIC is supported and works])
  1026. AC_RUN_IFELSE(
  1027. [AC_LANG_SOURCE([
  1028. #include <sys/time.h>
  1029. #include <time.h>
  1030. #include <unistd.h>
  1031. int main(int argc, char** argv)
  1032. {
  1033. struct timespec tval;
  1034. return clock_gettime(CLOCK_MONOTONIC, &tval);
  1035. }
  1036. ])],
  1037. [
  1038. AC_MSG_RESULT([yes])
  1039. CPPFLAGS="$CPPFLAGS -DHAVE_MONOTONIC_CLOCK"
  1040. ],
  1041. [
  1042. # either it failed to compile (CLOCK_MONOTONIC undefined)
  1043. # or clock_gettime has returned a non-zero value
  1044. AC_MSG_RESULT([no])
  1045. ],
  1046. [
  1047. AC_MSG_RESULT([guessing no])
  1048. ]
  1049. )
  1050. fi
  1051. #
  1052. # pthread
  1053. #
  1054. AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1055. AC_SEARCH_LIBS([pthread_sigmask], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1056. AC_SEARCH_LIBS([pthread_attr_init], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1057. AC_SEARCH_LIBS([pthread_attr_setstacksize], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1058. AC_SEARCH_LIBS([pthread_attr_destroy], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1059. AC_SEARCH_LIBS([pthread_cancel], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1060. AC_SEARCH_LIBS([pthread_join], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1061. #
  1062. # MySQL library
  1063. #
  1064. if test -z "$MYSQL_CONFIG_HOME"; then
  1065. AC_PATH_PROG([MYSQL_CONFIG_HOME], [mysql_config], [no])
  1066. fi
  1067. if test "$MYSQL_CONFIG_HOME" != "no" ; then
  1068. MYSQL_VERSION="`$MYSQL_CONFIG_HOME --version`"
  1069. if test "$manual_MYSQL_CFLAGS" = "no" ; then
  1070. MYSQL_CFLAGS="`$MYSQL_CONFIG_HOME --include`"
  1071. fi
  1072. if test "$manual_MYSQL_LIBS" = "no" ; then
  1073. MYSQL_LIBS="`$MYSQL_CONFIG_HOME --libs`"
  1074. fi
  1075. else
  1076. MYSQL_VERSION="unknown"
  1077. fi
  1078. MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS"
  1079. MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
  1080. AC_CHECK_LIB([mysqlclient], [mysql_init], [HAVE_MYSQL="yes"], [])
  1081. AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""])
  1082. CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
  1083. LDFLAGS="$MYSQL_OLD_LDFLAGS"
  1084. AC_MSG_CHECKING([MySQL library (required)])
  1085. if test "$HAVE_MYSQL" = "yes" ; then
  1086. AC_MSG_RESULT([yes ($MYSQL_VERSION)])
  1087. else
  1088. AC_MSG_RESULT([no])
  1089. AC_MSG_ERROR([MySQL not found or incompatible])
  1090. fi
  1091. AC_SUBST([HAVE_MYSQL])
  1092. AC_SUBST([MYSQL_VERSION])
  1093. AC_SUBST([MYSQL_CFLAGS])
  1094. AC_SUBST([MYSQL_LIBS])
  1095. #
  1096. # PCRE library (optional)
  1097. #
  1098. PCRE_LIBS=""
  1099. PCRE_CFLAGS=""
  1100. if test "$want_pcre" = "no" ; then
  1101. AC_MSG_NOTICE([ignoring PCRE (optional)])
  1102. else
  1103. host_os="`uname`"
  1104. if test "$host_os" = "FreeBSD" ; then
  1105. if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi
  1106. fi
  1107. if test -z "$PCRE_HOME" ; then
  1108. AC_SEARCH_LIBS([pcre_study], [pcre], [HAVE_PCRE="yes"], [])
  1109. if test "$HAVE_PCRE" = "yes" ; then
  1110. PCRE_LIBS="-lpcre"
  1111. fi
  1112. else
  1113. PCRE_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$PCRE_HOME/lib"
  1114. PCRE_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$PCRE_HOME/include"
  1115. AC_CHECK_LIB(pcre, pcre_compile, [HAVE_PCRE="yes"], [])
  1116. CPPFLAGS="$PCRE_OLD_CPPFLAGS"
  1117. LDFLAGS="$PCRE_OLD_LDFLAGS"
  1118. if test "$HAVE_PCRE" = "yes" ; then
  1119. PCRE_LIBS="-L$PCRE_HOME/lib -lpcre"
  1120. test -d "$PCRE_HOME/include" && PCRE_CFLAGS="-I$PCRE_HOME/include"
  1121. fi
  1122. fi
  1123. AC_MSG_CHECKING([PCRE library (optional)])
  1124. if test "$HAVE_PCRE" = "yes" ; then
  1125. PCRE_VERSION="`pcre-config --version`"
  1126. AC_MSG_RESULT([yes ($PCRE_VERSION)])
  1127. else
  1128. AC_MSG_RESULT([no])
  1129. if test "$require_pcre" = "yes" ; then
  1130. AC_MSG_ERROR([PCRE not found or incompatible (requested)])
  1131. else
  1132. AC_MSG_NOTICE([disabling PCRE (optional)])
  1133. fi
  1134. fi
  1135. fi
  1136. AC_SUBST([HAVE_PCRE])
  1137. AC_SUBST([PCRE_VERSION])
  1138. AC_SUBST([PCRE_LIBS])
  1139. AC_SUBST([PCRE_CFLAGS])
  1140. #
  1141. # Host specific stuff
  1142. #
  1143. AC_MSG_CHECKING([host OS])
  1144. host_os="`uname`"
  1145. AC_MSG_RESULT([$host_os])
  1146. fd_setsize=""
  1147. DLLEXT=".so"
  1148. case $host_os in
  1149. Solaris* )
  1150. LIBS="$LIBS -lsocket -lnsl -ldl"
  1151. ;;
  1152. Linux* )
  1153. LIBS="$LIBS -ldl"
  1154. ;;
  1155. FreeBSD*)
  1156. CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
  1157. ;;
  1158. NetBSD*)
  1159. CPPFLAGS="$CPPFLAGS -D__NETBSD__"
  1160. ;;
  1161. CYGWIN*)
  1162. CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
  1163. fd_setsize="done"
  1164. DLLEXT=".dll"
  1165. ;;
  1166. esac
  1167. AC_SUBST([DLLEXT])
  1168. AC_MSG_CHECKING([for MinGW])
  1169. if test -n "`$CC --version | grep -i mingw`" ; then
  1170. AC_MSG_RESULT([yes])
  1171. CPPFLAGS="$CPPFLAGS -DMINGW"
  1172. if test -z "$fd_setsize" ; then
  1173. CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
  1174. fi
  1175. LIBS="$LIBS -lws2_32"
  1176. else
  1177. AC_MSG_RESULT([no])
  1178. fi
  1179. CFLAGS="$OPT_LTO $CFLAGS"
  1180. CFLAGS_AR="$OPT_LTO_AR $CFLAGS"
  1181. AC_SUBST([CFLAGS_AR])
  1182. AC_MSG_NOTICE([Configure finish])
  1183. AC_MSG_NOTICE([CPPFLAGS= $CPPFLAGS])
  1184. AC_MSG_NOTICE([CFLAGS= $CFLAGS])
  1185. AC_MSG_NOTICE([CFLAGS_AR= $CFLAGS_AR])
  1186. AC_MSG_NOTICE([LDFLAGS= $LDFLAGS])
  1187. #AC_MSG_NOTICE([PROD_WARN= $PROD_WARN])
  1188. #AC_MSG_NOTICE([EXTRA_WARN= $EXTRA_WARN])
  1189. AC_MSG_NOTICE([output name = $output_login, $output_char, $output_map])
  1190. ###############################################################################
  1191. AC_OUTPUT