xmd Code
Brought to you by:
jrifkin
AC_INIT([xmd],[2.5.38])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([src/config.h])
AC_CHECK_LIB(m,cos)
AC_CHECK_LIB(readline,readline)
# Optional use of MutiProcessing support with pthreads
AC_ARG_WITH(pthread,
[ --with-pthread Enable pthread support.],
[case "${withval}" in
yes) pthread=yes ;;
no) pthread=no ;;
*) AC_MSG_ERROR([pthread has bad value, ${withval}, use either "yes" or "no"]) ;;
esac],
[pthread=no])
# Check for required pthread library if --with-pthread used.
if test "$pthread" = "yes"; then
AC_CHECK_LIB(pthread,pthread_mutex_init,, LIBPTHREAD="no", )
if test "$LIBPTHREAD" = "no"; then
echo
echo " **************************************************************"
echo " FATAL ERROR: you specified the option \"--with-pthread\" for"
echo " pthread support, but the pthread library was not found."
echo " You can re-run \"./configure\" without the option"
echo " \"--with-pthread\" to create the non-pthread version of xmd."
echo " **************************************************************"
echo
exit 1
fi
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT