1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Only build in crashdump support on Windows if there's a working dbghelp.h.

This commit is contained in:
Andrew Dunstan
2010-12-26 10:34:47 -05:00
parent 85cff3ce7f
commit a534728afb
7 changed files with 147 additions and 2 deletions

123
configure vendored
View File

@ -667,6 +667,7 @@ PTHREAD_CFLAGS
PTHREAD_LIBS
PTHREAD_CC
acx_pthread_config
have_win32_dbghelp
HAVE_IPV6
LIBOBJS
OSSP_UUID_LIBS
@ -20926,6 +20927,128 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_SYMLINK 1
_ACEOF
{ $as_echo "$as_me:$LINENO: checking for MINIDUMP_TYPE" >&5
$as_echo_n "checking for MINIDUMP_TYPE... " >&6; }
if test "${ac_cv_type_MINIDUMP_TYPE+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_cv_type_MINIDUMP_TYPE=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <dbghelp.h>
int
main ()
{
if (sizeof (MINIDUMP_TYPE))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <dbghelp.h>
int
main ()
{
if (sizeof ((MINIDUMP_TYPE)))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_MINIDUMP_TYPE=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_MINIDUMP_TYPE" >&5
$as_echo "$ac_cv_type_MINIDUMP_TYPE" >&6; }
if test "x$ac_cv_type_MINIDUMP_TYPE" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_MINIDUMP_TYPE 1
_ACEOF
pgac_minidump_type=yes
else
pgac_minidump_type=no
fi
fi
if test x"$pgac_minidump_type" = x"yes" ; then
have_win32_dbghelp=yes
else
have_win32_dbghelp=no
fi
if test "$with_readline" = yes; then