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.
 
 
 
 
 
 

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