@@ -1520,6 +1520,55 @@ printf "%s\n" "$ac_res" >&6; }
1520
1520
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1521
1521
1522
1522
} # ac_fn_c_check_header_compile
1523
+
1524
+ # ac_fn_c_try_link LINENO
1525
+ # -----------------------
1526
+ # Try to link conftest.$ac_ext, and return whether this succeeded.
1527
+ ac_fn_c_try_link ()
1528
+ {
1529
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1531
+ if { { ac_try="$ac_link"
1532
+ case "(($ac_try" in
1533
+ *\"* | *\ ` * | *\\ *) ac_try_echo=\$ ac_try;;
1534
+ *) ac_try_echo=$ac_try ;;
1535
+ esac
1536
+ eval ac_try_echo="\"\$ as_me:${as_lineno-$LINENO } : $ac_try_echo \""
1537
+ printf "%s\n" "$ac_try_echo "; } >&5
1538
+ echo "$ac_link "
1539
+ "$ac_link " || true
1540
+ (eval "$ac_link ") 2>conftest.err
1541
+ ac_status=$?
1542
+ if test -s conftest.err; then
1543
+ grep -v '^ *+' conftest.err >conftest.er1
1544
+ cat conftest.er1 >&5
1545
+ mv -f conftest.er1 conftest.err
1546
+ fi
1547
+ printf "%s\n" "$as_me :${as_lineno-$LINENO } : \$ ? = $ac_status " >&5
1548
+ test $ac_status = 0; } && {
1549
+ test -z "$ac_c_werror_flag " ||
1550
+ test ! -s conftest.err
1551
+ } && test -s conftest$ac_exeext && {
1552
+ test "$cross_compiling " = yes ||
1553
+ test -x conftest$ac_exeext
1554
+ }
1555
+ then :
1556
+ ac_retval=0
1557
+ else $as_nop
1558
+ printf "%s\n" "$as_me : failed program was:" >&5
1559
+ sed 's/^/| /' conftest.$ac_ext >&5
1560
+
1561
+ ac_retval=1
1562
+ fi
1563
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1564
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1565
+ # interfere with the next link command; also delete a directory that is
1566
+ # left behind by Apple's compiler. We do this before executing the actions.
1567
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1568
+ eval $as_lineno_stack ; ${as_lineno_stack: +: } unset as_lineno
1569
+ as_fn_set_status $ac_retval
1570
+
1571
+ } # ac_fn_c_try_link
1523
1572
ac_configure_args_raw=
1524
1573
for ac_arg
1525
1574
do
@@ -3970,7 +4019,46 @@ fi
3970
4019
then :
3971
4020
break
3972
4021
fi
3973
- found_postgresql=" $ac_cv_postgresql_found "
4022
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for the PostgreSQL library linking is working" >&5
4023
+ printf %s " checking for the PostgreSQL library linking is working... " >&6 ; }
4024
+ if test ${ac_cv_postgresql_found+y}
4025
+ then :
4026
+ printf %s " (cached) " >&6
4027
+ else $as_nop
4028
+
4029
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
4030
+ /* end confdefs.h. */
4031
+
4032
+
4033
+ #include <libpq-fe.h>
4034
+
4035
+ int
4036
+ main (void)
4037
+ {
4038
+
4039
+ char conninfo[]="dbname = postgres";
4040
+ PGconn *conn;
4041
+ conn = PQconnectdb(conninfo);
4042
+
4043
+
4044
+ ;
4045
+ return 0;
4046
+ }
4047
+
4048
+ _ACEOF
4049
+ if ac_fn_c_try_link " $LINENO "
4050
+ then :
4051
+ ac_cv_postgresql_found=yes
4052
+ else $as_nop
4053
+ ac_cv_postgresql_found=no
4054
+ fi
4055
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
4056
+ conftest$ac_exeext conftest.$ac_ext
4057
+
4058
+ fi
4059
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_postgresql_found " >&5
4060
+ printf " %s\n" " $ac_cv_postgresql_found " >&6 ; }
4061
+ found_postgresql=" $ac_cv_postgresql_found "
3974
4062
if test " X$found_postgresql " = " Xno"
3975
4063
then :
3976
4064
break
0 commit comments