dgux*) template=dgux ;;
freebsd*) template=freebsd ;;
hpux*) template=hpux ;;
- irix*) template=irix5 ;;
+ irix*) template=irix ;;
linux*) template=linux ;;
mingw*) template=win32 ;;
netbsd*) template=netbsd ;;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- # NetBSD and OpenBSD have a broken linker that does not
+ # NetBSD, OpenBSD, and Irix have a broken linker that does not
# recognize dependent libraries
- case $host_os in netbsd* | openbsd* )
+ case $host_os in netbsd* | openbsd* | irix*)
case $pgac_lib in
*curses*) ;;
*) pgac_lib=" -lcurses" ;;
-for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/un.h termios.h utime.h kernel/OS.h kernel/image.h SupportDefs.h
+
+
+for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
-for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask symlink sysconf utime utimes waitpid
+
+
+for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
-for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strcasecmp strdup strerror strtol strtoul
+for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
case $host_os in mingw*)
LIBOBJS="$LIBOBJS copydir.$ac_objext"
LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
+LIBOBJS="$LIBOBJS kill.$ac_objext"
LIBOBJS="$LIBOBJS open.$ac_objext"
-LIBOBJS="$LIBOBJS pipe.$ac_objext"
LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
esac
-# Win32 can't to rename or unlink on an open file
+# Win32 can't do rename or unlink on an open file
case $host_os in mingw*|cygwin*)
LIBOBJS="$LIBOBJS dirmod.$ac_objext" ;;
esac
echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
+# We handle this ourselves in PostgreSQL
+# case "${host_cpu}-${host_os}" in
+# *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
+# *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+# esac
echo "$as_me:$LINENO: result: ${flag}" >&5
echo "${ECHO_T}${flag}" >&6
if test "x$flag" != xno; then
# set thread flags
+# Some platforms use these, so just defineed them. They can't hurt if they
+# are not supported.
+PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
+
+
# At this point, we don't want to muck with the compiler name for threading.
# Let's see who fails, perhaps AIX. 2004-04-23
if test "$PTHREAD_CC" != "$CC"; then
done
+# Thread testing
+
+# We have to run the thread test near the end so we have all our symbols
+# defined. Cross compiling throws a warning.
+#
+if test "$enable_thread_safety" = yes; then
+echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
+echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
+
+_CFLAGS="$CFLAGS"
+_LIBS="$LIBS"
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
+LIBS="$LIBS $PTHREAD_LIBS"
+if test "$cross_compiling" = yes; then
+ echo "$as_me:$LINENO: result: maybe" >&5
+echo "${ECHO_T}maybe" >&6
+ { echo "$as_me:$LINENO: WARNING:
+*** Skipping thread test program because of cross-compile build.
+*** Run the program in src/tools/thread on the target matchine.
+" >&5
+echo "$as_me: WARNING:
+*** Skipping thread test program because of cross-compile build.
+*** Run the program in src/tools/thread on the target matchine.
+" >&2;}
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include "$srcdir/src/tools/thread/thread_test.c"
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error:
+*** Thread test program failed. Your platform is not thread-safe.
+*** Check the file 'config.log'for the exact reason." >&5
+echo "$as_me: error:
+*** Thread test program failed. Your platform is not thread-safe.
+*** Check the file 'config.log'for the exact reason." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+CFLAGS="$_CFLAGS"
+LIBS="$_LIBS"
+fi
# prepare build tree if outside source tree
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
+case $host_os in mingw*)
+ac_config_commands="$ac_config_commands check_win32_symlinks"
+
+ ;;
+esac
+
ac_config_headers="$ac_config_headers src/include/pg_config.h"
Configuration links:
$config_links
+Configuration commands:
+$config_commands
+
Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
"src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
"src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
"src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
+ "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
"src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Create a temporary directory, and hook for its removal unless debugging.
{ (exit 1); exit 1; }; }
done
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ check_win32_symlinks )
+# Links sometimes fail undetected on Mingw -
+# so here we detect it and warn the user
+for FILE in $CONFIG_LINKS
+ do
+ # test -e works for symlinks in the MinGW console
+ test -e `expr "$FILE" : '\(^:*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
+echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
+ done
+ ;;
+ esac
+done
+_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
fi
-#
-# We have to run the thread test here because it is an external program
-# that has to be runable separately for cross-compiling.
-#
-if test "$enable_thread_safety" = yes; then
-if test cross_compiling != yes; then
-for ac_prog in gmake make
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_MAKE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$MAKE"; then
- ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_MAKE="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-MAKE=$ac_cv_prog_MAKE
-if test -n "$MAKE"; then
- echo "$as_me:$LINENO: result: $MAKE" >&5
-echo "${ECHO_T}$MAKE" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$MAKE" && break
-done
-
-echo "$as_me:$LINENO: checking thread safety of required library functions." >&5
-echo $ECHO_N "checking thread safety of required library functions.... $ECHO_C" >&6
-#
-# Clean, compile, run, and clean thread test directory.
-# If test fails for any reason, remove Makefile.global so the user can't
-# compile (to simulate a configure failure).
-#
-$MAKE -C $srcdir/src/tools/thread clean >&5 ||
- ( rm -f src/Makefile.global
- { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
-echo "$as_me: error: Can not clean thread test directory." >&2;}
- { (exit 1); exit 1; }; })
-$MAKE -C $srcdir/src/tools/thread >&5 ||
- ( rm -f src/Makefile.global
- { { echo "$as_me:$LINENO: error: Can not build thread test proram." >&5
-echo "$as_me: error: Can not build thread test proram." >&2;}
- { (exit 1); exit 1; }; })
-$srcdir/src/tools/thread/thread_test >&5 ||
- ( rm -f src/Makefile.global
- { { echo "$as_me:$LINENO: error: Thread test program failed. See 'config.log' for details." >&5
-echo "$as_me: error: Thread test program failed. See 'config.log' for details." >&2;}
- { (exit 1); exit 1; }; })
-$MAKE -C $srcdir/src/tools/thread clean >&5 ||
- ( rm -f src/Makefile.global
- { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
-echo "$as_me: error: Can not clean thread test directory." >&2;}
- { (exit 1); exit 1; }; })
-echo "yes"
-else
-{ echo "$as_me:$LINENO: WARNING:
-*** Skipping thread test program because of cross-compile build.
-*** Run the program in $srcdir/src/tools/thread on the target matchine.
-" >&5
-echo "$as_me: WARNING:
-*** Skipping thread test program because of cross-compile build.
-*** Run the program in $srcdir/src/tools/thread on the target matchine.
-" >&2;}
-fi
-fi