KVirc – next generation IRC client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10193 lines
353 KiB

  1. dnl # // ##################################################################################################################
  2. dnl # // ## Initialization
  3. dnl # // ##################################################################################################################
  4. AC_DEFUN([AC_SS_INIT_VARIABLES],
  5. [
  6. SS_BUILD_FLAGS=""
  7. SS_BUILD_NUMBER=""
  8. dnl # // X Stuff
  9. SS_X_INCDIR=""
  10. SS_X_LIBDIR=""
  11. SS_X_LDFLAGS=""
  12. SS_X_CPPFLAGS=""
  13. dnl # // Qt Stuff
  14. SS_QT3_GENERAL_DIR=""
  15. SS_QT3_INCDIR=""
  16. SS_QT3_LIBDIR=""
  17. SS_QT3_MOC=""
  18. dnl # // KDE Stuff
  19. SS_KDE_REQUESTED="no"
  20. SS_KDE_GENERAL_DIR=""
  21. SS_KDE_INCDIR=""
  22. SS_KDE_LIBDIR=""
  23. SS_KDE_SERVICESDIR=""
  24. SS_KDE_ICONS32DIR=""
  25. dnl # // Perl stuff
  26. SS_PERL_ENABLE="no"
  27. SS_PERL_CCFLAGS=""
  28. SS_PERL_LDFLAGS=""
  29. SS_PERL_BINARY="true"
  30. dnl # // CXXFLAGS, will be set by AC_SS_CXXFLAGS
  31. dnl # CXXFLAGS=""
  32. dnl Build flags:
  33. dnl g - Debug version
  34. dnl h - Memory checks
  35. dnl m - Memory profiling
  36. dnl s - System memmove
  37. dnl S - splash screen
  38. dnl o = openssl support
  39. dnl b - Big channels
  40. dnl x - ix86 asm
  41. dnl T - tips
  42. dnl c - crypt
  43. dnl I - IPC
  44. dnl G - GSM codec
  45. dnl 8 - local 8 bit
  46. dnl A - dcc sound audio support
  47. dnl a - ignore sigalarm
  48. dnl i - ipv6
  49. dnl B - big endian
  50. dnl k - KDE
  51. dnl p - pseudo transparency
  52. dnl e - Esound daemon support
  53. dnl r - Arts daemon support
  54. dnl f - Audiofile support
  55. dnl P - profiling support
  56. dnl p - perl scripting support
  57. ])
  58. dnl # // ##################################################################################################################
  59. dnl # // ## OUTPUT MACROS
  60. dnl # // ##################################################################################################################
  61. AC_DEFUN([AC_CROSS_COLOR],
  62. [
  63. TPUT=0
  64. PRINTF=0
  65. COLOR=0
  66. IFS_OLD=$IFS
  67. IFS=":"
  68. for i in $PATH; do
  69. if test -x "$i/tput"; then
  70. TPUT=1
  71. fi
  72. done
  73. type printf >/dev/null 2>&1 && PRINTF=1
  74. for i in $PATH; do
  75. if test -x "$i/printf"; then
  76. PRINTF=1
  77. fi
  78. done
  79. if test "$TPUT" = "1" -o "$PRINTF" = "1"; then
  80. COLOR=1
  81. fi
  82. if test "$COLOR" = 1; then
  83. if test "$TPUT" = "1"; then
  84. if test "$1" = "1"; then
  85. tput bold
  86. else
  87. tput sgr0
  88. fi
  89. if test "$2" != ""; then
  90. tput setaf $2
  91. fi
  92. elif test "$PRINTF" = "1"; then
  93. if test "$2" != ""; then
  94. printf "\033\1330$1;3$2m"
  95. fi
  96. fi
  97. fi
  98. IFS=$IFS_OLD
  99. ])
  100. AC_DEFUN([AC_SS_HEADER],
  101. [
  102. AC_CROSS_COLOR([1],[2])
  103. echo "################################################################################"
  104. echo "### $1"
  105. echo "################################################################################"
  106. AC_CROSS_COLOR([0],[9])
  107. ])
  108. AC_DEFUN([AC_SS_SECTION],
  109. [
  110. AC_CROSS_COLOR([1],[3])
  111. echo "### $1"
  112. AC_CROSS_COLOR([0],[9])
  113. ])
  114. AC_DEFUN([AC_SS_SET_REDINK],
  115. [
  116. AC_CROSS_COLOR([1],[1])
  117. ])
  118. AC_DEFUN([AC_SS_SET_GREENINK],
  119. [
  120. AC_CROSS_COLOR([1],[2])
  121. ])
  122. AC_DEFUN([AC_SS_SET_NORMALINK],
  123. [
  124. AC_CROSS_COLOR([0],[9])
  125. ])
  126. dnl # // ##################################################################################################################
  127. dnl # // ## FILE LOOKUP MACROS
  128. dnl # // ##################################################################################################################
  129. AC_DEFUN([AC_SS_FIND_FILE_PATH],
  130. [
  131. $3="FAILED"
  132. for a_dir in $2; do
  133. for a_file in $1; do
  134. if test -r "$a_dir/$a_file"; then
  135. $3=$(echo "$a_dir" | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g' | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g')
  136. break 2
  137. fi
  138. done
  139. done
  140. ])
  141. AC_DEFUN([AC_SS_FIND_FILE_PATH_EXT],
  142. [
  143. $4="FAILED"
  144. for a_dir in $2; do
  145. for a_semidir in $3; do
  146. for a_file in $1; do
  147. if test -r "$a_dir/$a_semidir/$a_file"; then
  148. $4=$(echo "$a_dir/$a_semidir" | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g' | sed -e 's/\/\.\//\//g' | sed -e 's/\/\//\//g')
  149. break 3
  150. fi
  151. done
  152. done
  153. done
  154. ])
  155. dnl # // ##################################################################################################################
  156. dnl # // ## BASIC COMPILER FLAGS
  157. dnl # // ##################################################################################################################
  158. AC_DEFUN([AC_SS_CXXFLAGS_DEBUG_SYMBOLS],
  159. [
  160. dnl # // Checks if the --with-debug-symbols option has been passed to configure
  161. dnl # // adds -g to SS_CXXFLAGS
  162. dnl # // adds g to SS_BUILD_FLAGS
  163. AC_MSG_CHECKING([if you want the debug symbols])
  164. SS_LOCAL_ADD_DEBUG_SYMBOLS=""
  165. AC_ARG_ENABLE(debug,
  166. AC_HELP_STRING([--enable-debug],[Compile an executable suitable for debugging]),
  167. [SS_LOCAL_ADD_DEBUG_SYMBOLS="true"])
  168. if test -n "$SS_LOCAL_ADD_DEBUG_SYMBOLS"; then
  169. AC_MSG_RESULT([yes])
  170. if test -n "$SS_CXXFLAGS"; then
  171. SS_CXXFLAGS="$SS_CXXFLAGS -g"
  172. else
  173. SS_CXXFLAGS="-g"
  174. fi
  175. SS_BUILD_FLAGS="g$SS_BUILD_FLAGS"
  176. else
  177. AC_MSG_RESULT([no])
  178. fi
  179. ])
  180. AC_DEFUN([AC_SS_CXXFLAGS_PIPES],
  181. [
  182. dnl # // Checks if the --with-pipes option has been passed to configure
  183. dnl # // adds -pipe to CXXFLAGS
  184. AC_MSG_CHECKING([if you want to use pipes for compilation])
  185. SS_LOCAL_USE_PIPES=""
  186. AC_ARG_ENABLE(pipes,
  187. AC_HELP_STRING([--enable-pipes],[Use pipes instead of files for the compilation]),
  188. [SS_LOCAL_USE_PIPES="true"])
  189. if test -n "$SS_LOCAL_USE_PIPES"; then
  190. AC_MSG_RESULT([yes])
  191. if test -n "$SS_CXXFLAGS"; then
  192. SS_CXXFLAGS="$SS_CXXFLAGS -pipe"
  193. else
  194. SS_CXXFLAGS="-pipe"
  195. fi
  196. else
  197. AC_MSG_RESULT([no])
  198. fi
  199. ])
  200. AC_DEFUN([AC_SS_CXXFLAGS_PROFILING],
  201. [
  202. AC_MSG_CHECKING([if you want the profiling information])
  203. SS_LOCAL_ADD_PROFILING=""
  204. AC_ARG_ENABLE(profiling,
  205. AC_HELP_STRING([--enable-profiling],[Compile an executable suitable for profiling]),
  206. [SS_LOCAL_ADD_PROFILING="true"])
  207. if test -n "$SS_LOCAL_ADD_PROFILING"; then
  208. AC_MSG_RESULT([yes])
  209. if test -n "$SS_CXXFLAGS"; then
  210. SS_CXXFLAGS="$SS_CXXFLAGS -pg"
  211. else
  212. SS_CXXFLAGS="-pg"
  213. fi
  214. if test -n "$SS_LDFLAGS"; then
  215. SS_LDFLAGS="$SS_LDFLAGS -pg"
  216. else
  217. SS_LDFLAGS="-pg"
  218. fi
  219. SS_BUILD_FLAGS="P$SS_BUILD_FLAGS"
  220. else
  221. AC_MSG_RESULT([no])
  222. fi
  223. ])
  224. AC_DEFUN([AC_SS_CXXFLAGS_FNORTTI],
  225. [
  226. AC_MSG_CHECKING([if you want to use -fno-rtti])
  227. SS_LOCAL_FNORTTI=""
  228. AC_ARG_ENABLE(fno-rtti,
  229. AC_HELP_STRING([--enable-fno-rtti],[Disable runtime type information (dangerous)]),
  230. SS_LOCAL_FNORTTI="true")
  231. if test -n "$SS_LOCAL_FNORTTI"; then
  232. AC_MSG_RESULT([yes])
  233. if test -n "$SS_CXXFLAGS"; then
  234. SS_CXXFLAGS="$SS_CXXFLAGS -fno-rtti"
  235. else
  236. SS_CXXFLAGS="-fno-rtti"
  237. fi
  238. else
  239. AC_MSG_RESULT([no])
  240. fi
  241. ])
  242. AC_DEFUN([AC_SS_CXXFLAGS_ANSI],
  243. [
  244. SS_ANSI_COMPILATION=""
  245. AC_MSG_CHECKING([if you want a strict ansi compilation])
  246. AC_ARG_ENABLE(ansi,
  247. AC_HELP_STRING([--enable-ansi],[Strict ansi compilation (might not compile)]),
  248. SS_ANSI_COMPILATION="true")
  249. if test -n "$SS_ANSI_COMPILATION"; then
  250. AC_MSG_RESULT([yes])
  251. if test -n "$SS_CXXFLAGS"; then
  252. SS_CXXFLAGS="$SS_CXXFLAGS -ansi"
  253. else
  254. SS_CXXFLAGS="-ansi"
  255. fi
  256. else
  257. AC_MSG_RESULT([no])
  258. fi
  259. ])
  260. AC_DEFUN([AC_SS_CXXFLAGS_WALL],
  261. [
  262. SS_WALL_COMPILATION=""
  263. AC_MSG_CHECKING([if you want gcc to be paranoic])
  264. AC_ARG_ENABLE(wall,
  265. AC_HELP_STRING([--enable-wall],[Make gcc be paranoic (might not compile)]),
  266. SS_WALL_COMPILATION="true")
  267. if test -n "$SS_WALL_COMPILATION"; then
  268. AC_MSG_RESULT([yes])
  269. if test -n "$SS_CXXFLAGS"; then
  270. SS_CXXFLAGS="$SS_CXXFLAGS -Wall"
  271. else
  272. SS_CXXFLAGS="-Wall"
  273. fi
  274. else
  275. AC_MSG_RESULT([no])
  276. fi
  277. ])
  278. AC_DEFUN([AC_SS_CXXFLAGS_PEDANTIC],
  279. [
  280. SS_PEDANTIC_COMPILATION=""
  281. AC_MSG_CHECKING([if you want a strict ansi compilation])
  282. AC_ARG_ENABLE(pedantic,
  283. AC_HELP_STRING([--enable-pedantic],[Pedantic compilation (might not compile)]),
  284. SS_PEDANTIC_COMPILATION="true")
  285. if test -n "$SS_PEDANTIC_COMPILATION"; then
  286. AC_MSG_RESULT([yes])
  287. if test -n "$SS_CXXFLAGS"; then
  288. SS_CXXFLAGS="$SS_CXXFLAGS -pedantic"
  289. else
  290. SS_CXXFLAGS="-pedantic"
  291. fi
  292. else
  293. AC_MSG_RESULT([no])
  294. fi
  295. ])
  296. AC_DEFUN([AC_SS_CXXFLAGS_OPTIMISATION],
  297. [
  298. AC_MSG_CHECKING([for the optimisation level])
  299. SS_LOCAL_OPTIMISATION=""
  300. AC_ARG_ENABLE(optimisation,
  301. AC_HELP_STRING([--enable-optimisation=N],[Use optimisation level N when compiling]),
  302. SS_LOCAL_OPTIMISATION="$enableval")
  303. if test -n "$SS_LOCAL_OPTIMISATION"; then
  304. AC_MSG_RESULT([using -O$SS_LOCAL_OPTIMISATION])
  305. if test -n "$SS_CXXFLAGS"; then
  306. SS_CXXFLAGS="$SS_CXXFLAGS -O$SS_LOCAL_OPTIMISATION"
  307. else
  308. SS_CXXFLAGS="-O$SS_LOCAL_OPTIMISATION"
  309. fi
  310. SS_BUILD_FLAGS="$SS_LOCAL_OPTIMISATION$SS_BUILD_FLAGS"
  311. else
  312. AC_MSG_RESULT([using no optimisation flag])
  313. fi
  314. ])
  315. AC_DEFUN([AC_SS_CXXFLAGS],
  316. [
  317. SS_CXXFLAGS=""
  318. AC_SS_CXXFLAGS_DEBUG_SYMBOLS
  319. AC_SS_CXXFLAGS_PROFILING
  320. AC_SS_CXXFLAGS_PIPES
  321. AC_SS_CXXFLAGS_OPTIMISATION
  322. AC_SS_CXXFLAGS_FNORTTI
  323. AC_SS_CXXFLAGS_ANSI
  324. AC_SS_CXXFLAGS_PEDANTIC
  325. AC_SS_CXXFLAGS_WALL
  326. if test -n "$SS_CXXFLAGS"; then
  327. if test -n "$CXXFLAGS"; then
  328. CXXFLAGS="$CXXFLAGS $SS_CXXFLAGS"
  329. else
  330. CXXFLAGS="$SS_CXXFLAGS"
  331. fi
  332. fi
  333. ])
  334. dnl ###################################################################################################################
  335. dnl ### HEADERS AND FUNCTIONS
  336. dnl ###################################################################################################################
  337. AC_DEFUN([AC_SS_HEADER_CHECKS],
  338. [
  339. SS_HAS_OSS_SUPPORT="false"
  340. AC_CHECK_HEADER(strings.h)
  341. AC_CHECK_HEADERS(linux/soundcard.h sys/soundcard.h soundcard.h,SS_HAS_OSS_SUPPORT="true")
  342. if test "$SS_HAS_OSS_SUPPORT" = "true"; then
  343. AC_DEFINE([COMPILE_OSS_SUPPORT], 1, [define if you want to enable OSS sound support])
  344. fi
  345. ])
  346. AC_DEFUN([AC_SS_FUNCTION_CHECKS],
  347. [
  348. SS_HAVE_IPV6_FUNCTIONS="true"
  349. AC_CHECK_FUNCS(getenv strerror)
  350. AC_CHECK_FUNCS(inet_ntoa inet_aton)
  351. AC_CHECK_FUNCS(setenv unsetenv putenv)
  352. AC_CHECK_FUNCS(gmtime_r localtime_r)
  353. AC_CHECK_FUNC(inet_ntop,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  354. AC_CHECK_FUNC(inet_pton,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  355. AC_CHECK_FUNC(getaddrinfo,SS_HAVE_IPV6_FUNCTIONS="true",SS_HAVE_IPV6_FUNCTIONS="false")
  356. AC_CHECK_FUNCS(getnameinfo)
  357. ])
  358. dnl ###################################################################################################################
  359. dnl ### MISC OPTIONS
  360. dnl ###################################################################################################################
  361. AC_DEFUN([AC_SS_MISC_OPTIONS],
  362. [
  363. AC_MSG_CHECKING([if you want the memory profiling])
  364. AC_ARG_WITH(memory-profile, [ --with-memory-profile Compile the memory profile],SS_COMPILE_MEMORY_PROFILE="true")
  365. if test "$SS_COMPILE_MEMORY_PROFILE" = "true"; then
  366. AC_MSG_RESULT(yes)
  367. AC_DEFINE([COMPILE_MEMORY_PROFILE], 1, [define if you want the gcc memory profile])
  368. SS_BUILD_FLAGS="m$SS_BUILD_FLAGS"
  369. else
  370. AC_MSG_RESULT(no)
  371. fi
  372. AC_MSG_CHECKING([how to waste your time])
  373. AC_MSG_RESULT(by performing senseless checks)
  374. AC_MSG_CHECKING([if you want memory checking in malloc])
  375. AC_ARG_WITH(memory-checks, [ --with-memory-checks Enable malloc memory checks],SS_COMPILE_MEMORY_CHECKS="true")
  376. if test "$SS_COMPILE_MEMORY_CHECKS" = "true"; then
  377. AC_MSG_RESULT(yes)
  378. AC_DEFINE([COMPILE_MEMORY_CHECKS], 1, [define if you want the memory checks])
  379. SS_BUILD_FLAGS="h$SS_BUILD_FLAGS"
  380. else
  381. AC_MSG_RESULT(no)
  382. fi
  383. AC_MSG_CHECKING([if you want to use system memmove])
  384. AC_ARG_WITH(system-memmove, [ --without-system-memmove Do not use system memmove and memcpy],SS_DO_NOT_USE_SYSTEM_MEMMOVE="true")
  385. if test "$SS_DO_NOT_USE_SYSTEM_MEMMOVE" = "true"; then
  386. AC_MSG_RESULT(no)
  387. else
  388. AC_DEFINE([COMPILE_WITH_SYSTEM_MEMMOVE], 1, [define if you trust your memmove() function])
  389. AC_MSG_RESULT(yes)
  390. SS_BUILD_FLAGS="s$SS_BUILD_FLAGS"
  391. fi
  392. AC_MSG_CHECKING([if you want to optimize for big channels])
  393. AC_ARG_WITH(big-channels, [ --with-big-channels Optimize for big irc channels],SS_OPTIMIZE_BIG_CHANNELS="true")
  394. if test "$SS_OPTIMIZE_BIG_CHANNELS" = "true"; then
  395. AC_MSG_RESULT(yes: using 349 as dict size)
  396. AC_DEFINE_UNQUOTED([AVERAGE_CHANNEL_USERS],349, [define this to the number of average channel users])
  397. SS_BUILD_FLAGS="b$SS_BUILD_FLAGS"
  398. else
  399. AC_MSG_RESULT(no: using 101 as dict size)
  400. AC_DEFINE_UNQUOTED([AVERAGE_CHANNEL_USERS],101, [define this to the number of average channel users])
  401. fi
  402. AC_MSG_CHECKING([if you want ix86 assembly optimisations])
  403. AC_ARG_WITH(ix86-asm, [ --with-ix86-asm Compile ix86 assembly optimisations],SS_COMPILE_ix86_ASM="true")
  404. if test "$SS_COMPILE_ix86_ASM" = "true"; then
  405. AC_MSG_RESULT(yes)
  406. AC_MSG_CHECKING(target system CPU)
  407. if test "$target_cpu" = "i386"; then
  408. AC_MSG_RESULT(i386 : compiling asm code)
  409. else
  410. if test "$target_cpu" = "i486"; then
  411. AC_MSG_RESULT(i486 : compiling asm code)
  412. else
  413. if test "$target_cpu" = "i586"; then
  414. AC_MSG_RESULT(i586 : compiling asm code)
  415. else
  416. if test "$target_cpu" = "i686"; then
  417. AC_MSG_RESULT(i686 : compiling asm code)
  418. else
  419. AC_MSG_RESULT($target_cpu , no i386 optimisations)
  420. unset SS_COMPILE_ix86_ASM
  421. fi
  422. fi
  423. fi
  424. fi
  425. if test "$SS_COMPILE_ix86_ASM" = "true"; then
  426. AC_DEFINE([COMPILE_ix86_ASM], 1, [define if you want the i386 asm code])
  427. SS_BUILD_FLAGS="x$SS_BUILD_FLAGS"
  428. fi
  429. else
  430. AC_MSG_RESULT(no)
  431. fi
  432. AC_PATH_PROG(SS_MSGFMT,msgfmt,":",$PATH:/bin:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/local/qt/bin:/usr/X11R6/qt/bin:/usr/qt/bin:/usr/build/qt/bin)
  433. if test -z "SS_MSGFMT"; then
  434. SS_MSGFMT=":"
  435. fi
  436. AC_SUBST(SS_MSGFMT)
  437. AC_MSG_CHECKING([if you want the DCC VOICE sound support])
  438. AC_ARG_WITH(dcc-sound,[ --without-dcc-sound Do not compile the DCC VOICE sound support],SS_NO_SOUND="true")
  439. if test "$SS_NO_SOUND" = "true"; then
  440. AC_MSG_RESULT(no)
  441. AC_DEFINE([COMPILE_DISABLE_DCC_VOICE], 1, [define if you want to disable DCC VOICE sound support])
  442. else
  443. AC_MSG_RESULT(yes)
  444. SS_BUILD_FLAGS="A$SS_BUILD_FLAGS"
  445. fi
  446. SS_BUILD_FLAGS="T$SS_BUILD_FLAGS"
  447. AC_DEFINE([COMPILE_INFO_TIPS], 1, [define if you want the info tips to be compiled in])
  448. AC_MSG_CHECKING([if you want to disable the ipV6 support])
  449. AC_ARG_WITH(ipv6-support,[ --without-ipv6-support Do not compile the IpV6 support],SS_NOIPV6_SUPPORT="true")
  450. if test "$SS_NOIPV6_SUPPORT" = "true"; then
  451. AC_MSG_RESULT(yes)
  452. else
  453. AC_MSG_RESULT(no)
  454. fi
  455. AC_MSG_CHECKING([if you want to disable the cryptography support])
  456. AC_ARG_WITH(crypt-support,[ --without-crypt-support Do not compile the cryptography support],SS_NOCRYPT_SUPPORT="true")
  457. if test "$SS_NOCRYPT_SUPPORT" = "true"; then
  458. AC_MSG_RESULT(yes)
  459. else
  460. AC_MSG_RESULT(no)
  461. AC_DEFINE([COMPILE_CRYPT_SUPPORT], 1, [define if you want to compile the crypt support])
  462. SS_BUILD_FLAGS="c$SS_BUILD_FLAGS"
  463. fi
  464. AC_MSG_CHECKING([if you want to disable the X bell support])
  465. AC_ARG_WITH(x-bell,[ --without-x-bell Disable the X bell support],SS_NO_X_BELL="true")
  466. if test "$SS_NO_X_BELL" = "true"; then
  467. AC_MSG_RESULT(yes)
  468. AC_DEFINE([COMPILE_NO_X_BELL], 1, [define if you want to disable the X bell support])
  469. else
  470. AC_MSG_RESULT(no)
  471. fi
  472. AC_DEFINE([COMPILE_NEW_KVS], 1, [define if you want to enable the new KVS parser])
  473. AC_DEFINE([COMPILE_ONLY_NEW_KVS], 1, [define if you want to use only the new KVS parser])
  474. AC_MSG_CHECKING([if you want to link to the embedded version of qt])
  475. AC_ARG_WITH(qt-embedded,[ --with-qt-embedded Link to qt-embedded (see INSTALL)],SS_QT3_EMBEDDED="true")
  476. if test "$SS_QT3_EMBEDDED" = "true"; then
  477. AC_MSG_RESULT(yes)
  478. SS_BUILD_FLAGS="E$SS_BUILD_FLAGS"
  479. else
  480. AC_MSG_RESULT(no)
  481. fi
  482. AC_MSG_CHECKING([if you want to disable inter-process communication])
  483. AC_ARG_WITH(ipc,[ --without-ipc Disable inter-process communication support],SS_NO_IPC="true")
  484. if test "$SS_NO_IPC" = "true"; then
  485. AC_MSG_RESULT(yes)
  486. SS_BUILD_FLAGS="I$SS_BUILD_FLAGS"
  487. AC_DEFINE([COMPILE_NO_IPC], 1, [define this if you want to disable the inter-process communication support])
  488. else
  489. AC_MSG_RESULT(no)
  490. fi
  491. AC_MSG_CHECKING([if you want to explicitly disable the gsm codec support])
  492. AC_ARG_WITH(gsm,[ --without-gsm Disable gsm codec support],SS_NO_GSM="true")
  493. if test "$SS_NO_GSM" = "true"; then
  494. AC_MSG_RESULT(yes)
  495. else
  496. AC_DEFINE([COMPILE_USE_GSM], 1, [define if you have libgsm and want the GSM code to be compiled])
  497. SS_BUILD_FLAGS="G$SS_BUILD_FLAGS"
  498. AC_MSG_RESULT(no)
  499. fi
  500. AC_MSG_CHECKING([if you want to ignore SIGALARM])
  501. AC_ARG_WITH(ignore-sigalarm, [ --with-ignore-sigalarm Ignore SIGALARM in all threads],SS_IGNORE_SIGALARM="true")
  502. if test "$SS_IGNORE_SIGALARM" = "true"; then
  503. AC_MSG_RESULT(yes)
  504. AC_DEFINE([COMPILE_IGNORE_SIGALARM], 1, [define this if you want to ignore the SIGALARM signal])
  505. SS_BUILD_FLAGS="a$SS_BUILD_FLAGS"
  506. else
  507. AC_MSG_RESULT(no)
  508. fi
  509. AC_MSG_CHECKING([if you want the pseudo-transparency support])
  510. AC_ARG_WITH(transparency, [ --without-transparency Do NOT compile the pseudo-transparency support],SS_NO_PSEUDO_TRANSPARENCY="true")
  511. if test "$SS_NO_PSEUDO_TRANSPARENCY" = "true"; then
  512. AC_MSG_RESULT(no)
  513. else
  514. AC_MSG_RESULT(yes)
  515. AC_DEFINE([COMPILE_PSEUDO_TRANSPARENCY], 1, [define if you have the KDE support and want the pseudo transparency])
  516. SS_BUILD_FLAGS="p$SS_BUILD_FLAGS"
  517. fi
  518. AC_ARG_WITH(pizza,[ --with-pizza Use this when hungry],SS_PIZZA="true")
  519. ])
  520. dnl ###################################################################################################################
  521. dnl ### DYNAMIC LABELS
  522. dnl ###################################################################################################################
  523. AC_DEFUN([AC_SS_CHECK_DYNAMIC_LABELS],
  524. [
  525. AC_MSG_CHECKING([if the compiler supports dynamic labels])
  526. AC_ARG_WITH(dyn-labels, [ --without-dyn-labels Disable usage of the dynamic label jumps],SS_DISABLE_DYNAMIC_LABELS="true")
  527. if test "$SS_DISABLE_DYNAMIC_LABELS" = "true"; then
  528. AC_MSG_RESULT("no: trusting you")
  529. else
  530. AC_TRY_RUN([
  531. int main(int argc,char ** argv)
  532. {
  533. int retVal = 10;
  534. void * label = &&action4;
  535. goto action2;
  536. action1:
  537. retVal -= 4;
  538. label = &&endofcode;
  539. goto *label;
  540. action2:
  541. retVal -= 5;
  542. goto *label;
  543. action3:
  544. retVal += 40;
  545. action4:
  546. retVal -= 1;
  547. label = &&action1;
  548. goto *label;
  549. endofcode:
  550. return retVal;
  551. }
  552. ],SS_DISABLE_DYNAMIC_LABELS="false",SS_DISABLE_DYNAMIC_LABELS="true",SS_DISABLE_DYNAMIC_LABELS="true")
  553. if test "$SS_DISABLE_DYNAMIC_LABELS" = "true"; then
  554. AC_MSG_RESULT("no")
  555. else
  556. AC_MSG_RESULT("yes")
  557. AC_DEFINE([COMPILE_USE_DYNAMIC_LABELS], 1, [define if your compiler supports gotos do dynamic labels])
  558. fi
  559. fi
  560. ])
  561. dnl ###################################################################################################################
  562. dnl ### BIG_ENDIAN
  563. dnl ###################################################################################################################
  564. AC_DEFUN([AC_SS_CHECK_BIG_ENDIAN],
  565. [
  566. AC_MSG_CHECKING([if this system is big endian])
  567. AC_TRY_RUN([
  568. int main(int argc,char ** argv)
  569. {
  570. int nl;
  571. unsigned char * nlc;
  572. nl = 0x12CAFE34;
  573. nlc = (unsigned char *)(&nl);
  574. if((nlc[0] == 0x12) && (nlc[1] == 0xCA) && (nlc[2] == 0xFE) && (nlc[3] == 0x34))return 0;
  575. return 1;
  576. }
  577. ],SS_BIG_ENDIAN_MACHINE="true",SS_BIG_ENDIAN_MACHINE="false",SS_BIG_ENDIAN_MACHINE="false")
  578. dnl # This will fail if we're cross compiling...
  579. if test "$SS_BIG_ENDIAN_MACHINE" = "true"; then
  580. AC_MSG_RESULT([yes])
  581. SS_BUILD_FLAGS="B$SS_BUILD_FLAGS"
  582. AC_DEFINE([BIG_ENDIAN_MACHINE_BYTE_ORDER], 1, [define this if you are on a big endian machine])
  583. else
  584. AC_MSG_RESULT([no])
  585. fi
  586. ])
  587. dnl ###################################################################################################################
  588. dnl ### DLOPEN
  589. dnl ###################################################################################################################
  590. AC_DEFUN([AC_SS_CHECK_DL],
  591. [
  592. AC_MSG_CHECKING([for dlopen capabilities])
  593. SS_LINK_TO_LIBDL="no"
  594. SS_SAVE_LIBS="$LIBS"
  595. LIBS="-rdynamic"
  596. AC_TRY_LINK([
  597. #include <dlfcn.h>
  598. ],[
  599. /* sparc-unknown-openbsd3.0 hack */
  600. #ifndef RTLD_NOW
  601. #define RTLD_NOW RTLD_LAZY
  602. #endif
  603. dlopen("/lib/libc.so.6",RTLD_NOW);
  604. ],
  605. eval "SS_DLOPEN_OK=yes"
  606. ,
  607. eval "SS_DLOPEN_OK=no"
  608. )
  609. LIBS="$SS_SAVE_LIBS"
  610. if test "$SS_DLOPEN_OK" = "yes"; then
  611. AC_MSG_RESULT([builtin in libc])
  612. else
  613. SS_SAVE_LIBS="$LIBS"
  614. LIBS="-rdynamic -ldl"
  615. AC_TRY_LINK([
  616. #include <dlfcn.h>
  617. ],[
  618. /* sparc-unknown-openbsd3.0 hack */
  619. #ifndef RTLD_NOW
  620. #define RTLD_NOW RTLD_LAZY
  621. #endif
  622. dlopen("/usr/lib/libdl.so",RTLD_NOW);
  623. ],
  624. eval "SS_DLOPEN_OK=yes",
  625. eval "SS_DLOPEN_OK=no"
  626. )
  627. LIBS="$SS_SAVE_LIBS"
  628. if test "$SS_DLOPEN_OK" = "yes"; then
  629. SS_LINK_TO_LIBDL="yes"
  630. AC_MSG_RESULT([external in libdl])
  631. else
  632. AC_MSG_RESULT([FAILED])
  633. AC_SS_SET_REDINK
  634. echo "################################################################################"
  635. echo "### CONFIGURE ERROR:"
  636. echo "### No dlopen capabilities found."
  637. echo "### It looks that your system has no interface to the dynamic linker ?"
  638. echo "### If you're on linux, you either miss libdl , or the linker is not"
  639. echo "### able to find it. Make sure that libdl is in /lib or /usr/lib."
  640. echo "### If you're sure you have libdl, make sure you have also g++ installed."
  641. echo "### If you're not on linux, please drop a mail to pragma at kvirc dot net"
  642. echo "### describing your system and I'll try to fix it."
  643. echo "################################################################################"
  644. AC_SS_SET_NORMALINK
  645. AC_MSG_ERROR(["This was fatal...aborting"])
  646. fi
  647. fi
  648. ])
  649. dnl ###################################################################################################################
  650. dnl ### PERL
  651. dnl ###################################################################################################################
  652. AC_DEFUN([AC_SS_CHECK_PERL],
  653. [
  654. SS_PERL_ENABLE="yes"
  655. SS_PERL_CCFLAGS=""
  656. SS_PERL_LDFLAGS=""
  657. SS_PERL_BINARY="true"
  658. SS_PERL_RESULT_MESSAGE=""
  659. AC_ARG_ENABLE(perl,AC_HELP_STRING([--enable-perl],[Enable perl scripting support (default=detect)]),eval "SS_PERL_ENABLE=$enableval")
  660. if test "$SS_PERL_ENABLE" = "yes"; then
  661. AC_PATH_PROG(SS_PERL_BINARY,perl,":",$PATH:/bin:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/local/qt/bin:/usr/X11R6/qt/bin:/usr/qt/bin:/usr/build/qt/bin)
  662. if test -z "SS_PERL_BINARY"; then
  663. SS_PERL_RESULT_MESSAGE="disabled: can't find the perl binary"
  664. SS_PERL_ENABLE="no"
  665. SS_PERL_BINARY="true"
  666. fi
  667. else
  668. SS_PERL_RESULT_MESSAGE="disabled by user"
  669. fi
  670. if test "$SS_PERL_ENABLE" = "yes"; then
  671. AC_MSG_CHECKING([if perl il compiled with MULTIPLICITY option])
  672. SS_PERL_TEMP=$($SS_PERL_BINARY -V | grep MULTIPLICITY)
  673. if test -z "$SS_PERL_TEMP"; then
  674. AC_MSG_RESULT([no])
  675. SS_PERL_ENABLE="no"
  676. SS_PERL_BINARY="true"
  677. SS_PERL_RESULT_MESSAGE="disabled: MULTIPLICITY not defined"
  678. fi
  679. fi
  680. if test "$SS_PERL_ENABLE" = "yes"; then
  681. AC_MSG_CHECKING([for the system perl directory])
  682. SS_PERL_DIR=$($SS_PERL_BINARY -MConfig -e 'print $Config{archlib}')
  683. SS_PERL_DIR="$SS_PERL_DIR/CORE"
  684. AC_MSG_RESULT([got $SS_PERL_DIR])
  685. AC_MSG_CHECKING([for the perl ccflags])
  686. SS_PERL_CCFLAGS=$($SS_PERL_BINARY -MConfig -e 'print $Config{ccflags}')
  687. AC_MSG_RESULT([got $SS_PERL_CCFLAGS])
  688. AC_MSG_CHECKING([for the perl ldflags])
  689. SS_PERL_LDFLAGS=$($SS_PERL_BINARY -MExtUtils::Embed -e ldopts)
  690. AC_MSG_RESULT([got $SS_PERL_LDFLAGS])
  691. AC_MSG_CHECKING([if we can compile a perl application])
  692. SS_SAVED_LIBS="$LIBS"
  693. SS_SAVED_CFLAGS="$CFLAGS"
  694. SS_SAVED_CCFLAGS="$CCFLAGS"
  695. SS_SAVED_LDFLAGS="$LDFLAGS"
  696. SS_SAVED_CXXFLAGS="$CXXFLAGS"
  697. SS_SAVED_CPPFLAGS="$CPPFLAGS"
  698. LIBS="$SS_PERL_LDFLAGS"
  699. LDFLAGS="$LIBS"
  700. CFLAGS="$SS_PERL_CCFLAGS -I$SS_PERL_DIR"
  701. CCFLAGS="$CFLAGS"
  702. CXXFLAGS="$CFLAGS"
  703. CPPFLAGS="$CFLAGS"
  704. AC_TRY_LINK([
  705. #include <EXTERN.h>
  706. #include <perl.h>
  707. #include <XSUB.h>
  708. extern "C" void boot_DynaLoader(pTHX_ CV* cv);
  709. extern "C" void xs_init(pTHX)
  710. {
  711. char * file = __FILE__;
  712. newXS("DynaLoader::boot_DynaLoader",boot_DynaLoader,file);
  713. }
  714. ],[
  715. PerlInterpreter *my_perl;
  716. my_perl = perl_alloc();
  717. perl_construct(my_perl);
  718. perl_parse(my_perl,xs_init, 0, 0, (char **)NULL);
  719. perl_run(my_perl);
  720. perl_destruct(my_perl);
  721. perl_free(my_perl);
  722. ],
  723. eval "SS_PERL_ENABLE=yes",
  724. eval "SS_PERL_ENABLE=no"
  725. )
  726. SS_PERL_LDFLAGS="$LDFLAGS"
  727. SS_PERL_CCFLAGS="$CCFLAGS"
  728. LIBS="$SS_SAVED_LIBS"
  729. CFLAGS="$SS_SAVED_CFLAGS"
  730. LDFLAGS="$SS_SAVED_LDFLAGS"
  731. CXXFLAGS="$SS_SAVED_CXXFLAGS"
  732. CPPFLAGS="$SS_SAVED_CPPFLAGS"
  733. CCFLAGS="$SS_SAVED_CCFLAGS"
  734. if test "$SS_PERL_ENABLE" = "yes"; then
  735. AC_MSG_RESULT([seems ok])
  736. AC_DEFINE([COMPILE_PERL_SUPPORT], 1, [define if you have perl and want the perl scripting support in kvirc])
  737. SS_BUILD_FLAGS="p$SS_BUILD_FLAGS"
  738. SS_PERL_RESULT_MESSAGE="enabled"
  739. else
  740. AC_MSG_RESULT([seems broken])
  741. SS_PERL_RESULT_MESSAGE="disabled: failed to compile the test program"
  742. SS_PERL_LDFLAGS=""
  743. SS_PERL_CCFLAGS=""
  744. fi
  745. fi
  746. AC_SUBST(SS_PERL_CCFLAGS)
  747. AC_SUBST(SS_PERL_LDFLAGS)
  748. AC_SUBST(SS_PERL_BINARY)
  749. AC_MSG_CHECKING([for perl scripting support])
  750. AC_MSG_RESULT([$SS_PERL_RESULT_MESSAGE])
  751. ])
  752. dnl ###################################################################################################################
  753. dnl ### OPENSSL
  754. dnl ###################################################################################################################
  755. AC_DEFUN([AC_SS_CHECK_OPENSSL],
  756. [
  757. SS_LINK_TO_LIBSSL="false"
  758. SS_SSL_RESULT_MESSAGE=""
  759. SS_ENABLE_SSL_SUPPORT="yes"
  760. AC_ARG_ENABLE(ssl,AC_HELP_STRING([--disable-ssl],[Disable OpenSSL support]),eval "SS_ENABLE_SSL_SUPPORT=$enableval")
  761. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  762. AC_MSG_CHECKING([If we can compile and link a small SSL test application])
  763. SS_SAVED_LIBS="$LIBS"
  764. LIBS="-lcrypto -lssl"
  765. AC_TRY_LINK([
  766. #include <openssl/ssl.h>
  767. ],[
  768. SSL_new(0);
  769. ],
  770. eval "SS_ENABLE_SSL_SUPPORT=yes",
  771. eval "SS_ENABLE_SSL_SUPPORT=no"
  772. )
  773. LIBS="$SS_SAVED_LIBS"
  774. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  775. AC_MSG_RESULT([yes])
  776. AC_CHECK_HEADER(openssl/ssl.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  777. AC_CHECK_HEADER(openssl/err.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  778. AC_CHECK_HEADER(openssl/asn1.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  779. AC_CHECK_HEADER(openssl/evp.h,SS_DUMMY="yes",SS_ENABLE_SSL_SUPPORT="no")
  780. if test "$SS_ENABLE_SSL_SUPPORT" = "yes"; then
  781. AC_DEFINE([COMPILE_SSL_SUPPORT], 1, [define if you have openssl and want the ssl support in kvirc])
  782. SS_LINK_TO_LIBSSL="true"
  783. SS_BUILD_FLAGS="o$SS_BUILD_FLAGS"
  784. SS_SSL_RESULT_MESSAGE="enabled"
  785. else
  786. SS_SSL_RESULT_MESSAGE="disabled: missing header files"
  787. fi
  788. else
  789. AC_MSG_RESULT([no])
  790. SS_SSL_RESULT_MESSAGE="disabled: failed to compile the test program"
  791. fi
  792. else
  793. SS_SSL_RESULT_MESSAGE="disabled by user"
  794. fi
  795. AC_MSG_CHECKING([for secure connections support])
  796. AC_MSG_RESULT([$SS_SSL_RESULT_MESSAGE])
  797. ])
  798. dnl ###################################################################################################################
  799. dnl ### ESD
  800. dnl ###################################################################################################################
  801. AC_DEFUN([AC_SS_CHECK_ESD],
  802. [
  803. SS_LINK_TO_LIBESD="false"
  804. SS_DISABLE_ESD_SUPPORT="true"
  805. SS_SAVED_LIBS=$LIBS
  806. LIBS="$LIBS -lesd"
  807. AC_CHECK_LIB(esd,esd_play_file,SS_DISABLE_ESD_SUPPORT="false")
  808. LIBS="$SS_SAVED_LIBS"
  809. if test "$SS_DISABLE_ESD_SUPPORT" = "false"; then
  810. SS_DISABLE_ESD_SUPPORT="true"
  811. AC_CHECK_HEADER(esd.h,SS_DISABLE_ESD_SUPPORT="false")
  812. fi
  813. AC_MSG_CHECKING([for Esound daemon support])
  814. AC_ARG_WITH(esd-support, [ --without-esd-support Disable Esound daemon support],SS_DISABLE_ESD_SUPPORT="true")
  815. if test "$SS_DISABLE_ESD_SUPPORT" = "true"; then
  816. AC_MSG_RESULT(disabled by user)
  817. else
  818. AC_MSG_RESULT(yes: have libs and headers)
  819. AC_DEFINE([COMPILE_ESD_SUPPORT], 1, [define if you want to enable the Esound daemon support])
  820. SS_LINK_TO_LIBESD="true"
  821. SS_BUILD_FLAGS="e$SS_BUILD_FLAGS"
  822. fi
  823. ])
  824. dnl ###################################################################################################################
  825. dnl ### ZLIB
  826. dnl ###################################################################################################################
  827. AC_DEFUN([AC_SS_CHECK_ZLIB],
  828. [
  829. SS_LINK_TO_LIBZLIB="no"
  830. SS_DISABLE_ZLIB_SUPPORT="true"
  831. SS_SAVED_LIBS=$LIBS
  832. LIBS="$LIBS -lz"
  833. AC_CHECK_LIB(z,gzopen,SS_DISABLE_ZLIB_SUPPORT="false")
  834. LIBS="$SS_SAVED_LIBS"
  835. if test "$SS_DISABLE_ZLIB_SUPPORT" = "false"; then
  836. SS_DISABLE_ZLIB_SUPPORT="true"
  837. AC_CHECK_HEADER(zlib.h,SS_DISABLE_ZLIB_SUPPORT="false")
  838. fi
  839. AC_MSG_CHECKING([for GZip support])
  840. AC_ARG_WITH(zlib-support, [ --without-zlib-support Disable ZLIB support],SS_DISABLE_ZLIB_SUPPORT="true")
  841. if test "$SS_DISABLE_ZLIB_SUPPORT" = "true"; then
  842. AC_MSG_RESULT(disabled by user)
  843. else
  844. AC_MSG_RESULT(yes: have libs and headers)
  845. AC_DEFINE([COMPILE_ZLIB_SUPPORT], 1, [define if you want to enable the ZLib library support])
  846. SS_LINK_TO_LIBZ="yes"
  847. SS_BUILD_FLAGS="Z$SS_BUILD_FLAGS"
  848. fi
  849. ])
  850. dnl ###################################################################################################################
  851. dnl ### XSS
  852. dnl ###################################################################################################################
  853. AC_DEFUN([AC_SS_CHECK_XSS],
  854. [
  855. SS_LINK_TO_XSS="no"
  856. SS_COMPILE_XSS_SUPPORT="false"
  857. SS_SAVED_LIBS=$LIBS
  858. LIBS="$LIBS -lXss"
  859. AC_CHECK_LIB(Xss,XScreenSaverAllocInfo,SS_COMPILE_XSS_SUPPORT="true")
  860. LIBS="$SS_SAVED_LIBS"
  861. AC_MSG_CHECKING([for Xss support])
  862. if test "$SS_COMPILE_XSS_SUPPORT" = "false"; then
  863. AC_MSG_RESULT(disabled)
  864. else
  865. AC_MSG_RESULT(yes: lib is ok)
  866. AC_DEFINE([COMPILE_XSS_SUPPORT], 1, [define if you want to enable the ZLib library support])
  867. SS_LINK_TO_XSS="yes"
  868. SS_BUILD_FLAGS="$SS_BUILD_FLAGS"
  869. fi
  870. ])
  871. dnl ###################################################################################################################
  872. dnl ### Audiofile library
  873. dnl ###################################################################################################################
  874. AC_DEFUN([AC_SS_CHECK_AUDIOFILE],
  875. [
  876. SS_LINK_TO_LIBAUDIOFILE="false"
  877. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  878. SS_SAVED_LIBS=$LIBS
  879. LIBS="$LIBS -laudiofile"
  880. AC_CHECK_LIB(audiofile,afOpenFile,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  881. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "false"; then
  882. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  883. AC_CHECK_LIB(audiofile,afGetVirtualFrameSize,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  884. fi
  885. LIBS="$SS_SAVED_LIBS"
  886. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "false"; then
  887. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  888. AC_CHECK_HEADER(audiofile.h,SS_DISABLE_AUDIOFILE_SUPPORT="false")
  889. fi
  890. AC_MSG_CHECKING([for audiofile support])
  891. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "true"; then
  892. AC_MSG_RESULT(missing header or libs or wrong version)
  893. else
  894. if test "$SS_HAS_OSS_SUPPORT" = "false"; then
  895. SS_DISABLE_AUDIOFILE_SUPPORT="true"
  896. AC_MSG_RESULT(no oss support at all)
  897. else
  898. AC_ARG_WITH(af-support, [ --without-af-support Disable Audiofile library for playing files to OSS support], SS_DISABLE_AUDIOFILE_SUPPORT="true")
  899. if test "$SS_DISABLE_AUDIOFILE_SUPPORT" = "true"; then
  900. AC_MSG_RESULT(disabled by user)
  901. else
  902. AC_MSG_RESULT(yes: have libs and headers)
  903. AC_DEFINE([COMPILE_AUDIOFILE_SUPPORT], 1, [define if you want to enable the Audiofile library support])
  904. SS_LINK_TO_LIBAUDIOFILE="true"
  905. SS_BUILD_FLAGS="f$SS_BUILD_FLAGS"
  906. fi
  907. fi
  908. fi
  909. ])
  910. dnl ###################################################################################################################
  911. dnl ### ARTS
  912. dnl ###################################################################################################################
  913. AC_DEFUN([AC_SS_CHECK_ARTS],
  914. [
  915. SS_LINK_TO_LIBARTS="false"
  916. SS_DISABLE_ARTS_SUPPORT="false"
  917. AC_MSG_CHECKING([if Arts support is requested])
  918. AC_ARG_WITH(arts-support, [ --without-arts-support Disable Arts daemon support],SS_DISABLE_ARTS_SUPPORT="true")
  919. if test "$SS_KDE_REQUESTED" = "yes"; then
  920. if test "$SS_DISABLE_ARTS_SUPPORT" = "true"; then
  921. AC_MSG_RESULT(disabled by user)
  922. else
  923. AC_MSG_RESULT([yes])
  924. AC_MSG_CHECKING(if we can compile a simple Arts application)
  925. AC_LANG_CPLUSPLUS
  926. ss_save_CPPFLAGS="$CPPFLAGS"
  927. ss_save_CXXFLAGS="$CXXFLAGS"
  928. ss_save_LDFLAGS="$LDFLAGS"
  929. ss_save_LIBS="$LIBS"
  930. CPPFLAGS="-I$SS_X_INCDIR -I$SS_QT3_INCDIR -I$SS_KDE_INCDIR $CPPFLAGS $X_CFLAGS"
  931. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  932. LIBS="-L$SS_KDE_LIBDIR -L$SS_X_LIBDIR $SS_X_LDFLAGS $SS_X_LIBLINK -L$SS_QT3_LIBDIR $LIBS -lsoundserver_idl -ltdecore -l$SS_QTLIB_NAME -Wl,-rpath $SS_KDE_LIBDIR"
  933. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  934. LIBS="$LIBS -ldl";
  935. fi
  936. LDFLAGS="-s $LDFLAGS"
  937. AC_TRY_LINK([
  938. #include <arts/soundserver.h>
  939. ],[
  940. Arts::Dispatcher * d = new Arts::Dispatcher();
  941. Arts::SimpleSoundServer *server = new Arts::SimpleSoundServer(Arts::Reference("global:Arts_SimpleSoundServer"));
  942. ],
  943. SS_ARTS_LINKED_OK="TRUE",
  944. SS_ARTS_LINKED_OK="FALSE"
  945. )
  946. if test "$SS_ARTS_LINKED_OK" = "FALSE"; then
  947. AC_MSG_RESULT(failed)
  948. else
  949. AC_MSG_RESULT(success)
  950. AC_DEFINE([COMPILE_ARTS_SUPPORT], 1, [define if you want to enable the Arts daemon support])
  951. SS_LINK_TO_LIBARTS="true"
  952. SS_BUILD_FLAGS="r$SS_BUILD_FLAGS"
  953. fi
  954. LIBS="$ss_save_LIBS"
  955. LDFLAGS="$ss_save_LDFLAGS"
  956. CXXFLAGS="$ss_save_CXXFLAGS"
  957. CPPFLAGS="$ss_save_CPPFLAGS"
  958. fi
  959. else
  960. SS_DISABLE_ARTS_SUPPORT="true"
  961. AC_MSG_RESULT([no KDE so no Arts])
  962. fi
  963. ])
  964. dnl ###################################################################################################################
  965. dnl ### INTERFACE ADDRESS STUFF
  966. dnl ###################################################################################################################
  967. AC_DEFUN([AC_SS_CHECK_IFADDR_STUFF],
  968. [
  969. AC_MSG_CHECKING([if we can get interface addresses])
  970. AC_TRY_LINK([
  971. #include <stdio.h>
  972. #include <sys/ioctl.h>
  973. #include <net/if.h>
  974. #include <netinet/in.h>
  975. #include <arpa/inet.h>
  976. #include <string.h>
  977. ],[
  978. struct ifreq ifr;
  979. int ret;
  980. struct sockaddr * sa;
  981. ret = IFNAMSIZ;
  982. ret = ioctl(ret,SIOCGIFADDR,&ifr);
  983. if(ifr.ifr_name != 0)sa = (struct sockaddr *)&(ifr.ifr_addr);
  984. ],
  985. eval "SS_DISABLE_IFADDR=false"
  986. ,
  987. eval "SS_DISABLE_IFADDR=true"
  988. )
  989. if test "$SS_DISABLE_IFADDR" = "true"; then
  990. AC_MSG_RESULT("no")
  991. else
  992. AC_MSG_RESULT("yes")
  993. AC_DEFINE([COMPILE_GET_INTERFACE_ADDRESS], 1, [define if you have the SIOCGIFADDR ioctl and the related headers])
  994. fi
  995. ])
  996. dnl ###################################################################################################################
  997. dnl ### PTHREAD
  998. dnl ###################################################################################################################
  999. AC_DEFUN([AC_SS_CHECK_THREAD_STUFF],
  1000. [
  1001. SS_THREAD_LIBLINK=""
  1002. AC_MSG_CHECKING([if you want to use the solaris lthread])
  1003. SS_DO_IT="false"
  1004. AC_ARG_WITH(solaris-lthread, [ --with-solaris-lthread Use the Solaris native libthread],SS_DO_IT="true")
  1005. if test "$SS_DO_IT" = "true"; then
  1006. AC_MSG_RESULT(yes)
  1007. SS_THREAD_LIBLINK="-lthread"
  1008. AC_DEFINE([COMPILE_THREADS_USE_SOLARIS_LIBTHREAD], 1, [define if you want to use the solaris libthread])
  1009. else
  1010. AC_MSG_RESULT(no)
  1011. AC_MSG_CHECKING([if you want to use freebsd native pthread support])
  1012. SS_DO_IT="false"
  1013. AC_ARG_WITH(freebsd-pthread, [ --with-freebsd-pthread Use the FreeBSD native libc_r for threading],SS_DO_IT="true")
  1014. if test "$SS_DO_IT" = "true"; then
  1015. AC_MSG_RESULT(yes)
  1016. SS_THREAD_LIBLINK="-pthread"
  1017. AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
  1018. else
  1019. AC_MSG_RESULT(no..using lpthread)
  1020. SS_THREAD_LIBLINK="-lpthread"
  1021. AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
  1022. fi
  1023. AC_MSG_CHECKING([if your pthread implementation works])
  1024. SS_DO_IT="false"
  1025. AC_ARG_WITH(no-pthread-check, [ --with-no-pthread-check Do not check if pthreads stuff compiles],SS_DO_IT="true")
  1026. if test "$SS_DO_IT" = "true"; then
  1027. AC_MSG_RESULT(yes, trusting you)
  1028. else
  1029. SS_SAVE_LIBS="$LIBS"
  1030. LIBS="$SS_THREAD_LIBLINK"
  1031. AC_TRY_LINK([
  1032. #include <pthread.h>
  1033. ],[
  1034. pthread_mutex_lock(0);
  1035. ],
  1036. eval "SS_PTHREAD_OK=yes"
  1037. ,
  1038. eval "SS_PTHREAD_OK=no"
  1039. )
  1040. LIBS="$SS_SAVE_LIBS"
  1041. if test "$SS_PTHREAD_OK" = "yes"; then
  1042. AC_MSG_RESULT(yes, it seems to)
  1043. else
  1044. AC_MSG_RESULT(["FAILED"])
  1045. AC_SS_SET_REDINK
  1046. if test "$SS_THREAD_LIBLINK" = "-pthread"; then
  1047. echo "################################################################################"
  1048. echo "### CONFIGURE ERROR:"
  1049. echo "### Failed to compile the pthread test program."
  1050. echo "### You have specified to use the native FreeBSD libc_r for threading"
  1051. echo "### but it looks that this does not work."
  1052. echo "### Make sure that you have libc_r floating around your system"
  1053. echo "### and that the -pthread special gcc flag works."
  1054. echo "### (You need to use the native FreeBSD gcc compiler for this to work)"
  1055. echo "################################################################################"
  1056. else
  1057. echo "################################################################################"
  1058. echo "### CONFIGURE ERROR:"
  1059. echo "### Failed to compile the pthread test program."
  1060. echo "### It looks that you either don't have libpthread installed or"
  1061. echo "### it is not reachable by the linker."
  1062. echo "### Make sure that libpthread is in /lib or /usr/lib."
  1063. echo "### If you're on solaris you might try the --with-solaris-lthread"
  1064. echo "### configure option. If you're on FreeBSD you should use"
  1065. echo "### --with-freebsd-pthread."
  1066. echo "### Good luck :)"
  1067. echo "################################################################################"
  1068. fi
  1069. AC_SS_SET_NORMALINK
  1070. AC_MSG_ERROR(["This was fatal...aborting"])
  1071. fi
  1072. fi
  1073. fi
  1074. ])
  1075. dnl ###################################################################################################################
  1076. dnl ### X
  1077. dnl ###################################################################################################################
  1078. AC_DEFUN([AC_SS_FIND_X],
  1079. [
  1080. SS_DISABLE_X_SUPPORT="false"
  1081. AC_MSG_CHECKING([if you want to ignore X at all])
  1082. AC_ARG_ENABLE(x-support, [ --disable-x-support Ignore X Windows completely],SS_DISABLE_X_SUPPORT="true")
  1083. if test $SS_DISABLE_X_SUPPORT = "true"; then
  1084. AC_DEFINE([COMPILE_NO_X], 1, [define if you want to ignore X Windows completely])
  1085. SS_X_INCDIR="/usr/include"
  1086. SS_X_LIBDIR="/usr/lib"
  1087. SS_X_LDFLAGS=""
  1088. SS_X_CPPFLAGS=""
  1089. SS_X_LIBLINK=""
  1090. AC_MSG_RESULT(yes)
  1091. else
  1092. AC_MSG_RESULT(no, proceeding with checks)
  1093. AC_PATH_XTRA
  1094. if test -n "$no_x"; then
  1095. AC_SS_SET_REDINK
  1096. echo "################################################################################"
  1097. echo "### CONFIGURE ERROR:"
  1098. echo "### Can not find the X libraries."
  1099. echo "### Make sure that X is installed on your system and try to run configure again,"
  1100. echo "### this time passing the --x-includes and --x-libraries options."
  1101. echo "### You may also take a look at the config.log file in this directory,"
  1102. echo "### that will tell you which checks have failed and maybe more about the"
  1103. echo "### reason of the failure."
  1104. echo "###"
  1105. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1106. echo "### you may try to rerun configure with --disable-x-support"
  1107. echo "################################################################################"
  1108. AC_SS_SET_NORMALINK
  1109. AC_MSG_ERROR([This was a fatal one...aborting])
  1110. else
  1111. # Set the X include and lib dir
  1112. SS_X_INCDIR="$x_includes"
  1113. SS_X_LIBDIR="$x_libraries"
  1114. SS_X_LIBLINK="-lX11 -lXext"
  1115. if test -z "$SS_X_INCDIR"; then
  1116. # Ops... X headers not found ?
  1117. AC_TRY_COMPILE([
  1118. #include <X11/Xlib.h>
  1119. ],[
  1120. Display * d = XOpenDisplay(0);
  1121. XCloseDisplay(d);
  1122. ],
  1123. eval "ss_x_incdir_found=yes"
  1124. ,
  1125. eval "ss_x_incdir_found=no"
  1126. )
  1127. if test "$ss_x_incdir_found" = "no"; then
  1128. AC_SS_SET_REDINK
  1129. echo "################################################################################"
  1130. echo "### CONFIGURE ERROR:"
  1131. echo "### Can not find the X headers."
  1132. echo "### Possible reasons:"
  1133. echo "### 1) You miss the X server development files (Xlib.h for example)"
  1134. echo "###"
  1135. echo "### 2) Autoconf/Automake wasn't able to find the headers"
  1136. echo "### for some ugly reason."
  1137. echo "###"
  1138. echo "### You might try looking for a file named Xlib.h in your hard-drive"
  1139. echo "### and try passing the --x-includes option to ./configure"
  1140. echo "### Remember that if you find Xlib.h in /somepath/include/X11/Xlib.h"
  1141. echo "### Then you must pass --x-includes=/somepath/include to ./configure"
  1142. echo "### For example, my Xlib.h is in /usr/X11R6/include/X11/Xlib.h"
  1143. echo "### then i would try: ./configure --x-includes=/usr/X11R6/include"
  1144. echo "### If you can't find Xlib.h on your hard drive then install the X-devel"
  1145. echo "### package from your distribution."
  1146. echo "### If Xlib.h is there and --x-includes doesn't help, well , there is something"
  1147. echo "### wrong with X , autoconf or automake."
  1148. echo "### You may also take a look at the config.log file in this directory,"
  1149. echo "### that will tell you which checks have failed and maybe more about the"
  1150. echo "### reason of the failure."
  1151. echo "###"
  1152. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1153. echo "### you may try to rerun configure with --disable-x-support"
  1154. echo "################################################################################"
  1155. AC_SS_SET_NORMALINK
  1156. AC_MSG_ERROR([This was a fatal one...aborting])
  1157. else
  1158. # We can compile X programs without any additional path... use a dummy include path then
  1159. # Should we print a warning ?
  1160. SS_X_INCDIR="/usr/include"
  1161. fi
  1162. fi
  1163. if test -z "$SS_X_LIBDIR"; then
  1164. # Ops... X libs not found ?
  1165. SS_SAVE_LIBS="$LIBS"
  1166. SS_SAVE_CFLAGS="$CFLAGS"
  1167. SS_SAVE_CPPFLAGS="$CPPFLAGS"
  1168. SS_SAVE_CXXFLAGS="$CXXFLAGS"
  1169. CFLAGS="-I$SS_X_INCDIR"
  1170. CPPFLAGS="$CFLAGS"
  1171. CXXFLAGS="$CFLAGS"
  1172. LIBS="$SS_X_LIBLINK"
  1173. AC_TRY_LINK([
  1174. #include <X11/Xlib.h>
  1175. ],[
  1176. Display * d = XOpenDisplay(0);
  1177. XCloseDisplay(d);
  1178. ],
  1179. eval "ss_x_libdir_found=yes"
  1180. ,
  1181. eval "ss_x_libdir_found=no"
  1182. )
  1183. LIBS="$SS_SAVE_LIBS"
  1184. CFLAGS="$SS_SAVE_CFLAGS"
  1185. CPPFLAGS="$SS_SAVE_CPPFLAGS"
  1186. CXXFLAGS="$SS_SAVE_CXXFLAGS"
  1187. if test "$ss_x_libdir_found" = "no"; then
  1188. AC_SS_SET_REDINK
  1189. echo "################################################################################"
  1190. echo "### CONFIGURE ERROR:"
  1191. echo "### Can not find the X libraries."
  1192. echo "### Possible reasons:"
  1193. echo "### 1) You have no X server : KVIrc can't run on this system"
  1194. echo "###"
  1195. echo "### 2) Autoconf/Automake wasn't able to find the libraries"
  1196. echo "### for some ugly reason."
  1197. echo "###"
  1198. echo "### You might try looking for a file named libX11.so in your hard-drive"
  1199. echo "### and try passing the --x-libraries option to ./configure"
  1200. echo "### Remember that if you find libX11.so in /somepath/lib/libX11.so"
  1201. echo "### Then you must pass --x-libraries=/somepath/lib to ./configure"
  1202. echo "### For example, my libX11.so is in /usr/X11R6/lib/libX11.so"
  1203. echo "### then i would try: ./configure --x-libraries=/usr/X11R6/lib"
  1204. echo "### If you can't find libX11.so on your hard drive then install the X server"
  1205. echo "### package from your distribution."
  1206. echo "### If libX11.so is there and --x-libraries doesn't help, well , there is something"
  1207. echo "### wrong with X , autoconf or automake."
  1208. echo "### You may also take a look at the config.log file in this directory,"
  1209. echo "### that will tell you which checks have failed and maybe more about the"
  1210. echo "### reason of the failure."
  1211. echo "###"
  1212. echo "### If you use an environment that does not require X support such as Qt-Mac"
  1213. echo "### you may try to rerun configure with --disable-x-support"
  1214. echo "################################################################################"
  1215. AC_SS_SET_NORMALINK
  1216. AC_MSG_ERROR([This was a fatal one...aborting])
  1217. else
  1218. # We can link X programs without any additional path... use a dummy lib path then
  1219. # Should we print a warning ?
  1220. SS_X_LIBDIR="/usr/lib"
  1221. fi
  1222. fi
  1223. # Add any extra libs needed
  1224. SS_X_LDFLAGS=""
  1225. if test -n "$X_PRE_LIBS"; then
  1226. SS_X_LDFLAGS="$X_PRE_LIBS $SS_X_LDFLAGS"
  1227. fi
  1228. if test -n "$X_EXTRA_LIBS"; then
  1229. SS_X_LDFLAGS="$SS_X_LDFLAGS $X_EXTRA_LIBS"
  1230. fi
  1231. if test -n "$X_LIBS"; then
  1232. SS_X_LDFLAGS="$SS_X_LDFLAGS $X_LIBS"
  1233. fi
  1234. # Add any extra gcc flags
  1235. SS_X_CPPFLAGS=$X_CFLAGS
  1236. fi
  1237. fi
  1238. ])
  1239. dnl ###################################################################################################################
  1240. dnl ### QT
  1241. dnl ###################################################################################################################
  1242. AC_DEFUN([AC_SS_FIND_QT],
  1243. [
  1244. AC_ARG_ENABLE(qt-check,
  1245. AC_HELP_STRING([--disable-qt-check],[Do not check if Qt and X compile]),
  1246. SS_CHECK_QTX_COMPILE="$withval",SS_CHECK_QTX_COMPILE="NOTGIVEN")
  1247. AC_ARG_ENABLE(qt4,
  1248. AC_HELP_STRING([--enable-qt4],[Enable WORK IN PROGRESS Qt4 support]),
  1249. SS_USE_QT4="$withval",SS_USE_QT4="no")
  1250. if test "$SS_USE_QT4" = "no"; then
  1251. AC_SS_FIND_QT3_NAME
  1252. AC_SS_FIND_QT3_GENERAL_DIR
  1253. AC_SS_FIND_QT3_LIBRARY_DIR
  1254. AC_SS_FIND_QT3_INCLUDE_DIR
  1255. AC_SS_FIND_QT3_MOC
  1256. AC_SS_FIND_QT3_MT
  1257. if test "$SS_CHECK_QTX_COMPILE" = "NOTGIVEN"; then
  1258. AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3
  1259. fi
  1260. else
  1261. AC_SS_FIND_QT4_GENERAL_DIR
  1262. AC_SS_FIND_QT4_LIBRARY_DIR
  1263. AC_SS_FIND_QT4_INCLUDE_DIR
  1264. AC_SS_FIND_QT4_MOC
  1265. if test "$SS_CHECK_QTX_COMPILE" = "NOTGIVEN"; then
  1266. AC_SS_ENSURE_CAN_COMPILE_X_AND_QT4
  1267. fi
  1268. fi
  1269. ])
  1270. AC_DEFUN([AC_SS_FIND_QT3_NAME],
  1271. [
  1272. AC_MSG_CHECKING([for the Qt library name])
  1273. AC_ARG_WITH(qt-name,[ --with-qt-name=NAME Use NAME instead of \"qt\" as Qt library name],SS_QTLIB_NAME="$withval",SS_QTLIB_NAME="qt")
  1274. AC_MSG_RESULT("$SS_QTLIB_NAME")
  1275. ])
  1276. AC_DEFUN([AC_SS_FIND_QT3_GENERAL_DIR],
  1277. [
  1278. AC_MSG_CHECKING([for the general Qt3.x directory])
  1279. ss_qt_general_test_dirs="/usr/local /usr /usr/X11R6 /usr/lib /opt /opt/kde /kde /usr/kde /usr/build /usr/src /usr/local/lib /"
  1280. ss_qt_general_test_dirs="$ss_qt_general_test_dirs /usr/local/kde /usr/opt/kde"
  1281. if test -n "$HOME"; then
  1282. ss_qt_general_test_dirs="$ss_qt_general_test_dirs $HOME $HOME/lib"
  1283. fi
  1284. if test -n "$QTDIR"; then
  1285. ss_qt_general_test_dirs="$QTDIR $ss_qt_general_test_dirs"
  1286. fi
  1287. ss_qt_general_test_path_suffix="qt$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1288. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1289. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED$SS_QT3_PATCH_LEVEL_REQUIRED"
  1290. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1291. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED$SS_QT3_PATCH_LEVEL_REQUIRED"
  1292. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1293. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1294. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED"
  1295. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1296. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED$SS_QT3_MINOR_VERSION_REQUIRED"
  1297. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1298. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1299. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT3_MAJOR_VERSION_REQUIRED"
  1300. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix lib"
  1301. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt ."
  1302. AC_SS_FIND_FILE_PATH_EXT($SS_TQT3_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT3_GENERAL_DIR)
  1303. if test "$SS_QT3_GENERAL_DIR" = "FAILED"; then
  1304. AC_SS_FIND_FILE_PATH_EXT($SS_QT3_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT3_GENERAL_DIR)
  1305. if test "$SS_QT3_GENERAL_DIR" = "FAILED"; then
  1306. AC_MSG_RESULT([failed...continuing with normal checks])
  1307. unset SS_QT3_GENERAL_DIR
  1308. else
  1309. AC_MSG_RESULT([Seems to be $SS_QT3_GENERAL_DIR])
  1310. fi
  1311. else
  1312. AC_MSG_RESULT([Seems to be $SS_QT3_GENERAL_DIR])
  1313. fi
  1314. ])
  1315. AC_DEFUN([AC_SS_FIND_QT4_GENERAL_DIR],
  1316. [
  1317. AC_MSG_CHECKING([for the general Qt4.x directory])
  1318. ss_qt_general_test_dirs="/usr/local /usr /usr/X11R6 /usr/lib /opt /opt/kde /kde /usr/kde /usr/build /usr/src /usr/local/lib /"
  1319. ss_qt_general_test_dirs="$ss_qt_general_test_dirs /usr/local/kde /usr/opt/kde /usr/lib/qt4 /usr/local/lib/qt4"
  1320. if test -n "$HOME"; then
  1321. ss_qt_general_test_dirs="$ss_qt_general_test_dirs $HOME $HOME/lib"
  1322. fi
  1323. if test -n "$QTDIR"; then
  1324. ss_qt_general_test_dirs="$QTDIR $ss_qt_general_test_dirs"
  1325. fi
  1326. ss_qt_general_test_path_suffix="qt$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1327. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1328. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED$SS_QT4_PATCH_LEVEL_REQUIRED"
  1329. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1330. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED$SS_QT4_PATCH_LEVEL_REQUIRED"
  1331. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1332. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1333. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED"
  1334. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1335. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED$SS_QT4_MINOR_VERSION_REQUIRED"
  1336. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1337. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1338. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt-$SS_QT4_MAJOR_VERSION_REQUIRED"
  1339. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix lib"
  1340. ss_qt_general_test_path_suffix="$ss_qt_general_test_path_suffix qt ."
  1341. AC_SS_FIND_FILE_PATH_EXT($SS_QT4_GENERAL_FILE_TO_SEARCH,$ss_qt_general_test_dirs,$ss_qt_general_test_path_suffix,SS_QT4_GENERAL_DIR)
  1342. if test "$SS_QT4_GENERAL_DIR" = "FAILED"; then
  1343. AC_MSG_RESULT([failed...continuing with normal checks])
  1344. unset SS_QT4_GENERAL_DIR
  1345. else
  1346. AC_MSG_RESULT([Seems to be $SS_QT4_GENERAL_DIR])
  1347. fi
  1348. ])
  1349. AC_DEFUN([AC_SS_FIND_QT3_INCLUDE_DIR],
  1350. [
  1351. AC_ARG_WITH(qt-include-dir,[ --with-qt-include-dir path to the Qt 3.x headers ],SS_QT3_INCDIR="$withval",SS_QT3_INCDIR="NOTGIVEN")
  1352. if test "$SS_QT3_INCDIR" = "NOTGIVEN"; then
  1353. AC_MSG_CHECKING([for the Qt 3.x header files])
  1354. ss_qt_include_test_dirs="$SS_QT3_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1355. test -n "$QTDIR" && ss_qt_include_test_dirs="$QTDIR/include $QTDIR $ss_qt_include_test_dirs"
  1356. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/tqt3 /usr/include/qt3 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1357. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/tqt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT3_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1358. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/tqt$SS_QT3_MAJOR_VERSION_REQUIRED /include/qt$SS_QT3_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT3_MAJOR_VERSION_REQUIRED"
  1359. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT3_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1360. AC_SS_FIND_FILE_PATH($SS_TQT3_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT3_INCDIR)
  1361. if test "$SS_QT3_INCDIR" = "FAILED"; then
  1362. AC_SS_FIND_FILE_PATH($SS_QT3_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT3_INCDIR)
  1363. fi
  1364. if test "$SS_QT3_INCDIR" = "FAILED"; then
  1365. dnl HACK HACK HACK
  1366. ss_qt_include_test_dirs="$SS_QT4_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/include/qt4 /usr/qt4/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1367. test -n "$QTDIR" && ss_qt_include_test_dirs="$QTDIR/include $QTDIR $ss_qt_include_test_dirs"
  1368. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/qt4 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1369. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT4_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1370. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1371. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT4_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1372. AC_SS_FIND_FILE_PATH($SS_QT4_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT4_INCDIR)
  1373. SS_QT3_INCDIR="$SS_QT4_INCDIR -I/usr/include/tqt -include tqt.h"
  1374. AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_INCDIR])
  1375. dnl AC_MSG_RESULT([FAILED])
  1376. dnl AC_SS_SET_REDINK
  1377. dnl echo "################################################################################"
  1378. dnl echo "### CONFIGURE ERROR:"
  1379. dnl echo "### Can not find the qt 3.x header files."
  1380. dnl echo "### Make sure that qt is correctly installed on your system,"
  1381. dnl echo "### and the qt version is the one requested by this version of kvirc."
  1382. dnl echo "### Try to run configure again, this time passing the --with-qt-include-dir"
  1383. dnl echo "### option (see ./configure --help)."
  1384. dnl echo "### You may also take a look at the config.log file in this directory,"
  1385. dnl echo "### that will tell you which check has failed and maybe more about the reason"
  1386. dnl echo "### of the failure."
  1387. dnl echo "### If you're feeling that this may be a bug in this configure script"
  1388. dnl echo "### and want to report this to me , please include your configure script,"
  1389. dnl echo "### the config.log file as well as the complete configure output."
  1390. dnl echo "################################################################################"
  1391. dnl AC_SS_SET_NORMALINK
  1392. dnl AC_MSG_ERROR([This was a fatal one...aborting])
  1393. else
  1394. SS_QT3_INCDIR="$SS_QT3_INCDIR -I/usr/include/tqt -include tqt.h"
  1395. AC_MSG_RESULT([found in $SS_QT3_INCDIR])
  1396. fi
  1397. else
  1398. AC_MSG_RESULT([using user supplied path for the Qt 3.x include files $SS_QT3_INCDIR])
  1399. SS_QT3_INCDIR="$SS_QT3_INCDIR -I/usr/include/tqt -include tqt.h"
  1400. fi
  1401. ])
  1402. AC_DEFUN([AC_SS_FIND_QT4_INCLUDE_DIR],
  1403. [
  1404. AC_ARG_WITH(qt4-include-dir,[ --with-qt4-include-dir path to the Qt 4.x headers ],SS_QT4_INCDIR="$withval",SS_QT4_INCDIR="NOTGIVEN")
  1405. if test "$SS_QT4_INCDIR" = "NOTGIVEN"; then
  1406. AC_MSG_CHECKING([for the Qt 4.x header files])
  1407. ss_qt_include_test_dirs="$SS_QT4_GENERAL_DIR/include /include /usr/include /usr/local/include /usr/qt/include /usr/include/qt4 /usr/qt4/include /usr/local/qt/include /usr/X11R6/include /usr/lib/qt/include /usr/lib/qt /usr/include/X11"
  1408. test -n "$QTDIR" && ss_qt_include_test_dirs="$QTDIR/include $QTDIR $ss_qt_include_test_dirs"
  1409. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt /usr/include/qt4 /usr/local/include/qt /include/qt /usr/X11R6/include/qt /usr/build/qt/include"
  1410. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/include/qt-$SS_QT4_MAJOR_VERSION_REQUIRED /usr/local/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1411. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /include/qt$SS_QT4_MAJOR_VERSION_REQUIRED /usr/X11R6/include/qt$SS_QT4_MAJOR_VERSION_REQUIRED"
  1412. ss_qt_include_test_dirs="$ss_qt_include_test_dirs /usr/include/X11/qt$SS_QT4_MAJOR_VERSION_REQUIRED /opt/qt /opt/kde/qt"
  1413. AC_SS_FIND_FILE_PATH($SS_QT4_INCLUDE_FILE_TO_SEARCH,$ss_qt_include_test_dirs,SS_QT4_INCDIR)
  1414. if test "$SS_QT4_INCDIR" = "FAILED"; then
  1415. AC_MSG_RESULT([FAILED])
  1416. AC_SS_SET_REDINK
  1417. echo "################################################################################"
  1418. echo "### CONFIGURE ERROR:"
  1419. echo "### Can not find the qt 4.x header files."
  1420. echo "### Make sure that qt is correctly installed on your system,"
  1421. echo "### and the qt version is the one requested by this version of kvirc."
  1422. echo "### Try to run configure again, this time passing the --with-qt4-include-dir"
  1423. echo "### option (see ./configure --help)."
  1424. echo "### You may also take a look at the config.log file in this directory,"
  1425. echo "### that will tell you which check has failed and maybe more about the reason"
  1426. echo "### of the failure."
  1427. echo "### If you're feeling that this may be a bug in this configure script"
  1428. echo "### and want to report this to me , please include your configure script,"
  1429. echo "### the config.log file as well as the complete configure output."
  1430. echo "################################################################################"
  1431. AC_SS_SET_NORMALINK
  1432. AC_MSG_ERROR([This was a fatal one...aborting])
  1433. else
  1434. AC_MSG_RESULT([found in $SS_QT4_INCDIR])
  1435. fi
  1436. else
  1437. AC_MSG_RESULT([using user supplied path for the Qt 4.x include files $SS_QT4_INCDIR])
  1438. fi
  1439. SS_QT4_INCDIRECTORIES="-I$SS_QT4_INCDIR -I$SS_QT4_INCDIR/Qt/ -I$SS_QT4_INCDIR/QtCore/ -I$SS_QT4_INCDIR/QtGui/";
  1440. ])
  1441. AC_DEFUN([AC_SS_FIND_QT3_LIBRARY_DIR],
  1442. [
  1443. AC_ARG_WITH(qt-library-dir,[ --with-qt-library-dir path to the Qt 3.x library ],SS_QT3_LIBDIR="$withval",SS_QT3_LIBDIR="NOTGIVEN")
  1444. if test "$SS_QT3_LIBDIR" = "NOTGIVEN"; then
  1445. AC_MSG_CHECKING([for the Qt library])
  1446. ss_qt_library_test_dirs="$SS_QT3_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1447. test -n "$QTDIR" && ss_qt_library_test_dirs="$QTDIR/lib $QTDIR $ss_qt_library_test_dirs"
  1448. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1449. ss_qt_libs_to_find="lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1450. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1451. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1452. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so"
  1453. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1454. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1455. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1456. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.so"
  1457. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1458. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1459. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1460. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.dylib"
  1461. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1462. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1463. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1464. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.dylib"
  1465. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.a"
  1466. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME.a"
  1467. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT3_LIBDIR)
  1468. if test "$SS_QT3_LIBDIR" = "FAILED"; then
  1469. dnl HACK HACK HACK
  1470. AC_MSG_CHECKING([for the Qt 4.x libraries])
  1471. ss_qt_library_test_dirs="$SS_QT4_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1472. test -n "$QTDIR" && ss_qt_library_test_dirs="$QTDIR/lib $QTDIR $ss_qt_library_test_dirs"
  1473. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1474. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/lib/qt4 /usr/local/lib/qt4 /usr/X11R6/lib/qt4"
  1475. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/build/qt4/lib /opt/qt4/lib"
  1476. ss_qt_libs_to_find="libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1477. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1478. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1479. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so"
  1480. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.dylib"
  1481. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.dylib"
  1482. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.dylib"
  1483. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.a"
  1484. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT4_LIBDIR)
  1485. SS_QT3_LIBDIR="$SS_QT4_LIBDIR"
  1486. SS_QTLIB_NAME="tqt"
  1487. AC_MSG_RESULT([TQt4 detected--Qt4 found in $SS_QT3_LIBDIR])
  1488. dnl AC_MSG_RESULT([FAILED])
  1489. dnl AC_SS_SET_REDINK
  1490. dnl echo "################################################################################"
  1491. dnl echo "### CONFIGURE ERROR:"
  1492. dnl echo "### Can not find the qt 3.x library file."
  1493. dnl echo "### Make sure that qt is correctly installed on your system,"
  1494. dnl echo "### and the qt version is the one requested by this version of kvirc."
  1495. dnl echo "### (Usually a greater version is OK too)"
  1496. dnl echo "### Try to run configure again, this time passing the --with-qt-library-dir"
  1497. dnl echo "### option (see ./configure --help)."
  1498. dnl echo "### You may also take a look at the config.log file in this directory,"
  1499. dnl echo "### that will tell you which check has failed and maybe more about the reason"
  1500. dnl echo "### of the failure."
  1501. dnl echo "### If you're feeling that this may be a bug in this configure script"
  1502. dnl echo "### and want to report this to me , please include your configure script,"
  1503. dnl echo "### the config.log file as well as the complete configure output."
  1504. dnl echo "################################################################################"
  1505. dnl AC_SS_SET_NORMALINK
  1506. dnl AC_MSG_ERROR([This was a fatal one...aborting])
  1507. else
  1508. AC_MSG_RESULT([TQt3 found in $SS_QT3_LIBDIR])
  1509. fi
  1510. else
  1511. AC_MSG_RESULT([using user supplied path for the Qt library $SS_QT3_LIBDIR])
  1512. fi
  1513. ])
  1514. AC_DEFUN([AC_SS_FIND_QT4_LIBRARY_DIR],
  1515. [
  1516. AC_ARG_WITH(qt4-library-dir,[ --with-qt4-library-dir path to the Qt 4.x library ],SS_QT4_LIBDIR="$withval",SS_QT4_LIBDIR="NOTGIVEN")
  1517. if test "$SS_QT4_LIBDIR" = "NOTGIVEN"; then
  1518. AC_MSG_CHECKING([for the Qt 4.x libraries])
  1519. ss_qt_library_test_dirs="$SS_QT4_GENERAL_DIR/lib /lib /usr/lib /usr/local/lib /usr/qt/lib /usr/local/qt/lib /usr/X11R6/lib /usr/lib/qt/lib /usr/lib/qt /usr/local/lib/qt/lib"
  1520. test -n "$QTDIR" && ss_qt_library_test_dirs="$QTDIR/lib $QTDIR $ss_qt_library_test_dirs"
  1521. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/local/lib/qt /usr/X11R6/lib/qt /usr/build/qt/lib /opt/lib /opt/qt/lib"
  1522. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/lib/qt4 /usr/local/lib/qt4 /usr/X11R6/lib/qt4"
  1523. ss_qt_library_test_dirs="$ss_qt_library_test_dirs /usr/build/qt4/lib /opt/qt4/lib"
  1524. ss_qt_libs_to_find="libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.$SS_QT4_PATCH_LEVEL_REQUIRED"
  1525. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED"
  1526. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED"
  1527. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so"
  1528. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.$SS_QT4_MINOR_VERSION_REQUIRED.dylib"
  1529. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.$SS_QT4_MAJOR_VERSION_REQUIRED.dylib"
  1530. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.dylib"
  1531. ss_qt_libs_to_find="$ss_qt_libs_to_find libQtCore.so.a"
  1532. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$ss_qt_library_test_dirs,SS_QT4_LIBDIR)
  1533. if test "$SS_QT4_LIBDIR" = "FAILED"; then
  1534. AC_MSG_RESULT([FAILED])
  1535. AC_SS_SET_REDINK
  1536. echo "################################################################################"
  1537. echo "### CONFIGURE ERROR:"
  1538. echo "### Can not find the qt 4.x library files."
  1539. echo "### Make sure that qt is correctly installed on your system,"
  1540. echo "### and the qt version is the one requested by this version of kvirc."
  1541. echo "### (Usually a greater version is OK too)"
  1542. echo "### Try to run configure again, this time passing the --with-qt4-library-dir"
  1543. echo "### option (see ./configure --help)."
  1544. echo "### You may also take a look at the config.log file in this directory,"
  1545. echo "### that will tell you which check has failed and maybe more about the reason"
  1546. echo "### of the failure."
  1547. echo "### If you're feeling that this may be a bug in this configure script"
  1548. echo "### and want to report this to me , please include your configure script,"
  1549. echo "### the config.log file as well as the complete configure output."
  1550. echo "################################################################################"
  1551. AC_SS_SET_NORMALINK
  1552. AC_MSG_ERROR([This was a fatal one...aborting])
  1553. else
  1554. AC_MSG_RESULT([found in $SS_QT4_LIBDIR])
  1555. fi
  1556. else
  1557. AC_MSG_RESULT([using user supplied path for the Qt 4.x library $SS_QT4_LIBDIR])
  1558. fi
  1559. ])
  1560. AC_DEFUN([AC_SS_FIND_QT3_MOC],
  1561. [
  1562. AC_ARG_WITH(qt-moc,[ --with-qt-moc filename of the Qt 3.x meta object compiler ],SS_QT3_MOC="$withval",SS_QT3_MOC="NOTGIVEN")
  1563. if test "$SS_QT3_MOC" = "NOTGIVEN"; then
  1564. AC_MSG_CHECKING([for the Qt 3.x tmoc])
  1565. unset SS_QT3_MOC
  1566. ss_moc_test_dirs="$QTDIR/bin $PATH /usr/bin /bin /usr/local/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/X11R6/qt/bin /usr/qt/bin /usr/build/qt/bin"
  1567. if test -n "$SS_QT3_GENERAL_DIR"; then
  1568. ss_moc_test_dirs="$SS_QT3_GENERAL_DIR/bin $ss_moc_test_dirs"
  1569. fi
  1570. AC_SS_FIND_FILE_PATH(tmoc,$ss_moc_test_dirs,SS_QT3_MOC)
  1571. if test "$SS_QT3_MOC" = "FAILED"; then
  1572. AC_MSG_RESULT([FAILED])
  1573. AC_SS_SET_REDINK
  1574. echo "################################################################################"
  1575. echo "### CONFIGURE ERROR:"
  1576. echo "### The Qt meta object compiler can not be found."
  1577. echo "### Make sure that qt is correctly installed on your system, it is on your path,"
  1578. echo "### and the qt version is the one requested by this version of kvirc."
  1579. echo "### Try to run configure again, this time passing the --with-qt-moc"
  1580. echo "### option (see ./configure --help)."
  1581. echo "### You may also take a look at the config.log file in this directory,"
  1582. echo "### that will tell you which check has failed and maybe more about the reason"
  1583. echo "### of the failure."
  1584. echo "### If you're feeling that this may be a bug in this configure script"
  1585. echo "### and want to report this to me , please include your configure script,"
  1586. echo "### the config.log file as well as the complete configure output."
  1587. echo "################################################################################"
  1588. AC_SS_SET_NORMALINK
  1589. AC_MSG_ERROR([This was a fatal one...aborting])
  1590. else
  1591. SS_QT3_MOC="$SS_QT3_MOC/tmoc"
  1592. AC_MSG_RESULT([found as $SS_QT3_MOC])
  1593. fi
  1594. else
  1595. AC_MSG_RESULT([trusting you: using $SS_QT3_MOC])
  1596. fi
  1597. ])
  1598. AC_DEFUN([AC_SS_FIND_QT4_MOC],
  1599. [
  1600. AC_ARG_WITH(qt4-moc,[ --with-qt4-moc filename of the Qt 4.x meta object compiler ],SS_QT4_MOC="$withval",SS_QT4_MOC="NOTGIVEN")
  1601. if test "$SS_QT4_MOC" = "NOTGIVEN"; then
  1602. AC_MSG_CHECKING([for the Qt 4.x moc])
  1603. unset SS_QT4_MOC
  1604. ss_moc_test_dirs="$QTDIR/bin $PATH /usr/bin /bin /usr/local/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/X11R6/qt/bin /usr/qt/bin /usr/build/qt/bin"
  1605. if test -n "$SS_QT4_GENERAL_DIR"; then
  1606. ss_moc_test_dirs="$SS_QT4_GENERAL_DIR/bin $ss_moc_test_dirs"
  1607. fi
  1608. AC_SS_FIND_FILE_PATH(moc,$ss_moc_test_dirs,SS_QT4_MOC)
  1609. if test "$SS_QT4_MOC" = "FAILED"; then
  1610. AC_MSG_RESULT([FAILED])
  1611. AC_SS_SET_REDINK
  1612. echo "################################################################################"
  1613. echo "### CONFIGURE ERROR:"
  1614. echo "### The Qt 4.x meta object compiler can not be found."
  1615. echo "### Make sure that qt is correctly installed on your system, it is on your path,"
  1616. echo "### and the qt version is the one requested by this version of kvirc."
  1617. echo "### In particular you should make sure that the moc compiler is NOT the one"
  1618. echo "### shipped with Qt 3.x."
  1619. echo "### Try to run configure again, this time passing the --with-qt4-moc"
  1620. echo "### option (see ./configure --help)."
  1621. echo "### You may also take a look at the config.log file in this directory,"
  1622. echo "### that will tell you which check has failed and maybe more about the reason"
  1623. echo "### of the failure."
  1624. echo "### If you're feeling that this may be a bug in this configure script"
  1625. echo "### and want to report this to me , please include your configure script,"
  1626. echo "### the config.log file as well as the complete configure output."
  1627. echo "################################################################################"
  1628. AC_SS_SET_NORMALINK
  1629. AC_MSG_ERROR([This was a fatal one...aborting])
  1630. else
  1631. SS_QT4_MOC="$SS_QT4_MOC/moc"
  1632. AC_MSG_RESULT([found as $SS_QT4_MOC])
  1633. fi
  1634. else
  1635. AC_MSG_RESULT([trusting you: using $SS_QT4_MOC])
  1636. fi
  1637. ])
  1638. AC_DEFUN([AC_SS_FIND_QT3_MT],
  1639. [
  1640. AC_ARG_ENABLE(qt-mt,[ --disable-qt-mt ignore the threaded version of Qt],SS_QT3_NOMT="$withval",SS_QT3_NOMT="NOTGIVEN")
  1641. AC_MSG_CHECKING([for the multithreaded version of Qt])
  1642. if test "$SS_QT3_NOMT" = "NOTGIVEN"; then
  1643. ss_qt_libs_to_find="lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED"
  1644. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED"
  1645. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so.$SS_QT3_MAJOR_VERSION_REQUIRED"
  1646. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.so"
  1647. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.$SS_QT3_PATCH_LEVEL_REQUIRED.dylib"
  1648. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.$SS_QT3_MINOR_VERSION_REQUIRED.dylib"
  1649. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.$SS_QT3_MAJOR_VERSION_REQUIRED.dylib"
  1650. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.dylib"
  1651. ss_qt_libs_to_find="$ss_qt_libs_to_find lib$SS_QTLIB_NAME-mt.a"
  1652. AC_SS_FIND_FILE_PATH($ss_qt_libs_to_find,$SS_QT3_LIBDIR,SS_QTMTLIBDIR)
  1653. if test "$SS_QTMTLIBDIR" = "FAILED"; then
  1654. AC_MSG_RESULT([not found])
  1655. else
  1656. AC_MSG_RESULT([seems to be available])
  1657. SS_QTLIB_NAME="$SS_QTLIB_NAME-mt"
  1658. fi
  1659. else
  1660. AC_MSG_RESULT([disabled by user])
  1661. fi
  1662. ])
  1663. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT3],
  1664. [
  1665. AC_MSG_CHECKING([if we can compile an X-Qt 3.x application])
  1666. AC_LANG_CPLUSPLUS
  1667. ss_save_CPPFLAGS="$CPPFLAGS"
  1668. ss_save_CXXFLAGS="$CXXFLAGS"
  1669. ss_save_LDFLAGS="$LDFLAGS"
  1670. ss_save_LIBS="$LIBS"
  1671. if test -n "$SS_X_INCDIR"; then
  1672. CPPFLAGS="-I$SS_X_INCDIR"
  1673. else
  1674. CPPFLAGS=""
  1675. fi
  1676. CPPFLAGS="$CPPFLAGS -I$SS_QT3_INCDIR"
  1677. CXXFLAGS="-O2 -Wall -I/usr/include/tqt -include tqt.h $CXXFLAGS"
  1678. if test -n "$SS_X_LIBDIR"; then
  1679. LIBS="-L$SS_X_LIBDIR"
  1680. else
  1681. LIBS=""
  1682. fi
  1683. LIBS="$LIBS -L$SS_QT3_LIBDIR -l$SS_QTLIB_NAME"
  1684. if test -n "$SS_X_LDFLAGS"; then
  1685. LIBS="$LIBS $SS_X_LDFLAGS"
  1686. fi
  1687. if test -n "$SS_X_LIBLINK"; then
  1688. LIBS="$LIBS $SS_X_LIBLINK"
  1689. fi
  1690. LDFLAGS="-s $LDFLAGS"
  1691. AC_TRY_LINK([
  1692. #include <tqglobal.h>
  1693. ],[return 0; ],SS_QTX_LINKED_OK="TRUE",SS_QTX_LINKED_OK="FALSE")
  1694. if test "$SS_QTX_LINKED_OK" = "FALSE"; then
  1695. AC_MSG_RESULT([FAILED]);
  1696. AC_SS_SET_REDINK
  1697. echo "################################################################################"
  1698. echo "### CONFIGURE ERROR:"
  1699. echo "### Failed to compile the Qt library test program."
  1700. echo "### This may be a bad sign :)"
  1701. echo "### First of all, make sure that qt is correctly installed on your system,"
  1702. echo "### and the qt version is the one requested by this version of kvirc."
  1703. echo "### Ensure that you have only one copy of qt visible at a time."
  1704. echo "### You may also take a look at the config.log file in this directory,"
  1705. echo "### that will tell you which check has failed and maybe more about the reason"
  1706. echo "### of the failure."
  1707. echo "### The CPPFLAGS used were:"
  1708. for a_flag in $CPPFLAGS ; do
  1709. echo "### $a_flag"
  1710. done
  1711. echo "### The CXXFLAGS used were:"
  1712. for a_flag in $CXXFLAGS ; do
  1713. echo "### $a_flag"
  1714. done
  1715. echo "### The LIBS used were:"
  1716. for a_flag in $LIBS ; do
  1717. echo "### $a_flag"
  1718. done
  1719. echo "### The LDFLAGS used were:"
  1720. for a_flag in $LDFLAGS ; do
  1721. echo "### $a_flag"
  1722. done
  1723. echo "### If you're sure that qt is correctly installed , you may force configure"
  1724. echo "### to skip this check and try to compile kvirc anyway."
  1725. echo "### Try using the --without-qt-check option."
  1726. echo "### If you're feeling that this may be a bug in this configure script"
  1727. echo "### and want to report this to me , please include your configure script,"
  1728. echo "### the config.log file as well as the complete configure output."
  1729. echo "################################################################################"
  1730. AC_SS_SET_NORMALINK
  1731. AC_MSG_ERROR([This was a fatal one...aborting])
  1732. fi
  1733. LIBS="$ss_save_LIBS"
  1734. LDFLAGS="$ss_save_LDFLAGS"
  1735. CXXFLAGS="$ss_save_CXXFLAGS"
  1736. CPPFLAGS="$ss_save_CPPFLAGS"
  1737. AC_MSG_RESULT([success])
  1738. ])
  1739. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_AND_QT4],
  1740. [
  1741. AC_MSG_CHECKING([if we can compile an X-Qt 4.x application])
  1742. AC_LANG_CPLUSPLUS
  1743. ss_save_CPPFLAGS="$CPPFLAGS"
  1744. ss_save_CXXFLAGS="$CXXFLAGS"
  1745. ss_save_LDFLAGS="$LDFLAGS"
  1746. ss_save_LIBS="$LIBS"
  1747. if test -n "$SS_X_INCDIR"; then
  1748. CPPFLAGS="-I$SS_X_INCDIR"
  1749. else
  1750. CPPFLAGS=""
  1751. fi
  1752. CPPFLAGS="$CPPFLAGS $SS_QT4_INCDIRECTORIES"
  1753. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  1754. if test -n "$SS_X_LIBDIR"; then
  1755. LIBS="-L$SS_X_LIBDIR"
  1756. else
  1757. LIBS=""
  1758. fi
  1759. LIBS="$LIBS -L$SS_QT4_LIBDIR -lQtCore"
  1760. if test -n "$SS_X_LDFLAGS"; then
  1761. LIBS="$LIBS $SS_X_LDFLAGS"
  1762. fi
  1763. if test -n "$SS_X_LIBLINK"; then
  1764. LIBS="$LIBS $SS_X_LIBLINK"
  1765. fi
  1766. LDFLAGS="-s $LDFLAGS"
  1767. AC_TRY_LINK([
  1768. #include <qglobal.h>
  1769. #if (TQT_VERSION < 0x040000)
  1770. #error "Bad qt version: too old"
  1771. #endif
  1772. ],[return 0; ],SS_QTX_LINKED_OK="TRUE",SS_QTX_LINKED_OK="FALSE")
  1773. if test "$SS_QTX_LINKED_OK" = "FALSE"; then
  1774. AC_MSG_RESULT([FAILED]);
  1775. AC_SS_SET_REDINK
  1776. echo "################################################################################"
  1777. echo "### CONFIGURE ERROR:"
  1778. echo "### Failed to compile the Qt 4.x library test program."
  1779. echo "### This may be a bad sign :)"
  1780. echo "### First of all, make sure that qt is correctly installed on your system,"
  1781. echo "### and the qt version is the one requested by this version of kvirc."
  1782. echo "### Ensure that you have only one copy of qt visible at a time."
  1783. echo "### You may also take a look at the config.log file in this directory,"
  1784. echo "### that will tell you which check has failed and maybe more about the reason"
  1785. echo "### of the failure."
  1786. echo "### The CPPFLAGS used were:"
  1787. for a_flag in $CPPFLAGS ; do
  1788. echo "### $a_flag"
  1789. done
  1790. echo "### The CXXFLAGS used were:"
  1791. for a_flag in $CXXFLAGS ; do
  1792. echo "### $a_flag"
  1793. done
  1794. echo "### The LIBS used were:"
  1795. for a_flag in $LIBS ; do
  1796. echo "### $a_flag"
  1797. done
  1798. echo "### The LDFLAGS used were:"
  1799. for a_flag in $LDFLAGS ; do
  1800. echo "### $a_flag"
  1801. done
  1802. echo "### If you're sure that qt is correctly installed , you may force configure"
  1803. echo "### to skip this check and try to compile kvirc anyway."
  1804. echo "### Try using the --without-qt-check option."
  1805. echo "### If you're feeling that this may be a bug in this configure script"
  1806. echo "### and want to report this to me , please include your configure script,"
  1807. echo "### the config.log file as well as the complete configure output."
  1808. echo "################################################################################"
  1809. AC_SS_SET_NORMALINK
  1810. AC_MSG_ERROR([This was a fatal one...aborting])
  1811. fi
  1812. LIBS="$ss_save_LIBS"
  1813. LDFLAGS="$ss_save_LDFLAGS"
  1814. CXXFLAGS="$ss_save_CXXFLAGS"
  1815. CPPFLAGS="$ss_save_CPPFLAGS"
  1816. AC_MSG_RESULT([success])
  1817. ])
  1818. dnl ###################################################################################################################
  1819. dnl ### KDE
  1820. dnl ###################################################################################################################
  1821. AC_DEFUN([AC_SS_FIND_KDE],
  1822. [
  1823. AC_SS_CHECK_IF_KDE_IS_REQUESTED
  1824. if test "$SS_KDE_REQUESTED" = "yes"; then
  1825. AC_SS_FIND_KDE_GENERAL_DIR
  1826. if test "$SS_KDE_REQUESTED" = "yes"; then
  1827. AC_SS_FIND_KDE_SERVICES_DIR
  1828. AC_SS_FIND_KDE_LIBRARY_DIR
  1829. if test "$SS_KDE_REQUESTED" = "yes"; then
  1830. AC_SS_FIND_KDE_INCLUDE_DIR
  1831. if test "$SS_KDE_REQUESTED" = "yes"; then
  1832. AC_SS_ENSURE_CAN_COMPILE_X_QT3_AND_KDE
  1833. fi
  1834. fi
  1835. fi
  1836. fi
  1837. ])
  1838. AC_DEFUN([AC_SS_CHECK_IF_KDE_IS_REQUESTED],
  1839. [
  1840. AC_MSG_CHECKING([if KDE support is requested])
  1841. if test "$SS_USE_QT4" = "no"; then
  1842. SS_KDE_REQUESTED="yes"
  1843. AC_ARG_WITH(kde-support,[ --without-kde-support Disable the KDE support even if it is detected ],SS_KDE_REQUESTED="$withval")
  1844. if test "$SS_KDE_REQUESTED" = "yes"; then
  1845. AC_MSG_RESULT([yes])
  1846. else
  1847. AC_MSG_RESULT([no])
  1848. fi
  1849. else
  1850. SS_KDE_REQUESTED="no"
  1851. AC_MSG_RESULT([unsupported with qt 4.x])
  1852. fi
  1853. ])
  1854. AC_DEFUN([AC_SS_FIND_KDE_GENERAL_DIR],
  1855. [
  1856. AC_MSG_CHECKING([for the general KDE directory])
  1857. ss_kde_general_test_dirs="/usr /usr/local /usr /usr/local /usr/build /usr/X11R6 /opt /usr/opt /usr/lib /usr/lib /usr/src /usr/lib /usr/local/lib"
  1858. if test -n "$HOME"; then
  1859. ss_kde_general_test_dirs="$ss_kde_general_test_dirs $HOME $HOME/lib"
  1860. fi
  1861. if test -n "$TDEDIR"; then
  1862. ss_kde_general_test_dirs="$TDEDIR $ss_kde_general_test_dirs"
  1863. fi
  1864. ss_kde_general_test_path_suffix="trinity tde TDE kde kde3.0 kde3 KDE Kde KDE3 kde3 ."
  1865. AC_SS_FIND_FILE_PATH_EXT($SS_KDE_GENERAL_FILE_TO_SEARCH,$ss_kde_general_test_dirs,$ss_kde_general_test_path_suffix,SS_KDE_GENERAL_DIR)
  1866. if test "$SS_KDE_GENERAL_DIR" = "FAILED"; then
  1867. AC_MSG_RESULT([failed...continuing with normal checks])
  1868. unset SS_KDE_GENERAL_DIR
  1869. else
  1870. AC_MSG_RESULT([Seems to be $SS_KDE_GENERAL_DIR])
  1871. fi
  1872. ])
  1873. AC_DEFUN([AC_SS_FIND_KDE_SERVICES_DIR],
  1874. [
  1875. AC_ARG_WITH(kde-services-dir,[ --with-kde-services-dir path to the KDE protocol services dir ],SS_KDE_SERVICESDIR="$withval",SS_KDE_SERVICESDIR="NOTGIVEN")
  1876. if test "$SS_KDE_SERVICESDIR" = "NOTGIVEN"; then
  1877. AC_MSG_CHECKING([for KDE services directory])
  1878. ss_kde_services_test_dirs="/usr/share/services /usr/local/share/services /usr/kde/share/services /usr/local/kde/share/services /usr/X11R6/share/services /opt/kde/share/services /usr/lib/kde/share/services"
  1879. test -n "$TDEDIR" && ss_kde_services_test_dirs="$TDEDIR/share/services $ss_kde_services_test_dirs"
  1880. ss_kde_services_test_dirs="$ss_kde_services_test_dirs /usr/share/kde/services"
  1881. test -n "$SS_KDE_GENERAL_DIR" && ss_kde_services_test_dirs="$SS_KDE_GENERAL_DIR/share/services $ss_kde_services_test_dirs"
  1882. AC_SS_FIND_FILE_PATH("http.protocol",$ss_kde_services_test_dirs,SS_KDE_SERVICESDIR)
  1883. if test "$SS_KDE_SERVICESDIR" = "FAILED"; then
  1884. SS_KDE_SERVICESDIR=""
  1885. AC_MSG_RESULT([unknown])
  1886. else
  1887. AC_MSG_RESULT([found in $SS_KDE_SERVICESDIR])
  1888. fi
  1889. else
  1890. AC_MSG_RESULT([using user supplied path for the KDE services dir $SS_KDE_SERVICESDIR])
  1891. fi
  1892. ])
  1893. AC_DEFUN([AC_SS_FIND_KDE_INCLUDE_DIR],
  1894. [
  1895. AC_ARG_WITH(kde-include-dir,[ --with-kde-include-dir path to the KDE headers ],SS_KDE_INCDIR="$withval",SS_KDE_INCDIR="NOTGIVEN")
  1896. if test "$SS_KDE_INCDIR" = "NOTGIVEN"; then
  1897. AC_MSG_CHECKING([for KDE header files])
  1898. ss_kde_include_test_dirs="/include /usr/include /usr/local/include /usr/kde/include /usr/local/kde/include /usr/X11R6/include /opt/kde/include /usr/lib/kde/include /usr/lib/kde /usr/include/X11"
  1899. test -n "$TDEDIR" && ss_kde_include_test_dirs="$TDEDIR/include $TDEDIR $ss_kde_include_test_dirs"
  1900. ss_kde_include_test_dirs="$ss_kde_include_test_dirs /usr/include/tde /usr/local/include/tde /include/tde /usr/X11R6/include/tde /usr/build/kde/include"
  1901. ss_kde_include_test_dirs="$ss_kde_include_test_dirs /usr/include/tde2 /usr/local/include/tde2 /include/tde2 /usr/X11R6/include/tde2 /usr/include/X11/kde2"
  1902. test -n "$SS_KDE_GENERAL_DIR" && ss_kde_include_test_dirs="$SS_KDE_GENERAL_DIR/include $ss_kde_include_test_dirs"
  1903. AC_SS_FIND_FILE_PATH($SS_KDE_INCLUDE_FILE_TO_SEARCH,$ss_kde_include_test_dirs,SS_KDE_INCDIR)
  1904. if test "$SS_KDE_INCDIR" = "FAILED"; then
  1905. AC_MSG_RESULT("FAILED")
  1906. SS_KDE_REQUESTED="no"
  1907. SS_KDE_INCDIR=""
  1908. else
  1909. AC_MSG_RESULT([found in $SS_KDE_INCDIR])
  1910. fi
  1911. else
  1912. AC_MSG_RESULT([using user supplied path for the KDE include files $SS_KDE_INCDIR])
  1913. fi
  1914. if test -z "$SS_KDE_GENERAL_DIR"; then
  1915. # Set it.... we need it :)...
  1916. SS_KDE_GENERAL_DIR=`echo $SS_KDE_INCDIR | sed -e 's/\/include\$//'`
  1917. fi
  1918. ])
  1919. AC_DEFUN([AC_SS_FIND_KDE_LIBRARY_DIR],
  1920. [
  1921. AC_ARG_WITH(kde-library-dir,[ --with-kde-library-dir path to the KDE libraries ],SS_KDE_LIBDIR="$withval",SS_KDE_LIBDIR="NOTGIVEN")
  1922. if test "$SS_KDE_LIBDIR" = "NOTGIVEN"; then
  1923. AC_MSG_CHECKING([for the KDE libraries])
  1924. ss_kde_library_test_dirs="/lib /usr/lib /usr/local/lib /usr/kde/lib /opt/kde/lib /opt/lib /usr/opt/kde/lib /usr/local/kde/lib /usr/X11R6/lib /usr/lib/kde/lib /usr/lib/kde /usr/local/lib/kde/lib"
  1925. test -n "$TDEDIR" && ss_kde_library_test_dirs="$TDEDIR/lib $TDEDIR $ss_kde_library_test_dirs"
  1926. ss_kde_library_test_dirs="$ss_kde_library_test_dirs /usr/local/lib/kde /usr/X11R6/lib/kde /usr/build/kde/lib"
  1927. if test -n "$SS_KDE_GENERAL_DIR"; then
  1928. ss_kde_library_test_dirs="$SS_KDE_GENERAL_DIR/lib $ss_kde_library_test_dirs"
  1929. fi
  1930. AC_SS_FIND_FILE_PATH(libtdecore.so.6 libtdecore.so.5 libtdecore.so.4 libtdecore.so.3 libtdecore.so,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1931. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1932. AC_SS_FIND_FILE_PATH(libtdecore.so.8 libtdecore.so.7 libtdecore.so.4.0.0 libtdecore.so.4.1.0 libtdecore.so.4.2.0 ,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1933. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1934. # Try the senseless too
  1935. AC_SS_FIND_FILE_PATH(libtdecore.so.4.0.0 libtdecore.so.4.1.0 libtdecore.so.4.2.0 libtdecore.so.4.3.0,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1936. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1937. AC_SS_FIND_FILE_PATH(libtdecore.so.4.4.0 libtdecore.so.4.5.0 libtdecore.so.4.6.0 libtdecore.so.4.7.0 libtdecore.a,$ss_kde_library_test_dirs,SS_KDE_LIBDIR)
  1938. fi
  1939. fi
  1940. fi
  1941. if test "$SS_KDE_LIBDIR" = "FAILED"; then
  1942. AC_MSG_RESULT("FAILED")
  1943. SS_KDE_REQUESTED="no"
  1944. SS_KDE_LIBDIR=""
  1945. else
  1946. AC_MSG_RESULT([found in $SS_KDE_LIBDIR])
  1947. fi
  1948. else
  1949. AC_MSG_RESULT([using user supplied path for the KDE libraries $SS_KDE_LIBDIR])
  1950. fi
  1951. if test -z "$SS_KDE_GENERAL_DIR"; then
  1952. # Set it.... we need it :)...
  1953. SS_KDE_GENERAL_DIR=`echo $SS_KDE_LIBDIR | sed -e 's/\/lib\$//'`
  1954. fi
  1955. ])
  1956. AC_DEFUN([AC_SS_ENSURE_CAN_COMPILE_X_QT3_AND_KDE],
  1957. [
  1958. AC_ARG_WITH(kde-check,[ --without-kde-check Do not check if Qt,KDE and X compile ],SS_CHECK_QTX_COMPILE="$withval",SS_CHECK_KQTX_COMPILE="yes")
  1959. if test "$SS_CHECK_KQTX_COMPILE" = "yes"; then
  1960. AC_MSG_CHECKING(if we can compile an X-Qt-KDE application)
  1961. AC_LANG_CPLUSPLUS
  1962. ss_save_CPPFLAGS="$CPPFLAGS"
  1963. ss_save_CXXFLAGS="$CXXFLAGS"
  1964. ss_save_LDFLAGS="$LDFLAGS"
  1965. ss_save_LIBS="$LIBS"
  1966. if test -n "$SS_X_INCDIR"; then
  1967. CPPFLAGS="-I$SS_X_INCDIR"
  1968. else
  1969. CPPFLAGS=""
  1970. fi
  1971. CPPFLAGS="$CPPFLAGS -I$SS_X_INCDIR -I$SS_QT3_INCDIR -I$SS_KDE_INCDIR"
  1972. CXXFLAGS="-O2 -Wall $CXXFLAGS"
  1973. if test -n "$SS_X_LIBDIR"; then
  1974. LIBS="-L$SS_X_LIBDIR"
  1975. else
  1976. LIBS=""
  1977. fi
  1978. if test -n "$SS_X_LDFLAGS"; then
  1979. LIBS="$SS_X_LDFLAGS $LIBS"
  1980. fi
  1981. if test -n "$SS_X_LIBLINK"; then
  1982. LIBS="$LIBS $SS_X_LIBLINK"
  1983. fi
  1984. LIBS="-L$SS_KDE_LIBDIR -L$SS_QT3_LIBDIR -ltdecore -l$SS_QTLIB_NAME $LIBS -Wl,-rpath $SS_KDE_LIBDIR"
  1985. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  1986. LIBS="$LIBS -ldl";
  1987. fi
  1988. LDFLAGS="-s $LDFLAGS"
  1989. AC_TRY_LINK([
  1990. #include "kapp.h"
  1991. #include "twin.h"
  1992. ],[
  1993. int a = KWin::currentDesktop();
  1994. TDEApplication app(a,0,"kvirc");
  1995. ],
  1996. SS_KQTX_LINKED_OK="TRUE",
  1997. SS_KQTX_LINKED_OK="FALSE"
  1998. )
  1999. if test "$SS_KQTX_LINKED_OK" = "FALSE"; then
  2000. AC_MSG_RESULT(failed)
  2001. AC_MSG_ERROR([This was a fatal one...aborting])
  2002. else
  2003. AC_MSG_RESULT(success)
  2004. fi
  2005. LIBS="$ss_save_LIBS"
  2006. LDFLAGS="$ss_save_LDFLAGS"
  2007. CXXFLAGS="$ss_save_CXXFLAGS"
  2008. CPPFLAGS="$ss_save_CPPFLAGS"
  2009. fi
  2010. ])
  2011. AC_DEFUN([AC_SS_CHECK_OTHER_LIBS],
  2012. [
  2013. SS_OTHER_LIBDIRS=""
  2014. SS_OTHER_LIBLINK=""
  2015. SS_OTHER_INCDIRS=""
  2016. AC_MSG_CHECKING([if you want to link to libresolv])
  2017. SS_DO_IT="false"
  2018. AC_ARG_WITH(libresolv, [ --with-libresolv Link to libresolv],SS_DO_IT="true")
  2019. if test "$SS_DO_IT" = "true"; then
  2020. AC_MSG_RESULT(yes)
  2021. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lresolv"
  2022. else
  2023. AC_MSG_RESULT(no)
  2024. fi
  2025. AC_MSG_CHECKING([if you want to link to libsocket])
  2026. SS_DO_IT="false"
  2027. AC_ARG_WITH(libsocket, [ --with-libsocket Link to libsocket],SS_DO_IT="true")
  2028. if test "$SS_DO_IT" = "true"; then
  2029. AC_MSG_RESULT(yes)
  2030. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lsocket"
  2031. else
  2032. AC_MSG_RESULT(no)
  2033. fi
  2034. AC_MSG_CHECKING([if you want to link to libnsl])
  2035. SS_DO_IT="false"
  2036. AC_ARG_WITH(libnsl, [ --with-libnsl Link to libnsl],SS_DO_IT="true")
  2037. if test "$SS_DO_IT" = "true"; then
  2038. AC_MSG_RESULT(yes)
  2039. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lnsl"
  2040. else
  2041. AC_MSG_RESULT(no)
  2042. fi
  2043. AC_MSG_CHECKING([if you want to link to libcompat])
  2044. SS_DO_IT="false"
  2045. AC_ARG_WITH(libnsl, [ --with-libcompat Link to libcompat],SS_DO_IT="true")
  2046. if test "$SS_DO_IT" = "true"; then
  2047. AC_MSG_RESULT(yes)
  2048. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK -lcompat"
  2049. else
  2050. AC_MSG_RESULT(no)
  2051. fi
  2052. AC_MSG_CHECKING([if you want to link to other libraries])
  2053. SS_DO_IT="false"
  2054. AC_ARG_WITH(other-libs, [ --with-other-libs=... Link to the specified libraries],SS_DO_IT="$withval")
  2055. if test "$SS_DO_IT" != "false"; then
  2056. AC_MSG_RESULT([yes])
  2057. SS_OTHER_LIBLINK="$SS_OTHER_LIBLINK $SS_DO_IT"
  2058. else
  2059. AC_MSG_RESULT([no])
  2060. fi
  2061. AC_MSG_CHECKING([if you want to add other library search paths])
  2062. SS_DO_IT="false"
  2063. AC_ARG_WITH(other-ldirs, [ --with-other-ldirs=... Add the specified library paths],SS_DO_IT="$withval")
  2064. if test "$SS_DO_IT" != "false"; then
  2065. AC_MSG_RESULT([yes])
  2066. SS_OTHER_LIBDIRS="$SS_OTHER_LIBDIRS $SS_DO_IT"
  2067. else
  2068. AC_MSG_RESULT([no])
  2069. fi
  2070. AC_MSG_CHECKING([if you want to add other include search paths])
  2071. SS_DO_IT="false"
  2072. AC_ARG_WITH(other-idirs, [ --with-other-idirs=... Add the specified include search paths],SS_DO_IT="$withval")
  2073. if test "$SS_DO_IT" != "false"; then
  2074. AC_MSG_RESULT([yes])
  2075. SS_OTHER_INCDIRS="$SS_OTHER_INCDIRS $SS_DO_IT"
  2076. else
  2077. AC_MSG_RESULT([no])
  2078. fi
  2079. ])
  2080. AC_DEFUN([AC_SS_FINAL_CONFIG],
  2081. [
  2082. AC_MSG_CHECKING([if we finally have to compile the IpV6 support])
  2083. if test "$SS_NOIPV6_SUPPORT" = "true"; then
  2084. AC_MSG_RESULT([no: disabled by user])
  2085. else
  2086. if test "$SS_HAVE_IPV6_FUNCTIONS" = "true"; then
  2087. AC_MSG_RESULT([yes])
  2088. AC_DEFINE([COMPILE_IPV6_SUPPORT], 1, [define if you want the IpV6 support])
  2089. SS_BUILD_FLAGS="i$SS_BUILD_FLAGS"
  2090. else
  2091. AC_MSG_RESULT([no: the system lacks support])
  2092. fi
  2093. fi
  2094. dnl # // Toplevel source directory
  2095. SS_TOPSRCDIR=`pwd`
  2096. AC_SUBST(SS_TOPSRCDIR)
  2097. SS_CPPFLAGS="-D_REENTRANT -DREENTRANT"
  2098. if test -n "$SS_X_CPPFLAGS"; then
  2099. SS_CPPFLAGS="$SS_CPPFLAGS $SS_X_CPPFLAGS"
  2100. fi
  2101. if test "$SS_USE_QT4" = "no"; then
  2102. SS_INCDIRS="-I$SS_QT3_INCDIR -I$SS_X_INCDIR"
  2103. else
  2104. AC_DEFINE([COMPILE_USE_QT4], 1, [define if you want to compile the Qt 4.x support])
  2105. SS_INCDIRS="$SS_QT4_INCDIRECTORIES -I$SS_X_INCDIR"
  2106. SS_CPPFLAGS="$SS_CPPFLAGS -DQT3_SUPPORT"
  2107. fi
  2108. if test -n "$SS_X_INCDIR"; then
  2109. SS_INCDIRS="$SS_INCDIRS -I$SS_X_INCDIR"
  2110. fi
  2111. if test -n "$SS_X_LDFLAGS"; then
  2112. SS_LDFLAGS="$SS_X_LDFLAGS"
  2113. else
  2114. SS_LDFLAGS=""
  2115. fi
  2116. if test "$SS_USE_QT4" = "no"; then
  2117. SS_RPATH="-rpath $SS_QT3_LIBDIR -rpath $libdir"
  2118. else
  2119. SS_RPATH="-rpath $SS_QT4_LIBDIR -rpath $libdir"
  2120. fi
  2121. if test -n "$SS_X_LIBDIR"; then
  2122. SS_RPATH="$SS_RPATH -rpath $SS_X_LIBDIR"
  2123. fi
  2124. if test "$SS_USE_QT4" = "no"; then
  2125. SS_LIBDIRS="-L$SS_TOPSRCDIR/src/kvilib/build/ -L$SS_QT3_LIBDIR"
  2126. else
  2127. SS_LIBDIRS="-L$SS_TOPSRCDIR/src/kvilib/build/ -L$SS_QT4_LIBDIR"
  2128. fi
  2129. if test -n "$SS_X_LIBDIR"; then
  2130. SS_LIBDIRS="$SS_LIBDIRS -L$SS_X_LIBDIR"
  2131. fi
  2132. if test "$SS_USE_QT4" = "no"; then
  2133. SS_LIBLINK="-l$SS_QTLIB_NAME"
  2134. else
  2135. #if test -n "SS_LOCAL_ADD_DEBUG_SYMBOLS"; then
  2136. # SS_LIBLINK="-lQtCore_debug -lQtGui_debug -lQt3Support_debug"
  2137. #else
  2138. SS_LIBLINK="-lQtCore -lQtGui -lQt3Support"
  2139. #fi
  2140. fi
  2141. if test -n "$SS_X_LIBLINK"; then
  2142. SS_LIBLINK="$SS_LIBLINK $SS_X_LIBLINK"
  2143. fi
  2144. SS_LIBLINK="$SS_LIBLINK $SS_THREAD_LIBLINK"
  2145. if test "$SS_LINK_TO_LIBSSL" = "true"; then
  2146. SS_LIBLINK="$SS_LIBLINK -lssl -lcrypto"
  2147. fi
  2148. if test "$SS_LINK_TO_LIBESD" = "true"; then
  2149. SS_LIBLINK="$SS_LIBLINK -lesd"
  2150. fi
  2151. if test "$SS_LINK_TO_LIBARTS" = "true"; then
  2152. SS_LIBLINK="$SS_LIBLINK -lsoundserver_idl"
  2153. fi
  2154. if test "$SS_LINK_TO_LIBAUDIOFILE" = "true"; then
  2155. SS_LIBLINK="$SS_LIBLINK -laudiofile -lm"
  2156. fi
  2157. if test "$SS_LOCAL_8BIT" = "true"; then
  2158. SS_CPPFLAGS="$SS_CPPFLAGS -DQT3_NO_ASCII_CAST -DQT3_NO_COMPAT"
  2159. fi
  2160. if test "$SS_QT3_EMBEDDED" = "true"; then
  2161. SS_CPPFLAGS="$SS_CPPFLAGS -DQWS"
  2162. fi
  2163. if test "$SS_KDE_REQUESTED" = "yes"; then
  2164. SS_INCDIRS="$SS_INCDIRS -I$SS_KDE_INCDIR"
  2165. SS_RPATH="$SS_RPATH -rpath $SS_KDE_LIBDIR"
  2166. SS_LIBDIRS="$SS_LIBDIRS -L$SS_KDE_LIBDIR"
  2167. SS_LIBLINK="-ltdecore -ltdeui -lkparts -lDCOP -ltdefx -lkio $SS_LIBLINK"
  2168. AC_DEFINE([COMPILE_TDE_SUPPORT], 1, [define if you want to compile the TDE support])
  2169. AC_DEFINE_UNQUOTED([TDE_DIR], "$SS_KDE_GENERAL_DIR", [contain path to TDE if compiled with the TDE support])
  2170. AC_DEFINE_UNQUOTED([TDE_LIBDIR], "$SS_KDE_LIBDIR", [contain path to TDE libs if compiled with the TDE support])
  2171. SS_BUILD_FLAGS="k$SS_BUILD_FLAGS"
  2172. else
  2173. AC_DEFINE_UNQUOTED([TDE_DIR], "", [contain path to TDE if compiled with the TDE support])
  2174. AC_DEFINE_UNQUOTED([TDE_LIBDIR], "", [contain path to TDE libs if compiled with the TDE support])
  2175. fi
  2176. if test -n "$SS_OTHER_LIBLINK"; then
  2177. SS_LIBLINK="$SS_LIBLINK $SS_OTHER_LIBLINK"
  2178. fi
  2179. if test -n "$SS_OTHER_LIBDIRS"; then
  2180. SS_LIBDIRS="$SS_LIBDIRS $SS_OTHER_LIBDIRS"
  2181. SS_OTHER_LIBDIRS=`echo "$SS_OTHER_LIBDIRS" | sed -e s/-L//g`
  2182. SS_RPATH="$SS_RPATH -rpath $SS_OTHER_LIBDIRS"
  2183. fi
  2184. if test -n "$SS_OTHER_INCDIRS"; then
  2185. SS_INCDIRS="$SS_INCDIRS $SS_OTHER_INCDIRS"
  2186. fi
  2187. if test "$SS_LINK_TO_LIBDL" = "yes"; then
  2188. SS_LIBLINK="$SS_LIBLINK -ldl"
  2189. fi
  2190. if test "$SS_LINK_TO_LIBZ" = "yes"; then
  2191. SS_LIBLINK="$SS_LIBLINK -lz"
  2192. fi
  2193. if test "$SS_LINK_TO_XSS" = "yes"; then
  2194. SS_LIBLINK="$SS_LIBLINK -lXss"
  2195. fi
  2196. AC_SUBST(SS_CPPFLAGS)
  2197. AC_SUBST(SS_INCDIRS)
  2198. AC_SUBST(SS_LDFLAGS)
  2199. AC_SUBST(SS_RPATH)
  2200. AC_SUBST(SS_LIBDIRS)
  2201. AC_SUBST(SS_LIBLINK)
  2202. if test "$SS_USE_QT4" = "no"; then
  2203. SS_QT_MOC=$SS_QT3_MOC
  2204. SS_QT_MOC_FLAGS=""
  2205. else
  2206. SS_QT_MOC=$SS_QT4_MOC
  2207. SS_QT_MOC_FLAGS="-DCOMPILE_USE_QT4"
  2208. fi
  2209. AC_SUBST(SS_QT_MOC)
  2210. AC_SUBST(SS_QT_MOC_FLAGS)
  2211. build_date=`date -u`
  2212. if test -z "$build_date"; then
  2213. build_date=`date`
  2214. fi
  2215. if test -z "$build_date"; then
  2216. build_date="unknown"
  2217. fi
  2218. AC_DEFINE_UNQUOTED([BUILD_DATE],"$build_date", [this is the build date (configure date rather)])
  2219. dnl # Let's sort the build flags
  2220. SS_AUX_CHARS="a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9"
  2221. buid_flags=""
  2222. for achar in $SS_AUX_CHARS; do
  2223. tmp_val=`echo "$SS_BUILD_FLAGS" | grep $achar`
  2224. if test "$tmp_val"; then
  2225. build_flags="$build_flags$achar"
  2226. fi
  2227. done
  2228. SS_DIRTAG=`echo $VERSION | cut -d . -f 1,2`
  2229. AC_DEFINE_UNQUOTED([VERSION_BRANCH], "$SS_DIRTAG", [MAJOR.MINOR part of version])
  2230. AC_DEFINE_UNQUOTED([BUILD_FLAGS],"$target_cpu-$build_flags", [these are the build flags])
  2231. globalkvircdir="\${datadir}/kvirc/$SS_DIRTAG"
  2232. AC_SUBST(globalkvircdir)
  2233. configdir="\${globalkvircdir}/config"
  2234. AC_SUBST(configdir)
  2235. picsdir="\${globalkvircdir}/pics"
  2236. AC_SUBST(picsdir)
  2237. helpdir="\${globalkvircdir}/help/en"
  2238. AC_SUBST(helpdir)
  2239. pluglibdir="\${globalkvircdir}/modules"
  2240. AC_SUBST(pluglibdir)
  2241. modulelibdir="\${globalkvircdir}/modules"
  2242. AC_SUBST(modulelibdir)
  2243. defscriptdir="\${globalkvircdir}/defscript"
  2244. AC_SUBST(defscriptdir)
  2245. themedir="\${globalkvircdir}/themes"
  2246. AC_SUBST(themedir)
  2247. msgcolorsdir="\${globalkvircdir}/msgcolors"
  2248. AC_SUBST(msgcolorsdir)
  2249. if test -z "$mandir"; then
  2250. mandir="\${exec_prefix}/man/man1"
  2251. fi
  2252. AC_SUBST(mandir)
  2253. licensedir="\${globalkvircdir}/license"
  2254. AC_SUBST(licensedir)
  2255. if test -n "$SS_KDE_SERVICESDIR"; then
  2256. kdeservicesdir="$SS_KDE_SERVICESDIR"
  2257. else
  2258. kdeservicesdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/protocols"
  2259. fi
  2260. AC_SUBST(kdeservicesdir)
  2261. if test "$SS_KDE_REQUESTED" = "yes"; then
  2262. iconapps16datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/16x16/apps"
  2263. iconapps32datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/32x32/apps"
  2264. iconapps48datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/48x48/apps"
  2265. iconapps64datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/64x64/apps"
  2266. iconapps128datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/128x128/apps"
  2267. iconappsscalabledatadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/scalable/apps"
  2268. iconmime16datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/16x16/mimetypes"
  2269. iconmime32datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/32x32/mimetypes"
  2270. iconmime48datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/48x48/mimetypes"
  2271. iconmime64datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/64x64/mimetypes"
  2272. iconmime128datadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/128x128/mimetypes"
  2273. iconmimescalabledatadir="$SS_KDE_GENERAL_DIR/share/icons/hicolor/scalable/mimetypes"
  2274. applnkdir="$SS_KDE_GENERAL_DIR/share/applnk/Internet"
  2275. mimelnkdir="$SS_KDE_GENERAL_DIR/share/mimelnk/text"
  2276. else
  2277. iconapps16datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/16x16"
  2278. iconapps32datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/32x32"
  2279. iconapps48datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/48x48"
  2280. iconapps64datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/64x64"
  2281. iconapps128datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/128x128"
  2282. iconappsscalabledatadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/scalable"
  2283. iconmime16datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/16x16"
  2284. iconmime32datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/32x32"
  2285. iconmime48datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/48x48"
  2286. iconmime64datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/64x64"
  2287. iconmime128datadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/128x128"
  2288. iconmimescalabledatadir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/icons/scalable"
  2289. applnkdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/applnk"
  2290. mimelnkdir="\${exec_prefix}/share/kvirc/$SS_DIRTAG/mimelnk"
  2291. fi
  2292. AC_SUBST(iconapps16datadir)
  2293. AC_SUBST(iconapps32datadir)
  2294. AC_SUBST(iconapps48datadir)
  2295. AC_SUBST(iconapps64datadir)
  2296. AC_SUBST(iconapps128datadir)
  2297. AC_SUBST(iconappsscalabledatadir)
  2298. AC_SUBST(iconmime16datadir)
  2299. AC_SUBST(iconmime32datadir)
  2300. AC_SUBST(iconmime48datadir)
  2301. AC_SUBST(iconmime64datadir)
  2302. AC_SUBST(iconmime128datadir)
  2303. AC_SUBST(iconmimescalabledatadir)
  2304. AC_SUBST(applnkdir)
  2305. AC_SUBST(mimelnkdir)
  2306. localedir="\${globalkvircdir}/locale"
  2307. AC_SUBST(localedir)
  2308. headersdir="\${exec_prefix}/include/kvirc/$VERSION"
  2309. AC_SUBST(headersdir)
  2310. configmodulesdir="\${globalkvircdir}/config/modules"
  2311. AC_SUBST(configmodulesdir)
  2312. topdir=`pwd`
  2313. AC_SUBST(topdir)
  2314. AC_SS_HEADER([Configuration status:])
  2315. AC_SS_SET_GREENINK
  2316. echo "### The kvirc binary will be installed in:"
  2317. echo "### $bindir"
  2318. echo "### The libraries will be installed in:"
  2319. echo "### $libdir"
  2320. echo "### Modules will be installed in:"
  2321. echo "### $pluglibdir"
  2322. AC_SS_SET_NORMALINK
  2323. AC_SS_HEADER([Take a look at the paths above just to be sure that they're correct])
  2324. ])
  2325. dnl just a wrapper to clean up configure.in
  2326. AC_DEFUN([KVIRC_PROG_LIBTOOL],
  2327. [
  2328. AM_PROG_LIBTOOL
  2329. LIBTOOL_SHELL="/bin/sh ./libtool"
  2330. # LIBTOOL="$LIBTOOL --silent"
  2331. AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps (experimental, needs objprelink in path)],
  2332. kvirc_use_objprelink=$enableval, kvirc_use_objprelink=no)
  2333. if test "x$kvirc_use_objprelink" = "xyes"; then
  2334. echo Patching libtool to run objprelink.
  2335. mv libtool libtool.orig
  2336. cat > libtool <<\EOF
  2337. #! /bin/sh
  2338. ALREADYPRELINKED=""
  2339. for n
  2340. do
  2341. case $n in
  2342. *.o) k=$n
  2343. if test -r $k; then
  2344. ISELF=`file $k | grep ELF`
  2345. if test -n "$ISELF"; then
  2346. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2347. if test -z "$ALREADY"; then
  2348. echo objprelink $k
  2349. objprelink $k
  2350. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2351. fi
  2352. fi
  2353. fi
  2354. ;;
  2355. *.lo) k=$n
  2356. if test -r $k; then
  2357. ISELF=`file $k | grep ELF`
  2358. if test -n "$ISELF"; then
  2359. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2360. if test -z "$ALREADY"; then
  2361. echo objprelink $k
  2362. objprelink $k
  2363. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2364. fi
  2365. fi
  2366. fi
  2367. ASHORTNAME=`echo $n | sed -e 's/\.lo$//'`
  2368. k=".libs/$ASHORTNAME.o"
  2369. if test -r $k; then
  2370. ISELF=`file $k | grep ELF`
  2371. if test -n "$ISELF"; then
  2372. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2373. if test -z "$ALREADY"; then
  2374. echo objprelink $k
  2375. objprelink $k
  2376. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2377. fi
  2378. fi
  2379. fi
  2380. k=".libs/$ASHORTNAME.lo"
  2381. if test -r $k; then
  2382. ISELF=`file $k | grep ELF`
  2383. if test -n "$ISELF"; then
  2384. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2385. if test -z "$ALREADY"; then
  2386. echo objprelink $k
  2387. objprelink $k
  2388. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2389. fi
  2390. fi
  2391. fi
  2392. k="$ASHORTNAME.o"
  2393. if test -r $k; then
  2394. ISELF=`file $k | grep ELF`
  2395. if test -n "$ISELF"; then
  2396. ALREADY=`echo $ALREADYPRELINKED | grep "!!!$k"`
  2397. if test -z "$ALREADY"; then
  2398. echo objprelink $k
  2399. objprelink $k
  2400. ALREADYPRELINKED="$ALREADYPRELINKED !!!$k"
  2401. fi
  2402. fi
  2403. fi
  2404. ;;
  2405. esac
  2406. done
  2407. EOF
  2408. cat >> libtool libtool.orig
  2409. rm libtool.orig
  2410. chmod a+x libtool
  2411. fi
  2412. ])
  2413. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2414. #
  2415. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  2416. # 2006, 2007, 2008 Free Software Foundation, Inc.
  2417. # Written by Gordon Matzigkeit, 1996
  2418. #
  2419. # This file is free software; the Free Software Foundation gives
  2420. # unlimited permission to copy and/or distribute it, with or without
  2421. # modifications, as long as this notice is preserved.
  2422. m4_define([_LT_COPYING], [dnl
  2423. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  2424. # 2006, 2007, 2008 Free Software Foundation, Inc.
  2425. # Written by Gordon Matzigkeit, 1996
  2426. #
  2427. # This file is part of GNU Libtool.
  2428. #
  2429. # GNU Libtool is free software; you can redistribute it and/or
  2430. # modify it under the terms of the GNU General Public License as
  2431. # published by the Free Software Foundation; either version 2 of
  2432. # the License, or (at your option) any later version.
  2433. #
  2434. # As a special exception to the GNU General Public License,
  2435. # if you distribute this file as part of a program or library that
  2436. # is built using GNU Libtool, you may include this file under the
  2437. # same distribution terms that you use for the rest of that program.
  2438. #
  2439. # GNU Libtool is distributed in the hope that it will be useful,
  2440. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  2441. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2442. # GNU General Public License for more details.
  2443. #
  2444. # You should have received a copy of the GNU General Public License
  2445. # along with GNU Libtool; see the file COPYING. If not, a copy
  2446. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  2447. # obtained by writing to the Free Software Foundation, Inc.,
  2448. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  2449. ])
  2450. # serial 56 LT_INIT
  2451. # LT_PREREQ(VERSION)
  2452. # ------------------
  2453. # Complain and exit if this libtool version is less that VERSION.
  2454. m4_defun([LT_PREREQ],
  2455. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  2456. [m4_default([$3],
  2457. [m4_fatal([Libtool version $1 or higher is required],
  2458. 63)])],
  2459. [$2])])
  2460. # _LT_CHECK_BUILDDIR
  2461. # ------------------
  2462. # Complain if the absolute build directory name contains unusual characters
  2463. m4_defun([_LT_CHECK_BUILDDIR],
  2464. [case `pwd` in
  2465. *\ * | *\ *)
  2466. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  2467. esac
  2468. ])
  2469. # LT_INIT([OPTIONS])
  2470. # ------------------
  2471. AC_DEFUN([LT_INIT],
  2472. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  2473. AC_BEFORE([$0], [LT_LANG])dnl
  2474. AC_BEFORE([$0], [LT_OUTPUT])dnl
  2475. AC_BEFORE([$0], [LTDL_INIT])dnl
  2476. m4_require([_LT_CHECK_BUILDDIR])dnl
  2477. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  2478. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  2479. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  2480. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  2481. dnl unless we require an AC_DEFUNed macro:
  2482. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  2483. AC_REQUIRE([LTSUGAR_VERSION])dnl
  2484. AC_REQUIRE([LTVERSION_VERSION])dnl
  2485. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  2486. m4_require([_LT_PROG_LTMAIN])dnl
  2487. dnl Parse OPTIONS
  2488. _LT_SET_OPTIONS([$0], [$1])
  2489. # This can be used to rebuild libtool when needed
  2490. LIBTOOL_DEPS="$ltmain"
  2491. # Always use our own libtool.
  2492. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  2493. AC_SUBST(LIBTOOL)dnl
  2494. _LT_SETUP
  2495. # Only expand once:
  2496. m4_define([LT_INIT])
  2497. ])# LT_INIT
  2498. # Old names:
  2499. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  2500. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  2501. dnl aclocal-1.4 backwards compatibility:
  2502. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  2503. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  2504. # _LT_CC_BASENAME(CC)
  2505. # -------------------
  2506. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  2507. m4_defun([_LT_CC_BASENAME],
  2508. [for cc_temp in $1""; do
  2509. case $cc_temp in
  2510. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  2511. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  2512. \-*) ;;
  2513. *) break;;
  2514. esac
  2515. done
  2516. cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  2517. ])
  2518. # _LT_FILEUTILS_DEFAULTS
  2519. # ----------------------
  2520. # It is okay to use these file commands and assume they have been set
  2521. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  2522. m4_defun([_LT_FILEUTILS_DEFAULTS],
  2523. [: ${CP="cp -f"}
  2524. : ${MV="mv -f"}
  2525. : ${RM="rm -f"}
  2526. ])# _LT_FILEUTILS_DEFAULTS
  2527. # _LT_SETUP
  2528. # ---------
  2529. m4_defun([_LT_SETUP],
  2530. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2531. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2532. _LT_DECL([], [host_alias], [0], [The host system])dnl
  2533. _LT_DECL([], [host], [0])dnl
  2534. _LT_DECL([], [host_os], [0])dnl
  2535. dnl
  2536. _LT_DECL([], [build_alias], [0], [The build system])dnl
  2537. _LT_DECL([], [build], [0])dnl
  2538. _LT_DECL([], [build_os], [0])dnl
  2539. dnl
  2540. AC_REQUIRE([AC_PROG_CC])dnl
  2541. AC_REQUIRE([LT_PATH_LD])dnl
  2542. AC_REQUIRE([LT_PATH_NM])dnl
  2543. dnl
  2544. AC_REQUIRE([AC_PROG_LN_S])dnl
  2545. test -z "$LN_S" && LN_S="ln -s"
  2546. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  2547. dnl
  2548. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  2549. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  2550. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  2551. dnl
  2552. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2553. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2554. m4_require([_LT_CMD_RELOAD])dnl
  2555. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  2556. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  2557. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  2558. _LT_CONFIG_LIBTOOL_INIT([
  2559. # See if we are running on zsh, and set the options which allow our
  2560. # commands through without removal of \ escapes INIT.
  2561. if test -n "\${ZSH_VERSION+set}" ; then
  2562. setopt NO_GLOB_SUBST
  2563. fi
  2564. ])
  2565. if test -n "${ZSH_VERSION+set}" ; then
  2566. setopt NO_GLOB_SUBST
  2567. fi
  2568. _LT_CHECK_OBJDIR
  2569. m4_require([_LT_TAG_COMPILER])dnl
  2570. _LT_PROG_ECHO_BACKSLASH
  2571. case $host_os in
  2572. aix3*)
  2573. # AIX sometimes has problems with the GCC collect2 program. For some
  2574. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2575. # vanish in a puff of smoke.
  2576. if test "X${COLLECT_NAMES+set}" != Xset; then
  2577. COLLECT_NAMES=
  2578. export COLLECT_NAMES
  2579. fi
  2580. ;;
  2581. esac
  2582. # Sed substitution that helps us do robust quoting. It backslashifies
  2583. # metacharacters that are still active within double-quoted strings.
  2584. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  2585. # Same as above, but do not quote variable references.
  2586. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  2587. # Sed substitution to delay expansion of an escaped shell variable in a
  2588. # double_quote_subst'ed string.
  2589. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  2590. # Sed substitution to delay expansion of an escaped single quote.
  2591. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  2592. # Sed substitution to avoid accidental globbing in evaled expressions
  2593. no_glob_subst='s/\*/\\\*/g'
  2594. # Global variables:
  2595. ofile=libtool
  2596. can_build_shared=yes
  2597. # All known linkers require a `.a' archive for static linking (except MSVC,
  2598. # which needs '.lib').
  2599. libext=a
  2600. with_gnu_ld="$lt_cv_prog_gnu_ld"
  2601. old_CC="$CC"
  2602. old_CFLAGS="$CFLAGS"
  2603. # Set sane defaults for various variables
  2604. test -z "$CC" && CC=cc
  2605. test -z "$LTCC" && LTCC=$CC
  2606. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  2607. test -z "$LD" && LD=ld
  2608. test -z "$ac_objext" && ac_objext=o
  2609. _LT_CC_BASENAME([$compiler])
  2610. # Only perform the check for file, if the check method requires it
  2611. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  2612. case $deplibs_check_method in
  2613. file_magic*)
  2614. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  2615. _LT_PATH_MAGIC
  2616. fi
  2617. ;;
  2618. esac
  2619. # Use C for the default configuration in the libtool script
  2620. LT_SUPPORTED_TAG([CC])
  2621. _LT_LANG_C_CONFIG
  2622. _LT_LANG_DEFAULT_CONFIG
  2623. _LT_CONFIG_COMMANDS
  2624. ])# _LT_SETUP
  2625. # _LT_PROG_LTMAIN
  2626. # ---------------
  2627. # Note that this code is called both from `configure', and `config.status'
  2628. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  2629. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  2630. # so we pass a copy along to make sure it has a sensible value anyway.
  2631. m4_defun([_LT_PROG_LTMAIN],
  2632. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  2633. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  2634. ltmain="$ac_aux_dir/ltmain.sh"
  2635. ])# _LT_PROG_LTMAIN
  2636. ## ------------------------------------- ##
  2637. ## Accumulate code for creating libtool. ##
  2638. ## ------------------------------------- ##
  2639. # So that we can recreate a full libtool script including additional
  2640. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  2641. # in macros and then make a single call at the end using the `libtool'
  2642. # label.
  2643. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  2644. # ----------------------------------------
  2645. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  2646. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  2647. [m4_ifval([$1],
  2648. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  2649. [$1
  2650. ])])])
  2651. # Initialize.
  2652. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  2653. # _LT_CONFIG_LIBTOOL([COMMANDS])
  2654. # ------------------------------
  2655. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  2656. m4_define([_LT_CONFIG_LIBTOOL],
  2657. [m4_ifval([$1],
  2658. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  2659. [$1
  2660. ])])])
  2661. # Initialize.
  2662. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  2663. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  2664. # -----------------------------------------------------
  2665. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  2666. [_LT_CONFIG_LIBTOOL([$1])
  2667. _LT_CONFIG_LIBTOOL_INIT([$2])
  2668. ])
  2669. # _LT_FORMAT_COMMENT([COMMENT])
  2670. # -----------------------------
  2671. # Add leading comment marks to the start of each line, and a trailing
  2672. # full-stop to the whole comment if one is not present already.
  2673. m4_define([_LT_FORMAT_COMMENT],
  2674. [m4_ifval([$1], [
  2675. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  2676. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  2677. )])
  2678. ## ------------------------ ##
  2679. ## FIXME: Eliminate VARNAME ##
  2680. ## ------------------------ ##
  2681. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  2682. # -------------------------------------------------------------------
  2683. # CONFIGNAME is the name given to the value in the libtool script.
  2684. # VARNAME is the (base) name used in the configure script.
  2685. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  2686. # VARNAME. Any other value will be used directly.
  2687. m4_define([_LT_DECL],
  2688. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  2689. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  2690. [m4_ifval([$1], [$1], [$2])])
  2691. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  2692. m4_ifval([$4],
  2693. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  2694. lt_dict_add_subkey([lt_decl_dict], [$2],
  2695. [tagged?], [m4_ifval([$5], [yes], [no])])])
  2696. ])
  2697. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  2698. # --------------------------------------------------------
  2699. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  2700. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  2701. # ------------------------------------------------
  2702. m4_define([lt_decl_tag_varnames],
  2703. [_lt_decl_filter([tagged?], [yes], $@)])
  2704. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  2705. # ---------------------------------------------------------
  2706. m4_define([_lt_decl_filter],
  2707. [m4_case([$#],
  2708. [0], [m4_fatal([$0: too few arguments: $#])],
  2709. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  2710. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  2711. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  2712. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  2713. ])
  2714. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  2715. # --------------------------------------------------
  2716. m4_define([lt_decl_quote_varnames],
  2717. [_lt_decl_filter([value], [1], $@)])
  2718. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  2719. # ---------------------------------------------------
  2720. m4_define([lt_decl_dquote_varnames],
  2721. [_lt_decl_filter([value], [2], $@)])
  2722. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  2723. # ---------------------------------------------------
  2724. m4_define([lt_decl_varnames_tagged],
  2725. [m4_assert([$# <= 2])dnl
  2726. _$0(m4_quote(m4_default([$1], [[, ]])),
  2727. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  2728. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  2729. m4_define([_lt_decl_varnames_tagged],
  2730. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  2731. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  2732. # ------------------------------------------------
  2733. m4_define([lt_decl_all_varnames],
  2734. [_$0(m4_quote(m4_default([$1], [[, ]])),
  2735. m4_if([$2], [],
  2736. m4_quote(lt_decl_varnames),
  2737. m4_quote(m4_shift($@))))[]dnl
  2738. ])
  2739. m4_define([_lt_decl_all_varnames],
  2740. [lt_join($@, lt_decl_varnames_tagged([$1],
  2741. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  2742. ])
  2743. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  2744. # ------------------------------------
  2745. # Quote a variable value, and forward it to `config.status' so that its
  2746. # declaration there will have the same value as in `configure'. VARNAME
  2747. # must have a single quote delimited value for this to work.
  2748. m4_define([_LT_CONFIG_STATUS_DECLARE],
  2749. [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
  2750. # _LT_CONFIG_STATUS_DECLARATIONS
  2751. # ------------------------------
  2752. # We delimit libtool config variables with single quotes, so when
  2753. # we write them to config.status, we have to be sure to quote all
  2754. # embedded single quotes properly. In configure, this macro expands
  2755. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  2756. #
  2757. # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
  2758. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  2759. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  2760. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  2761. # _LT_LIBTOOL_TAGS
  2762. # ----------------
  2763. # Output comment and list of tags supported by the script
  2764. m4_defun([_LT_LIBTOOL_TAGS],
  2765. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  2766. available_tags="_LT_TAGS"dnl
  2767. ])
  2768. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  2769. # -----------------------------------
  2770. # Extract the dictionary values for VARNAME (optionally with TAG) and
  2771. # expand to a commented shell variable setting:
  2772. #
  2773. # # Some comment about what VAR is for.
  2774. # visible_name=$lt_internal_name
  2775. m4_define([_LT_LIBTOOL_DECLARE],
  2776. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  2777. [description])))[]dnl
  2778. m4_pushdef([_libtool_name],
  2779. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  2780. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  2781. [0], [_libtool_name=[$]$1],
  2782. [1], [_libtool_name=$lt_[]$1],
  2783. [2], [_libtool_name=$lt_[]$1],
  2784. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  2785. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  2786. ])
  2787. # _LT_LIBTOOL_CONFIG_VARS
  2788. # -----------------------
  2789. # Produce commented declarations of non-tagged libtool config variables
  2790. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  2791. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  2792. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  2793. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  2794. [m4_foreach([_lt_var],
  2795. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  2796. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  2797. # _LT_LIBTOOL_TAG_VARS(TAG)
  2798. # -------------------------
  2799. m4_define([_LT_LIBTOOL_TAG_VARS],
  2800. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  2801. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  2802. # _LT_TAGVAR(VARNAME, [TAGNAME])
  2803. # ------------------------------
  2804. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  2805. # _LT_CONFIG_COMMANDS
  2806. # -------------------
  2807. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  2808. # variables for single and double quote escaping we saved from calls
  2809. # to _LT_DECL, we can put quote escaped variables declarations
  2810. # into `config.status', and then the shell code to quote escape them in
  2811. # for loops in `config.status'. Finally, any additional code accumulated
  2812. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  2813. m4_defun([_LT_CONFIG_COMMANDS],
  2814. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  2815. dnl If the libtool generation code has been placed in $CONFIG_LT,
  2816. dnl instead of duplicating it all over again into config.status,
  2817. dnl then we will have config.status run $CONFIG_LT later, so it
  2818. dnl needs to know what name is stored there:
  2819. [AC_CONFIG_COMMANDS([libtool],
  2820. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  2821. dnl If the libtool generation code is destined for config.status,
  2822. dnl expand the accumulated commands and init code now:
  2823. [AC_CONFIG_COMMANDS([libtool],
  2824. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  2825. ])#_LT_CONFIG_COMMANDS
  2826. # Initialize.
  2827. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  2828. [
  2829. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2830. # if CDPATH is set.
  2831. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  2832. sed_quote_subst='$sed_quote_subst'
  2833. double_quote_subst='$double_quote_subst'
  2834. delay_variable_subst='$delay_variable_subst'
  2835. _LT_CONFIG_STATUS_DECLARATIONS
  2836. LTCC='$LTCC'
  2837. LTCFLAGS='$LTCFLAGS'
  2838. compiler='$compiler_DEFAULT'
  2839. # Quote evaled strings.
  2840. for var in lt_decl_all_varnames([[ \
  2841. ]], lt_decl_quote_varnames); do
  2842. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  2843. *[[\\\\\\\`\\"\\\$]]*)
  2844. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  2845. ;;
  2846. *)
  2847. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  2848. ;;
  2849. esac
  2850. done
  2851. # Double-quote double-evaled strings.
  2852. for var in lt_decl_all_varnames([[ \
  2853. ]], lt_decl_dquote_varnames); do
  2854. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  2855. *[[\\\\\\\`\\"\\\$]]*)
  2856. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  2857. ;;
  2858. *)
  2859. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  2860. ;;
  2861. esac
  2862. done
  2863. # Fix-up fallback echo if it was mangled by the above quoting rules.
  2864. case \$lt_ECHO in
  2865. *'\\\[$]0 --fallback-echo"')dnl "
  2866. lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
  2867. ;;
  2868. esac
  2869. _LT_OUTPUT_LIBTOOL_INIT
  2870. ])
  2871. # LT_OUTPUT
  2872. # ---------
  2873. # This macro allows early generation of the libtool script (before
  2874. # AC_OUTPUT is called), incase it is used in configure for compilation
  2875. # tests.
  2876. AC_DEFUN([LT_OUTPUT],
  2877. [: ${CONFIG_LT=./config.lt}
  2878. AC_MSG_NOTICE([creating $CONFIG_LT])
  2879. cat >"$CONFIG_LT" <<_LTEOF
  2880. #! $SHELL
  2881. # Generated by $as_me.
  2882. # Run this file to recreate a libtool stub with the current configuration.
  2883. lt_cl_silent=false
  2884. SHELL=\${CONFIG_SHELL-$SHELL}
  2885. _LTEOF
  2886. cat >>"$CONFIG_LT" <<\_LTEOF
  2887. AS_SHELL_SANITIZE
  2888. _AS_PREPARE
  2889. exec AS_MESSAGE_FD>&1
  2890. exec AS_MESSAGE_LOG_FD>>config.log
  2891. {
  2892. echo
  2893. AS_BOX([Running $as_me.])
  2894. } >&AS_MESSAGE_LOG_FD
  2895. lt_cl_help="\
  2896. \`$as_me' creates a local libtool stub from the current configuration,
  2897. for use in further configure time tests before the real libtool is
  2898. generated.
  2899. Usage: $[0] [[OPTIONS]]
  2900. -h, --help print this help, then exit
  2901. -V, --version print version number, then exit
  2902. -q, --quiet do not print progress messages
  2903. -d, --debug don't remove temporary files
  2904. Report bugs to <bug-libtool@gnu.org>."
  2905. lt_cl_version="\
  2906. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  2907. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  2908. configured by $[0], generated by m4_PACKAGE_STRING.
  2909. Copyright (C) 2008 Free Software Foundation, Inc.
  2910. This config.lt script is free software; the Free Software Foundation
  2911. gives unlimited permision to copy, distribute and modify it."
  2912. while test $[#] != 0
  2913. do
  2914. case $[1] in
  2915. --version | --v* | -V )
  2916. echo "$lt_cl_version"; exit 0 ;;
  2917. --help | --h* | -h )
  2918. echo "$lt_cl_help"; exit 0 ;;
  2919. --debug | --d* | -d )
  2920. debug=: ;;
  2921. --quiet | --q* | --silent | --s* | -q )
  2922. lt_cl_silent=: ;;
  2923. -*) AC_MSG_ERROR([unrecognized option: $[1]
  2924. Try \`$[0] --help' for more information.]) ;;
  2925. *) AC_MSG_ERROR([unrecognized argument: $[1]
  2926. Try \`$[0] --help' for more information.]) ;;
  2927. esac
  2928. shift
  2929. done
  2930. if $lt_cl_silent; then
  2931. exec AS_MESSAGE_FD>/dev/null
  2932. fi
  2933. _LTEOF
  2934. cat >>"$CONFIG_LT" <<_LTEOF
  2935. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  2936. _LTEOF
  2937. cat >>"$CONFIG_LT" <<\_LTEOF
  2938. AC_MSG_NOTICE([creating $ofile])
  2939. _LT_OUTPUT_LIBTOOL_COMMANDS
  2940. AS_EXIT(0)
  2941. _LTEOF
  2942. chmod +x "$CONFIG_LT"
  2943. # configure is writing to config.log, but config.lt does its own redirection,
  2944. # appending to config.log, which fails on DOS, as config.log is still kept
  2945. # open by configure. Here we exec the FD to /dev/null, effectively closing
  2946. # config.log, so it can be properly (re)opened and appended to by config.lt.
  2947. if test "$no_create" != yes; then
  2948. lt_cl_success=:
  2949. test "$silent" = yes &&
  2950. lt_config_lt_args="$lt_config_lt_args --quiet"
  2951. exec AS_MESSAGE_LOG_FD>/dev/null
  2952. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  2953. exec AS_MESSAGE_LOG_FD>>config.log
  2954. $lt_cl_success || AS_EXIT(1)
  2955. fi
  2956. ])# LT_OUTPUT
  2957. # _LT_CONFIG(TAG)
  2958. # ---------------
  2959. # If TAG is the built-in tag, create an initial libtool script with a
  2960. # default configuration from the untagged config vars. Otherwise add code
  2961. # to config.status for appending the configuration named by TAG from the
  2962. # matching tagged config vars.
  2963. m4_defun([_LT_CONFIG],
  2964. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2965. _LT_CONFIG_SAVE_COMMANDS([
  2966. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  2967. m4_if(_LT_TAG, [C], [
  2968. # See if we are running on zsh, and set the options which allow our
  2969. # commands through without removal of \ escapes.
  2970. if test -n "${ZSH_VERSION+set}" ; then
  2971. setopt NO_GLOB_SUBST
  2972. fi
  2973. cfgfile="${ofile}T"
  2974. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  2975. $RM "$cfgfile"
  2976. cat <<_LT_EOF >> "$cfgfile"
  2977. #! $SHELL
  2978. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2979. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  2980. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2981. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  2982. #
  2983. _LT_COPYING
  2984. _LT_LIBTOOL_TAGS
  2985. # ### BEGIN LIBTOOL CONFIG
  2986. _LT_LIBTOOL_CONFIG_VARS
  2987. _LT_LIBTOOL_TAG_VARS
  2988. # ### END LIBTOOL CONFIG
  2989. _LT_EOF
  2990. case $host_os in
  2991. aix3*)
  2992. cat <<\_LT_EOF >> "$cfgfile"
  2993. # AIX sometimes has problems with the GCC collect2 program. For some
  2994. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2995. # vanish in a puff of smoke.
  2996. if test "X${COLLECT_NAMES+set}" != Xset; then
  2997. COLLECT_NAMES=
  2998. export COLLECT_NAMES
  2999. fi
  3000. _LT_EOF
  3001. ;;
  3002. esac
  3003. _LT_PROG_LTMAIN
  3004. # We use sed instead of cat because bash on DJGPP gets confused if
  3005. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3006. # text mode, it properly converts lines to CR/LF. This bash problem
  3007. # is reportedly fixed, but why not run on old versions too?
  3008. sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  3009. || (rm -f "$cfgfile"; exit 1)
  3010. _LT_PROG_XSI_SHELLFNS
  3011. sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  3012. || (rm -f "$cfgfile"; exit 1)
  3013. mv -f "$cfgfile" "$ofile" ||
  3014. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3015. chmod +x "$ofile"
  3016. ],
  3017. [cat <<_LT_EOF >> "$ofile"
  3018. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  3019. dnl in a comment (ie after a #).
  3020. # ### BEGIN LIBTOOL TAG CONFIG: $1
  3021. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  3022. # ### END LIBTOOL TAG CONFIG: $1
  3023. _LT_EOF
  3024. ])dnl /m4_if
  3025. ],
  3026. [m4_if([$1], [], [
  3027. PACKAGE='$PACKAGE'
  3028. VERSION='$VERSION'
  3029. TIMESTAMP='$TIMESTAMP'
  3030. RM='$RM'
  3031. ofile='$ofile'], [])
  3032. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  3033. ])# _LT_CONFIG
  3034. # LT_SUPPORTED_TAG(TAG)
  3035. # ---------------------
  3036. # Trace this macro to discover what tags are supported by the libtool
  3037. # --tag option, using:
  3038. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  3039. AC_DEFUN([LT_SUPPORTED_TAG], [])
  3040. # C support is built-in for now
  3041. m4_define([_LT_LANG_C_enabled], [])
  3042. m4_define([_LT_TAGS], [])
  3043. # LT_LANG(LANG)
  3044. # -------------
  3045. # Enable libtool support for the given language if not already enabled.
  3046. AC_DEFUN([LT_LANG],
  3047. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  3048. m4_case([$1],
  3049. [C], [_LT_LANG(C)],
  3050. [C++], [_LT_LANG(CXX)],
  3051. [Java], [_LT_LANG(GCJ)],
  3052. [Fortran 77], [_LT_LANG(F77)],
  3053. [Fortran], [_LT_LANG(FC)],
  3054. [Windows Resource], [_LT_LANG(RC)],
  3055. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  3056. [_LT_LANG($1)],
  3057. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  3058. ])# LT_LANG
  3059. # _LT_LANG(LANGNAME)
  3060. # ------------------
  3061. m4_defun([_LT_LANG],
  3062. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  3063. [LT_SUPPORTED_TAG([$1])dnl
  3064. m4_append([_LT_TAGS], [$1 ])dnl
  3065. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  3066. _LT_LANG_$1_CONFIG($1)])dnl
  3067. ])# _LT_LANG
  3068. # _LT_LANG_DEFAULT_CONFIG
  3069. # -----------------------
  3070. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  3071. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  3072. [LT_LANG(CXX)],
  3073. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  3074. AC_PROVIDE_IFELSE([AC_PROG_F77],
  3075. [LT_LANG(F77)],
  3076. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  3077. AC_PROVIDE_IFELSE([AC_PROG_FC],
  3078. [LT_LANG(FC)],
  3079. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  3080. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  3081. dnl pulling things in needlessly.
  3082. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  3083. [LT_LANG(GCJ)],
  3084. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  3085. [LT_LANG(GCJ)],
  3086. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  3087. [LT_LANG(GCJ)],
  3088. [m4_ifdef([AC_PROG_GCJ],
  3089. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  3090. m4_ifdef([A][M_PROG_GCJ],
  3091. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  3092. m4_ifdef([LT_PROG_GCJ],
  3093. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  3094. AC_PROVIDE_IFELSE([LT_PROG_RC],
  3095. [LT_LANG(RC)],
  3096. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  3097. ])# _LT_LANG_DEFAULT_CONFIG
  3098. # Obsolete macros:
  3099. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  3100. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  3101. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  3102. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  3103. dnl aclocal-1.4 backwards compatibility:
  3104. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  3105. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  3106. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  3107. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  3108. # _LT_TAG_COMPILER
  3109. # ----------------
  3110. m4_defun([_LT_TAG_COMPILER],
  3111. [AC_REQUIRE([AC_PROG_CC])dnl
  3112. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  3113. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  3114. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  3115. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  3116. # If no C compiler was specified, use CC.
  3117. LTCC=${LTCC-"$CC"}
  3118. # If no C compiler flags were specified, use CFLAGS.
  3119. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  3120. # Allow CC to be a program name with arguments.
  3121. compiler=$CC
  3122. ])# _LT_TAG_COMPILER
  3123. # _LT_COMPILER_BOILERPLATE
  3124. # ------------------------
  3125. # Check for compiler boilerplate output or warnings with
  3126. # the simple compiler test code.
  3127. m4_defun([_LT_COMPILER_BOILERPLATE],
  3128. [m4_require([_LT_DECL_SED])dnl
  3129. ac_outfile=conftest.$ac_objext
  3130. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  3131. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3132. _lt_compiler_boilerplate=`cat conftest.err`
  3133. $RM conftest*
  3134. ])# _LT_COMPILER_BOILERPLATE
  3135. # _LT_LINKER_BOILERPLATE
  3136. # ----------------------
  3137. # Check for linker boilerplate output or warnings with
  3138. # the simple link test code.
  3139. m4_defun([_LT_LINKER_BOILERPLATE],
  3140. [m4_require([_LT_DECL_SED])dnl
  3141. ac_outfile=conftest.$ac_objext
  3142. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  3143. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  3144. _lt_linker_boilerplate=`cat conftest.err`
  3145. $RM -r conftest*
  3146. ])# _LT_LINKER_BOILERPLATE
  3147. # _LT_REQUIRED_DARWIN_CHECKS
  3148. # -------------------------
  3149. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  3150. case $host_os in
  3151. rhapsody* | darwin*)
  3152. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  3153. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  3154. AC_CHECK_TOOL([LIPO], [lipo], [:])
  3155. AC_CHECK_TOOL([OTOOL], [otool], [:])
  3156. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  3157. _LT_DECL([], [DSYMUTIL], [1],
  3158. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  3159. _LT_DECL([], [NMEDIT], [1],
  3160. [Tool to change global to local symbols on Mac OS X])
  3161. _LT_DECL([], [LIPO], [1],
  3162. [Tool to manipulate fat objects and archives on Mac OS X])
  3163. _LT_DECL([], [OTOOL], [1],
  3164. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  3165. _LT_DECL([], [OTOOL64], [1],
  3166. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  3167. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  3168. [lt_cv_apple_cc_single_mod=no
  3169. if test -z "${LT_MULTI_MODULE}"; then
  3170. # By default we will add the -single_module flag. You can override
  3171. # by either setting the environment variable LT_MULTI_MODULE
  3172. # non-empty at configure time, or by adding -multi_module to the
  3173. # link flags.
  3174. rm -rf libconftest.dylib*
  3175. echo "int foo(void){return 1;}" > conftest.c
  3176. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3177. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  3178. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  3179. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  3180. _lt_result=$?
  3181. if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  3182. lt_cv_apple_cc_single_mod=yes
  3183. else
  3184. cat conftest.err >&AS_MESSAGE_LOG_FD
  3185. fi
  3186. rm -rf libconftest.dylib*
  3187. rm -f conftest.*
  3188. fi])
  3189. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  3190. [lt_cv_ld_exported_symbols_list],
  3191. [lt_cv_ld_exported_symbols_list=no
  3192. save_LDFLAGS=$LDFLAGS
  3193. echo "_main" > conftest.sym
  3194. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  3195. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3196. [lt_cv_ld_exported_symbols_list=yes],
  3197. [lt_cv_ld_exported_symbols_list=no])
  3198. LDFLAGS="$save_LDFLAGS"
  3199. ])
  3200. case $host_os in
  3201. rhapsody* | darwin1.[[012]])
  3202. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  3203. darwin1.*)
  3204. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3205. darwin*) # darwin 5.x on
  3206. # if running on 10.5 or later, the deployment target defaults
  3207. # to the OS version, if on x86, and 10.4, the deployment
  3208. # target defaults to 10.4. Don't you love it?
  3209. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  3210. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  3211. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3212. 10.[[012]]*)
  3213. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  3214. 10.*)
  3215. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  3216. esac
  3217. ;;
  3218. esac
  3219. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  3220. _lt_dar_single_mod='$single_module'
  3221. fi
  3222. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  3223. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  3224. else
  3225. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  3226. fi
  3227. if test "$DSYMUTIL" != ":"; then
  3228. _lt_dsymutil='~$DSYMUTIL $lib || :'
  3229. else
  3230. _lt_dsymutil=
  3231. fi
  3232. ;;
  3233. esac
  3234. ])
  3235. # _LT_DARWIN_LINKER_FEATURES
  3236. # --------------------------
  3237. # Checks for linker and compiler features on darwin
  3238. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  3239. [
  3240. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  3241. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  3242. _LT_TAGVAR(hardcode_direct, $1)=no
  3243. _LT_TAGVAR(hardcode_automatic, $1)=yes
  3244. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3245. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  3246. _LT_TAGVAR(link_all_deplibs, $1)=yes
  3247. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  3248. case $cc_basename in
  3249. ifort*) _lt_dar_can_shared=yes ;;
  3250. *) _lt_dar_can_shared=$GCC ;;
  3251. esac
  3252. if test "$_lt_dar_can_shared" = "yes"; then
  3253. output_verbose_link_cmd=echo
  3254. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  3255. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  3256. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  3257. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  3258. m4_if([$1], [CXX],
  3259. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  3260. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  3261. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  3262. fi
  3263. ],[])
  3264. else
  3265. _LT_TAGVAR(ld_shlibs, $1)=no
  3266. fi
  3267. ])
  3268. # _LT_SYS_MODULE_PATH_AIX
  3269. # -----------------------
  3270. # Links a minimal program and checks the executable
  3271. # for the system default hardcoded library path. In most cases,
  3272. # this is /usr/lib:/lib, but when the MPI compilers are used
  3273. # the location of the communication and MPI libs are included too.
  3274. # If we don't find anything, use the default library path according
  3275. # to the aix ld manual.
  3276. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  3277. [m4_require([_LT_DECL_SED])dnl
  3278. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  3279. lt_aix_libpath_sed='
  3280. /Import File Strings/,/^$/ {
  3281. /^0/ {
  3282. s/^0 *\(.*\)$/\1/
  3283. p
  3284. }
  3285. }'
  3286. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3287. # Check for a 64-bit object if we didn't find anything.
  3288. if test -z "$aix_libpath"; then
  3289. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  3290. fi],[])
  3291. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  3292. ])# _LT_SYS_MODULE_PATH_AIX
  3293. # _LT_SHELL_INIT(ARG)
  3294. # -------------------
  3295. m4_define([_LT_SHELL_INIT],
  3296. [ifdef([AC_DIVERSION_NOTICE],
  3297. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  3298. [AC_DIVERT_PUSH(NOTICE)])
  3299. $1
  3300. AC_DIVERT_POP
  3301. ])# _LT_SHELL_INIT
  3302. # _LT_PROG_ECHO_BACKSLASH
  3303. # -----------------------
  3304. # Add some code to the start of the generated configure script which
  3305. # will find an echo command which doesn't interpret backslashes.
  3306. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  3307. [_LT_SHELL_INIT([
  3308. # Check that we are running under the correct shell.
  3309. SHELL=${CONFIG_SHELL-/bin/sh}
  3310. case X$lt_ECHO in
  3311. X*--fallback-echo)
  3312. # Remove one level of quotation (which was required for Make).
  3313. ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  3314. ;;
  3315. esac
  3316. ECHO=${lt_ECHO-echo}
  3317. if test "X[$]1" = X--no-reexec; then
  3318. # Discard the --no-reexec flag, and continue.
  3319. shift
  3320. elif test "X[$]1" = X--fallback-echo; then
  3321. # Avoid inline document here, it may be left over
  3322. :
  3323. elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
  3324. # Yippee, $ECHO works!
  3325. :
  3326. else
  3327. # Restart under the correct shell.
  3328. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3329. fi
  3330. if test "X[$]1" = X--fallback-echo; then
  3331. # used as fallback echo
  3332. shift
  3333. cat <<_LT_EOF
  3334. [$]*
  3335. _LT_EOF
  3336. exit 0
  3337. fi
  3338. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3339. # if CDPATH is set.
  3340. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  3341. if test -z "$lt_ECHO"; then
  3342. if test "X${echo_test_string+set}" != Xset; then
  3343. # find a string as large as possible, as long as the shell can cope with it
  3344. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  3345. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  3346. if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
  3347. { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
  3348. then
  3349. break
  3350. fi
  3351. done
  3352. fi
  3353. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  3354. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  3355. test "X$echo_testing_string" = "X$echo_test_string"; then
  3356. :
  3357. else
  3358. # The Solaris, AIX, and Digital Unix default echo programs unquote
  3359. # backslashes. This makes it impossible to quote backslashes using
  3360. # echo "$something" | sed 's/\\/\\\\/g'
  3361. #
  3362. # So, first we look for a working echo in the user's PATH.
  3363. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3364. for dir in $PATH /usr/ucb; do
  3365. IFS="$lt_save_ifs"
  3366. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  3367. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  3368. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  3369. test "X$echo_testing_string" = "X$echo_test_string"; then
  3370. ECHO="$dir/echo"
  3371. break
  3372. fi
  3373. done
  3374. IFS="$lt_save_ifs"
  3375. if test "X$ECHO" = Xecho; then
  3376. # We didn't find a better echo, so look for alternatives.
  3377. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
  3378. echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
  3379. test "X$echo_testing_string" = "X$echo_test_string"; then
  3380. # This shell has a builtin print -r that does the trick.
  3381. ECHO='print -r'
  3382. elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
  3383. test "X$CONFIG_SHELL" != X/bin/ksh; then
  3384. # If we have ksh, try running configure again with it.
  3385. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  3386. export ORIGINAL_CONFIG_SHELL
  3387. CONFIG_SHELL=/bin/ksh
  3388. export CONFIG_SHELL
  3389. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  3390. else
  3391. # Try using printf.
  3392. ECHO='printf %s\n'
  3393. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  3394. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  3395. test "X$echo_testing_string" = "X$echo_test_string"; then
  3396. # Cool, printf works
  3397. :
  3398. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3399. test "X$echo_testing_string" = 'X\t' &&
  3400. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3401. test "X$echo_testing_string" = "X$echo_test_string"; then
  3402. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  3403. export CONFIG_SHELL
  3404. SHELL="$CONFIG_SHELL"
  3405. export SHELL
  3406. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  3407. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  3408. test "X$echo_testing_string" = 'X\t' &&
  3409. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  3410. test "X$echo_testing_string" = "X$echo_test_string"; then
  3411. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  3412. else
  3413. # maybe with a smaller string...
  3414. prev=:
  3415. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  3416. if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
  3417. then
  3418. break
  3419. fi
  3420. prev="$cmd"
  3421. done
  3422. if test "$prev" != 'sed 50q "[$]0"'; then
  3423. echo_test_string=`eval $prev`
  3424. export echo_test_string
  3425. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  3426. else
  3427. # Oops. We lost completely, so just stick with echo.
  3428. ECHO=echo
  3429. fi
  3430. fi
  3431. fi
  3432. fi
  3433. fi
  3434. fi
  3435. # Copy echo and quote the copy suitably for passing to libtool from
  3436. # the Makefile, instead of quoting the original, which is used later.
  3437. lt_ECHO=$ECHO
  3438. if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  3439. lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  3440. fi
  3441. AC_SUBST(lt_ECHO)
  3442. ])
  3443. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  3444. _LT_DECL([], [ECHO], [1],
  3445. [An echo program that does not interpret backslashes])
  3446. ])# _LT_PROG_ECHO_BACKSLASH
  3447. # _LT_ENABLE_LOCK
  3448. # ---------------
  3449. m4_defun([_LT_ENABLE_LOCK],
  3450. [AC_ARG_ENABLE([libtool-lock],
  3451. [AS_HELP_STRING([--disable-libtool-lock],
  3452. [avoid locking (might break parallel builds)])])
  3453. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  3454. # Some flags need to be propagated to the compiler or linker for good
  3455. # libtool support.
  3456. case $host in
  3457. ia64-*-hpux*)
  3458. # Find out which ABI we are using.
  3459. echo 'int i;' > conftest.$ac_ext
  3460. if AC_TRY_EVAL(ac_compile); then
  3461. case `/usr/bin/file conftest.$ac_objext` in
  3462. *ELF-32*)
  3463. HPUX_IA64_MODE="32"
  3464. ;;
  3465. *ELF-64*)
  3466. HPUX_IA64_MODE="64"
  3467. ;;
  3468. esac
  3469. fi
  3470. rm -rf conftest*
  3471. ;;
  3472. *-*-irix6*)
  3473. # Find out which ABI we are using.
  3474. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  3475. if AC_TRY_EVAL(ac_compile); then
  3476. if test "$lt_cv_prog_gnu_ld" = yes; then
  3477. case `/usr/bin/file conftest.$ac_objext` in
  3478. *32-bit*)
  3479. LD="${LD-ld} -melf32bsmip"
  3480. ;;
  3481. *N32*)
  3482. LD="${LD-ld} -melf32bmipn32"
  3483. ;;
  3484. *64-bit*)
  3485. LD="${LD-ld} -melf64bmip"
  3486. ;;
  3487. esac
  3488. else
  3489. case `/usr/bin/file conftest.$ac_objext` in
  3490. *32-bit*)
  3491. LD="${LD-ld} -32"
  3492. ;;
  3493. *N32*)
  3494. LD="${LD-ld} -n32"
  3495. ;;
  3496. *64-bit*)
  3497. LD="${LD-ld} -64"
  3498. ;;
  3499. esac
  3500. fi
  3501. fi
  3502. rm -rf conftest*
  3503. ;;
  3504. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  3505. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  3506. # Find out which ABI we are using.
  3507. echo 'int i;' > conftest.$ac_ext
  3508. if AC_TRY_EVAL(ac_compile); then
  3509. case `/usr/bin/file conftest.o` in
  3510. *32-bit*)
  3511. case $host in
  3512. x86_64-*kfreebsd*-gnu)
  3513. LD="${LD-ld} -m elf_i386_fbsd"
  3514. ;;
  3515. x86_64-*linux*)
  3516. LD="${LD-ld} -m elf_i386"
  3517. ;;
  3518. ppc64-*linux*|powerpc64-*linux*)
  3519. LD="${LD-ld} -m elf32ppclinux"
  3520. ;;
  3521. s390x-*linux*)
  3522. LD="${LD-ld} -m elf_s390"
  3523. ;;
  3524. sparc64-*linux*)
  3525. LD="${LD-ld} -m elf32_sparc"
  3526. ;;
  3527. esac
  3528. ;;
  3529. *64-bit*)
  3530. case $host in
  3531. x86_64-*kfreebsd*-gnu)
  3532. LD="${LD-ld} -m elf_x86_64_fbsd"
  3533. ;;
  3534. x86_64-*linux*)
  3535. LD="${LD-ld} -m elf_x86_64"
  3536. ;;
  3537. ppc*-*linux*|powerpc*-*linux*)
  3538. LD="${LD-ld} -m elf64ppc"
  3539. ;;
  3540. s390*-*linux*|s390*-*tpf*)
  3541. LD="${LD-ld} -m elf64_s390"
  3542. ;;
  3543. sparc*-*linux*)
  3544. LD="${LD-ld} -m elf64_sparc"
  3545. ;;
  3546. esac
  3547. ;;
  3548. esac
  3549. fi
  3550. rm -rf conftest*
  3551. ;;
  3552. *-*-sco3.2v5*)
  3553. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  3554. SAVE_CFLAGS="$CFLAGS"
  3555. CFLAGS="$CFLAGS -belf"
  3556. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  3557. [AC_LANG_PUSH(C)
  3558. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  3559. AC_LANG_POP])
  3560. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  3561. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  3562. CFLAGS="$SAVE_CFLAGS"
  3563. fi
  3564. ;;
  3565. sparc*-*solaris*)
  3566. # Find out which ABI we are using.
  3567. echo 'int i;' > conftest.$ac_ext
  3568. if AC_TRY_EVAL(ac_compile); then
  3569. case `/usr/bin/file conftest.o` in
  3570. *64-bit*)
  3571. case $lt_cv_prog_gnu_ld in
  3572. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  3573. *)
  3574. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  3575. LD="${LD-ld} -64"
  3576. fi
  3577. ;;
  3578. esac
  3579. ;;
  3580. esac
  3581. fi
  3582. rm -rf conftest*
  3583. ;;
  3584. esac
  3585. need_locks="$enable_libtool_lock"
  3586. ])# _LT_ENABLE_LOCK
  3587. # _LT_CMD_OLD_ARCHIVE
  3588. # -------------------
  3589. m4_defun([_LT_CMD_OLD_ARCHIVE],
  3590. [AC_CHECK_TOOL(AR, ar, false)
  3591. test -z "$AR" && AR=ar
  3592. test -z "$AR_FLAGS" && AR_FLAGS=cru
  3593. _LT_DECL([], [AR], [1], [The archiver])
  3594. _LT_DECL([], [AR_FLAGS], [1])
  3595. AC_CHECK_TOOL(STRIP, strip, :)
  3596. test -z "$STRIP" && STRIP=:
  3597. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  3598. AC_CHECK_TOOL(RANLIB, ranlib, :)
  3599. test -z "$RANLIB" && RANLIB=:
  3600. _LT_DECL([], [RANLIB], [1],
  3601. [Commands used to install an old-style archive])
  3602. # Determine commands to create old-style static archives.
  3603. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  3604. old_postinstall_cmds='chmod 644 $oldlib'
  3605. old_postuninstall_cmds=
  3606. if test -n "$RANLIB"; then
  3607. case $host_os in
  3608. openbsd*)
  3609. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  3610. ;;
  3611. *)
  3612. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  3613. ;;
  3614. esac
  3615. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  3616. fi
  3617. _LT_DECL([], [old_postinstall_cmds], [2])
  3618. _LT_DECL([], [old_postuninstall_cmds], [2])
  3619. _LT_TAGDECL([], [old_archive_cmds], [2],
  3620. [Commands used to build an old-style archive])
  3621. ])# _LT_CMD_OLD_ARCHIVE
  3622. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3623. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  3624. # ----------------------------------------------------------------
  3625. # Check whether the given compiler option works
  3626. AC_DEFUN([_LT_COMPILER_OPTION],
  3627. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3628. m4_require([_LT_DECL_SED])dnl
  3629. AC_CACHE_CHECK([$1], [$2],
  3630. [$2=no
  3631. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  3632. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3633. lt_compiler_flag="$3"
  3634. # Insert the option either (1) after the last *FLAGS variable, or
  3635. # (2) before a word containing "conftest.", or (3) at the end.
  3636. # Note that $ac_compile itself does not contain backslashes and begins
  3637. # with a dollar sign (not a hyphen), so the echo should work correctly.
  3638. # The option is referenced via a variable to avoid confusing sed.
  3639. lt_compile=`echo "$ac_compile" | $SED \
  3640. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3641. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3642. -e 's:$: $lt_compiler_flag:'`
  3643. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  3644. (eval "$lt_compile" 2>conftest.err)
  3645. ac_status=$?
  3646. cat conftest.err >&AS_MESSAGE_LOG_FD
  3647. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  3648. if (exit $ac_status) && test -s "$ac_outfile"; then
  3649. # The compiler can only warn and ignore the option if not recognized
  3650. # So say no if there are warnings other than the usual output.
  3651. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  3652. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3653. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  3654. $2=yes
  3655. fi
  3656. fi
  3657. $RM conftest*
  3658. ])
  3659. if test x"[$]$2" = xyes; then
  3660. m4_if([$5], , :, [$5])
  3661. else
  3662. m4_if([$6], , :, [$6])
  3663. fi
  3664. ])# _LT_COMPILER_OPTION
  3665. # Old name:
  3666. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  3667. dnl aclocal-1.4 backwards compatibility:
  3668. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  3669. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  3670. # [ACTION-SUCCESS], [ACTION-FAILURE])
  3671. # ----------------------------------------------------
  3672. # Check whether the given linker option works
  3673. AC_DEFUN([_LT_LINKER_OPTION],
  3674. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3675. m4_require([_LT_DECL_SED])dnl
  3676. AC_CACHE_CHECK([$1], [$2],
  3677. [$2=no
  3678. save_LDFLAGS="$LDFLAGS"
  3679. LDFLAGS="$LDFLAGS $3"
  3680. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  3681. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  3682. # The linker can only warn and ignore the option if not recognized
  3683. # So say no if there are warnings
  3684. if test -s conftest.err; then
  3685. # Append any errors to the config.log.
  3686. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  3687. $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  3688. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  3689. if diff conftest.exp conftest.er2 >/dev/null; then
  3690. $2=yes
  3691. fi
  3692. else
  3693. $2=yes
  3694. fi
  3695. fi
  3696. $RM -r conftest*
  3697. LDFLAGS="$save_LDFLAGS"
  3698. ])
  3699. if test x"[$]$2" = xyes; then
  3700. m4_if([$4], , :, [$4])
  3701. else
  3702. m4_if([$5], , :, [$5])
  3703. fi
  3704. ])# _LT_LINKER_OPTION
  3705. # Old name:
  3706. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  3707. dnl aclocal-1.4 backwards compatibility:
  3708. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  3709. # LT_CMD_MAX_LEN
  3710. #---------------
  3711. AC_DEFUN([LT_CMD_MAX_LEN],
  3712. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3713. # find the maximum length of command line arguments
  3714. AC_MSG_CHECKING([the maximum length of command line arguments])
  3715. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  3716. i=0
  3717. teststring="ABCD"
  3718. case $build_os in
  3719. msdosdjgpp*)
  3720. # On DJGPP, this test can blow up pretty badly due to problems in libc
  3721. # (any single argument exceeding 2000 bytes causes a buffer overrun
  3722. # during glob expansion). Even if it were fixed, the result of this
  3723. # check would be larger than it should be.
  3724. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  3725. ;;
  3726. gnu*)
  3727. # Under GNU Hurd, this test is not required because there is
  3728. # no limit to the length of command line arguments.
  3729. # Libtool will interpret -1 as no limit whatsoever
  3730. lt_cv_sys_max_cmd_len=-1;
  3731. ;;
  3732. cygwin* | mingw* | cegcc*)
  3733. # On Win9x/ME, this test blows up -- it succeeds, but takes
  3734. # about 5 minutes as the teststring grows exponentially.
  3735. # Worse, since 9x/ME are not pre-emptively multitasking,
  3736. # you end up with a "frozen" computer, even though with patience
  3737. # the test eventually succeeds (with a max line length of 256k).
  3738. # Instead, let's just punt: use the minimum linelength reported by
  3739. # all of the supported platforms: 8192 (on NT/2K/XP).
  3740. lt_cv_sys_max_cmd_len=8192;
  3741. ;;
  3742. amigaos*)
  3743. # On AmigaOS with pdksh, this test takes hours, literally.
  3744. # So we just punt and use a minimum line length of 8192.
  3745. lt_cv_sys_max_cmd_len=8192;
  3746. ;;
  3747. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  3748. # This has been around since 386BSD, at least. Likely further.
  3749. if test -x /sbin/sysctl; then
  3750. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  3751. elif test -x /usr/sbin/sysctl; then
  3752. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  3753. else
  3754. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  3755. fi
  3756. # And add a safety zone
  3757. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3758. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3759. ;;
  3760. interix*)
  3761. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  3762. lt_cv_sys_max_cmd_len=196608
  3763. ;;
  3764. osf*)
  3765. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  3766. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  3767. # nice to cause kernel panics so lets avoid the loop below.
  3768. # First set a reasonable default.
  3769. lt_cv_sys_max_cmd_len=16384
  3770. #
  3771. if test -x /sbin/sysconfig; then
  3772. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  3773. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  3774. esac
  3775. fi
  3776. ;;
  3777. sco3.2v5*)
  3778. lt_cv_sys_max_cmd_len=102400
  3779. ;;
  3780. sysv5* | sco5v6* | sysv4.2uw2*)
  3781. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  3782. if test -n "$kargmax"; then
  3783. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  3784. else
  3785. lt_cv_sys_max_cmd_len=32768
  3786. fi
  3787. ;;
  3788. *)
  3789. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  3790. if test -n "$lt_cv_sys_max_cmd_len"; then
  3791. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  3792. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  3793. else
  3794. # Make teststring a little bigger before we do anything with it.
  3795. # a 1K string should be a reasonable start.
  3796. for i in 1 2 3 4 5 6 7 8 ; do
  3797. teststring=$teststring$teststring
  3798. done
  3799. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  3800. # If test is not a shell built-in, we'll probably end up computing a
  3801. # maximum length that is only half of the actual maximum length, but
  3802. # we can't tell.
  3803. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
  3804. = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
  3805. test $i != 17 # 1/2 MB should be enough
  3806. do
  3807. i=`expr $i + 1`
  3808. teststring=$teststring$teststring
  3809. done
  3810. # Only check the string length outside the loop.
  3811. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  3812. teststring=
  3813. # Add a significant safety factor because C++ compilers can tack on
  3814. # massive amounts of additional arguments before passing them to the
  3815. # linker. It appears as though 1/2 is a usable value.
  3816. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  3817. fi
  3818. ;;
  3819. esac
  3820. ])
  3821. if test -n $lt_cv_sys_max_cmd_len ; then
  3822. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  3823. else
  3824. AC_MSG_RESULT(none)
  3825. fi
  3826. max_cmd_len=$lt_cv_sys_max_cmd_len
  3827. _LT_DECL([], [max_cmd_len], [0],
  3828. [What is the maximum length of a command?])
  3829. ])# LT_CMD_MAX_LEN
  3830. # Old name:
  3831. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  3832. dnl aclocal-1.4 backwards compatibility:
  3833. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  3834. # _LT_HEADER_DLFCN
  3835. # ----------------
  3836. m4_defun([_LT_HEADER_DLFCN],
  3837. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  3838. ])# _LT_HEADER_DLFCN
  3839. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  3840. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  3841. # ----------------------------------------------------------------
  3842. m4_defun([_LT_TRY_DLOPEN_SELF],
  3843. [m4_require([_LT_HEADER_DLFCN])dnl
  3844. if test "$cross_compiling" = yes; then :
  3845. [$4]
  3846. else
  3847. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  3848. lt_status=$lt_dlunknown
  3849. cat > conftest.$ac_ext <<_LT_EOF
  3850. [#line __oline__ "configure"
  3851. #include "confdefs.h"
  3852. #if HAVE_DLFCN_H
  3853. #include <dlfcn.h>
  3854. #endif
  3855. #include <stdio.h>
  3856. #ifdef RTLD_GLOBAL
  3857. # define LT_DLGLOBAL RTLD_GLOBAL
  3858. #else
  3859. # ifdef DL_GLOBAL
  3860. # define LT_DLGLOBAL DL_GLOBAL
  3861. # else
  3862. # define LT_DLGLOBAL 0
  3863. # endif
  3864. #endif
  3865. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  3866. find out it does not work in some platform. */
  3867. #ifndef LT_DLLAZY_OR_NOW
  3868. # ifdef RTLD_LAZY
  3869. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  3870. # else
  3871. # ifdef DL_LAZY
  3872. # define LT_DLLAZY_OR_NOW DL_LAZY
  3873. # else
  3874. # ifdef RTLD_NOW
  3875. # define LT_DLLAZY_OR_NOW RTLD_NOW
  3876. # else
  3877. # ifdef DL_NOW
  3878. # define LT_DLLAZY_OR_NOW DL_NOW
  3879. # else
  3880. # define LT_DLLAZY_OR_NOW 0
  3881. # endif
  3882. # endif
  3883. # endif
  3884. # endif
  3885. #endif
  3886. void fnord() { int i=42;}
  3887. int main ()
  3888. {
  3889. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  3890. int status = $lt_dlunknown;
  3891. if (self)
  3892. {
  3893. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  3894. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  3895. /* dlclose (self); */
  3896. }
  3897. else
  3898. puts (dlerror ());
  3899. return status;
  3900. }]
  3901. _LT_EOF
  3902. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  3903. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  3904. lt_status=$?
  3905. case x$lt_status in
  3906. x$lt_dlno_uscore) $1 ;;
  3907. x$lt_dlneed_uscore) $2 ;;
  3908. x$lt_dlunknown|x*) $3 ;;
  3909. esac
  3910. else :
  3911. # compilation failed
  3912. $3
  3913. fi
  3914. fi
  3915. rm -fr conftest*
  3916. ])# _LT_TRY_DLOPEN_SELF
  3917. # LT_SYS_DLOPEN_SELF
  3918. # ------------------
  3919. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  3920. [m4_require([_LT_HEADER_DLFCN])dnl
  3921. if test "x$enable_dlopen" != xyes; then
  3922. enable_dlopen=unknown
  3923. enable_dlopen_self=unknown
  3924. enable_dlopen_self_static=unknown
  3925. else
  3926. lt_cv_dlopen=no
  3927. lt_cv_dlopen_libs=
  3928. case $host_os in
  3929. beos*)
  3930. lt_cv_dlopen="load_add_on"
  3931. lt_cv_dlopen_libs=
  3932. lt_cv_dlopen_self=yes
  3933. ;;
  3934. mingw* | pw32* | cegcc*)
  3935. lt_cv_dlopen="LoadLibrary"
  3936. lt_cv_dlopen_libs=
  3937. ;;
  3938. cygwin*)
  3939. lt_cv_dlopen="dlopen"
  3940. lt_cv_dlopen_libs=
  3941. ;;
  3942. darwin*)
  3943. # if libdl is installed we need to link against it
  3944. AC_CHECK_LIB([dl], [dlopen],
  3945. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  3946. lt_cv_dlopen="dyld"
  3947. lt_cv_dlopen_libs=
  3948. lt_cv_dlopen_self=yes
  3949. ])
  3950. ;;
  3951. *)
  3952. AC_CHECK_FUNC([shl_load],
  3953. [lt_cv_dlopen="shl_load"],
  3954. [AC_CHECK_LIB([dld], [shl_load],
  3955. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  3956. [AC_CHECK_FUNC([dlopen],
  3957. [lt_cv_dlopen="dlopen"],
  3958. [AC_CHECK_LIB([dl], [dlopen],
  3959. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  3960. [AC_CHECK_LIB([svld], [dlopen],
  3961. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  3962. [AC_CHECK_LIB([dld], [dld_link],
  3963. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  3964. ])
  3965. ])
  3966. ])
  3967. ])
  3968. ])
  3969. ;;
  3970. esac
  3971. if test "x$lt_cv_dlopen" != xno; then
  3972. enable_dlopen=yes
  3973. else
  3974. enable_dlopen=no
  3975. fi
  3976. case $lt_cv_dlopen in
  3977. dlopen)
  3978. save_CPPFLAGS="$CPPFLAGS"
  3979. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  3980. save_LDFLAGS="$LDFLAGS"
  3981. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  3982. save_LIBS="$LIBS"
  3983. LIBS="$lt_cv_dlopen_libs $LIBS"
  3984. AC_CACHE_CHECK([whether a program can dlopen itself],
  3985. lt_cv_dlopen_self, [dnl
  3986. _LT_TRY_DLOPEN_SELF(
  3987. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  3988. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  3989. ])
  3990. if test "x$lt_cv_dlopen_self" = xyes; then
  3991. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  3992. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  3993. lt_cv_dlopen_self_static, [dnl
  3994. _LT_TRY_DLOPEN_SELF(
  3995. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  3996. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  3997. ])
  3998. fi
  3999. CPPFLAGS="$save_CPPFLAGS"
  4000. LDFLAGS="$save_LDFLAGS"
  4001. LIBS="$save_LIBS"
  4002. ;;
  4003. esac
  4004. case $lt_cv_dlopen_self in
  4005. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  4006. *) enable_dlopen_self=unknown ;;
  4007. esac
  4008. case $lt_cv_dlopen_self_static in
  4009. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  4010. *) enable_dlopen_self_static=unknown ;;
  4011. esac
  4012. fi
  4013. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  4014. [Whether dlopen is supported])
  4015. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  4016. [Whether dlopen of programs is supported])
  4017. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  4018. [Whether dlopen of statically linked programs is supported])
  4019. ])# LT_SYS_DLOPEN_SELF
  4020. # Old name:
  4021. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  4022. dnl aclocal-1.4 backwards compatibility:
  4023. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  4024. # _LT_COMPILER_C_O([TAGNAME])
  4025. # ---------------------------
  4026. # Check to see if options -c and -o are simultaneously supported by compiler.
  4027. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  4028. m4_defun([_LT_COMPILER_C_O],
  4029. [m4_require([_LT_DECL_SED])dnl
  4030. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4031. m4_require([_LT_TAG_COMPILER])dnl
  4032. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  4033. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  4034. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  4035. $RM -r conftest 2>/dev/null
  4036. mkdir conftest
  4037. cd conftest
  4038. mkdir out
  4039. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  4040. lt_compiler_flag="-o out/conftest2.$ac_objext"
  4041. # Insert the option either (1) after the last *FLAGS variable, or
  4042. # (2) before a word containing "conftest.", or (3) at the end.
  4043. # Note that $ac_compile itself does not contain backslashes and begins
  4044. # with a dollar sign (not a hyphen), so the echo should work correctly.
  4045. lt_compile=`echo "$ac_compile" | $SED \
  4046. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  4047. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  4048. -e 's:$: $lt_compiler_flag:'`
  4049. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  4050. (eval "$lt_compile" 2>out/conftest.err)
  4051. ac_status=$?
  4052. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  4053. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  4054. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  4055. then
  4056. # The compiler can only warn and ignore the option if not recognized
  4057. # So say no if there are warnings
  4058. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  4059. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  4060. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  4061. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  4062. fi
  4063. fi
  4064. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  4065. $RM conftest*
  4066. # SGI C++ compiler will create directory out/ii_files/ for
  4067. # template instantiation
  4068. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  4069. $RM out/* && rmdir out
  4070. cd ..
  4071. $RM -r conftest
  4072. $RM conftest*
  4073. ])
  4074. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  4075. [Does compiler simultaneously support -c and -o options?])
  4076. ])# _LT_COMPILER_C_O
  4077. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  4078. # ----------------------------------
  4079. # Check to see if we can do hard links to lock some files if needed
  4080. m4_defun([_LT_COMPILER_FILE_LOCKS],
  4081. [m4_require([_LT_ENABLE_LOCK])dnl
  4082. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4083. _LT_COMPILER_C_O([$1])
  4084. hard_links="nottested"
  4085. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  4086. # do not overwrite the value of need_locks provided by the user
  4087. AC_MSG_CHECKING([if we can lock with hard links])
  4088. hard_links=yes
  4089. $RM conftest*
  4090. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4091. touch conftest.a
  4092. ln conftest.a conftest.b 2>&5 || hard_links=no
  4093. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  4094. AC_MSG_RESULT([$hard_links])
  4095. if test "$hard_links" = no; then
  4096. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  4097. need_locks=warn
  4098. fi
  4099. else
  4100. need_locks=no
  4101. fi
  4102. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  4103. ])# _LT_COMPILER_FILE_LOCKS
  4104. # _LT_CHECK_OBJDIR
  4105. # ----------------
  4106. m4_defun([_LT_CHECK_OBJDIR],
  4107. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  4108. [rm -f .libs 2>/dev/null
  4109. mkdir .libs 2>/dev/null
  4110. if test -d .libs; then
  4111. lt_cv_objdir=.libs
  4112. else
  4113. # MS-DOS does not allow filenames that begin with a dot.
  4114. lt_cv_objdir=_libs
  4115. fi
  4116. rmdir .libs 2>/dev/null])
  4117. objdir=$lt_cv_objdir
  4118. _LT_DECL([], [objdir], [0],
  4119. [The name of the directory that contains temporary libtool files])dnl
  4120. m4_pattern_allow([LT_OBJDIR])dnl
  4121. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  4122. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  4123. ])# _LT_CHECK_OBJDIR
  4124. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  4125. # --------------------------------------
  4126. # Check hardcoding attributes.
  4127. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  4128. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  4129. _LT_TAGVAR(hardcode_action, $1)=
  4130. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  4131. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  4132. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  4133. # We can hardcode non-existent directories.
  4134. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  4135. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  4136. # have to relink, otherwise we might link with an installed library
  4137. # when we should be linking with a yet-to-be-installed one
  4138. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  4139. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  4140. # Linking always hardcodes the temporary library directory.
  4141. _LT_TAGVAR(hardcode_action, $1)=relink
  4142. else
  4143. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  4144. _LT_TAGVAR(hardcode_action, $1)=immediate
  4145. fi
  4146. else
  4147. # We cannot hardcode anything, or else we can only hardcode existing
  4148. # directories.
  4149. _LT_TAGVAR(hardcode_action, $1)=unsupported
  4150. fi
  4151. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  4152. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  4153. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  4154. # Fast installation is not supported
  4155. enable_fast_install=no
  4156. elif test "$shlibpath_overrides_runpath" = yes ||
  4157. test "$enable_shared" = no; then
  4158. # Fast installation is not necessary
  4159. enable_fast_install=needless
  4160. fi
  4161. _LT_TAGDECL([], [hardcode_action], [0],
  4162. [How to hardcode a shared library path into an executable])
  4163. ])# _LT_LINKER_HARDCODE_LIBPATH
  4164. # _LT_CMD_STRIPLIB
  4165. # ----------------
  4166. m4_defun([_LT_CMD_STRIPLIB],
  4167. [m4_require([_LT_DECL_EGREP])
  4168. striplib=
  4169. old_striplib=
  4170. AC_MSG_CHECKING([whether stripping libraries is possible])
  4171. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  4172. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  4173. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  4174. AC_MSG_RESULT([yes])
  4175. else
  4176. # FIXME - insert some real tests, host_os isn't really good enough
  4177. case $host_os in
  4178. darwin*)
  4179. if test -n "$STRIP" ; then
  4180. striplib="$STRIP -x"
  4181. old_striplib="$STRIP -S"
  4182. AC_MSG_RESULT([yes])
  4183. else
  4184. AC_MSG_RESULT([no])
  4185. fi
  4186. ;;
  4187. *)
  4188. AC_MSG_RESULT([no])
  4189. ;;
  4190. esac
  4191. fi
  4192. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  4193. _LT_DECL([], [striplib], [1])
  4194. ])# _LT_CMD_STRIPLIB
  4195. # _LT_SYS_DYNAMIC_LINKER([TAG])
  4196. # -----------------------------
  4197. # PORTME Fill in your ld.so characteristics
  4198. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  4199. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4200. m4_require([_LT_DECL_EGREP])dnl
  4201. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4202. m4_require([_LT_DECL_OBJDUMP])dnl
  4203. m4_require([_LT_DECL_SED])dnl
  4204. AC_MSG_CHECKING([dynamic linker characteristics])
  4205. m4_if([$1],
  4206. [], [
  4207. if test "$GCC" = yes; then
  4208. case $host_os in
  4209. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  4210. *) lt_awk_arg="/^libraries:/" ;;
  4211. esac
  4212. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  4213. if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
  4214. # if the path contains ";" then we assume it to be the separator
  4215. # otherwise default to the standard path separator (i.e. ":") - it is
  4216. # assumed that no part of a normal pathname contains ";" but that should
  4217. # okay in the real world where ";" in dirpaths is itself problematic.
  4218. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  4219. else
  4220. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  4221. fi
  4222. # Ok, now we have the path, separated by spaces, we can step through it
  4223. # and add multilib dir if necessary.
  4224. lt_tmp_lt_search_path_spec=
  4225. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  4226. for lt_sys_path in $lt_search_path_spec; do
  4227. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  4228. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  4229. else
  4230. test -d "$lt_sys_path" && \
  4231. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  4232. fi
  4233. done
  4234. lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
  4235. BEGIN {RS=" "; FS="/|\n";} {
  4236. lt_foo="";
  4237. lt_count=0;
  4238. for (lt_i = NF; lt_i > 0; lt_i--) {
  4239. if ($lt_i != "" && $lt_i != ".") {
  4240. if ($lt_i == "..") {
  4241. lt_count++;
  4242. } else {
  4243. if (lt_count == 0) {
  4244. lt_foo="/" $lt_i lt_foo;
  4245. } else {
  4246. lt_count--;
  4247. }
  4248. }
  4249. }
  4250. }
  4251. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  4252. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  4253. }'`
  4254. sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
  4255. else
  4256. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  4257. fi])
  4258. library_names_spec=
  4259. libname_spec='lib$name'
  4260. soname_spec=
  4261. shrext_cmds=".so"
  4262. postinstall_cmds=
  4263. postuninstall_cmds=
  4264. finish_cmds=
  4265. finish_eval=
  4266. shlibpath_var=
  4267. shlibpath_overrides_runpath=unknown
  4268. version_type=none
  4269. dynamic_linker="$host_os ld.so"
  4270. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  4271. need_lib_prefix=unknown
  4272. hardcode_into_libs=no
  4273. # when you set need_version to no, make sure it does not cause -set_version
  4274. # flags to be left without arguments
  4275. need_version=unknown
  4276. case $host_os in
  4277. aix3*)
  4278. version_type=linux
  4279. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  4280. shlibpath_var=LIBPATH
  4281. # AIX 3 has no versioning support, so we append a major version to the name.
  4282. soname_spec='${libname}${release}${shared_ext}$major'
  4283. ;;
  4284. aix[[4-9]]*)
  4285. version_type=linux
  4286. need_lib_prefix=no
  4287. need_version=no
  4288. hardcode_into_libs=yes
  4289. if test "$host_cpu" = ia64; then
  4290. # AIX 5 supports IA64
  4291. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  4292. shlibpath_var=LD_LIBRARY_PATH
  4293. else
  4294. # With GCC up to 2.95.x, collect2 would create an import file
  4295. # for dependence libraries. The import file would start with
  4296. # the line `#! .'. This would cause the generated library to
  4297. # depend on `.', always an invalid library. This was fixed in
  4298. # development snapshots of GCC prior to 3.0.
  4299. case $host_os in
  4300. aix4 | aix4.[[01]] | aix4.[[01]].*)
  4301. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  4302. echo ' yes '
  4303. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  4304. :
  4305. else
  4306. can_build_shared=no
  4307. fi
  4308. ;;
  4309. esac
  4310. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  4311. # soname into executable. Probably we can add versioning support to
  4312. # collect2, so additional links can be useful in future.
  4313. if test "$aix_use_runtimelinking" = yes; then
  4314. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  4315. # instead of lib<name>.a to let people know that these are not
  4316. # typical AIX shared libraries.
  4317. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4318. else
  4319. # We preserve .a as extension for shared libraries through AIX4.2
  4320. # and later when we are not doing run time linking.
  4321. library_names_spec='${libname}${release}.a $libname.a'
  4322. soname_spec='${libname}${release}${shared_ext}$major'
  4323. fi
  4324. shlibpath_var=LIBPATH
  4325. fi
  4326. ;;
  4327. amigaos*)
  4328. case $host_cpu in
  4329. powerpc)
  4330. # Since July 2007 AmigaOS4 officially supports .so libraries.
  4331. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  4332. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4333. ;;
  4334. m68k)
  4335. library_names_spec='$libname.ixlibrary $libname.a'
  4336. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  4337. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  4338. ;;
  4339. esac
  4340. ;;
  4341. beos*)
  4342. library_names_spec='${libname}${shared_ext}'
  4343. dynamic_linker="$host_os ld.so"
  4344. shlibpath_var=LIBRARY_PATH
  4345. ;;
  4346. bsdi[[45]]*)
  4347. version_type=linux
  4348. need_version=no
  4349. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4350. soname_spec='${libname}${release}${shared_ext}$major'
  4351. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  4352. shlibpath_var=LD_LIBRARY_PATH
  4353. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  4354. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  4355. # the default ld.so.conf also contains /usr/contrib/lib and
  4356. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  4357. # libtool to hard-code these into programs
  4358. ;;
  4359. cygwin* | mingw* | pw32* | cegcc*)
  4360. version_type=windows
  4361. shrext_cmds=".dll"
  4362. need_version=no
  4363. need_lib_prefix=no
  4364. case $GCC,$host_os in
  4365. yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
  4366. library_names_spec='$libname.dll.a'
  4367. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  4368. postinstall_cmds='base_file=`basename \${file}`~
  4369. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  4370. dldir=$destdir/`dirname \$dlpath`~
  4371. test -d \$dldir || mkdir -p \$dldir~
  4372. $install_prog $dir/$dlname \$dldir/$dlname~
  4373. chmod a+x \$dldir/$dlname~
  4374. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  4375. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  4376. fi'
  4377. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  4378. dlpath=$dir/\$dldll~
  4379. $RM \$dlpath'
  4380. shlibpath_overrides_runpath=yes
  4381. case $host_os in
  4382. cygwin*)
  4383. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  4384. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4385. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  4386. ;;
  4387. mingw* | cegcc*)
  4388. # MinGW DLLs use traditional 'lib' prefix
  4389. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4390. sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  4391. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  4392. # It is most probably a Windows format PATH printed by
  4393. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  4394. # path with ; separators, and with drive letters. We can handle the
  4395. # drive letters (cygwin fileutils understands them), so leave them,
  4396. # especially as we might pass files found there to a mingw objdump,
  4397. # which wouldn't understand a cygwinified path. Ahh.
  4398. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  4399. else
  4400. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  4401. fi
  4402. ;;
  4403. pw32*)
  4404. # pw32 DLLs use 'pw' prefix rather than 'lib'
  4405. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  4406. ;;
  4407. esac
  4408. ;;
  4409. *)
  4410. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  4411. ;;
  4412. esac
  4413. dynamic_linker='Win32 ld.exe'
  4414. # FIXME: first we should search . and the directory the executable is in
  4415. shlibpath_var=PATH
  4416. ;;
  4417. darwin* | rhapsody*)
  4418. dynamic_linker="$host_os dyld"
  4419. version_type=darwin
  4420. need_lib_prefix=no
  4421. need_version=no
  4422. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  4423. soname_spec='${libname}${release}${major}$shared_ext'
  4424. shlibpath_overrides_runpath=yes
  4425. shlibpath_var=DYLD_LIBRARY_PATH
  4426. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  4427. m4_if([$1], [],[
  4428. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  4429. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  4430. ;;
  4431. dgux*)
  4432. version_type=linux
  4433. need_lib_prefix=no
  4434. need_version=no
  4435. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  4436. soname_spec='${libname}${release}${shared_ext}$major'
  4437. shlibpath_var=LD_LIBRARY_PATH
  4438. ;;
  4439. freebsd1*)
  4440. dynamic_linker=no
  4441. ;;
  4442. freebsd* | dragonfly*)
  4443. # DragonFly does not have aout. When/if they implement a new
  4444. # versioning mechanism, adjust this.
  4445. if test -x /usr/bin/objformat; then
  4446. objformat=`/usr/bin/objformat`
  4447. else
  4448. case $host_os in
  4449. freebsd[[123]]*) objformat=aout ;;
  4450. *) objformat=elf ;;
  4451. esac
  4452. fi
  4453. version_type=freebsd-$objformat
  4454. case $version_type in
  4455. freebsd-elf*)
  4456. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4457. need_version=no
  4458. need_lib_prefix=no
  4459. ;;
  4460. freebsd-*)
  4461. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  4462. need_version=yes
  4463. ;;
  4464. esac
  4465. shlibpath_var=LD_LIBRARY_PATH
  4466. case $host_os in
  4467. freebsd2*)
  4468. shlibpath_overrides_runpath=yes
  4469. ;;
  4470. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  4471. shlibpath_overrides_runpath=yes
  4472. hardcode_into_libs=yes
  4473. ;;
  4474. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  4475. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  4476. shlibpath_overrides_runpath=no
  4477. hardcode_into_libs=yes
  4478. ;;
  4479. *) # from 4.6 on, and DragonFly
  4480. shlibpath_overrides_runpath=yes
  4481. hardcode_into_libs=yes
  4482. ;;
  4483. esac
  4484. ;;
  4485. gnu*)
  4486. version_type=linux
  4487. need_lib_prefix=no
  4488. need_version=no
  4489. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  4490. soname_spec='${libname}${release}${shared_ext}$major'
  4491. shlibpath_var=LD_LIBRARY_PATH
  4492. hardcode_into_libs=yes
  4493. ;;
  4494. hpux9* | hpux10* | hpux11*)
  4495. # Give a soname corresponding to the major version so that dld.sl refuses to
  4496. # link against other versions.
  4497. version_type=sunos
  4498. need_lib_prefix=no
  4499. need_version=no
  4500. case $host_cpu in
  4501. ia64*)
  4502. shrext_cmds='.so'
  4503. hardcode_into_libs=yes
  4504. dynamic_linker="$host_os dld.so"
  4505. shlibpath_var=LD_LIBRARY_PATH
  4506. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4507. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4508. soname_spec='${libname}${release}${shared_ext}$major'
  4509. if test "X$HPUX_IA64_MODE" = X32; then
  4510. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  4511. else
  4512. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  4513. fi
  4514. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4515. ;;
  4516. hppa*64*)
  4517. shrext_cmds='.sl'
  4518. hardcode_into_libs=yes
  4519. dynamic_linker="$host_os dld.sl"
  4520. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  4521. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  4522. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4523. soname_spec='${libname}${release}${shared_ext}$major'
  4524. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  4525. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  4526. ;;
  4527. *)
  4528. shrext_cmds='.sl'
  4529. dynamic_linker="$host_os dld.sl"
  4530. shlibpath_var=SHLIB_PATH
  4531. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  4532. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4533. soname_spec='${libname}${release}${shared_ext}$major'
  4534. ;;
  4535. esac
  4536. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  4537. postinstall_cmds='chmod 555 $lib'
  4538. ;;
  4539. interix[[3-9]]*)
  4540. version_type=linux
  4541. need_lib_prefix=no
  4542. need_version=no
  4543. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4544. soname_spec='${libname}${release}${shared_ext}$major'
  4545. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  4546. shlibpath_var=LD_LIBRARY_PATH
  4547. shlibpath_overrides_runpath=no
  4548. hardcode_into_libs=yes
  4549. ;;
  4550. irix5* | irix6* | nonstopux*)
  4551. case $host_os in
  4552. nonstopux*) version_type=nonstopux ;;
  4553. *)
  4554. if test "$lt_cv_prog_gnu_ld" = yes; then
  4555. version_type=linux
  4556. else
  4557. version_type=irix
  4558. fi ;;
  4559. esac
  4560. need_lib_prefix=no
  4561. need_version=no
  4562. soname_spec='${libname}${release}${shared_ext}$major'
  4563. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  4564. case $host_os in
  4565. irix5* | nonstopux*)
  4566. libsuff= shlibsuff=
  4567. ;;
  4568. *)
  4569. case $LD in # libtool.m4 will add one of these switches to LD
  4570. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  4571. libsuff= shlibsuff= libmagic=32-bit;;
  4572. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  4573. libsuff=32 shlibsuff=N32 libmagic=N32;;
  4574. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  4575. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  4576. *) libsuff= shlibsuff= libmagic=never-match;;
  4577. esac
  4578. ;;
  4579. esac
  4580. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  4581. shlibpath_overrides_runpath=no
  4582. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  4583. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  4584. hardcode_into_libs=yes
  4585. ;;
  4586. # No shared lib support for Linux oldld, aout, or coff.
  4587. linux*oldld* | linux*aout* | linux*coff*)
  4588. dynamic_linker=no
  4589. ;;
  4590. # This must be Linux ELF.
  4591. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4592. version_type=linux
  4593. need_lib_prefix=no
  4594. need_version=no
  4595. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4596. soname_spec='${libname}${release}${shared_ext}$major'
  4597. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  4598. shlibpath_var=LD_LIBRARY_PATH
  4599. shlibpath_overrides_runpath=no
  4600. # Some binutils ld are patched to set DT_RUNPATH
  4601. save_LDFLAGS=$LDFLAGS
  4602. save_libdir=$libdir
  4603. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  4604. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  4605. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  4606. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  4607. [shlibpath_overrides_runpath=yes])])
  4608. LDFLAGS=$save_LDFLAGS
  4609. libdir=$save_libdir
  4610. # This implies no fast_install, which is unacceptable.
  4611. # Some rework will be needed to allow for fast_install
  4612. # before this can be enabled.
  4613. hardcode_into_libs=yes
  4614. # Append ld.so.conf contents to the search path
  4615. if test -f /etc/ld.so.conf; then
  4616. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  4617. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  4618. fi
  4619. # We used to test for /lib/ld.so.1 and disable shared libraries on
  4620. # powerpc, because MkLinux only supported shared libraries with the
  4621. # GNU dynamic linker. Since this was broken with cross compilers,
  4622. # most powerpc-linux boxes support dynamic linking these days and
  4623. # people can always --disable-shared, the test was removed, and we
  4624. # assume the GNU/Linux dynamic linker is in use.
  4625. dynamic_linker='GNU/Linux ld.so'
  4626. ;;
  4627. netbsdelf*-gnu)
  4628. version_type=linux
  4629. need_lib_prefix=no
  4630. need_version=no
  4631. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4632. soname_spec='${libname}${release}${shared_ext}$major'
  4633. shlibpath_var=LD_LIBRARY_PATH
  4634. shlibpath_overrides_runpath=no
  4635. hardcode_into_libs=yes
  4636. dynamic_linker='NetBSD ld.elf_so'
  4637. ;;
  4638. netbsd*)
  4639. version_type=sunos
  4640. need_lib_prefix=no
  4641. need_version=no
  4642. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4643. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4644. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4645. dynamic_linker='NetBSD (a.out) ld.so'
  4646. else
  4647. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  4648. soname_spec='${libname}${release}${shared_ext}$major'
  4649. dynamic_linker='NetBSD ld.elf_so'
  4650. fi
  4651. shlibpath_var=LD_LIBRARY_PATH
  4652. shlibpath_overrides_runpath=yes
  4653. hardcode_into_libs=yes
  4654. ;;
  4655. newsos6)
  4656. version_type=linux
  4657. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4658. shlibpath_var=LD_LIBRARY_PATH
  4659. shlibpath_overrides_runpath=yes
  4660. ;;
  4661. *nto* | *qnx*)
  4662. version_type=qnx
  4663. need_lib_prefix=no
  4664. need_version=no
  4665. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4666. soname_spec='${libname}${release}${shared_ext}$major'
  4667. shlibpath_var=LD_LIBRARY_PATH
  4668. shlibpath_overrides_runpath=no
  4669. hardcode_into_libs=yes
  4670. dynamic_linker='ldqnx.so'
  4671. ;;
  4672. openbsd*)
  4673. version_type=sunos
  4674. sys_lib_dlsearch_path_spec="/usr/lib"
  4675. need_lib_prefix=no
  4676. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  4677. case $host_os in
  4678. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  4679. *) need_version=no ;;
  4680. esac
  4681. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4682. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4683. shlibpath_var=LD_LIBRARY_PATH
  4684. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4685. case $host_os in
  4686. openbsd2.[[89]] | openbsd2.[[89]].*)
  4687. shlibpath_overrides_runpath=no
  4688. ;;
  4689. *)
  4690. shlibpath_overrides_runpath=yes
  4691. ;;
  4692. esac
  4693. else
  4694. shlibpath_overrides_runpath=yes
  4695. fi
  4696. ;;
  4697. os2*)
  4698. libname_spec='$name'
  4699. shrext_cmds=".dll"
  4700. need_lib_prefix=no
  4701. library_names_spec='$libname${shared_ext} $libname.a'
  4702. dynamic_linker='OS/2 ld.exe'
  4703. shlibpath_var=LIBPATH
  4704. ;;
  4705. osf3* | osf4* | osf5*)
  4706. version_type=osf
  4707. need_lib_prefix=no
  4708. need_version=no
  4709. soname_spec='${libname}${release}${shared_ext}$major'
  4710. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4711. shlibpath_var=LD_LIBRARY_PATH
  4712. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  4713. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  4714. ;;
  4715. rdos*)
  4716. dynamic_linker=no
  4717. ;;
  4718. solaris*)
  4719. version_type=linux
  4720. need_lib_prefix=no
  4721. need_version=no
  4722. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4723. soname_spec='${libname}${release}${shared_ext}$major'
  4724. shlibpath_var=LD_LIBRARY_PATH
  4725. shlibpath_overrides_runpath=yes
  4726. hardcode_into_libs=yes
  4727. # ldd complains unless libraries are executable
  4728. postinstall_cmds='chmod +x $lib'
  4729. ;;
  4730. sunos4*)
  4731. version_type=sunos
  4732. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  4733. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  4734. shlibpath_var=LD_LIBRARY_PATH
  4735. shlibpath_overrides_runpath=yes
  4736. if test "$with_gnu_ld" = yes; then
  4737. need_lib_prefix=no
  4738. fi
  4739. need_version=yes
  4740. ;;
  4741. sysv4 | sysv4.3*)
  4742. version_type=linux
  4743. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4744. soname_spec='${libname}${release}${shared_ext}$major'
  4745. shlibpath_var=LD_LIBRARY_PATH
  4746. case $host_vendor in
  4747. sni)
  4748. shlibpath_overrides_runpath=no
  4749. need_lib_prefix=no
  4750. runpath_var=LD_RUN_PATH
  4751. ;;
  4752. siemens)
  4753. need_lib_prefix=no
  4754. ;;
  4755. motorola)
  4756. need_lib_prefix=no
  4757. need_version=no
  4758. shlibpath_overrides_runpath=no
  4759. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  4760. ;;
  4761. esac
  4762. ;;
  4763. sysv4*MP*)
  4764. if test -d /usr/nec ;then
  4765. version_type=linux
  4766. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  4767. soname_spec='$libname${shared_ext}.$major'
  4768. shlibpath_var=LD_LIBRARY_PATH
  4769. fi
  4770. ;;
  4771. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4772. version_type=freebsd-elf
  4773. need_lib_prefix=no
  4774. need_version=no
  4775. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  4776. soname_spec='${libname}${release}${shared_ext}$major'
  4777. shlibpath_var=LD_LIBRARY_PATH
  4778. shlibpath_overrides_runpath=yes
  4779. hardcode_into_libs=yes
  4780. if test "$with_gnu_ld" = yes; then
  4781. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  4782. else
  4783. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  4784. case $host_os in
  4785. sco3.2v5*)
  4786. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  4787. ;;
  4788. esac
  4789. fi
  4790. sys_lib_dlsearch_path_spec='/usr/lib'
  4791. ;;
  4792. tpf*)
  4793. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  4794. version_type=linux
  4795. need_lib_prefix=no
  4796. need_version=no
  4797. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4798. shlibpath_var=LD_LIBRARY_PATH
  4799. shlibpath_overrides_runpath=no
  4800. hardcode_into_libs=yes
  4801. ;;
  4802. uts4*)
  4803. version_type=linux
  4804. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4805. soname_spec='${libname}${release}${shared_ext}$major'
  4806. shlibpath_var=LD_LIBRARY_PATH
  4807. ;;
  4808. *)
  4809. dynamic_linker=no
  4810. ;;
  4811. esac
  4812. AC_MSG_RESULT([$dynamic_linker])
  4813. test "$dynamic_linker" = no && can_build_shared=no
  4814. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  4815. if test "$GCC" = yes; then
  4816. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  4817. fi
  4818. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  4819. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  4820. fi
  4821. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  4822. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  4823. fi
  4824. _LT_DECL([], [variables_saved_for_relink], [1],
  4825. [Variables whose values should be saved in libtool wrapper scripts and
  4826. restored at link time])
  4827. _LT_DECL([], [need_lib_prefix], [0],
  4828. [Do we need the "lib" prefix for modules?])
  4829. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  4830. _LT_DECL([], [version_type], [0], [Library versioning type])
  4831. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  4832. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  4833. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  4834. [Is shlibpath searched before the hard-coded library search path?])
  4835. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  4836. _LT_DECL([], [library_names_spec], [1],
  4837. [[List of archive names. First name is the real one, the rest are links.
  4838. The last name is the one that the linker finds with -lNAME]])
  4839. _LT_DECL([], [soname_spec], [1],
  4840. [[The coded name of the library, if different from the real name]])
  4841. _LT_DECL([], [postinstall_cmds], [2],
  4842. [Command to use after installation of a shared archive])
  4843. _LT_DECL([], [postuninstall_cmds], [2],
  4844. [Command to use after uninstallation of a shared archive])
  4845. _LT_DECL([], [finish_cmds], [2],
  4846. [Commands used to finish a libtool library installation in a directory])
  4847. _LT_DECL([], [finish_eval], [1],
  4848. [[As "finish_cmds", except a single script fragment to be evaled but
  4849. not shown]])
  4850. _LT_DECL([], [hardcode_into_libs], [0],
  4851. [Whether we should hardcode library paths into libraries])
  4852. _LT_DECL([], [sys_lib_search_path_spec], [2],
  4853. [Compile-time system search path for libraries])
  4854. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  4855. [Run-time system search path for libraries])
  4856. ])# _LT_SYS_DYNAMIC_LINKER
  4857. # _LT_PATH_TOOL_PREFIX(TOOL)
  4858. # --------------------------
  4859. # find a file program which can recognize shared library
  4860. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  4861. [m4_require([_LT_DECL_EGREP])dnl
  4862. AC_MSG_CHECKING([for $1])
  4863. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  4864. [case $MAGIC_CMD in
  4865. [[\\/*] | ?:[\\/]*])
  4866. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  4867. ;;
  4868. *)
  4869. lt_save_MAGIC_CMD="$MAGIC_CMD"
  4870. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4871. dnl $ac_dummy forces splitting on constant user-supplied paths.
  4872. dnl POSIX.2 word splitting is done only on the output of word expansions,
  4873. dnl not every word. This closes a longstanding sh security hole.
  4874. ac_dummy="m4_if([$2], , $PATH, [$2])"
  4875. for ac_dir in $ac_dummy; do
  4876. IFS="$lt_save_ifs"
  4877. test -z "$ac_dir" && ac_dir=.
  4878. if test -f $ac_dir/$1; then
  4879. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  4880. if test -n "$file_magic_test_file"; then
  4881. case $deplibs_check_method in
  4882. "file_magic "*)
  4883. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  4884. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4885. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  4886. $EGREP "$file_magic_regex" > /dev/null; then
  4887. :
  4888. else
  4889. cat <<_LT_EOF 1>&2
  4890. *** Warning: the command libtool uses to detect shared libraries,
  4891. *** $file_magic_cmd, produces output that libtool cannot recognize.
  4892. *** The result is that libtool may fail to recognize shared libraries
  4893. *** as such. This will affect the creation of libtool libraries that
  4894. *** depend on shared libraries, but programs linked with such libtool
  4895. *** libraries will work regardless of this problem. Nevertheless, you
  4896. *** may want to report the problem to your system manager and/or to
  4897. *** bug-libtool@gnu.org
  4898. _LT_EOF
  4899. fi ;;
  4900. esac
  4901. fi
  4902. break
  4903. fi
  4904. done
  4905. IFS="$lt_save_ifs"
  4906. MAGIC_CMD="$lt_save_MAGIC_CMD"
  4907. ;;
  4908. esac])
  4909. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4910. if test -n "$MAGIC_CMD"; then
  4911. AC_MSG_RESULT($MAGIC_CMD)
  4912. else
  4913. AC_MSG_RESULT(no)
  4914. fi
  4915. _LT_DECL([], [MAGIC_CMD], [0],
  4916. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  4917. ])# _LT_PATH_TOOL_PREFIX
  4918. # Old name:
  4919. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  4920. dnl aclocal-1.4 backwards compatibility:
  4921. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  4922. # _LT_PATH_MAGIC
  4923. # --------------
  4924. # find a file program which can recognize a shared library
  4925. m4_defun([_LT_PATH_MAGIC],
  4926. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  4927. if test -z "$lt_cv_path_MAGIC_CMD"; then
  4928. if test -n "$ac_tool_prefix"; then
  4929. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  4930. else
  4931. MAGIC_CMD=:
  4932. fi
  4933. fi
  4934. ])# _LT_PATH_MAGIC
  4935. # LT_PATH_LD
  4936. # ----------
  4937. # find the pathname to the GNU or non-GNU linker
  4938. AC_DEFUN([LT_PATH_LD],
  4939. [AC_REQUIRE([AC_PROG_CC])dnl
  4940. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4941. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4942. m4_require([_LT_DECL_SED])dnl
  4943. m4_require([_LT_DECL_EGREP])dnl
  4944. AC_ARG_WITH([gnu-ld],
  4945. [AS_HELP_STRING([--with-gnu-ld],
  4946. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  4947. [test "$withval" = no || with_gnu_ld=yes],
  4948. [with_gnu_ld=no])dnl
  4949. ac_prog=ld
  4950. if test "$GCC" = yes; then
  4951. # Check if gcc -print-prog-name=ld gives a path.
  4952. AC_MSG_CHECKING([for ld used by $CC])
  4953. case $host in
  4954. *-*-mingw*)
  4955. # gcc leaves a trailing carriage return which upsets mingw
  4956. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  4957. *)
  4958. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  4959. esac
  4960. case $ac_prog in
  4961. # Accept absolute paths.
  4962. [[\\/]]* | ?:[[\\/]]*)
  4963. re_direlt='/[[^/]][[^/]]*/\.\./'
  4964. # Canonicalize the pathname of ld
  4965. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  4966. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  4967. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  4968. done
  4969. test -z "$LD" && LD="$ac_prog"
  4970. ;;
  4971. "")
  4972. # If it fails, then pretend we aren't using GCC.
  4973. ac_prog=ld
  4974. ;;
  4975. *)
  4976. # If it is relative, then search for the first ld in PATH.
  4977. with_gnu_ld=unknown
  4978. ;;
  4979. esac
  4980. elif test "$with_gnu_ld" = yes; then
  4981. AC_MSG_CHECKING([for GNU ld])
  4982. else
  4983. AC_MSG_CHECKING([for non-GNU ld])
  4984. fi
  4985. AC_CACHE_VAL(lt_cv_path_LD,
  4986. [if test -z "$LD"; then
  4987. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4988. for ac_dir in $PATH; do
  4989. IFS="$lt_save_ifs"
  4990. test -z "$ac_dir" && ac_dir=.
  4991. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4992. lt_cv_path_LD="$ac_dir/$ac_prog"
  4993. # Check to see if the program is GNU ld. I'd rather use --version,
  4994. # but apparently some variants of GNU ld only accept -v.
  4995. # Break only if it was the GNU/non-GNU ld that we prefer.
  4996. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  4997. *GNU* | *'with BFD'*)
  4998. test "$with_gnu_ld" != no && break
  4999. ;;
  5000. *)
  5001. test "$with_gnu_ld" != yes && break
  5002. ;;
  5003. esac
  5004. fi
  5005. done
  5006. IFS="$lt_save_ifs"
  5007. else
  5008. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  5009. fi])
  5010. LD="$lt_cv_path_LD"
  5011. if test -n "$LD"; then
  5012. AC_MSG_RESULT($LD)
  5013. else
  5014. AC_MSG_RESULT(no)
  5015. fi
  5016. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  5017. _LT_PATH_LD_GNU
  5018. AC_SUBST([LD])
  5019. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  5020. ])# LT_PATH_LD
  5021. # Old names:
  5022. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  5023. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  5024. dnl aclocal-1.4 backwards compatibility:
  5025. dnl AC_DEFUN([AM_PROG_LD], [])
  5026. dnl AC_DEFUN([AC_PROG_LD], [])
  5027. # _LT_PATH_LD_GNU
  5028. #- --------------
  5029. m4_defun([_LT_PATH_LD_GNU],
  5030. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  5031. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  5032. case `$LD -v 2>&1 </dev/null` in
  5033. *GNU* | *'with BFD'*)
  5034. lt_cv_prog_gnu_ld=yes
  5035. ;;
  5036. *)
  5037. lt_cv_prog_gnu_ld=no
  5038. ;;
  5039. esac])
  5040. with_gnu_ld=$lt_cv_prog_gnu_ld
  5041. ])# _LT_PATH_LD_GNU
  5042. # _LT_CMD_RELOAD
  5043. # --------------
  5044. # find reload flag for linker
  5045. # -- PORTME Some linkers may need a different reload flag.
  5046. m4_defun([_LT_CMD_RELOAD],
  5047. [AC_CACHE_CHECK([for $LD option to reload object files],
  5048. lt_cv_ld_reload_flag,
  5049. [lt_cv_ld_reload_flag='-r'])
  5050. reload_flag=$lt_cv_ld_reload_flag
  5051. case $reload_flag in
  5052. "" | " "*) ;;
  5053. *) reload_flag=" $reload_flag" ;;
  5054. esac
  5055. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  5056. case $host_os in
  5057. darwin*)
  5058. if test "$GCC" = yes; then
  5059. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  5060. else
  5061. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  5062. fi
  5063. ;;
  5064. esac
  5065. _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  5066. _LT_DECL([], [reload_cmds], [2])dnl
  5067. ])# _LT_CMD_RELOAD
  5068. # _LT_CHECK_MAGIC_METHOD
  5069. # ----------------------
  5070. # how to check for library dependencies
  5071. # -- PORTME fill in with the dynamic library characteristics
  5072. m4_defun([_LT_CHECK_MAGIC_METHOD],
  5073. [m4_require([_LT_DECL_EGREP])
  5074. m4_require([_LT_DECL_OBJDUMP])
  5075. AC_CACHE_CHECK([how to recognize dependent libraries],
  5076. lt_cv_deplibs_check_method,
  5077. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  5078. lt_cv_file_magic_test_file=
  5079. lt_cv_deplibs_check_method='unknown'
  5080. # Need to set the preceding variable on all platforms that support
  5081. # interlibrary dependencies.
  5082. # 'none' -- dependencies not supported.
  5083. # `unknown' -- same as none, but documents that we really don't know.
  5084. # 'pass_all' -- all dependencies passed with no checks.
  5085. # 'test_compile' -- check by making test program.
  5086. # 'file_magic [[regex]]' -- check by looking for files in library path
  5087. # which responds to the $file_magic_cmd with a given extended regex.
  5088. # If you have `file' or equivalent on your system and you're not sure
  5089. # whether `pass_all' will *always* work, you probably want this one.
  5090. case $host_os in
  5091. aix[[4-9]]*)
  5092. lt_cv_deplibs_check_method=pass_all
  5093. ;;
  5094. beos*)
  5095. lt_cv_deplibs_check_method=pass_all
  5096. ;;
  5097. bsdi[[45]]*)
  5098. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  5099. lt_cv_file_magic_cmd='/usr/bin/file -L'
  5100. lt_cv_file_magic_test_file=/shlib/libc.so
  5101. ;;
  5102. cygwin*)
  5103. # func_win32_libid is a shell function defined in ltmain.sh
  5104. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  5105. lt_cv_file_magic_cmd='func_win32_libid'
  5106. ;;
  5107. mingw* | pw32*)
  5108. # Base MSYS/MinGW do not provide the 'file' command needed by
  5109. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  5110. # unless we find 'file', for example because we are cross-compiling.
  5111. if ( file / ) >/dev/null 2>&1; then
  5112. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  5113. lt_cv_file_magic_cmd='func_win32_libid'
  5114. else
  5115. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  5116. lt_cv_file_magic_cmd='$OBJDUMP -f'
  5117. fi
  5118. ;;
  5119. cegcc)
  5120. # use the weaker test based on 'objdump'. See mingw*.
  5121. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  5122. lt_cv_file_magic_cmd='$OBJDUMP -f'
  5123. ;;
  5124. darwin* | rhapsody*)
  5125. lt_cv_deplibs_check_method=pass_all
  5126. ;;
  5127. freebsd* | dragonfly*)
  5128. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  5129. case $host_cpu in
  5130. i*86 )
  5131. # Not sure whether the presence of OpenBSD here was a mistake.
  5132. # Let's accept both of them until this is cleared up.
  5133. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  5134. lt_cv_file_magic_cmd=/usr/bin/file
  5135. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  5136. ;;
  5137. esac
  5138. else
  5139. lt_cv_deplibs_check_method=pass_all
  5140. fi
  5141. ;;
  5142. gnu*)
  5143. lt_cv_deplibs_check_method=pass_all
  5144. ;;
  5145. hpux10.20* | hpux11*)
  5146. lt_cv_file_magic_cmd=/usr/bin/file
  5147. case $host_cpu in
  5148. ia64*)
  5149. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  5150. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  5151. ;;
  5152. hppa*64*)
  5153. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  5154. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  5155. ;;
  5156. *)
  5157. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  5158. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  5159. ;;
  5160. esac
  5161. ;;
  5162. interix[[3-9]]*)
  5163. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  5164. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  5165. ;;
  5166. irix5* | irix6* | nonstopux*)
  5167. case $LD in
  5168. *-32|*"-32 ") libmagic=32-bit;;
  5169. *-n32|*"-n32 ") libmagic=N32;;
  5170. *-64|*"-64 ") libmagic=64-bit;;
  5171. *) libmagic=never-match;;
  5172. esac
  5173. lt_cv_deplibs_check_method=pass_all
  5174. ;;
  5175. # This must be Linux ELF.
  5176. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5177. lt_cv_deplibs_check_method=pass_all
  5178. ;;
  5179. netbsd* | netbsdelf*-gnu)
  5180. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  5181. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5182. else
  5183. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  5184. fi
  5185. ;;
  5186. newos6*)
  5187. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  5188. lt_cv_file_magic_cmd=/usr/bin/file
  5189. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  5190. ;;
  5191. *nto* | *qnx*)
  5192. lt_cv_deplibs_check_method=pass_all
  5193. ;;
  5194. openbsd*)
  5195. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5196. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  5197. else
  5198. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  5199. fi
  5200. ;;
  5201. osf3* | osf4* | osf5*)
  5202. lt_cv_deplibs_check_method=pass_all
  5203. ;;
  5204. rdos*)
  5205. lt_cv_deplibs_check_method=pass_all
  5206. ;;
  5207. solaris*)
  5208. lt_cv_deplibs_check_method=pass_all
  5209. ;;
  5210. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  5211. lt_cv_deplibs_check_method=pass_all
  5212. ;;
  5213. sysv4 | sysv4.3*)
  5214. case $host_vendor in
  5215. motorola)
  5216. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  5217. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  5218. ;;
  5219. ncr)
  5220. lt_cv_deplibs_check_method=pass_all
  5221. ;;
  5222. sequent)
  5223. lt_cv_file_magic_cmd='/bin/file'
  5224. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  5225. ;;
  5226. sni)
  5227. lt_cv_file_magic_cmd='/bin/file'
  5228. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  5229. lt_cv_file_magic_test_file=/lib/libc.so
  5230. ;;
  5231. siemens)
  5232. lt_cv_deplibs_check_method=pass_all
  5233. ;;
  5234. pc)
  5235. lt_cv_deplibs_check_method=pass_all
  5236. ;;
  5237. esac
  5238. ;;
  5239. tpf*)
  5240. lt_cv_deplibs_check_method=pass_all
  5241. ;;
  5242. esac
  5243. ])
  5244. file_magic_cmd=$lt_cv_file_magic_cmd
  5245. deplibs_check_method=$lt_cv_deplibs_check_method
  5246. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  5247. _LT_DECL([], [deplibs_check_method], [1],
  5248. [Method to check whether dependent libraries are shared objects])
  5249. _LT_DECL([], [file_magic_cmd], [1],
  5250. [Command to use when deplibs_check_method == "file_magic"])
  5251. ])# _LT_CHECK_MAGIC_METHOD
  5252. # LT_PATH_NM
  5253. # ----------
  5254. # find the pathname to a BSD- or MS-compatible name lister
  5255. AC_DEFUN([LT_PATH_NM],
  5256. [AC_REQUIRE([AC_PROG_CC])dnl
  5257. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  5258. [if test -n "$NM"; then
  5259. # Let the user override the test.
  5260. lt_cv_path_NM="$NM"
  5261. else
  5262. lt_nm_to_check="${ac_tool_prefix}nm"
  5263. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  5264. lt_nm_to_check="$lt_nm_to_check nm"
  5265. fi
  5266. for lt_tmp_nm in $lt_nm_to_check; do
  5267. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  5268. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  5269. IFS="$lt_save_ifs"
  5270. test -z "$ac_dir" && ac_dir=.
  5271. tmp_nm="$ac_dir/$lt_tmp_nm"
  5272. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  5273. # Check to see if the nm accepts a BSD-compat flag.
  5274. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  5275. # nm: unknown option "B" ignored
  5276. # Tru64's nm complains that /dev/null is an invalid object file
  5277. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  5278. */dev/null* | *'Invalid file or object type'*)
  5279. lt_cv_path_NM="$tmp_nm -B"
  5280. break
  5281. ;;
  5282. *)
  5283. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  5284. */dev/null*)
  5285. lt_cv_path_NM="$tmp_nm -p"
  5286. break
  5287. ;;
  5288. *)
  5289. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  5290. continue # so that we can try to find one that supports BSD flags
  5291. ;;
  5292. esac
  5293. ;;
  5294. esac
  5295. fi
  5296. done
  5297. IFS="$lt_save_ifs"
  5298. done
  5299. : ${lt_cv_path_NM=no}
  5300. fi])
  5301. if test "$lt_cv_path_NM" != "no"; then
  5302. NM="$lt_cv_path_NM"
  5303. else
  5304. # Didn't find any BSD compatible name lister, look for dumpbin.
  5305. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
  5306. AC_SUBST([DUMPBIN])
  5307. if test "$DUMPBIN" != ":"; then
  5308. NM="$DUMPBIN"
  5309. fi
  5310. fi
  5311. test -z "$NM" && NM=nm
  5312. AC_SUBST([NM])
  5313. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  5314. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  5315. [lt_cv_nm_interface="BSD nm"
  5316. echo "int some_variable = 0;" > conftest.$ac_ext
  5317. (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  5318. (eval "$ac_compile" 2>conftest.err)
  5319. cat conftest.err >&AS_MESSAGE_LOG_FD
  5320. (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  5321. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  5322. cat conftest.err >&AS_MESSAGE_LOG_FD
  5323. (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
  5324. cat conftest.out >&AS_MESSAGE_LOG_FD
  5325. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  5326. lt_cv_nm_interface="MS dumpbin"
  5327. fi
  5328. rm -f conftest*])
  5329. ])# LT_PATH_NM
  5330. # Old names:
  5331. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  5332. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  5333. dnl aclocal-1.4 backwards compatibility:
  5334. dnl AC_DEFUN([AM_PROG_NM], [])
  5335. dnl AC_DEFUN([AC_PROG_NM], [])
  5336. # LT_LIB_M
  5337. # --------
  5338. # check for math library
  5339. AC_DEFUN([LT_LIB_M],
  5340. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5341. LIBM=
  5342. case $host in
  5343. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  5344. # These system don't have libm, or don't need it
  5345. ;;
  5346. *-ncr-sysv4.3*)
  5347. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  5348. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  5349. ;;
  5350. *)
  5351. AC_CHECK_LIB(m, cos, LIBM="-lm")
  5352. ;;
  5353. esac
  5354. AC_SUBST([LIBM])
  5355. ])# LT_LIB_M
  5356. # Old name:
  5357. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  5358. dnl aclocal-1.4 backwards compatibility:
  5359. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  5360. # _LT_COMPILER_NO_RTTI([TAGNAME])
  5361. # -------------------------------
  5362. m4_defun([_LT_COMPILER_NO_RTTI],
  5363. [m4_require([_LT_TAG_COMPILER])dnl
  5364. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5365. if test "$GCC" = yes; then
  5366. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5367. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  5368. lt_cv_prog_compiler_rtti_exceptions,
  5369. [-fno-rtti -fno-exceptions], [],
  5370. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  5371. fi
  5372. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  5373. [Compiler flag to turn off builtin functions])
  5374. ])# _LT_COMPILER_NO_RTTI
  5375. # _LT_CMD_GLOBAL_SYMBOLS
  5376. # ----------------------
  5377. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  5378. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  5379. AC_REQUIRE([AC_PROG_CC])dnl
  5380. AC_REQUIRE([LT_PATH_NM])dnl
  5381. AC_REQUIRE([LT_PATH_LD])dnl
  5382. m4_require([_LT_DECL_SED])dnl
  5383. m4_require([_LT_DECL_EGREP])dnl
  5384. m4_require([_LT_TAG_COMPILER])dnl
  5385. # Check for command to grab the raw symbol name followed by C symbol from nm.
  5386. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  5387. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  5388. [
  5389. # These are sane defaults that work on at least a few old systems.
  5390. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  5391. # Character class describing NM global symbol codes.
  5392. symcode='[[BCDEGRST]]'
  5393. # Regexp to match symbols that can be accessed directly from C.
  5394. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  5395. # Define system-specific variables.
  5396. case $host_os in
  5397. aix*)
  5398. symcode='[[BCDT]]'
  5399. ;;
  5400. cygwin* | mingw* | pw32* | cegcc*)
  5401. symcode='[[ABCDGISTW]]'
  5402. ;;
  5403. hpux*)
  5404. if test "$host_cpu" = ia64; then
  5405. symcode='[[ABCDEGRST]]'
  5406. fi
  5407. ;;
  5408. irix* | nonstopux*)
  5409. symcode='[[BCDEGRST]]'
  5410. ;;
  5411. osf*)
  5412. symcode='[[BCDEGQRST]]'
  5413. ;;
  5414. solaris*)
  5415. symcode='[[BDRT]]'
  5416. ;;
  5417. sco3.2v5*)
  5418. symcode='[[DT]]'
  5419. ;;
  5420. sysv4.2uw2*)
  5421. symcode='[[DT]]'
  5422. ;;
  5423. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  5424. symcode='[[ABDT]]'
  5425. ;;
  5426. sysv4)
  5427. symcode='[[DFNSTU]]'
  5428. ;;
  5429. esac
  5430. # If we're using GNU nm, then use its standard symbol codes.
  5431. case `$NM -V 2>&1` in
  5432. *GNU* | *'with BFD'*)
  5433. symcode='[[ABCDGIRSTW]]' ;;
  5434. esac
  5435. # Transform an extracted symbol line into a proper C declaration.
  5436. # Some systems (esp. on ia64) link data and code symbols differently,
  5437. # so use this general approach.
  5438. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  5439. # Transform an extracted symbol line into symbol name and symbol address
  5440. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  5441. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  5442. # Handle CRLF in mingw tool chain
  5443. opt_cr=
  5444. case $build_os in
  5445. mingw*)
  5446. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  5447. ;;
  5448. esac
  5449. # Try without a prefix underscore, then with it.
  5450. for ac_symprfx in "" "_"; do
  5451. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  5452. symxfrm="\\1 $ac_symprfx\\2 \\2"
  5453. # Write the raw and C identifiers.
  5454. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  5455. # Fake it for dumpbin and say T for any non-static function
  5456. # and D for any global variable.
  5457. # Also find C++ and __fastcall symbols from MSVC++,
  5458. # which start with @ or ?.
  5459. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  5460. " {last_section=section; section=\$ 3};"\
  5461. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  5462. " \$ 0!~/External *\|/{next};"\
  5463. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  5464. " {if(hide[section]) next};"\
  5465. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  5466. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  5467. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  5468. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  5469. " ' prfx=^$ac_symprfx]"
  5470. else
  5471. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  5472. fi
  5473. # Check to see that the pipe works correctly.
  5474. pipe_works=no
  5475. rm -f conftest*
  5476. cat > conftest.$ac_ext <<_LT_EOF
  5477. #ifdef __cplusplus
  5478. extern "C" {
  5479. #endif
  5480. char nm_test_var;
  5481. void nm_test_func(void);
  5482. void nm_test_func(void){}
  5483. #ifdef __cplusplus
  5484. }
  5485. #endif
  5486. int main(){nm_test_var='a';nm_test_func();return(0);}
  5487. _LT_EOF
  5488. if AC_TRY_EVAL(ac_compile); then
  5489. # Now try to grab the symbols.
  5490. nlist=conftest.nm
  5491. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  5492. # Try sorting and uniquifying the output.
  5493. if sort "$nlist" | uniq > "$nlist"T; then
  5494. mv -f "$nlist"T "$nlist"
  5495. else
  5496. rm -f "$nlist"T
  5497. fi
  5498. # Make sure that we snagged all the symbols we need.
  5499. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  5500. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  5501. cat <<_LT_EOF > conftest.$ac_ext
  5502. #ifdef __cplusplus
  5503. extern "C" {
  5504. #endif
  5505. _LT_EOF
  5506. # Now generate the symbol file.
  5507. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  5508. cat <<_LT_EOF >> conftest.$ac_ext
  5509. /* The mapping between symbol names and symbols. */
  5510. const struct {
  5511. const char *name;
  5512. void *address;
  5513. }
  5514. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  5515. {
  5516. { "@PROGRAM@", (void *) 0 },
  5517. _LT_EOF
  5518. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  5519. cat <<\_LT_EOF >> conftest.$ac_ext
  5520. {0, (void *) 0}
  5521. };
  5522. /* This works around a problem in FreeBSD linker */
  5523. #ifdef FREEBSD_WORKAROUND
  5524. static const void *lt_preloaded_setup() {
  5525. return lt__PROGRAM__LTX_preloaded_symbols;
  5526. }
  5527. #endif
  5528. #ifdef __cplusplus
  5529. }
  5530. #endif
  5531. _LT_EOF
  5532. # Now try linking the two files.
  5533. mv conftest.$ac_objext conftstm.$ac_objext
  5534. lt_save_LIBS="$LIBS"
  5535. lt_save_CFLAGS="$CFLAGS"
  5536. LIBS="conftstm.$ac_objext"
  5537. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  5538. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  5539. pipe_works=yes
  5540. fi
  5541. LIBS="$lt_save_LIBS"
  5542. CFLAGS="$lt_save_CFLAGS"
  5543. else
  5544. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  5545. fi
  5546. else
  5547. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  5548. fi
  5549. else
  5550. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  5551. fi
  5552. else
  5553. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  5554. cat conftest.$ac_ext >&5
  5555. fi
  5556. rm -rf conftest* conftst*
  5557. # Do not use the global_symbol_pipe unless it works.
  5558. if test "$pipe_works" = yes; then
  5559. break
  5560. else
  5561. lt_cv_sys_global_symbol_pipe=
  5562. fi
  5563. done
  5564. ])
  5565. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  5566. lt_cv_sys_global_symbol_to_cdecl=
  5567. fi
  5568. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  5569. AC_MSG_RESULT(failed)
  5570. else
  5571. AC_MSG_RESULT(ok)
  5572. fi
  5573. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  5574. [Take the output of nm and produce a listing of raw symbols and C names])
  5575. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  5576. [Transform the output of nm in a proper C declaration])
  5577. _LT_DECL([global_symbol_to_c_name_address],
  5578. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  5579. [Transform the output of nm in a C name address pair])
  5580. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  5581. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  5582. [Transform the output of nm in a C name address pair when lib prefix is needed])
  5583. ]) # _LT_CMD_GLOBAL_SYMBOLS
  5584. # _LT_COMPILER_PIC([TAGNAME])
  5585. # ---------------------------
  5586. m4_defun([_LT_COMPILER_PIC],
  5587. [m4_require([_LT_TAG_COMPILER])dnl
  5588. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  5589. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5590. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  5591. AC_MSG_CHECKING([for $compiler option to produce PIC])
  5592. m4_if([$1], [CXX], [
  5593. # C++ specific cases for pic, static, wl, etc.
  5594. if test "$GXX" = yes; then
  5595. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5596. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5597. case $host_os in
  5598. aix*)
  5599. # All AIX code is PIC.
  5600. if test "$host_cpu" = ia64; then
  5601. # AIX 5 now supports IA64 processor
  5602. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5603. fi
  5604. ;;
  5605. amigaos*)
  5606. case $host_cpu in
  5607. powerpc)
  5608. # see comment about AmigaOS4 .so support
  5609. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5610. ;;
  5611. m68k)
  5612. # FIXME: we need at least 68020 code to build shared libraries, but
  5613. # adding the `-m68020' flag to GCC prevents building anything better,
  5614. # like `-m68040'.
  5615. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5616. ;;
  5617. esac
  5618. ;;
  5619. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5620. # PIC is the default for these OSes.
  5621. ;;
  5622. mingw* | cygwin* | os2* | pw32* | cegcc*)
  5623. # This hack is so that the source file can tell whether it is being
  5624. # built for inclusion in a dll (and should export symbols for example).
  5625. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5626. # (--disable-auto-import) libraries
  5627. m4_if([$1], [GCJ], [],
  5628. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5629. ;;
  5630. darwin* | rhapsody*)
  5631. # PIC is the default on this platform
  5632. # Common symbols not allowed in MH_DYLIB files
  5633. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5634. ;;
  5635. *djgpp*)
  5636. # DJGPP does not support shared libraries at all
  5637. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5638. ;;
  5639. interix[[3-9]]*)
  5640. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5641. # Instead, we relocate shared libraries at runtime.
  5642. ;;
  5643. sysv4*MP*)
  5644. if test -d /usr/nec; then
  5645. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5646. fi
  5647. ;;
  5648. hpux*)
  5649. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5650. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5651. # sets the default TLS model and affects inlining.
  5652. case $host_cpu in
  5653. hppa*64*)
  5654. ;;
  5655. *)
  5656. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5657. ;;
  5658. esac
  5659. ;;
  5660. *qnx* | *nto*)
  5661. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5662. # it will coredump.
  5663. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5664. ;;
  5665. *)
  5666. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5667. ;;
  5668. esac
  5669. else
  5670. case $host_os in
  5671. aix[[4-9]]*)
  5672. # All AIX code is PIC.
  5673. if test "$host_cpu" = ia64; then
  5674. # AIX 5 now supports IA64 processor
  5675. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5676. else
  5677. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5678. fi
  5679. ;;
  5680. chorus*)
  5681. case $cc_basename in
  5682. cxch68*)
  5683. # Green Hills C++ Compiler
  5684. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  5685. ;;
  5686. esac
  5687. ;;
  5688. dgux*)
  5689. case $cc_basename in
  5690. ec++*)
  5691. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5692. ;;
  5693. ghcx*)
  5694. # Green Hills C++ Compiler
  5695. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5696. ;;
  5697. *)
  5698. ;;
  5699. esac
  5700. ;;
  5701. freebsd* | dragonfly*)
  5702. # FreeBSD uses GNU C++
  5703. ;;
  5704. hpux9* | hpux10* | hpux11*)
  5705. case $cc_basename in
  5706. CC*)
  5707. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5708. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5709. if test "$host_cpu" != ia64; then
  5710. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5711. fi
  5712. ;;
  5713. aCC*)
  5714. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5715. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5716. case $host_cpu in
  5717. hppa*64*|ia64*)
  5718. # +Z the default
  5719. ;;
  5720. *)
  5721. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5722. ;;
  5723. esac
  5724. ;;
  5725. *)
  5726. ;;
  5727. esac
  5728. ;;
  5729. interix*)
  5730. # This is c89, which is MS Visual C++ (no shared libs)
  5731. # Anyone wants to do a port?
  5732. ;;
  5733. irix5* | irix6* | nonstopux*)
  5734. case $cc_basename in
  5735. CC*)
  5736. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5737. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5738. # CC pic flag -KPIC is the default.
  5739. ;;
  5740. *)
  5741. ;;
  5742. esac
  5743. ;;
  5744. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5745. case $cc_basename in
  5746. KCC*)
  5747. # KAI C++ Compiler
  5748. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5749. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5750. ;;
  5751. ecpc* )
  5752. # old Intel C++ for x86_64 which still supported -KPIC.
  5753. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5754. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5755. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5756. ;;
  5757. icpc* )
  5758. # Intel C++, used to be incompatible with GCC.
  5759. # ICC 10 doesn't accept -KPIC any more.
  5760. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5761. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5762. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5763. ;;
  5764. pgCC* | pgcpp*)
  5765. # Portland Group C++ compiler
  5766. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5767. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5768. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5769. ;;
  5770. cxx*)
  5771. # Compaq C++
  5772. # Make sure the PIC flag is empty. It appears that all Alpha
  5773. # Linux and Compaq Tru64 Unix objects are PIC.
  5774. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5775. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5776. ;;
  5777. xlc* | xlC*)
  5778. # IBM XL 8.0 on PPC
  5779. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5780. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  5781. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  5782. ;;
  5783. *)
  5784. case `$CC -V 2>&1 | sed 5q` in
  5785. *Sun\ C*)
  5786. # Sun C++ 5.9
  5787. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5788. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5789. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5790. ;;
  5791. esac
  5792. ;;
  5793. esac
  5794. ;;
  5795. lynxos*)
  5796. ;;
  5797. m88k*)
  5798. ;;
  5799. mvs*)
  5800. case $cc_basename in
  5801. cxx*)
  5802. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  5803. ;;
  5804. *)
  5805. ;;
  5806. esac
  5807. ;;
  5808. netbsd* | netbsdelf*-gnu)
  5809. ;;
  5810. *qnx* | *nto*)
  5811. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5812. # it will coredump.
  5813. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5814. ;;
  5815. osf3* | osf4* | osf5*)
  5816. case $cc_basename in
  5817. KCC*)
  5818. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5819. ;;
  5820. RCC*)
  5821. # Rational C++ 2.4.1
  5822. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5823. ;;
  5824. cxx*)
  5825. # Digital/Compaq C++
  5826. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5827. # Make sure the PIC flag is empty. It appears that all Alpha
  5828. # Linux and Compaq Tru64 Unix objects are PIC.
  5829. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5830. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5831. ;;
  5832. *)
  5833. ;;
  5834. esac
  5835. ;;
  5836. psos*)
  5837. ;;
  5838. solaris*)
  5839. case $cc_basename in
  5840. CC*)
  5841. # Sun C++ 4.2, 5.x and Centerline C++
  5842. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5843. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5844. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5845. ;;
  5846. gcx*)
  5847. # Green Hills C++ Compiler
  5848. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5849. ;;
  5850. *)
  5851. ;;
  5852. esac
  5853. ;;
  5854. sunos4*)
  5855. case $cc_basename in
  5856. CC*)
  5857. # Sun C++ 4.x
  5858. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5859. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5860. ;;
  5861. lcc*)
  5862. # Lucid
  5863. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5864. ;;
  5865. *)
  5866. ;;
  5867. esac
  5868. ;;
  5869. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  5870. case $cc_basename in
  5871. CC*)
  5872. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5873. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5874. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5875. ;;
  5876. esac
  5877. ;;
  5878. tandem*)
  5879. case $cc_basename in
  5880. NCC*)
  5881. # NonStop-UX NCC 3.20
  5882. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5883. ;;
  5884. *)
  5885. ;;
  5886. esac
  5887. ;;
  5888. vxworks*)
  5889. ;;
  5890. *)
  5891. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5892. ;;
  5893. esac
  5894. fi
  5895. ],
  5896. [
  5897. if test "$GCC" = yes; then
  5898. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5899. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5900. case $host_os in
  5901. aix*)
  5902. # All AIX code is PIC.
  5903. if test "$host_cpu" = ia64; then
  5904. # AIX 5 now supports IA64 processor
  5905. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5906. fi
  5907. ;;
  5908. amigaos*)
  5909. case $host_cpu in
  5910. powerpc)
  5911. # see comment about AmigaOS4 .so support
  5912. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5913. ;;
  5914. m68k)
  5915. # FIXME: we need at least 68020 code to build shared libraries, but
  5916. # adding the `-m68020' flag to GCC prevents building anything better,
  5917. # like `-m68040'.
  5918. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5919. ;;
  5920. esac
  5921. ;;
  5922. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5923. # PIC is the default for these OSes.
  5924. ;;
  5925. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5926. # This hack is so that the source file can tell whether it is being
  5927. # built for inclusion in a dll (and should export symbols for example).
  5928. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  5929. # (--disable-auto-import) libraries
  5930. m4_if([$1], [GCJ], [],
  5931. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5932. ;;
  5933. darwin* | rhapsody*)
  5934. # PIC is the default on this platform
  5935. # Common symbols not allowed in MH_DYLIB files
  5936. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5937. ;;
  5938. hpux*)
  5939. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  5940. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  5941. # sets the default TLS model and affects inlining.
  5942. case $host_cpu in
  5943. hppa*64*)
  5944. # +Z the default
  5945. ;;
  5946. *)
  5947. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5948. ;;
  5949. esac
  5950. ;;
  5951. interix[[3-9]]*)
  5952. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  5953. # Instead, we relocate shared libraries at runtime.
  5954. ;;
  5955. msdosdjgpp*)
  5956. # Just because we use GCC doesn't mean we suddenly get shared libraries
  5957. # on systems that don't support them.
  5958. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5959. enable_shared=no
  5960. ;;
  5961. *nto* | *qnx*)
  5962. # QNX uses GNU C++, but need to define -shared option too, otherwise
  5963. # it will coredump.
  5964. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5965. ;;
  5966. sysv4*MP*)
  5967. if test -d /usr/nec; then
  5968. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5969. fi
  5970. ;;
  5971. *)
  5972. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5973. ;;
  5974. esac
  5975. else
  5976. # PORTME Check for flag to pass linker flags through the system compiler.
  5977. case $host_os in
  5978. aix*)
  5979. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5980. if test "$host_cpu" = ia64; then
  5981. # AIX 5 now supports IA64 processor
  5982. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5983. else
  5984. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5985. fi
  5986. ;;
  5987. mingw* | cygwin* | pw32* | os2* | cegcc*)
  5988. # This hack is so that the source file can tell whether it is being
  5989. # built for inclusion in a dll (and should export symbols for example).
  5990. m4_if([$1], [GCJ], [],
  5991. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5992. ;;
  5993. hpux9* | hpux10* | hpux11*)
  5994. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5995. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5996. # not for PA HP-UX.
  5997. case $host_cpu in
  5998. hppa*64*|ia64*)
  5999. # +Z the default
  6000. ;;
  6001. *)
  6002. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  6003. ;;
  6004. esac
  6005. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  6006. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  6007. ;;
  6008. irix5* | irix6* | nonstopux*)
  6009. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6010. # PIC (with -KPIC) is the default.
  6011. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6012. ;;
  6013. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  6014. case $cc_basename in
  6015. # old Intel for x86_64 which still supported -KPIC.
  6016. ecc*)
  6017. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6018. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6019. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6020. ;;
  6021. # icc used to be incompatible with GCC.
  6022. # ICC 10 doesn't accept -KPIC any more.
  6023. icc* | ifort*)
  6024. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6025. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  6026. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  6027. ;;
  6028. # Lahey Fortran 8.1.
  6029. lf95*)
  6030. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6031. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  6032. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  6033. ;;
  6034. pgcc* | pgf77* | pgf90* | pgf95*)
  6035. # Portland Group compilers (*not* the Pentium gcc compiler,
  6036. # which looks to be a dead project)
  6037. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6038. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  6039. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6040. ;;
  6041. ccc*)
  6042. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6043. # All Alpha code is PIC.
  6044. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6045. ;;
  6046. xl*)
  6047. # IBM XL C 8.0/Fortran 10.1 on PPC
  6048. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6049. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  6050. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  6051. ;;
  6052. *)
  6053. case `$CC -V 2>&1 | sed 5q` in
  6054. *Sun\ C*)
  6055. # Sun C 5.9
  6056. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6057. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6058. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6059. ;;
  6060. *Sun\ F*)
  6061. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  6062. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6063. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6064. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  6065. ;;
  6066. esac
  6067. ;;
  6068. esac
  6069. ;;
  6070. newsos6)
  6071. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6072. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6073. ;;
  6074. *nto* | *qnx*)
  6075. # QNX uses GNU C++, but need to define -shared option too, otherwise
  6076. # it will coredump.
  6077. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  6078. ;;
  6079. osf3* | osf4* | osf5*)
  6080. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6081. # All OSF/1 code is PIC.
  6082. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6083. ;;
  6084. rdos*)
  6085. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  6086. ;;
  6087. solaris*)
  6088. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6089. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6090. case $cc_basename in
  6091. f77* | f90* | f95*)
  6092. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  6093. *)
  6094. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  6095. esac
  6096. ;;
  6097. sunos4*)
  6098. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  6099. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  6100. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6101. ;;
  6102. sysv4 | sysv4.2uw2* | sysv4.3*)
  6103. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6104. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6105. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6106. ;;
  6107. sysv4*MP*)
  6108. if test -d /usr/nec ;then
  6109. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  6110. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6111. fi
  6112. ;;
  6113. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  6114. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6115. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  6116. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6117. ;;
  6118. unicos*)
  6119. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  6120. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  6121. ;;
  6122. uts4*)
  6123. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  6124. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  6125. ;;
  6126. *)
  6127. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  6128. ;;
  6129. esac
  6130. fi
  6131. ])
  6132. case $host_os in
  6133. # For platforms which do not support PIC, -DPIC is meaningless:
  6134. *djgpp*)
  6135. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6136. ;;
  6137. *)
  6138. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  6139. ;;
  6140. esac
  6141. AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  6142. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  6143. [How to pass a linker flag through the compiler])
  6144. #
  6145. # Check to make sure the PIC flag actually works.
  6146. #
  6147. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  6148. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  6149. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  6150. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  6151. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  6152. "" | " "*) ;;
  6153. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  6154. esac],
  6155. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  6156. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  6157. fi
  6158. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  6159. [Additional compiler flags for building library objects])
  6160. #
  6161. # Check to make sure the static flag actually works.
  6162. #
  6163. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  6164. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  6165. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  6166. $lt_tmp_static_flag,
  6167. [],
  6168. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  6169. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  6170. [Compiler flag to prevent dynamic linking])
  6171. ])# _LT_COMPILER_PIC
  6172. # _LT_LINKER_SHLIBS([TAGNAME])
  6173. # ----------------------------
  6174. # See if the linker supports building shared libraries.
  6175. m4_defun([_LT_LINKER_SHLIBS],
  6176. [AC_REQUIRE([LT_PATH_LD])dnl
  6177. AC_REQUIRE([LT_PATH_NM])dnl
  6178. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6179. m4_require([_LT_DECL_EGREP])dnl
  6180. m4_require([_LT_DECL_SED])dnl
  6181. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  6182. m4_require([_LT_TAG_COMPILER])dnl
  6183. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6184. m4_if([$1], [CXX], [
  6185. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6186. case $host_os in
  6187. aix[[4-9]]*)
  6188. # If we're using GNU nm, then we don't want the "-C" option.
  6189. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  6190. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  6191. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6192. else
  6193. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6194. fi
  6195. ;;
  6196. pw32*)
  6197. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  6198. ;;
  6199. cygwin* | mingw* | cegcc*)
  6200. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  6201. ;;
  6202. linux* | k*bsd*-gnu)
  6203. _LT_TAGVAR(link_all_deplibs, $1)=no
  6204. ;;
  6205. *)
  6206. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6207. ;;
  6208. esac
  6209. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  6210. ], [
  6211. runpath_var=
  6212. _LT_TAGVAR(allow_undefined_flag, $1)=
  6213. _LT_TAGVAR(always_export_symbols, $1)=no
  6214. _LT_TAGVAR(archive_cmds, $1)=
  6215. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6216. _LT_TAGVAR(compiler_needs_object, $1)=no
  6217. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6218. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6219. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  6220. _LT_TAGVAR(hardcode_automatic, $1)=no
  6221. _LT_TAGVAR(hardcode_direct, $1)=no
  6222. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6223. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6224. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  6225. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6226. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6227. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  6228. _LT_TAGVAR(inherit_rpath, $1)=no
  6229. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6230. _LT_TAGVAR(module_cmds, $1)=
  6231. _LT_TAGVAR(module_expsym_cmds, $1)=
  6232. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  6233. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  6234. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  6235. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6236. # include_expsyms should be a list of space-separated symbols to be *always*
  6237. # included in the symbol list
  6238. _LT_TAGVAR(include_expsyms, $1)=
  6239. # exclude_expsyms can be an extended regexp of symbols to exclude
  6240. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  6241. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  6242. # as well as any symbol that contains `d'.
  6243. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  6244. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  6245. # platforms (ab)use it in PIC code, but their linkers get confused if
  6246. # the symbol is explicitly referenced. Since portable code cannot
  6247. # rely on this symbol name, it's probably fine to never include it in
  6248. # preloaded symbol tables.
  6249. # Exclude shared library initialization/finalization symbols.
  6250. dnl Note also adjust exclude_expsyms for C++ above.
  6251. extract_expsyms_cmds=
  6252. case $host_os in
  6253. cygwin* | mingw* | pw32* | cegcc*)
  6254. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  6255. # When not using gcc, we currently assume that we are using
  6256. # Microsoft Visual C++.
  6257. if test "$GCC" != yes; then
  6258. with_gnu_ld=no
  6259. fi
  6260. ;;
  6261. interix*)
  6262. # we just hope/assume this is gcc and not c89 (= MSVC++)
  6263. with_gnu_ld=yes
  6264. ;;
  6265. openbsd*)
  6266. with_gnu_ld=no
  6267. ;;
  6268. linux* | k*bsd*-gnu)
  6269. _LT_TAGVAR(link_all_deplibs, $1)=no
  6270. ;;
  6271. esac
  6272. _LT_TAGVAR(ld_shlibs, $1)=yes
  6273. if test "$with_gnu_ld" = yes; then
  6274. # If archive_cmds runs LD, not CC, wlarc should be empty
  6275. wlarc='${wl}'
  6276. # Set some defaults for GNU ld with shared library support. These
  6277. # are reset later if shared libraries are not supported. Putting them
  6278. # here allows them to be overridden if necessary.
  6279. runpath_var=LD_RUN_PATH
  6280. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6281. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6282. # ancient GNU ld didn't support --whole-archive et. al.
  6283. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  6284. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6285. else
  6286. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6287. fi
  6288. supports_anon_versioning=no
  6289. case `$LD -v 2>&1` in
  6290. *GNU\ gold*) supports_anon_versioning=yes ;;
  6291. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  6292. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  6293. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  6294. *\ 2.11.*) ;; # other 2.11 versions
  6295. *) supports_anon_versioning=yes ;;
  6296. esac
  6297. # See if GNU ld supports shared libraries.
  6298. case $host_os in
  6299. aix[[3-9]]*)
  6300. # On AIX/PPC, the GNU linker is very broken
  6301. if test "$host_cpu" != ia64; then
  6302. _LT_TAGVAR(ld_shlibs, $1)=no
  6303. cat <<_LT_EOF 1>&2
  6304. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  6305. *** to be unable to reliably create shared libraries on AIX.
  6306. *** Therefore, libtool is disabling shared libraries support. If you
  6307. *** really care for shared libraries, you may want to modify your PATH
  6308. *** so that a non-GNU linker is found, and then restart.
  6309. _LT_EOF
  6310. fi
  6311. ;;
  6312. amigaos*)
  6313. case $host_cpu in
  6314. powerpc)
  6315. # see comment about AmigaOS4 .so support
  6316. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6317. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  6318. ;;
  6319. m68k)
  6320. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  6321. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6322. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6323. ;;
  6324. esac
  6325. ;;
  6326. beos*)
  6327. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6328. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6329. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6330. # support --undefined. This deserves some investigation. FIXME
  6331. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6332. else
  6333. _LT_TAGVAR(ld_shlibs, $1)=no
  6334. fi
  6335. ;;
  6336. cygwin* | mingw* | pw32* | cegcc*)
  6337. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6338. # as there is no search path for DLLs.
  6339. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6340. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6341. _LT_TAGVAR(always_export_symbols, $1)=no
  6342. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6343. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  6344. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6345. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6346. # If the export-symbols file already is a .def file (1st line
  6347. # is EXPORTS), use it as is; otherwise, prepend...
  6348. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  6349. cp $export_symbols $output_objdir/$soname.def;
  6350. else
  6351. echo EXPORTS > $output_objdir/$soname.def;
  6352. cat $export_symbols >> $output_objdir/$soname.def;
  6353. fi~
  6354. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6355. else
  6356. _LT_TAGVAR(ld_shlibs, $1)=no
  6357. fi
  6358. ;;
  6359. interix[[3-9]]*)
  6360. _LT_TAGVAR(hardcode_direct, $1)=no
  6361. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6362. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6363. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6364. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6365. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6366. # default) and relocated if they conflict, which is a slow very memory
  6367. # consuming and fragmenting process. To avoid this, we pick a random,
  6368. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6369. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6370. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6371. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6372. ;;
  6373. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  6374. tmp_diet=no
  6375. if test "$host_os" = linux-dietlibc; then
  6376. case $cc_basename in
  6377. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  6378. esac
  6379. fi
  6380. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  6381. && test "$tmp_diet" = no
  6382. then
  6383. tmp_addflag=
  6384. tmp_sharedflag='-shared'
  6385. case $cc_basename,$host_cpu in
  6386. pgcc*) # Portland Group C compiler
  6387. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6388. tmp_addflag=' $pic_flag'
  6389. ;;
  6390. pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
  6391. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6392. tmp_addflag=' $pic_flag -Mnomain' ;;
  6393. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  6394. tmp_addflag=' -i_dynamic' ;;
  6395. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  6396. tmp_addflag=' -i_dynamic -nofor_main' ;;
  6397. ifc* | ifort*) # Intel Fortran compiler
  6398. tmp_addflag=' -nofor_main' ;;
  6399. lf95*) # Lahey Fortran 8.1
  6400. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6401. tmp_sharedflag='--shared' ;;
  6402. xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  6403. tmp_sharedflag='-qmkshrobj'
  6404. tmp_addflag= ;;
  6405. esac
  6406. case `$CC -V 2>&1 | sed 5q` in
  6407. *Sun\ C*) # Sun C 5.9
  6408. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6409. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6410. tmp_sharedflag='-G' ;;
  6411. *Sun\ F*) # Sun Fortran 8.3
  6412. tmp_sharedflag='-G' ;;
  6413. esac
  6414. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6415. if test "x$supports_anon_versioning" = xyes; then
  6416. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6417. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6418. echo "local: *; };" >> $output_objdir/$libname.ver~
  6419. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  6420. fi
  6421. case $cc_basename in
  6422. xlf*)
  6423. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  6424. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  6425. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6426. _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  6427. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  6428. if test "x$supports_anon_versioning" = xyes; then
  6429. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6430. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6431. echo "local: *; };" >> $output_objdir/$libname.ver~
  6432. $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  6433. fi
  6434. ;;
  6435. esac
  6436. else
  6437. _LT_TAGVAR(ld_shlibs, $1)=no
  6438. fi
  6439. ;;
  6440. netbsd* | netbsdelf*-gnu)
  6441. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6442. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  6443. wlarc=
  6444. else
  6445. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6446. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6447. fi
  6448. ;;
  6449. solaris*)
  6450. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  6451. _LT_TAGVAR(ld_shlibs, $1)=no
  6452. cat <<_LT_EOF 1>&2
  6453. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  6454. *** create shared libraries on Solaris systems. Therefore, libtool
  6455. *** is disabling shared libraries support. We urge you to upgrade GNU
  6456. *** binutils to release 2.9.1 or newer. Another option is to modify
  6457. *** your PATH or compiler configuration so that the native linker is
  6458. *** used, and then restart.
  6459. _LT_EOF
  6460. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6461. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6462. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6463. else
  6464. _LT_TAGVAR(ld_shlibs, $1)=no
  6465. fi
  6466. ;;
  6467. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  6468. case `$LD -v 2>&1` in
  6469. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  6470. _LT_TAGVAR(ld_shlibs, $1)=no
  6471. cat <<_LT_EOF 1>&2
  6472. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  6473. *** reliably create shared libraries on SCO systems. Therefore, libtool
  6474. *** is disabling shared libraries support. We urge you to upgrade GNU
  6475. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  6476. *** your PATH or compiler configuration so that the native linker is
  6477. *** used, and then restart.
  6478. _LT_EOF
  6479. ;;
  6480. *)
  6481. # For security reasons, it is highly recommended that you always
  6482. # use absolute paths for naming shared libraries, and exclude the
  6483. # DT_RUNPATH tag from executables and libraries. But doing so
  6484. # requires that you compile everything twice, which is a pain.
  6485. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6486. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6487. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6488. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6489. else
  6490. _LT_TAGVAR(ld_shlibs, $1)=no
  6491. fi
  6492. ;;
  6493. esac
  6494. ;;
  6495. sunos4*)
  6496. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6497. wlarc=
  6498. _LT_TAGVAR(hardcode_direct, $1)=yes
  6499. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6500. ;;
  6501. *)
  6502. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6503. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6504. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6505. else
  6506. _LT_TAGVAR(ld_shlibs, $1)=no
  6507. fi
  6508. ;;
  6509. esac
  6510. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  6511. runpath_var=
  6512. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6513. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6514. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6515. fi
  6516. else
  6517. # PORTME fill in a description of your system's linker (not GNU ld)
  6518. case $host_os in
  6519. aix3*)
  6520. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6521. _LT_TAGVAR(always_export_symbols, $1)=yes
  6522. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  6523. # Note: this linker hardcodes the directories in LIBPATH if there
  6524. # are no directories specified by -L.
  6525. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6526. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  6527. # Neither direct hardcoding nor static linking is supported with a
  6528. # broken collect2.
  6529. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6530. fi
  6531. ;;
  6532. aix[[4-9]]*)
  6533. if test "$host_cpu" = ia64; then
  6534. # On IA64, the linker does run time linking by default, so we don't
  6535. # have to do anything special.
  6536. aix_use_runtimelinking=no
  6537. exp_sym_flag='-Bexport'
  6538. no_entry_flag=""
  6539. else
  6540. # If we're using GNU nm, then we don't want the "-C" option.
  6541. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  6542. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  6543. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6544. else
  6545. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  6546. fi
  6547. aix_use_runtimelinking=no
  6548. # Test if we are trying to use run time linking or normal
  6549. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6550. # need to do runtime linking.
  6551. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6552. for ld_flag in $LDFLAGS; do
  6553. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  6554. aix_use_runtimelinking=yes
  6555. break
  6556. fi
  6557. done
  6558. ;;
  6559. esac
  6560. exp_sym_flag='-bexport'
  6561. no_entry_flag='-bnoentry'
  6562. fi
  6563. # When large executables or shared objects are built, AIX ld can
  6564. # have problems creating the table of contents. If linking a library
  6565. # or program results in "error TOC overflow" add -mminimal-toc to
  6566. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6567. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6568. _LT_TAGVAR(archive_cmds, $1)=''
  6569. _LT_TAGVAR(hardcode_direct, $1)=yes
  6570. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6571. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6572. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6573. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  6574. if test "$GCC" = yes; then
  6575. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6576. # We only want to do this on AIX 4.2 and lower, the check
  6577. # below for broken collect2 doesn't work under 4.3+
  6578. collect2name=`${CC} -print-prog-name=collect2`
  6579. if test -f "$collect2name" &&
  6580. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6581. then
  6582. # We have reworked collect2
  6583. :
  6584. else
  6585. # We have old collect2
  6586. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6587. # It fails to find uninstalled libraries when the uninstalled
  6588. # path is not listed in the libpath. Setting hardcode_minus_L
  6589. # to unsupported forces relinking
  6590. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6591. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6592. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6593. fi
  6594. ;;
  6595. esac
  6596. shared_flag='-shared'
  6597. if test "$aix_use_runtimelinking" = yes; then
  6598. shared_flag="$shared_flag "'${wl}-G'
  6599. fi
  6600. _LT_TAGVAR(link_all_deplibs, $1)=no
  6601. else
  6602. # not using gcc
  6603. if test "$host_cpu" = ia64; then
  6604. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6605. # chokes on -Wl,-G. The following line is correct:
  6606. shared_flag='-G'
  6607. else
  6608. if test "$aix_use_runtimelinking" = yes; then
  6609. shared_flag='${wl}-G'
  6610. else
  6611. shared_flag='${wl}-bM:SRE'
  6612. fi
  6613. fi
  6614. fi
  6615. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  6616. # It seems that -bexpall does not export symbols beginning with
  6617. # underscore (_), so it is better to generate a list of symbols to export.
  6618. _LT_TAGVAR(always_export_symbols, $1)=yes
  6619. if test "$aix_use_runtimelinking" = yes; then
  6620. # Warning - without using the other runtime loading flags (-brtl),
  6621. # -berok will link without error, but may produce a broken library.
  6622. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  6623. # Determine the default libpath from the value encoded in an
  6624. # empty executable.
  6625. _LT_SYS_MODULE_PATH_AIX
  6626. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6627. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  6628. else
  6629. if test "$host_cpu" = ia64; then
  6630. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  6631. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6632. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  6633. else
  6634. # Determine the default libpath from the value encoded in an
  6635. # empty executable.
  6636. _LT_SYS_MODULE_PATH_AIX
  6637. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6638. # Warning - without using the other run time loading flags,
  6639. # -berok will link without error, but may produce a broken library.
  6640. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  6641. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  6642. # Exported symbols can be pulled into shared objects from archives
  6643. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6644. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6645. # This is similar to how AIX traditionally builds its shared libraries.
  6646. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  6647. fi
  6648. fi
  6649. ;;
  6650. amigaos*)
  6651. case $host_cpu in
  6652. powerpc)
  6653. # see comment about AmigaOS4 .so support
  6654. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6655. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  6656. ;;
  6657. m68k)
  6658. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  6659. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6660. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6661. ;;
  6662. esac
  6663. ;;
  6664. bsdi[[45]]*)
  6665. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  6666. ;;