mirror of
https://github.com/postgres/postgres.git
synced 2025-07-20 05:03:10 +03:00
Fix thread handling in configure.
This commit is contained in:
34
configure
vendored
34
configure
vendored
@ -844,6 +844,7 @@ Optional Features:
|
|||||||
--enable-debug build with debugging symbols (-g)
|
--enable-debug build with debugging symbols (-g)
|
||||||
--enable-depend turn on automatic dependency tracking
|
--enable-depend turn on automatic dependency tracking
|
||||||
--enable-cassert enable assertion checks (for debugging)
|
--enable-cassert enable assertion checks (for debugging)
|
||||||
|
--enable-thread-safety allow libpq and ecpg to be thread-safe
|
||||||
--disable-largefile omit support for large files
|
--disable-largefile omit support for large files
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
@ -854,7 +855,6 @@ Optional Packages:
|
|||||||
--with-libraries=DIRS look for additional libraries in DIRS
|
--with-libraries=DIRS look for additional libraries in DIRS
|
||||||
--with-libs=DIRS alternative spelling of --with-libraries
|
--with-libs=DIRS alternative spelling of --with-libraries
|
||||||
--with-pgport=PORTNUM change default port number 5432
|
--with-pgport=PORTNUM change default port number 5432
|
||||||
--enable-thread-safety allow libpq and ecpg to be thread-safe
|
|
||||||
--with-tcl build Tcl and Tk interfaces
|
--with-tcl build Tcl and Tk interfaces
|
||||||
--without-tk do not build Tk interfaces if Tcl is enabled
|
--without-tk do not build Tk interfaces if Tcl is enabled
|
||||||
--with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR
|
--with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR
|
||||||
@ -2779,35 +2779,29 @@ echo "$as_me:$LINENO: checking allow thread-safe libpq and ecpg" >&5
|
|||||||
echo $ECHO_N "checking allow thread-safe libpq and ecpg... $ECHO_C" >&6
|
echo $ECHO_N "checking allow thread-safe libpq and ecpg... $ECHO_C" >&6
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-thread-safety or --disable-thread-safety was given.
|
||||||
|
if test "${enable_thread_safety+set}" = set; then
|
||||||
|
enableval="$enable_thread_safety"
|
||||||
|
|
||||||
# Check whether --with-threads or --without-threads was given.
|
case $enableval in
|
||||||
if test "${with_threads+set}" = set; then
|
|
||||||
withval="$with_threads"
|
|
||||||
|
|
||||||
case $withval in
|
|
||||||
yes)
|
yes)
|
||||||
|
:
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define USE_THREADS 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
{ { echo "$as_me:$LINENO: error: no argument expected for --with-threads option" >&5
|
{ { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
|
||||||
echo "$as_me: error: no argument expected for --with-threads option" >&2;}
|
echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
else
|
else
|
||||||
with_threads=no
|
enable_thread_safety=no
|
||||||
|
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
|
echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
|
||||||
echo "${ECHO_T}$enable_thread_safety" >&6
|
echo "${ECHO_T}$enable_thread_safety" >&6
|
||||||
|
|
||||||
@ -13079,6 +13073,10 @@ functions, or libraries required for threading support.
|
|||||||
" >&2;}
|
" >&2;}
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# do not use values from template file
|
||||||
|
THREAD_CFLAGS=
|
||||||
|
THREAD_LIBS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -13096,8 +13094,8 @@ fi
|
|||||||
#
|
#
|
||||||
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES" = yes ; then
|
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES" = yes ; then
|
||||||
_CFLAGS="$CFLAGS"
|
_CFLAGS="$CFLAGS"
|
||||||
_LIB="$LIBS"
|
_LIBS="$LIBS"
|
||||||
CFLAGS="$CFLAGS $TREAD_CFLAGS"
|
CFLAGS="$CFLAGS $THREAD_CFLAGS"
|
||||||
LIBS="$LIBS $THREAD_LIBS"
|
LIBS="$LIBS $THREAD_LIBS"
|
||||||
|
|
||||||
|
|
||||||
@ -13178,7 +13176,7 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
CFLAGS="$_CFLAGS"
|
CFLAGS="$_CFLAGS"
|
||||||
LIB="$_LIBS"
|
LIBS="$_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
16
configure.in
16
configure.in
@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.274 2003/08/04 04:03:03 tgl Exp $
|
dnl $Header: /cvsroot/pgsql/configure.in,v 1.275 2003/08/04 16:48:03 momjian Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Developers, please strive to achieve this order:
|
dnl Developers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -314,9 +314,7 @@ IFS=$ac_save_IFS
|
|||||||
# Enable libpq to be thread-safety
|
# Enable libpq to be thread-safety
|
||||||
#
|
#
|
||||||
AC_MSG_CHECKING([allow thread-safe libpq and ecpg])
|
AC_MSG_CHECKING([allow thread-safe libpq and ecpg])
|
||||||
PGAC_ARG_BOOL(with, threads, no, [ --enable-thread-safety allow libpq and ecpg to be thread-safe],
|
PGAC_ARG_BOOL(enable, thread-safety, no, [ --enable-thread-safety allow libpq and ecpg to be thread-safe])
|
||||||
[AC_DEFINE([USE_THREADS], 1, [Define to 1 to build libpq and ecpg to be thread-safe. (--enable-thread-safety)])])
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$enable_thread_safety])
|
AC_MSG_RESULT([$enable_thread_safety])
|
||||||
AC_SUBST(enable_thread_safety)
|
AC_SUBST(enable_thread_safety)
|
||||||
|
|
||||||
@ -970,6 +968,10 @@ so it can be added to the next release. Report all compile flags, link flags,
|
|||||||
functions, or libraries required for threading support.
|
functions, or libraries required for threading support.
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# do not use values from template file
|
||||||
|
THREAD_CFLAGS=
|
||||||
|
THREAD_LIBS=
|
||||||
fi
|
fi
|
||||||
AC_SUBST(THREAD_CFLAGS)
|
AC_SUBST(THREAD_CFLAGS)
|
||||||
AC_SUBST(THREAD_LIBS)
|
AC_SUBST(THREAD_LIBS)
|
||||||
@ -987,12 +989,12 @@ AC_SUBST(THREAD_LIBS)
|
|||||||
#
|
#
|
||||||
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES" = yes ; then
|
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES" = yes ; then
|
||||||
_CFLAGS="$CFLAGS"
|
_CFLAGS="$CFLAGS"
|
||||||
_LIB="$LIBS"
|
_LIBS="$LIBS"
|
||||||
CFLAGS="$CFLAGS $TREAD_CFLAGS"
|
CFLAGS="$CFLAGS $THREAD_CFLAGS"
|
||||||
LIBS="$LIBS $THREAD_LIBS"
|
LIBS="$LIBS $THREAD_LIBS"
|
||||||
AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
|
AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
|
||||||
CFLAGS="$_CFLAGS"
|
CFLAGS="$_CFLAGS"
|
||||||
LIB="$_LIBS"
|
LIBS="$_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -600,10 +600,6 @@
|
|||||||
/* Define to select SysV-style shared memory. */
|
/* Define to select SysV-style shared memory. */
|
||||||
#undef USE_SYSV_SHARED_MEMORY
|
#undef USE_SYSV_SHARED_MEMORY
|
||||||
|
|
||||||
/* Define to 1 to build libpq and ecpg to be thread-safe.
|
|
||||||
(--enable-thread-safety) */
|
|
||||||
#undef USE_THREADS
|
|
||||||
|
|
||||||
/* Define to select unnamed POSIX semaphores. */
|
/* Define to select unnamed POSIX semaphores. */
|
||||||
#undef USE_UNNAMED_POSIX_SEMAPHORES
|
#undef USE_UNNAMED_POSIX_SEMAPHORES
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user