dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
AC_ARG_ENABLE(pc-files,
if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
AC_ARG_ENABLE(pc-files,
dnl --------------
dnl For each parameter, test if the source-directory exists, and if it contains
dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll
dnl --------------
dnl For each parameter, test if the source-directory exists, and if it contains
dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll
dnl -------------------------
dnl Allow the choice of the pkg-config library directory to be overridden.
AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
dnl -------------------------
dnl Allow the choice of the pkg-config library directory to be overridden.
AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
AC_MSG_CHECKING(for $PKG_CONFIG library directory)
AC_ARG_WITH(pkg-config-libdir,
[ --with-pkg-config-libdir=XXX use given directory for installing pc-files],
AC_MSG_CHECKING(for $PKG_CONFIG library directory)
AC_ARG_WITH(pkg-config-libdir,
[ --with-pkg-config-libdir=XXX use given directory for installing pc-files],
AC_SUBST(PKG_CONFIG_LIBDIR)
])dnl
dnl ---------------------------------------------------------------------------
AC_SUBST(PKG_CONFIG_LIBDIR)
])dnl
dnl ---------------------------------------------------------------------------
dnl ---------------
dnl Check for POSIX thread library.
AC_DEFUN([CF_WITH_PTHREAD],
dnl ---------------
dnl Check for POSIX thread library.
AC_DEFUN([CF_WITH_PTHREAD],
- int rc = pthread_create(0,0,0,0);
+ int rc = pthread_create(0,0,0,0);
+ int r2 = pthread_mutexattr_settype(0, 0);
],[with_pthread=yes],[with_pthread=no])
LIBS="$cf_save_LIBS"
AC_MSG_RESULT($with_pthread)
],[with_pthread=yes],[with_pthread=no])
LIBS="$cf_save_LIBS"
AC_MSG_RESULT($with_pthread)
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,