Guest User

Untitled

a guest
Oct 30th, 2010
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 16.65 KB | None | 0 0
  1. new_ldflags=${LDFLAGS}
  2. new_libs=$LIBS
  3. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_net_pton in -lresolv" >&5
  4. $as_echo_n "checking for inet_net_pton in -lresolv... " >&6; }
  5. if test "${ac_cv_lib_resolv_inet_net_pton+set}" = set; then :
  6.   $as_echo_n "(cached) " >&6
  7. else
  8.   ac_check_lib_save_LIBS=$LIBS
  9. LIBS="-lresolv  $LIBS"
  10. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  11. /* end confdefs.h.  */
  12.  
  13. /* Override any GCC internal prototype to avoid an error.
  14.    Use char because int might match the return type of a GCC
  15.    builtin and then its argument prototype would still apply.  */
  16. #ifdef __cplusplus
  17. extern "C"
  18. #endif
  19. char inet_net_pton ();
  20. int
  21. main ()
  22. {
  23. return inet_net_pton ();
  24.   ;
  25.   return 0;
  26. }
  27. _ACEOF
  28. if ac_fn_c_try_link "$LINENO"; then :
  29.   ac_cv_lib_resolv_inet_net_pton=yes
  30. else
  31.   ac_cv_lib_resolv_inet_net_pton=no
  32. fi
  33. rm -f core conftest.err conftest.$ac_objext \
  34.     conftest$ac_exeext conftest.$ac_ext
  35. LIBS=$ac_check_lib_save_LIBS
  36. fi
  37. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_net_pton" >&5
  38. $as_echo "$ac_cv_lib_resolv_inet_net_pton" >&6; }
  39. if test "x$ac_cv_lib_resolv_inet_net_pton" = x""yes; then :
  40.   new_libs="-lresolv"; ext_lib_found="yes"
  41. else
  42.   ext_lib_found="no"
  43. fi
  44.  
  45. for dir in /lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
  46. do
  47. if test $ext_lib_found = no
  48. then
  49. ext_haslib_cvdir=`echo $dir | $as_tr_sh`
  50. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolv library with -L$dir" >&5
  51. $as_echo_n "checking for resolv library with -L$dir... " >&6; }
  52. if { as_var=ext_cv${ext_haslib_cvdir}_haslib_resolv; eval "test \"\${$as_var+set}\" = set"; }; then :
  53.   $as_echo_n "(cached) " >&6
  54. else
  55.   ext_func_search_save_LIBS=$LIBS
  56. ext_func_save_ldflags=${LDFLAGS}
  57. LIBS="-lresolv  ${ext_func_search_save_LIBS}"
  58. LDFLAGS="-L$dir ${ext_func_save_ldflags}"
  59. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  60. /* end confdefs.h.  */
  61.  
  62. /* Override any GCC internal prototype to avoid an error.
  63.    Use char because int might match the return type of a GCC
  64.    builtin and then its argument prototype would still apply.  */
  65. #ifdef __cplusplus
  66. extern "C"
  67. #endif
  68. char inet_net_pton ();
  69. int
  70. main ()
  71. {
  72. return inet_net_pton ();
  73.   ;
  74.   return 0;
  75. }
  76. _ACEOF
  77. if ac_fn_c_try_link "$LINENO"; then :
  78.   eval "ext_cv${ext_haslib_cvdir}_haslib_resolv"="yes"
  79. else
  80.   eval "ext_cv${ext_haslib_cvdir}_haslib_resolv"="no"
  81. fi
  82. rm -f core conftest.err conftest.$ac_objext \
  83.     conftest$ac_exeext conftest.$ac_ext
  84. LIBS=$ext_func_search_save_LIBS
  85. LDFLAGS=$ext_func_save_ldflags
  86.  
  87. fi
  88. eval ac_res=\$ext_cv${ext_haslib_cvdir}_haslib_resolv
  89.            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  90. $as_echo "$ac_res" >&6; }
  91. if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_resolv'}' = "xyes"`; then
  92. new_libs="-lresolv ${new_libs}"
  93. new_ldflags="-L${dir} ${new_ldflags}"
  94. ext_lib_found="yes"
  95. fi
  96. fi
  97. done
  98. LIBS=$new_libs
  99. LDFLAGS=$new_ldflags
  100.  
  101. $as_echo $LIBS
  102.  
  103. new_ldflags=${LDFLAGS}
  104. new_libs=$LIBS
  105. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
  106. $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
  107. if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
  108.   $as_echo_n "(cached) " >&6
  109. else
  110.   ac_check_lib_save_LIBS=$LIBS
  111. LIBS="-lpthread  $LIBS"
  112. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  113. /* end confdefs.h.  */
  114.  
  115. /* Override any GCC internal prototype to avoid an error.
  116.    Use char because int might match the return type of a GCC
  117.    builtin and then its argument prototype would still apply.  */
  118. #ifdef __cplusplus
  119. extern "C"
  120. #endif
  121. char pthread_create ();
  122. int
  123. main ()
  124. {
  125. return pthread_create ();
  126.   ;
  127.   return 0;
  128. }
  129. _ACEOF
  130. if ac_fn_c_try_link "$LINENO"; then :
  131.   ac_cv_lib_pthread_pthread_create=yes
  132. else
  133.   ac_cv_lib_pthread_pthread_create=no
  134. fi
  135. rm -f core conftest.err conftest.$ac_objext \
  136.     conftest$ac_exeext conftest.$ac_ext
  137. LIBS=$ac_check_lib_save_LIBS
  138. fi
  139. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
  140. $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
  141. if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
  142.   new_libs="-lpthread"; ext_lib_found="yes"
  143. else
  144.   ext_lib_found="no"
  145. fi
  146.  
  147. for dir in /lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
  148. do
  149. if test $ext_lib_found = no
  150. then
  151. ext_haslib_cvdir=`echo $dir | $as_tr_sh`
  152. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread library with -L$dir" >&5
  153. $as_echo_n "checking for pthread library with -L$dir... " >&6; }
  154. if { as_var=ext_cv${ext_haslib_cvdir}_haslib_pthread; eval "test \"\${$as_var+set}\" = set"; }; then :
  155.   $as_echo_n "(cached) " >&6
  156. else
  157.   ext_func_search_save_LIBS=$LIBS
  158. ext_func_save_ldflags=${LDFLAGS}
  159. LIBS="-lpthread  ${ext_func_search_save_LIBS}"
  160. LDFLAGS="-L$dir ${ext_func_save_ldflags}"
  161. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  162. /* end confdefs.h.  */
  163.  
  164. /* Override any GCC internal prototype to avoid an error.
  165.    Use char because int might match the return type of a GCC
  166.    builtin and then its argument prototype would still apply.  */
  167. #ifdef __cplusplus
  168. extern "C"
  169. #endif
  170. char pthread_create ();
  171. int
  172. main ()
  173. {
  174. return pthread_create ();
  175.   ;
  176.   return 0;
  177. }
  178. _ACEOF
  179. if ac_fn_c_try_link "$LINENO"; then :
  180.   eval "ext_cv${ext_haslib_cvdir}_haslib_pthread"="yes"
  181. else
  182.   eval "ext_cv${ext_haslib_cvdir}_haslib_pthread"="no"
  183. fi
  184. rm -f core conftest.err conftest.$ac_objext \
  185.     conftest$ac_exeext conftest.$ac_ext
  186. LIBS=$ext_func_search_save_LIBS
  187. LDFLAGS=$ext_func_save_ldflags
  188.  
  189. fi
  190. eval ac_res=\$ext_cv${ext_haslib_cvdir}_haslib_pthread
  191.            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  192. $as_echo "$ac_res" >&6; }
  193. if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_pthread'}' = "xyes"`; then
  194. new_libs="-lpthread ${new_libs}"
  195. new_ldflags="-L${dir} ${new_ldflags}"
  196. ext_lib_found="yes"
  197. fi
  198. fi
  199. done
  200. LIBS=$new_libs
  201. LDFLAGS=$new_ldflags
  202.  
  203. $as_echo $LIBS
  204.  
  205.  
  206. # SSL support
  207.  
  208. # Check whether --with-ssl was given.
  209. if test "${with_ssl+set}" = set; then :
  210.   withval=$with_ssl;
  211. else
  212.   with_ssl=check
  213. fi
  214.  
  215.  
  216. if test "x$with_ssl" != xno; then :
  217.  
  218. $as_echo new_libs:
  219. $as_echo $new_libs
  220.  
  221. new_ldflags=${LDFLAGS}
  222. new_libs=$LIBS
  223. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
  224. $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
  225. if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
  226.   $as_echo_n "(cached) " >&6
  227. else
  228.   ac_check_lib_save_LIBS=$LIBS
  229. $as_echo "cuando no esta definida ssl: $LIBS"
  230. LIBS="-lssl  $LIBS"
  231. $as_echo "cuando no esta definida ssl: $LIBS"
  232. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  233. /* end confdefs.h.  */
  234.  
  235. /* Override any GCC internal prototype to avoid an error.
  236.    Use char because int might match the return type of a GCC
  237.    builtin and then its argument prototype would still apply.  */
  238. #ifdef __cplusplus
  239. extern "C"
  240. #endif
  241. char SSL_library_init ();
  242. int
  243. main ()
  244. {
  245. return SSL_library_init ();
  246.   ;
  247.   return 0;
  248. }
  249. _ACEOF
  250. if ac_fn_c_try_link "$LINENO"; then :
  251.   ac_cv_lib_ssl_SSL_library_init=yes
  252. else
  253.   ac_cv_lib_ssl_SSL_library_init=no
  254. fi
  255. rm -f core conftest.err conftest.$ac_objext \
  256.     conftest$ac_exeext conftest.$ac_ext
  257. LIBS=$ac_check_lib_save_LIBS
  258. $as_echo "despues de ver ac_fn_c_try_link $LIBS"
  259. fi
  260. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
  261. $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
  262. if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
  263.   new_libs="-lssl"; ext_lib_found="yes"
  264. else
  265.   ext_lib_found="no"
  266. fi
  267.  
  268. for dir in /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/ssl /usr/lib/ssl
  269. do
  270. if test $ext_lib_found = no
  271. then
  272. ext_haslib_cvdir=`echo $dir | $as_tr_sh`
  273. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl library with -L$dir" >&5
  274. $as_echo_n "checking for ssl library with -L$dir... " >&6; }
  275. if { as_var=ext_cv${ext_haslib_cvdir}_haslib_ssl; eval "test \"\${$as_var+set}\" = set"; }; then :
  276.   $as_echo_n "(cached) " >&6
  277. else
  278.   ext_func_search_save_LIBS=$LIBS
  279. ext_func_save_ldflags=${LDFLAGS}
  280. LIBS="-lssl  ${ext_func_search_save_LIBS}"
  281. $as_echo "al buscar por los dirs"
  282. LDFLAGS="-L$dir ${ext_func_save_ldflags}"
  283. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  284. /* end confdefs.h.  */
  285.  
  286. /* Override any GCC internal prototype to avoid an error.
  287.    Use char because int might match the return type of a GCC
  288.    builtin and then its argument prototype would still apply.  */
  289. #ifdef __cplusplus
  290. extern "C"
  291. #endif
  292. char SSL_library_init ();
  293. int
  294. main ()
  295. {
  296. return SSL_library_init ();
  297.   ;
  298.   return 0;
  299. }
  300. _ACEOF
  301. if ac_fn_c_try_link "$LINENO"; then :
  302.   eval "ext_cv${ext_haslib_cvdir}_haslib_ssl"="yes"
  303. else
  304.   eval "ext_cv${ext_haslib_cvdir}_haslib_ssl"="no"
  305. fi
  306. rm -f core conftest.err conftest.$ac_objext \
  307.     conftest$ac_exeext conftest.$ac_ext
  308. LIBS=$ext_func_search_save_LIBS
  309. $as_echo "$LIBS  luego de ac_fn_c_try_link PULPO"
  310. LDFLAGS=$ext_func_save_ldflags
  311.  
  312. fi
  313. eval ac_res=\$ext_cv${ext_haslib_cvdir}_haslib_ssl
  314.            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  315. $as_echo "$ac_res" >&6; }
  316. if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_ssl'}' = "xyes"`; then
  317. new_libs="-lssl ${new_libs}"
  318. new_ldflags="-L${dir} ${new_ldflags}"
  319. ext_lib_found="yes"
  320. fi
  321. fi
  322. done
  323. LIBS=$new_libs
  324. $as_echo "ultimo test $LIBS"
  325. LDFLAGS=$new_ldflags
  326.  
  327.  
  328.  
  329. else
  330.   if test "x$with_ssl" != xcheck -a "x$ext_lib_found" = xno
  331. then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  332. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  333. as_fn_error "ssl test failed (--without-ssl to disable)
  334. See \`config.log' for more details." "$LINENO" 5; }
  335. fi
  336.  
  337.  
  338. fi
  339.  
  340. if test x"$ext_lib_found" = xyes
  341.     then found_ssl=yes
  342. fi
  343.  
  344.  
  345.  
  346.  
  347. # SQL support
  348.  
  349.  
  350. # Check whether --with-mysql was given.
  351. if test "${with_mysql+set}" = set; then :
  352.  withval=$with_mysql;
  353. else
  354.  with_mysql=check
  355. fi
  356.  
  357.  
  358. if test "x$with_mysql" != xno; then :
  359.  
  360. new_ldflags=${LDFLAGS}
  361. new_libs=$LIBS
  362. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_close in -lmysqlclient" >&5
  363. $as_echo_n "checking for mysql_close in -lmysqlclient... " >&6; }
  364. if test "${ac_cv_lib_mysqlclient_mysql_close+set}" = set; then :
  365.  $as_echo_n "(cached) " >&6
  366. else
  367.  ac_check_lib_save_LIBS=$LIBS
  368. LIBS="-lmysqlclient  $LIBS"
  369. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  370. /* end confdefs.h.  */
  371.  
  372. /* Override any GCC internal prototype to avoid an error.
  373.   Use char because int might match the return type of a GCC
  374.   builtin and then its argument prototype would still apply.  */
  375. #ifdef __cplusplus
  376. extern "C"
  377. #endif
  378. char mysql_close ();
  379. int
  380. main ()
  381. {
  382. return mysql_close ();
  383.  ;
  384.  return 0;
  385. }
  386. _ACEOF
  387. if ac_fn_c_try_link "$LINENO"; then :
  388.  ac_cv_lib_mysqlclient_mysql_close=yes
  389. else
  390.  ac_cv_lib_mysqlclient_mysql_close=no
  391. fi
  392. rm -f core conftest.err conftest.$ac_objext \
  393.    conftest$ac_exeext conftest.$ac_ext
  394. LIBS=$ac_check_lib_save_LIBS
  395. fi
  396. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_close" >&5
  397. $as_echo "$ac_cv_lib_mysqlclient_mysql_close" >&6; }
  398. if test "x$ac_cv_lib_mysqlclient_mysql_close" = x""yes; then :
  399.  new_libs="-lmysqlclient"; ext_lib_found="yes"
  400. else
  401.  ext_lib_found="no"
  402. fi
  403.  
  404. for dir in /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/mysql /usr/lib/mysql
  405. do
  406. if test $ext_lib_found = no
  407. then
  408. ext_haslib_cvdir=`echo $dir | $as_tr_sh`
  409. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysqlclient library with -L$dir" >&5
  410. $as_echo_n "checking for mysqlclient library with -L$dir... " >&6; }
  411. if { as_var=ext_cv${ext_haslib_cvdir}_haslib_mysqlclient; eval "test \"\${$as_var+set}\" = set"; }; then :
  412.  $as_echo_n "(cached) " >&6
  413. else
  414.  ext_func_search_save_LIBS=$LIBS
  415. ext_func_save_ldflags=${LDFLAGS}
  416. LIBS="-lmysqlclient  ${ext_func_search_save_LIBS}"
  417. LDFLAGS="-L$dir ${ext_func_save_ldflags}"
  418. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  419. /* end confdefs.h.  */
  420.  
  421. /* Override any GCC internal prototype to avoid an error.
  422.   Use char because int might match the return type of a GCC
  423.   builtin and then its argument prototype would still apply.  */
  424. #ifdef __cplusplus
  425. extern "C"
  426. #endif
  427. char mysql_close ();
  428. int
  429. main ()
  430. {
  431. return mysql_close ();
  432.  ;
  433.  return 0;
  434. }
  435. _ACEOF
  436. if ac_fn_c_try_link "$LINENO"; then :
  437.  eval "ext_cv${ext_haslib_cvdir}_haslib_mysqlclient"="yes"
  438. else
  439.  eval "ext_cv${ext_haslib_cvdir}_haslib_mysqlclient"="no"
  440. fi
  441. rm -f core conftest.err conftest.$ac_objext \
  442.    conftest$ac_exeext conftest.$ac_ext
  443. LIBS=$ext_func_search_save_LIBS
  444. LDFLAGS=$ext_func_save_ldflags
  445.  
  446. fi
  447. eval ac_res=\$ext_cv${ext_haslib_cvdir}_haslib_mysqlclient
  448.            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  449. $as_echo "$ac_res" >&6; }
  450. if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_mysqlclient'}' = "xyes"`; then
  451. new_libs="-lmysqlclient ${new_libs}"
  452. new_ldflags="-L${dir} ${new_ldflags}"
  453. ext_lib_found="yes"
  454. fi
  455. fi
  456. done
  457. LIBS=$new_libs
  458. LDFLAGS=$new_ldflags
  459.  
  460. else
  461.  if test "x$with_mysql" != xcheck -a "x$ext_lib_found" = xno
  462. then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  463. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  464. as_fn_error "mysql test failed (--without-mysql to disable)
  465. See \`config.log' for more details." "$LINENO" 5; }
  466. fi
  467.  
  468.  
  469. fi
  470.  
  471. if test x"$ext_lib_found" = xyes
  472.     then found_mysql=yes
  473. fi
  474.  
  475.  
  476.  
  477. #PQ
  478.  
  479. # Check whether --with-postgresql was given.
  480. if test "${with_postgresql+set}" = set; then :
  481.   withval=$with_postgresql;
  482. else
  483.   with_postgresql=check
  484. fi
  485.  
  486.  
  487. if test "x$with_postgresql" != xno; then :
  488.  
  489. new_ldflags=${LDFLAGS}
  490. new_libs=$LIBS
  491. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQfinish in -lpq" >&5
  492. $as_echo_n "checking for PQfinish in -lpq... " >&6; }
  493. if test "${ac_cv_lib_pq_PQfinish+set}" = set; then :
  494.   $as_echo_n "(cached) " >&6
  495. else
  496.   ac_check_lib_save_LIBS=$LIBS
  497. LIBS="-lpq  $LIBS"
  498. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  499. /* end confdefs.h.  */
  500.  
  501. /* Override any GCC internal prototype to avoid an error.
  502.    Use char because int might match the return type of a GCC
  503.    builtin and then its argument prototype would still apply.  */
  504. #ifdef __cplusplus
  505. extern "C"
  506. #endif
  507. char PQfinish ();
  508. int
  509. main ()
  510. {
  511. return PQfinish ();
  512.   ;
  513.   return 0;
  514. }
  515. _ACEOF
  516. if ac_fn_c_try_link "$LINENO"; then :
  517.   ac_cv_lib_pq_PQfinish=yes
  518. else
  519.   ac_cv_lib_pq_PQfinish=no
  520. fi
  521. rm -f core conftest.err conftest.$ac_objext \
  522.     conftest$ac_exeext conftest.$ac_ext
  523. LIBS=$ac_check_lib_save_LIBS
  524. fi
  525. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQfinish" >&5
  526. $as_echo "$ac_cv_lib_pq_PQfinish" >&6; }
  527. if test "x$ac_cv_lib_pq_PQfinish" = x""yes; then :
  528.   new_libs="-lpq"; ext_lib_found="yes"
  529. else
  530.   ext_lib_found="no"
  531. fi
  532.  
  533. for dir in /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/postgresql /usr/lib/postgresql
  534. do
  535. if test $ext_lib_found = no
  536. then
  537. ext_haslib_cvdir=`echo $dir | $as_tr_sh`
  538. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pq library with -L$dir" >&5
  539. $as_echo_n "checking for pq library with -L$dir... " >&6; }
  540. if { as_var=ext_cv${ext_haslib_cvdir}_haslib_pq; eval "test \"\${$as_var+set}\" = set"; }; then :
  541.   $as_echo_n "(cached) " >&6
  542. else
  543.   ext_func_search_save_LIBS=$LIBS
  544. ext_func_save_ldflags=${LDFLAGS}
  545. LIBS="-lpq  ${ext_func_search_save_LIBS}"
  546. LDFLAGS="-L$dir ${ext_func_save_ldflags}"
  547. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  548. /* end confdefs.h.  */
  549.  
  550. /* Override any GCC internal prototype to avoid an error.
  551.    Use char because int might match the return type of a GCC
  552.    builtin and then its argument prototype would still apply.  */
  553. #ifdef __cplusplus
  554. extern "C"
  555. #endif
  556. char PQfinish ();
  557. int
  558. main ()
  559. {
  560. return PQfinish ();
  561.   ;
  562.   return 0;
  563. }
  564. _ACEOF
  565. if ac_fn_c_try_link "$LINENO"; then :
  566.   eval "ext_cv${ext_haslib_cvdir}_haslib_pq"="yes"
  567. else
  568.   eval "ext_cv${ext_haslib_cvdir}_haslib_pq"="no"
  569. fi
  570. rm -f core conftest.err conftest.$ac_objext \
  571.     conftest$ac_exeext conftest.$ac_ext
  572. LIBS=$ext_func_search_save_LIBS
  573. LDFLAGS=$ext_func_save_ldflags
  574.  
  575. fi
  576. eval ac_res=\$ext_cv${ext_haslib_cvdir}_haslib_pq
  577.            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  578. $as_echo "$ac_res" >&6; }
  579. if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_pq'}' = "xyes"`; then
  580. new_libs="-lpq ${new_libs}"
  581. new_ldflags="-L${dir} ${new_ldflags}"
  582. ext_lib_found="yes"
  583. fi
  584. fi
  585. done
  586. LIBS=$new_libs
  587. LDFLAGS=$new_ldflags
  588.  
  589. else
  590.   if test "x$with_postgresql" != xcheck -a "x$ext_lib_found" = xno
  591. then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  592. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  593. as_fn_error "postgresql test failed (--without-postgresql to disable)
  594. See \`config.log' for more details." "$LINENO" 5; }
  595. fi
  596.  
  597.  
  598. fi
  599.  
  600. if test x"$ext_lib_found" = xyes
  601.     then found_postgresql=yes
  602. fi
Advertisement
Add Comment
Please, Sign In to add comment