Hi,
        I've written a small finite element programme that can be compiled to
use multiple processors (MP), by giving the option --with-mp to
autoconf. If this option is selected, configure checks for a few
important MP header files and libraries, that are needed, including:

<thread.h>
<pthread.h>
<pthreads.h>
thread, pthread or pthreads libraries. 

If the --with-mp is given, it's essential that at least one of these
libraries and  one of the header files are present. How would I exit
with an error message if one is not ??

I've got this so far, but are unsure how to exit with an error message
if there is no support on the system for multi-processing, yet the
--with-mp option to configure was selected. 


dnl Multi-Processor Support
AC_ARG_WITH(mp, [  --with-mp=[no]           support multiple processors
(needs pthreads installed) ])
if test "x$with_mp" = "xyes"; then
AC_DEFINE(ENABLE_MP)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
AC_CHECK_LIB(thread,  pthread_create)
AC_CHECK_LIB(pthread,  pthread_create)
AC_CHECK_LIB(pthreads, pthread_create)
AC_CHECK_LIB(thread, thr_setconcurrency,
[AC_DEFINE(HAVE_THR_SETCONCURRENCY)])
fi

-- 
Dr. David Kirkby Ph.D,
email: [EMAIL PROTECTED] 
former email address: [EMAIL PROTECTED]
web page: http://www.david-kirkby.co.uk       
Amateur radio callsign: G8WRB

Reply via email to