Revision c2333b98f1847ea22db8f0e7a8b066009fb73c07 authored by Sami Ilvonen on 09 February 2015, 10:10:23 UTC, committed by Sami Ilvonen on 09 February 2015, 10:10:23 UTC
configure.in
dnl Process this file with autoconf to produce a configure script.
AC_INIT(elmerpost, 5.5.0, jpr@csc.fi)
AC_CONFIG_SRCDIR([src/ElmerPost.c])
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_SYS_LARGEFILE
sinclude(acx_elmer.m4)
ACX_DEBUG
ACX_HOST
ACX_PLATFORM_DEFS
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC([xlc pathcc icc cc gcc])
AC_PROG_CXX([xlC pathCC icc CC g++])
AC_PROG_CPP
AC_PROG_FC([gfortran xlf90 pathf90 ifort ifc f90 g95])
AC_PROG_RANLIB
ACX_CHECK_B64FLAGS
AC_FC_WRAPPERS
ACX_FC_CHAR_MANGLING
LIBS="-L. $LIBS -L$prefix/lib"
LDFLAGS="-L. $LDFLAGS -L$prefix/lib"
CFLAGS="$CFLAGS -I$prefix/include"
FCFLAGS="$FCFLAGS -I. -I$prefix/include"
FFFLAGS="$FCFLAGS -I. -I$prefix/include"
ACX_MATC([],[AC_MSG_ERROR([Couldn't link to MATC, make sure that libmatc is available and it works with your compiler.])])
# Checks for libraries.
# MATC
# Checks for header files.
AC_PATH_X
AC_HEADER_STDC
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h sys/param.h sys/time.h termio.h])
sinclude(acx_gl.m4)
ACX_CHECK_GL
ACX_CHECK_GLU
AC_CHECK_LIB(X11, XGetErrorText)
ACX_TCLTK([],[AC_MSG_ERROR([Tcl/tk not found, use TCLTK_LIBS environment variable or --with-tcltk="-L/path/to/ -ltcl8.4 -ltk8.4" to point to it's location.])])
CPPFLAGS="$CPPFLAGS $TCLTK_INCLUDE"
sinclude(acx_ftgl.m4)
ACX_FTGL([],[AC_MSG_ERROR([FTGL not available.])])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_HEADER_STDBOOL
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([floor gettimeofday memset sqrt strerror])
ACX_SHLIB_STUFF
AC_SUBST(SH_LDFLAGS)
AC_SUBST(SH_LD)
AC_DEFINE_UNQUOTED(ELMER_POST_HOME,"${prefix}/share/elmerpost", [Elmer post default install directory])
AM_CONDITIONAL(NOTWINDOWS, test "$acx_platform_def" != "WIN32")
AM_CONDITIONAL(NOTMINGW32, test "$acx_platform_mgw" != "TRUE" )
LIBS="$FTGL_LIBS $LIBS $GL_LIBS $GLU_LIBS $MATC_LIBS $TCLTK_LIBS $FT_LIBS $FTGL_LIBS"
CFLAGS="$CFLAGS $GL_CFLAGS $GLU_CFLAGS $FT_CFLAGS"
CXXFLAGS="$CXXFLAGS $GL_CFLAGS $GLU_CFLAGS $FT_CFLAGS"
AC_CONFIG_FILES([Makefile
src/Makefile
src/camera/Makefile
src/elements/Makefile
src/graphics/Makefile
src/modules/Makefile
src/objects/Makefile
src/sico2elmer/Makefile
src/glaux/Makefile
src/tk/Makefile
src/tcl/Makefile
src/visuals/Makefile])
AC_OUTPUT
AC_MSG_RESULT([
ElmerPost build options:
Version $VERSION
Install prefix $prefix
CFLAGS $CFLAGS
CXXFLAGS $CXXFLAGS
FCFLAGS $FCFLAGS
LDFLAGS $LDFLAGS
LIBS $LIBS
Compilers:
Fortran 90 compiler $FC
CC $CC
C++ $CXX
Libs:
OpenGL $GL_LIBS $GLU_LIBS
MATC $MATC_LIBS
Tcl/Tk $TCLTK_LIBS
FTGL $FTGL_LIBS $FT_LIBS
])
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...