configure.in 27 KB

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