configure.in 27 KB

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