mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
First cut at cc_r detection. Specific to AIX. See comment in
configure.in for details.
This commit is contained in:
parent
deca38c9a9
commit
9e11b935b8
2 changed files with 704 additions and 602 deletions
40
configure.in
40
configure.in
|
|
@ -311,6 +311,7 @@ dnl AC_PROG_INSTALL
|
|||
|
||||
dnl The default compiler is cc (NOT gcc)
|
||||
dnl (should check to see if 'cc' exists)
|
||||
save_CC="$CC"
|
||||
if test -z "${CC}"; then
|
||||
AC_CHECK_PROGS(CC,cc)
|
||||
fi
|
||||
|
|
@ -318,6 +319,45 @@ fi
|
|||
dnl The default CFLAGS is empty NOT whatever AC_PROG_CC sets.
|
||||
dnl CFLAGS=${CFLAGS-""}
|
||||
|
||||
dnl
|
||||
dnl AIX Thread requires we use cc_r or x1c_r.
|
||||
dnl But only do this IF AIX and CC is zero (initially),
|
||||
dnl and cc exists and threads are auto|yes|posix.
|
||||
dnl
|
||||
dnl If we find cc_r|x1c_r, force pthreads and assume
|
||||
dnl pthread_create is in $LIBS (ie: don't bring in
|
||||
dnl any additional thread libraries)
|
||||
dnl If we do not find cc_r|x1c_r, disable threads
|
||||
dnl
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
case "$host" in
|
||||
*-*-aix*) $ol_host_os=aix ;;
|
||||
esac
|
||||
|
||||
ol_aix_threads=no
|
||||
if test -z "$save_CC" -a "$CC" = cc -a "$ol_host_os" = aix ; then
|
||||
case "$ol_with_threads" in
|
||||
auto | yes | posix) ol_aix_threads=yes ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test ol_aix_threads = yes ; then
|
||||
AC_CHECK_PROGS(CC,cc_r x1c_r)
|
||||
|
||||
if test "$CC" ; then
|
||||
if test $ol_with_threads != auto ; then
|
||||
AC_MSG_ERROR([--with-threads requires cc_r (or other suitable compiler) on AIX])
|
||||
else
|
||||
AC_MSG_WARN([disabling threads, no cc_r on AIX])
|
||||
fi
|
||||
ol_with_threads=no
|
||||
else
|
||||
ol_with_threads=posix
|
||||
ol_cv_pthread_create=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
dnl AC_PROG_MAKE_SET
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue