dnl***************************************************************************
-dnl Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.433 2008/04/12 23:39:06 tom Exp $
+dnl $Id: configure.in,v 1.439 2008/08/17 01:26:58 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
-AC_REVISION($Revision: 1.433 $)
+AC_REVISION($Revision: 1.439 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
fi
AC_SUBST(NCURSES_CONST)
+### use option --enable-ext-colors to turn on use of colors beyond 16.
+AC_MSG_CHECKING(if you want to use extended colors)
+AC_ARG_ENABLE(ext-colors,
+ [ --enable-ext-colors compile for 256-color support],
+ [with_ext_colors=$enableval],
+ [with_ext_colors=no])
+AC_MSG_RESULT($with_ext_colors)
+NCURSES_EXT_COLORS=0
+if test "$with_ext_colors" = yes ; then
+ if test "$with_widec" != yes ; then
+ AC_MSG_ERROR(This option applies only to wide-character library)
+ else
+ # cannot be ABI 5 since it changes sizeof(cchar_t)
+ CF_NCURSES_ABI_6
+ fi
+ NCURSES_EXT_COLORS=1
+ AC_DEFINE(NCURSES_EXT_COLORS)
+fi
+AC_SUBST(NCURSES_EXT_COLORS)
+
+### use option --enable-ext-mouse to modify coding to support 5-button mice
+AC_MSG_CHECKING(if you want to use extended mouse encoding)
+AC_ARG_ENABLE(ext-mouse,
+ [ --enable-ext-mouse compile for extended mouse-encoding],
+ [with_ext_mouse=$enableval],
+ [with_ext_mouse=no])
+AC_MSG_RESULT($with_ext_mouse)
+NCURSES_MOUSE_VERSION=1
+if test "$with_ext_mouse" = yes ; then
+ NCURSES_MOUSE_VERSION=2
+ CF_NCURSES_ABI_6
+fi
+AC_SUBST(NCURSES_MOUSE_VERSION)
+
AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code)
AC_ARG_ENABLE(no-padding,
[ --enable-no-padding compile with $NCURSES_NO_PADDING code],
AC_MSG_RESULT($with_colorfgbg)
test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
-### use option --enable-ext-colors to turn on use of colors beyond 16.
-AC_MSG_CHECKING(if you want to use experimental extended colors)
-AC_ARG_ENABLE(ext-colors,
- [ --enable-ext-colors compile for experimental 256-color support],
- [with_ext_colors=$enableval],
- [with_ext_colors=no])
-AC_MSG_RESULT($with_ext_colors)
-NCURSES_EXT_COLORS=0
-if test "$with_ext_colors" = yes ; then
- if test "$with_widec" != yes ; then
- AC_MSG_ERROR(This option applies only to wide-character library)
- else
- # cannot be ABI 5 since it changes sizeof(cchar_t)
- CF_NCURSES_ABI_6
- fi
- NCURSES_EXT_COLORS=1
- AC_DEFINE(NCURSES_EXT_COLORS)
+# This is still experimental (20080329), but should ultimately be moved to
+# the script-block --with-normal, etc.
+CF_WITH_PTHREAD
+
+AC_ARG_ENABLE(weak-symbols,
+ [ --enable-weak-symbols enable weak-symbols for pthreads],
+ [use_weak_symbols=$withval],
+ [use_weak_symbols=no])
+AC_MSG_RESULT($use_weak_symbols)
+if test "$use_weak_symbols" = yes ; then
+ CF_WEAK_SYMBOLS
+else
+ cf_cv_weak_symbols=no
fi
-AC_SUBST(NCURSES_EXT_COLORS)
-### use option --enable-ext-mouse to modify coding to support 5-button mice
-AC_MSG_CHECKING(if you want to use experimental extended mouse encoding)
-AC_ARG_ENABLE(ext-mouse,
- [ --enable-ext-mouse compile for experimental mouse-encoding],
- [with_ext_mouse=$enableval],
- [with_ext_mouse=no])
-AC_MSG_RESULT($with_ext_mouse)
-NCURSES_MOUSE_VERSION=1
-if test "$with_ext_mouse" = yes ; then
- NCURSES_MOUSE_VERSION=2
- CF_NCURSES_ABI_6
+if test $cf_cv_weak_symbols = yes ; then
+ AC_DEFINE(USE_WEAK_SYMBOLS)
fi
-AC_SUBST(NCURSES_MOUSE_VERSION)
-# This is still experimental (20080329), but should ultimately be moved to
-# the script-block --with-normal, etc.
-CF_WITH_PTHREAD
+PTHREAD=
if test "$with_pthread" = "yes" ; then
AC_DEFINE(USE_PTHREADS)
enable_reentrant=yes
+ if test $cf_cv_weak_symbols = yes ; then
+ PTHREAD=-lpthread
+ fi
fi
+AC_SUBST(PTHREAD)
# Reentrant code has to be opaque; there's little advantage to making ncurses
# opaque outside of that, so there is no --enable-opaque option. We can use
cf_cv_enable_opaque="NCURSES_INTERNALS"
NCURSES_OPAQUE=1
NCURSES_SIZE_T=int
- LIB_SUFFIX="t${LIB_SUFFIX}"
+ if test $cf_cv_weak_symbols = yes ; then
+ CF_REMOVE_LIB(LIBS,$LIBS,pthread)
+ else
+ LIB_SUFFIX="t${LIB_SUFFIX}"
+ fi
AC_DEFINE(USE_REENTRANT)
CF_NCURSES_ABI_6
else