configure.in 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320
  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. #CXXFLAGS="$CXXFLAGS -std=gnu++11"
  402. CXXFLAG_CLEARS="-std=c++11"
  403. AC_C_BIGENDIAN(
  404. [AC_MSG_ERROR([[bigendian is not supported... stopping]])],
  405. ,
  406. [AC_MSG_WARN([[unable to determine endianess, only little endian is supported]])]
  407. )
  408. if test "$enable_64bit" = "no" ; then
  409. AC_MSG_CHECKING([whether pointers can be stored in ints (old code)])
  410. pointers_fit_in_ints="no"
  411. AC_COMPILE_IFELSE(
  412. [AC_LANG_PROGRAM([[static int test_array[((long int)sizeof(int)) == ((long int)sizeof(void*)) ? 1 : -1];]])],
  413. [pointers_fit_in_ints="yes"],
  414. []
  415. )
  416. if test "$pointers_fit_in_ints" = "no" ; then
  417. CFLAGS="$CFLAGS -m32"
  418. LDFLAGS="$LDFLAGS -m32"
  419. AC_COMPILE_IFELSE(
  420. [AC_LANG_PROGRAM([[static int test_array[((long int)sizeof(int)) == ((long int)sizeof(void *)) ? 1 : -1];]])],
  421. [pointers_fit_in_ints="yes (with -m32)"],
  422. []
  423. )
  424. fi
  425. AC_MSG_RESULT($pointers_fit_in_ints)
  426. if test "$pointers_fit_in_ints" = "no" ; then
  427. AC_MSG_ERROR([pointers cannot be stored in ints, required for old code... stopping])
  428. fi
  429. fi
  430. #
  431. # check if we're producing 32bit code - so well produce binarys for at least i686 (speedup: cmovs, and cmpchg8 support)
  432. #
  433. AC_MSG_CHECKING([whether $CC produces 32bit code])
  434. AC_RUN_IFELSE(
  435. [AC_LANG_SOURCE([
  436. int main(int argc, char **argv){
  437. if(sizeof(void*) == 4) return 0;
  438. else return 1;
  439. }
  440. ])],
  441. [
  442. AC_MSG_RESULT([yes])
  443. AC_MSG_CHECKING([whether $CC supports -march=i686 (and we can run it)])
  444. OLD_CFLAGS="$CFLAGS"
  445. OLD_LDFLAGS="$LDFLAGS"
  446. CFLAGS="$CFLAGS -march=i686"
  447. LDFLAGS="$LDFLAGS -march=i686"
  448. AC_RUN_IFELSE(
  449. [AC_LANG_SOURCE([
  450. int main(int argc, char **argv) { return 0; }
  451. ])],
  452. [
  453. AC_MSG_RESULT([yes])
  454. ],
  455. [
  456. AC_MSG_RESULT([no])
  457. CFLAGS="$OLD_CFLAGS"
  458. LDFLAGS="$OLD_LDFLAGS"
  459. ],
  460. [
  461. AC_MSG_RESULT([guessing no])
  462. CFLAGS="$OLD_CFLAGS"
  463. LDFLAGS="$OLD_LDFLAGS"
  464. ]
  465. )
  466. ],
  467. [
  468. AC_MSG_RESULT([no])
  469. ],
  470. [
  471. AC_MSG_RESULT([guessing no])
  472. ]
  473. )
  474. #
  475. # Check if CC supports __thread attribute (Thread Local Storage)
  476. # (Usually our OSX friends 're lacking support of it in older llvm versions ..)
  477. #
  478. AC_MSG_CHECKING([whether $CC supports __thread specifier (TLS)])
  479. AC_RUN_IFELSE(
  480. [AC_LANG_SOURCE([
  481. __thread int g_Test = -1;
  482. int main(int argc, char **argv){
  483. g_Test = 0;
  484. return g_Test;
  485. }
  486. ])],
  487. [
  488. AC_MSG_RESULT([yes])
  489. CPPFLAGS="$CPPFLAGS -DHAS_TLS"
  490. ],
  491. [
  492. AC_MSG_RESULT([no])
  493. ]
  494. )
  495. #
  496. # LTO Support test
  497. #
  498. if test "$enable_lto" != "no" ; then
  499. OPT_LTO_AR=""
  500. OPT_LTO=""
  501. OLD_CFLAGS="$CFLAGS"
  502. CFLAGS="$CFLAGS -flto -fuse-linker-plugin -ffat-lto-objects"
  503. OLD_LDFLAGS="$LDFLAGS"
  504. LDFLAGS="$LDFLAGS -flto -fuse-linker-plugin -ffat-lto-objects"
  505. AC_MSG_CHECKING([whether $CC supports -ffat-lto-objects])
  506. AC_RUN_IFELSE(
  507. [AC_LANG_SOURCE([
  508. int main(int argc, char **argv){
  509. return 0;
  510. }
  511. ])],
  512. [
  513. AC_MSG_RESULT([yes])
  514. OPT_LTO_AR="-ffat-lto-objects"
  515. ],
  516. [
  517. AC_MSG_RESULT([no])
  518. ],
  519. [
  520. AC_MSG_RESULT([guessing no])
  521. ]
  522. )
  523. CFLAGS="$OLD_CFLAGS"
  524. LDFLAGS="$OLD_LDFLAGS"
  525. CFLAGS="$CFLAGS -flto -fuse-linker-plugin"
  526. LDFLAGS="$LDFLAGS -flto -fuse-linker-plugin"
  527. AC_MSG_CHECKING([whether $CC supports -flto -fuse-linker-plugin])
  528. AC_RUN_IFELSE(
  529. [AC_LANG_SOURCE([
  530. int main(int argc, char **argv){
  531. return 0;
  532. }
  533. ])],
  534. [
  535. AC_MSG_RESULT([yes])
  536. OPT_LTO_AR="-flto -fuse-linker-plugin $OPT_LTO_AR"
  537. OPT_LTO="-flto -fuse-linker-plugin"
  538. ],
  539. [
  540. AC_MSG_RESULT([no])
  541. ],
  542. [
  543. AC_MSG_RESULT([guessing no])
  544. ]
  545. )
  546. CFLAGS="$OLD_CFLAGS"
  547. LDFLAGS="$OLD_LDFLAGS"
  548. fi
  549. AC_DEFUN(AC_CHECK_COMPILER_WFLAG,
  550. [
  551. AC_MSG_CHECKING([whether $CC supports -W$1])
  552. OLD_CFLAGS="$CFLAGS"
  553. CFLAGS="$CFLAGS -Werror -W$1"
  554. AC_COMPILE_IFELSE(
  555. [AC_LANG_SOURCE([int foo;])],
  556. [
  557. AC_MSG_RESULT([yes])
  558. CFLAGS="$OLD_CFLAGS -W$1"
  559. # Optionally, run a test
  560. if test "x$2" != "x"; then
  561. AC_MSG_CHECKING([whether $CC can actually use -W$1])
  562. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  563. AC_COMPILE_IFELSE(
  564. [AC_LANG_SOURCE([$2])],
  565. [
  566. AC_MSG_RESULT([no])
  567. CFLAGS="$OLD_CFLAGS"
  568. ]
  569. [
  570. AC_MSG_RESULT([yes])
  571. CFLAGS="$OLD_CFLAGS -W$1"
  572. ],
  573. )
  574. fi
  575. ],
  576. [
  577. AC_MSG_RESULT([no])
  578. CFLAGS="$OLD_CFLAGS"
  579. ]
  580. )
  581. ]
  582. )
  583. AC_DEFUN(AC_CHECK_COMPILER_WNOFLAG,
  584. [
  585. AC_MSG_CHECKING([whether $CC supports -Wno-$1])
  586. OLD_CFLAGS="$CFLAGS"
  587. CFLAGS="$CFLAGS -Werror -Wno-$1"
  588. AC_COMPILE_IFELSE(
  589. [AC_LANG_SOURCE([int foo;])],
  590. [
  591. # Recent versions of gcc don't fail if -Wno-foo is not recognized
  592. # (unless there are also other warnings), so we also check for -Wfoo
  593. # which always fails if not supported
  594. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  595. AC_COMPILE_IFELSE(
  596. [AC_LANG_SOURCE([int foo;])],
  597. [
  598. AC_MSG_RESULT([yes])
  599. CFLAGS="$OLD_CFLAGS -Wno-$1"
  600. # Optionally, run a test
  601. if test "x$2" != "x"; then
  602. AC_MSG_CHECKING([whether $CC can actually use -Wno-$1])
  603. CFLAGS="$OLD_CFLAGS -Werror -W$1"
  604. AC_COMPILE_IFELSE(
  605. [AC_LANG_SOURCE([$2])],
  606. [
  607. AC_MSG_RESULT([not needed but enabled])
  608. CFLAGS="$OLD_CFLAGS"
  609. ],
  610. [
  611. CFLAGS="$OLD_CFLAGS -Werror -Wno-$1"
  612. AC_COMPILE_IFELSE(
  613. [AC_LANG_SOURCE([$2])],
  614. [
  615. AC_MSG_RESULT([yes])
  616. CFLAGS="$OLD_CFLAGS -Wno-$1"
  617. ],
  618. [
  619. AC_MSG_RESULT([no])
  620. CFLAGS="$OLD_CFLAGS"
  621. ]
  622. )
  623. ]
  624. )
  625. fi
  626. ],
  627. [
  628. AC_MSG_RESULT([no])
  629. CFLAGS="$OLD_CFLAGS"
  630. ]
  631. )
  632. ],
  633. [
  634. AC_MSG_RESULT([no])
  635. CFLAGS="$OLD_CFLAGS"
  636. ]
  637. )
  638. ]
  639. )
  640. AC_CHECK_COMPILER_WNOFLAG(unused-parameter, [int foo(int bar) { return 0; }])
  641. AC_CHECK_COMPILER_WFLAG(empty-body)
  642. AC_CHECK_COMPILER_WNOFLAG(switch)
  643. AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers)
  644. AC_MSG_CHECKING([whether compiler is clang])
  645. if test -n "`$CC --version | grep -i clang`" ; then
  646. AC_MSG_RESULT([yes, skipping some flags..])
  647. else
  648. AC_MSG_RESULT([no])
  649. AC_CHECK_COMPILER_WNOFLAG(maybe-uninitialized)
  650. AC_CHECK_COMPILER_WNOFLAG(clobbered)
  651. fi
  652. # Certain versions of gcc make -Wshadow completely useless by making it flood
  653. # you with unnecessary warnings <https://lkml.org/lkml/2006/11/28/239>
  654. # Let's check if we can really use it
  655. SAVED_OLD_CFLAGS="$CFLAGS"
  656. AC_CHECK_COMPILER_WFLAG(shadow)
  657. if test "x$CFLAGS" != "x$SAVED_OLD_CFLAGS"; then
  658. AC_MSG_CHECKING([whether $CC can efficiently use -Wshadow])
  659. NEW_CFLAGS="$CFLAGS"
  660. CFLAGS="$CFLAGS -Werror -Wshadow"
  661. AC_COMPILE_IFELSE(
  662. [AC_LANG_SOURCE([
  663. int foo(void) {
  664. return 0;
  665. }
  666. int bar(void) {
  667. int foo = 0;
  668. return foo + 1;
  669. }
  670. ])],
  671. [
  672. AC_MSG_RESULT([yes])
  673. CFLAGS="$NEW_CFLAGS"
  674. ],
  675. [
  676. AC_MSG_RESULT([no])
  677. CFLAGS="$SAVED_OLD_CFLAGS"
  678. ]
  679. )
  680. fi
  681. AC_MSG_CHECKING([whether $CC supports -fPIC])
  682. OLD_CFLAGS="$CFLAGS"
  683. CFLAGS="$CFLAGS -fPIC"
  684. AC_COMPILE_IFELSE(
  685. [AC_LANG_SOURCE([int foo;])],
  686. [
  687. AC_MSG_RESULT([yes])
  688. compiler_supports_pic="yes"
  689. ],
  690. [
  691. AC_MSG_RESULT([no])
  692. compiler_supports_pic="no"
  693. ]
  694. )
  695. CFLAGS="$OLD_CFLAGS"
  696. #
  697. # option for shared objects
  698. #
  699. AC_MSG_CHECKING([how to make shared objects])
  700. OLD_CFLAGS="$CFLAGS"
  701. compiler_shared_objects=""
  702. compiler_supports_shared_objects="no"
  703. if test "$compiler_supports_pic" = "yes" ; then
  704. my_shared_test_flags="$CFLAGS -fPIC"
  705. fi
  706. # default
  707. CFLAGS="$my_shared_test_flags -shared"
  708. AC_LINK_IFELSE(
  709. [AC_LANG_SOURCE([
  710. int bar = 0;
  711. int foo(void)
  712. {
  713. return bar;
  714. }
  715. ])],
  716. [
  717. compiler_shared_objects="-shared"
  718. compiler_supports_shared_objects="yes"
  719. ]
  720. )
  721. # BeOS specific
  722. CFLAGS="$my_shared_test_flags -nostart"
  723. AC_LINK_IFELSE(
  724. [AC_LANG_SOURCE([
  725. int bar = 0;
  726. int foo(void)
  727. {
  728. return bar;
  729. }
  730. ])],
  731. [
  732. compiler_shared_objects="-nostart"
  733. compiler_supports_shared_objects="yes"
  734. ]
  735. )
  736. CFLAGS="$OLD_CFLAGS"
  737. if test "$compiler_supports_shared_objects" = "no" ; then
  738. AC_MSG_RESULT([not supported])
  739. AC_MSG_NOTICE([compiler is unable to generate shared objects, disabled plugins (optional)])
  740. WITH_PLUGINS="no"
  741. else
  742. AC_MSG_RESULT([$compiler_shared_objects $compiler_supports_shared_objects])
  743. SOFLAGS="$SOFLAGS $compiler_shared_objects"
  744. AC_SUBST([SOFLAGS])
  745. #
  746. # On certain platforms, undefined references on shared libraries won't be checked
  747. # unless explicitly required with the --no-undefined linker option
  748. #
  749. AC_MSG_CHECKING([whether $CC needs -Wl,--no-undefined to check for undefined references in shared objects])
  750. OLD_CFLAGS="$CFLAGS"
  751. CFLAGS="$SOFLAGS"
  752. AC_LINK_IFELSE(
  753. [AC_LANG_SOURCE([
  754. void foo(void) {
  755. foobar();
  756. }
  757. ])],
  758. [
  759. CFLAGS="$SOFLAGS -Wl,--no-undefined"
  760. AC_LINK_IFELSE(
  761. [AC_LANG_SOURCE([
  762. int bar = 0;
  763. int foo(void) {
  764. return bar;
  765. }
  766. ])],
  767. [
  768. AC_MSG_RESULT([yes])
  769. SOFLAGS="$SOFLAGS -Wl,--no-undefined"
  770. ],
  771. [
  772. AC_MSG_RESULT([unsupported (undefined references check will be ignored)])
  773. ]
  774. )
  775. ],
  776. [
  777. AC_MSG_RESULT([no])
  778. ]
  779. )
  780. CFLAGS="$OLD_CFLAGS"
  781. #
  782. # shared objects need position independent code; some platforms emit
  783. # it always, others need -fPIC
  784. #
  785. AC_MSG_CHECKING([whether $CC needs -fPIC for shared objects])
  786. OLD_CFLAGS="$CFLAGS"
  787. CFLAGS="$CFLAGS $SOFLAGS"
  788. WITH_PLUGINS="yes"
  789. AC_LINK_IFELSE(
  790. [AC_LANG_SOURCE([
  791. int bar = 0;
  792. int foo(void)
  793. {
  794. return bar;
  795. }
  796. ])],
  797. [
  798. AC_MSG_RESULT([no])
  799. CFLAGS="$OLD_CFLAGS"
  800. ],
  801. [
  802. if test "$compiler_supports_pic" = "yes" ; then
  803. # Verify if -shared really fails due to lack of -fPIC or something else
  804. CFLAGS="$CFLAGS -fPIC"
  805. AC_LINK_IFELSE(
  806. [AC_LANG_SOURCE([
  807. int bar = 0;
  808. int foo(void)
  809. {
  810. return bar;
  811. }
  812. ])],
  813. [
  814. AC_MSG_RESULT([yes])
  815. CFLAGS="$OLD_CFLAGS -fPIC"
  816. ],
  817. [
  818. AC_MSG_RESULT([no, but fails for another reason])
  819. AC_MSG_ERROR([compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping])
  820. ]
  821. )
  822. else
  823. # Disable compilation of plugins (optional), so 'make all' does not fail
  824. AC_MSG_RESULT([yes, but unsupported])
  825. AC_MSG_NOTICE([compiler is unable to generate position independent code, disabled plugins (optional)])
  826. WITH_PLUGINS="no"
  827. fi
  828. ]
  829. )
  830. fi
  831. my_shared_test_flags=""
  832. AC_SUBST([WITH_PLUGINS])
  833. #
  834. # -O2 implies -fstrict-aliasing, but the code is not safe for that
  835. #
  836. AC_MSG_CHECKING([whether $CC supports -fno-strict-aliasing])
  837. OLD_CPPFLAGS="$CPPFLAGS"
  838. CPPFLAGS="$CPPFLAGS -fno-strict-aliasing"
  839. AC_COMPILE_IFELSE(
  840. [AC_LANG_SOURCE([int foo;])],
  841. [AC_MSG_RESULT([yes])],
  842. [
  843. AC_MSG_RESULT([no])
  844. CPPFLAGS="$OLD_CPPFLAGS"
  845. ]
  846. )
  847. ###############################################################################
  848. # Check for libraries and header files.
  849. #
  850. #
  851. # setrlimit - used to set the socket limit
  852. #
  853. AC_CHECK_FUNC([setrlimit],[CPPFLAGS="$CPPFLAGS -DHAVE_SETRLIMIT"])
  854. #
  855. # strnlen - string length with upper scan bound
  856. #
  857. AC_CHECK_FUNC([strnlen],[CPPFLAGS="$CPPFLAGS -DHAVE_STRNLEN"])
  858. # libconfig
  859. AC_CHECK_FUNCS([uselocale])
  860. AC_CHECK_FUNCS([newlocale])
  861. AC_CHECK_FUNCS([freelocale])
  862. AC_CHECK_HEADERS([xlocale.h], [], [], [
  863. AC_LANG_SOURCE([#ifdef HAVE_XLOCALE_H
  864. # include <xlocale.h>
  865. #endif
  866. ])])
  867. #
  868. # Memory manager
  869. #
  870. case $enable_manager in
  871. "no")
  872. CPPFLAGS="$CPPFLAGS -DNO_MEMMGR"
  873. ;;
  874. "builtin")
  875. # enabled by default
  876. ;;
  877. "memwatch")
  878. CPPFLAGS="$CPPFLAGS -DMEMWATCH"
  879. AC_CHECK_HEADER([memwatch.h], , [AC_MSG_ERROR([memwatch header not found... stopping])])
  880. ;;
  881. "dmalloc")
  882. CPPFLAGS="$CPPFLAGS -DDMALLOC -DDMALLOC_FUNC_CHECK"
  883. LIBS="$LIBS -ldmalloc"
  884. AC_CHECK_HEADER([dmalloc.h], , [AC_MSG_ERROR([dmalloc header not found... stopping])])
  885. ;;
  886. "gcollect")
  887. CPPFLAGS="$CPPFLAGS -DGCOLLECT"
  888. LIBS="$LIBS -lgc"
  889. AC_CHECK_HEADER([gc.h], , [AC_MSG_ERROR([gcollect header not found... stopping])])
  890. ;;
  891. "bcheck")
  892. CPPFLAGS="$CPPFLAGS -DBCHECK"
  893. ;;
  894. esac
  895. #
  896. # Packetver
  897. #
  898. if test -n "$enable_packetver" ; then
  899. CPPFLAGS="$CPPFLAGS -DPACKETVER=$enable_packetver"
  900. fi
  901. #
  902. # Debug
  903. #
  904. case $enable_debug in
  905. "no")
  906. # default value
  907. CPPFLAGS="$CPPFLAGS"
  908. ;;
  909. "yes")
  910. if test $ac_cv_prog_cc_g = yes; then
  911. CPPFLAGS="$CPPFLAGS -g -DDEBUG"
  912. LDFLAGS="$LDFLAGS -g"
  913. else
  914. echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
  915. exit 1
  916. fi
  917. ;;
  918. "gdb")
  919. if test $ac_cv_prog_cc_g = yes; then
  920. CPPFLAGS="$CPPFLAGS -ggdb -DDEBUG"
  921. LDFLAGS="$LDFLAGS -g"
  922. else
  923. echo "error: --enable-debug flag=$enable_debug entered but the compiler does not support -g"
  924. exit 1
  925. fi
  926. ;;
  927. esac
  928. #
  929. # Renewal
  930. #
  931. case $enable_prere in
  932. "no")
  933. # default value
  934. CPPFLAGS="$CPPFLAGS"
  935. ;;
  936. "yes")
  937. CPPFLAGS="$CPPFLAGS -DPRERE"
  938. ;;
  939. esac
  940. #
  941. # VIP
  942. #
  943. case $enable_vip in
  944. "no")
  945. # default value
  946. CPPFLAGS="$CPPFLAGS"
  947. ;;
  948. "yes")
  949. CPPFLAGS="$CPPFLAGS -DVIP_ENABLE"
  950. ;;
  951. esac
  952. #
  953. # Warnings
  954. #
  955. case $enable_warn in
  956. "no") #default
  957. CPPFLAGS="$CPPFLAGS $PROD_WARN"
  958. ;;
  959. "yes")
  960. CPPFLAGS="$CPPFLAGS"
  961. ;;
  962. "extra")
  963. CPPFLAGS="$CPPFLAGS $EXTRA_WARN"
  964. ;;
  965. esac
  966. #
  967. # Buildbot
  968. #
  969. case $enable_buildbot in
  970. "no")
  971. # default value
  972. ;;
  973. "yes")
  974. CPPFLAGS="$CPPFLAGS -DBUILDBOT"
  975. ;;
  976. esac
  977. #
  978. # RDTSC
  979. #
  980. case $enable_rdtsc in
  981. 0)
  982. #default value
  983. ;;
  984. 1)
  985. CPPFLAGS="$CPPFLAGS -DENABLE_RDTSC"
  986. ;;
  987. esac
  988. #
  989. # Profiler
  990. #
  991. case $enable_profiler in
  992. "no")
  993. # default value
  994. ;;
  995. "gprof")
  996. CFLAGS="$CFLAGS -pg"
  997. LDFLAGS="$LDFLAGS -pg"
  998. ;;
  999. esac
  1000. #
  1001. # zlib library (required)
  1002. #
  1003. if test -n "${ZLIB_HOME}" ; then
  1004. LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
  1005. CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
  1006. fi
  1007. AC_SEARCH_LIBS([inflateEnd], [z], [],[AC_MSG_ERROR([zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping])])
  1008. AC_CHECK_HEADER([zlib.h], [], [AC_MSG_ERROR([zlib header not found, please specify the correct path with --with-zlib=DIR... stopping])],
  1009. [AC_LANG_SOURCE([#ifdef HAVE_ZLIB_H
  1010. # include <zlib.h>
  1011. #endif
  1012. ])])
  1013. #
  1014. # math library (required)
  1015. #
  1016. AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([math library not found... stopping])])
  1017. #
  1018. # clock_gettime (optional, rt on Debian)
  1019. #
  1020. AC_SEARCH_LIBS([clock_gettime], [rt])
  1021. #
  1022. # CLOCK_MONOTONIC clock for clock_gettime
  1023. # Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix
  1024. # compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD
  1025. # >= 5.1.0, which does not have the posix defines (ref. r11983)) would be
  1026. # checked but some systems define them even when they do not support it
  1027. # (ref. bugreport:1003).
  1028. #
  1029. if test "$ac_cv_search_clock_gettime" != "no" ; then
  1030. AC_MSG_CHECKING([whether CLOCK_MONOTONIC is supported and works])
  1031. AC_RUN_IFELSE(
  1032. [AC_LANG_SOURCE([
  1033. #include <sys/time.h>
  1034. #include <time.h>
  1035. #include <unistd.h>
  1036. int main(int argc, char** argv)
  1037. {
  1038. struct timespec tval;
  1039. return clock_gettime(CLOCK_MONOTONIC, &tval);
  1040. }
  1041. ])],
  1042. [
  1043. AC_MSG_RESULT([yes])
  1044. CPPFLAGS="$CPPFLAGS -DHAVE_MONOTONIC_CLOCK"
  1045. ],
  1046. [
  1047. # either it failed to compile (CLOCK_MONOTONIC undefined)
  1048. # or clock_gettime has returned a non-zero value
  1049. AC_MSG_RESULT([no])
  1050. ],
  1051. [
  1052. AC_MSG_RESULT([guessing no])
  1053. ]
  1054. )
  1055. fi
  1056. #
  1057. # pthread
  1058. #
  1059. AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1060. AC_SEARCH_LIBS([pthread_sigmask], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1061. AC_SEARCH_LIBS([pthread_attr_init], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1062. AC_SEARCH_LIBS([pthread_attr_setstacksize], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1063. AC_SEARCH_LIBS([pthread_attr_destroy], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1064. AC_SEARCH_LIBS([pthread_cancel], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1065. AC_SEARCH_LIBS([pthread_join], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
  1066. #
  1067. # MySQL library
  1068. #
  1069. if test -z "$MYSQL_CONFIG_HOME"; then
  1070. AC_PATH_PROG([MYSQL_CONFIG_HOME], [mysql_config], [no])
  1071. fi
  1072. if test "$MYSQL_CONFIG_HOME" != "no" ; then
  1073. MYSQL_VERSION="`$MYSQL_CONFIG_HOME --version`"
  1074. if test "$manual_MYSQL_CFLAGS" = "no" ; then
  1075. MYSQL_CFLAGS="`$MYSQL_CONFIG_HOME --include`"
  1076. fi
  1077. if test "$manual_MYSQL_LIBS" = "no" ; then
  1078. MYSQL_LIBS="`$MYSQL_CONFIG_HOME --libs`"
  1079. fi
  1080. else
  1081. MYSQL_VERSION="unknown"
  1082. fi
  1083. MYSQL_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $MYSQL_LIBS"
  1084. MYSQL_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
  1085. AC_CHECK_LIB([mysqlclient], [mysql_init], [HAVE_MYSQL="yes"], [])
  1086. AC_CHECK_HEADER([mysql.h], [], [HAVE_MYSQL=""])
  1087. CPPFLAGS="$MYSQL_OLD_CPPFLAGS"
  1088. LDFLAGS="$MYSQL_OLD_LDFLAGS"
  1089. AC_MSG_CHECKING([MySQL library (required)])
  1090. if test "$HAVE_MYSQL" = "yes" ; then
  1091. AC_MSG_RESULT([yes ($MYSQL_VERSION)])
  1092. else
  1093. AC_MSG_RESULT([no])
  1094. AC_MSG_ERROR([MySQL not found or incompatible])
  1095. fi
  1096. AC_SUBST([HAVE_MYSQL])
  1097. AC_SUBST([MYSQL_VERSION])
  1098. AC_SUBST([MYSQL_CFLAGS])
  1099. AC_SUBST([MYSQL_LIBS])
  1100. #
  1101. # PCRE library (optional)
  1102. #
  1103. PCRE_LIBS=""
  1104. PCRE_CFLAGS=""
  1105. if test "$want_pcre" = "no" ; then
  1106. AC_MSG_NOTICE([ignoring PCRE (optional)])
  1107. else
  1108. host_os="`uname`"
  1109. if test "$host_os" = "FreeBSD" ; then
  1110. if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi
  1111. fi
  1112. if test -z "$PCRE_HOME" ; then
  1113. AC_SEARCH_LIBS([pcre_study], [pcre], [HAVE_PCRE="yes"], [])
  1114. if test "$HAVE_PCRE" = "yes" ; then
  1115. PCRE_LIBS="-lpcre"
  1116. fi
  1117. else
  1118. PCRE_OLD_LDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$PCRE_HOME/lib"
  1119. PCRE_OLD_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$PCRE_HOME/include"
  1120. AC_CHECK_LIB(pcre, pcre_compile, [HAVE_PCRE="yes"], [])
  1121. CPPFLAGS="$PCRE_OLD_CPPFLAGS"
  1122. LDFLAGS="$PCRE_OLD_LDFLAGS"
  1123. if test "$HAVE_PCRE" = "yes" ; then
  1124. PCRE_LIBS="-L$PCRE_HOME/lib -lpcre"
  1125. test -d "$PCRE_HOME/include" && PCRE_CFLAGS="-I$PCRE_HOME/include"
  1126. fi
  1127. fi
  1128. AC_MSG_CHECKING([PCRE library (optional)])
  1129. if test "$HAVE_PCRE" = "yes" ; then
  1130. PCRE_VERSION="`pcre-config --version`"
  1131. AC_MSG_RESULT([yes ($PCRE_VERSION)])
  1132. else
  1133. AC_MSG_RESULT([no])
  1134. if test "$require_pcre" = "yes" ; then
  1135. AC_MSG_ERROR([PCRE not found or incompatible (requested)])
  1136. else
  1137. AC_MSG_NOTICE([disabling PCRE (optional)])
  1138. fi
  1139. fi
  1140. fi
  1141. AC_SUBST([HAVE_PCRE])
  1142. AC_SUBST([PCRE_VERSION])
  1143. AC_SUBST([PCRE_LIBS])
  1144. AC_SUBST([PCRE_CFLAGS])
  1145. #
  1146. # Host specific stuff
  1147. #
  1148. AC_MSG_CHECKING([host OS])
  1149. host_os="`uname`"
  1150. AC_MSG_RESULT([$host_os])
  1151. fd_setsize=""
  1152. DLLEXT=".so"
  1153. case $host_os in
  1154. Solaris* )
  1155. LIBS="$LIBS -lsocket -lnsl -ldl"
  1156. ;;
  1157. Linux* )
  1158. LIBS="$LIBS -ldl"
  1159. ;;
  1160. FreeBSD*)
  1161. CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
  1162. ;;
  1163. NetBSD*)
  1164. CPPFLAGS="$CPPFLAGS -D__NETBSD__"
  1165. ;;
  1166. CYGWIN*)
  1167. CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096 -DCYGWIN"
  1168. fd_setsize="done"
  1169. DLLEXT=".dll"
  1170. ;;
  1171. esac
  1172. AC_SUBST([DLLEXT])
  1173. AC_MSG_CHECKING([for MinGW])
  1174. if test -n "`$CC --version | grep -i mingw`" ; then
  1175. AC_MSG_RESULT([yes])
  1176. CPPFLAGS="$CPPFLAGS -DMINGW"
  1177. if test -z "$fd_setsize" ; then
  1178. CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=4096"
  1179. fi
  1180. LIBS="$LIBS -lws2_32"
  1181. else
  1182. AC_MSG_RESULT([no])
  1183. fi
  1184. CXXFLAG_CLEARS="-std=c++11 $CPPFLAGS"
  1185. CFLAGS="$OPT_LTO $CFLAGS"
  1186. CFLAGS_AR="$OPT_LTO_AR $CFLAGS"
  1187. AC_SUBST([CFLAGS_AR])
  1188. AC_SUBST([CXXFLAG_CLEARS])
  1189. AC_MSG_NOTICE([Configure finish])
  1190. AC_MSG_NOTICE([CPPFLAGS= $CPPFLAGS])
  1191. AC_MSG_NOTICE([CFLAGS= $CFLAGS])
  1192. AC_MSG_NOTICE([CFLAGS_AR= $CFLAGS_AR])
  1193. AC_MSG_NOTICE([LDFLAGS= $LDFLAGS])
  1194. #AC_MSG_NOTICE([PROD_WARN= $PROD_WARN])
  1195. #AC_MSG_NOTICE([EXTRA_WARN= $EXTRA_WARN])
  1196. AC_MSG_NOTICE([output name = $output_login, $output_char, $output_map])
  1197. ###############################################################################
  1198. AC_OUTPUT