dnl $Id: configure.in,v 1.1 1996/11/19 14:02:11 roitzsch Exp $ dnl Process this file with autoconf to produce a configure script. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl AC_INIT(kaskade.cc) AC_CONFIG_HEADER(general.h fortran.h) dnl Set the operating system and version AC_CANONICAL_HOST AC_DEFINE_UNQUOTED(CPU,$host_cpu) AC_DEFINE_UNQUOTED(VENDOR,$host_vendor) AC_DEFINE_UNQUOTED(OS,$host_os) dnl host_os_name=substr($host_os,1,regexp($host_os,'[0-9]')) changequote(<<, >>)dnl host_os_name=`echo $host_os | sed 's/[0-9].*$//'` host_os_rel=`echo $host_os | sed 's/^\([a-z][a-z]*\)\([0-9][0-9]*\).\([0-9][0-9]*\).*$/\2/'` host_os_vers=`echo $host_os | sed 's/^\([a-z][a-z]*\)\([0-9][0-9]*\).\([0-9][0-9]*\).*$/\3/'` changequote([, ])dnl AC_DEFINE_UNQUOTED(OSNAME,$host_os_name) AC_SUBST(host_os_name) AC_DEFINE_UNQUOTED(OSREL,$host_os_rel) AC_DEFINE_UNQUOTED(OSVERS,$host_os_vers) dnl Checks for programs. AC_PROG_CC AC_ISC_POSIX AC_PROG_CXX AC_PROG_RANLIB AC_PROG_CC_C_O AC_PROG_INSTALL F77=f77 AR=ar FFLAGS= CLDFLAGS= FLDFLAGS= if test $host_cpu = ymp; then AC_DEFINE(CRAYFTN,1) AR=bld fi PAC_GET_F77($host_cpu) if test $HAS_F77 = 0; then AC_CHECK_PROG(f2c_exists,f2c,yes,no) if test "$f2c_exists" = yes; then F77=fc FCLIB=-lf2c AC_DEFINE(FORTRANUNDERSCORE) else AC_MSG_WARN(No Fortran compiler (or f2c) found!) FTESTPROG= fi else AC_CHECKING(FTN=$F77, $FFLAGS) PAC_GET_FORTNAMES PAC_FIND_FCLIB($host_os_name) fi AC_SUBST(F77) AC_SUBST(AR) AC_SUBST(FFLAGS) AC_SUBST(FCLIB) AC_SUBST(CLDFLAGS) AC_SUBST(FLDFLAGS) dnl Checks for libraries. AC_CHECK_LIB(m, pow) dnl Check for X11 AC_PATH_X if test "$no_x" = yes; then echo ++++ X11 not found - MiniGraphik only with Postscript support; X11MINIOBJ= else X11MINIOBJ='$(OBJDIR)/xdriv.o' X_CFLAGS="-I$x_includes" X_LIBS="-L$x_libraries -lX11" AC_DEFINE(X11AVAIL,1) fi AC_SUBST(X_CFLAGS) AC_SUBST(X_LIBS) AC_SUBST(X11MINIOBJ) dnl "stolen" from tk tk_checkBoth=0 AC_CHECK_FUNC(connect, tk_checkSocket=0, tk_checkSocket=1) if test "$tk_checkSocket" = 1; then AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tk_checkBoth=1) fi if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tk_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) dnl Checks/Creates system dependent local directories. AC_MSG_CHECKING(for library directory) if test -d ../lib-$host_os_name-$CC; then AC_MSG_RESULT( ../lib-$host_os_name-$CC already exists) else mkdir ../lib-$host_os_name-$CC; AC_MSG_RESULT(../lib-$host_os_name-$CC created) fi AC_MSG_CHECKING(for object directory) if test -d ../obj-$host_os_name-$CC; then AC_MSG_RESULT(../obj-$host_os_name-$CC already exists) else mkdir ../obj-$host_os_name-$CC; AC_MSG_RESULT(../obj-$host_os_name-$CC created) fi AC_OUTPUT(makefile)