2012-11-09 21:13:49 +06:00
|
|
|
AC_INIT([netgen],[5.1-dev],[],[])
|
2009-01-13 23:32:10 +05:00
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
|
|
|
|
2009-01-16 01:41:14 +05:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
2009-01-18 00:37:57 +05:00
|
|
|
AC_PREFIX_DEFAULT(["/opt/netgen"])
|
|
|
|
|
2009-01-16 01:41:14 +05:00
|
|
|
|
2009-01-17 01:09:52 +05:00
|
|
|
|
|
|
|
|
2009-08-25 04:51:13 +06:00
|
|
|
|
|
|
|
# AC_HEADER_STDC
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
AC_PROG_CXX
|
2012-11-18 15:09:38 +06:00
|
|
|
|
|
|
|
AC_OPENMP
|
|
|
|
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
|
2013-05-27 20:37:51 +06:00
|
|
|
LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS"
|
2012-11-18 15:09:38 +06:00
|
|
|
|
2009-08-25 04:51:13 +06:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
LT_INIT
|
|
|
|
|
2009-08-25 02:23:51 +06:00
|
|
|
# OpenCASCADE configuration
|
2009-01-14 02:14:02 +05:00
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
occon=false
|
2009-01-13 23:32:10 +05:00
|
|
|
AC_ARG_ENABLE([occ],
|
2009-11-02 17:29:13 +05:00
|
|
|
[AC_HELP_STRING([--enable-occ],[compile with OpenCascade geometry kernel])],
|
2009-08-25 02:23:51 +06:00
|
|
|
[occon=true])
|
2009-01-13 23:32:10 +05:00
|
|
|
|
2009-01-15 22:37:07 +05:00
|
|
|
AC_ARG_WITH([occ],
|
2009-11-02 17:29:13 +05:00
|
|
|
[AC_HELP_STRING([--with-occ=dir],[use OpenCascade installed in directory dir])],
|
2009-08-25 02:23:51 +06:00
|
|
|
[occdir=$withval]
|
|
|
|
[occon=true],
|
|
|
|
[occdir=/opt/OpenCASCADE]
|
2009-01-15 22:37:07 +05:00
|
|
|
)
|
|
|
|
|
2009-01-18 19:47:12 +05:00
|
|
|
|
2009-08-25 04:51:13 +06:00
|
|
|
|
2009-08-25 02:23:51 +06:00
|
|
|
if test a$occon = atrue ; then
|
|
|
|
|
2011-07-25 17:33:19 +06:00
|
|
|
AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"])
|
2009-08-25 02:23:51 +06:00
|
|
|
AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
|
|
|
|
|
|
|
|
# -lTKDCAF
|
|
|
|
|
|
|
|
if test a$build_cpu = ax86_64 ; then
|
|
|
|
AC_SUBST([OCCFLAGS],["$OCCFLAGS -D_OCC64"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([iostream],[OCCFLAGS="$OCCFLAGS -DHAVE_IOSTREAM"])
|
|
|
|
AC_CHECK_HEADER([iostream.h],[OCC_FLAGS="$OCCFLAGS -DHAVE_IOSTREAM_H"])
|
|
|
|
AC_CHECK_HEADER([limits],[OCCFLAGS="$OCCFLAGS -DHAVE_LIMITS"])
|
|
|
|
AC_CHECK_HEADER([limits.h],[OCCFLAGS="$OCCFLAGS -DHAVE_LIMITS_H"])
|
2009-08-25 23:22:36 +06:00
|
|
|
AC_CHECK_HEADER([iomanip],[OCCFLAGS="$OCCFLAGS -DHAVE_IOMANIP"])
|
|
|
|
AC_CHECK_HEADER([iomanip.h],[OCCFLAGS="$OCCFLAGS -DHAVE_IOMANIP_H"])
|
2009-08-25 02:23:51 +06:00
|
|
|
|
|
|
|
|
|
|
|
echo "OCCFLAGS = $OCCFLAGS"
|
|
|
|
echo "OCCLIBS = $OCCLIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-15 22:37:07 +05:00
|
|
|
AC_ARG_WITH([togl],
|
2009-11-02 17:29:13 +05:00
|
|
|
[AC_HELP_STRING([--with-togl=dir],[directory containing libTogl1.7])],
|
2009-01-15 22:37:07 +05:00
|
|
|
[togldir=$withval]
|
2009-01-20 14:08:01 +05:00
|
|
|
[togllibfl="-L$withval$"]
|
2009-01-15 22:37:07 +05:00
|
|
|
)
|
2009-01-20 14:08:01 +05:00
|
|
|
# [togllibfl="-L$(TK_BIN_DIR)/Togl1.7"]
|
|
|
|
# [togllibfl="-L/usr/local/lib/Togl1.7"]
|
2009-01-15 22:37:07 +05:00
|
|
|
|
|
|
|
|
2009-11-02 17:29:13 +05:00
|
|
|
nglibon=true
|
2009-01-18 19:47:12 +05:00
|
|
|
AC_ARG_ENABLE([nglib],
|
2009-11-02 17:29:13 +05:00
|
|
|
[AC_HELP_STRING([--enable-nglib],[generate shared library nglib])],
|
|
|
|
[if test "$enableval" = yes; then nglibon=true; else nglibon=false; fi])
|
2009-01-18 19:47:12 +05:00
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
ngguion=true
|
|
|
|
AC_ARG_ENABLE([gui],
|
|
|
|
[AC_HELP_STRING([--disable-gui],[don't build netgen with GUI])],
|
|
|
|
[if test "$enableval" = yes; then ngguion=true; else ngguion=false; fi])
|
|
|
|
|
2012-10-18 14:30:35 +06:00
|
|
|
metisdir=/usr/local
|
2012-10-04 17:43:21 +06:00
|
|
|
AC_ARG_WITH([metis],
|
|
|
|
[AC_HELP_STRING([--with-metis=dir],[path to metis 5.x])],
|
|
|
|
[metisdir=$withval],
|
|
|
|
[metisdir=/usr/local]
|
|
|
|
)
|
2009-01-18 19:47:12 +05:00
|
|
|
|
2009-01-25 07:54:27 +05:00
|
|
|
AC_ARG_ENABLE([parallel],
|
2009-11-02 17:29:13 +05:00
|
|
|
[AC_HELP_STRING([--enable-parallel],[enable mpi parallelization])],
|
2012-11-01 18:53:59 +06:00
|
|
|
[AC_SUBST([MPI_INCLUDES], "-I$metisdir/include -DMETIS")]
|
|
|
|
[CXXFLAGS="$CXXFLAGS -DPARALLEL"]
|
2012-10-04 17:58:37 +06:00
|
|
|
[AC_SUBST([MPI_LIBS], "-L$metisdir/lib -lmetis")]
|
2009-04-05 21:10:33 +06:00
|
|
|
)
|
2011-05-13 17:56:59 +06:00
|
|
|
# -DVTRACE
|
|
|
|
# -lvt-hyb
|
2011-02-14 18:01:51 +05:00
|
|
|
|
|
|
|
# [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -I/usr/include/mpich2 -I/usr/include/metis -DPARALLEL -I/usr/share/metis/Lib -DMETIS -DVTRACE -I/usr/local/include/vampirtrace")
|
|
|
|
# AC_SUBST([MPI_LIBS], "-lmetis -L/opt/mpich/ch-p4/lib -lmpich")
|
|
|
|
|
|
|
|
# -lvt -lvt-mpi -lvt-mpi-unify")
|
2011-02-14 17:27:18 +05:00
|
|
|
# [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/usr/include/metis -DMETIS")
|
|
|
|
# AC_SUBST([MPI_LIBS], " -L/opt/mpich/ch-p4/lib64 -lmpich -lmetis")
|
|
|
|
# [AC_SUBST([MPI_INCLUDES], "-DPARALLEL -DNO_PARALLEL_THREADS -I/opt/mpich/include")
|
|
|
|
# AC_SUBST([MPI_LIBS], "")
|
|
|
|
# -lmetis
|
2009-01-26 00:24:07 +05:00
|
|
|
# [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/home/joachim/download/metis-4.0/Lib -DMETIS")
|
|
|
|
# AC_SUBST([MPI_LIBS], "-L/home/joachim/download/metis-4.0 -lmetis -L/opt/mpich/ch-p4/lib64 -lmpich")
|
2009-01-25 07:54:27 +05:00
|
|
|
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-11-02 17:29:13 +05:00
|
|
|
jpeglibon=false
|
2009-04-05 21:10:33 +06:00
|
|
|
AC_ARG_ENABLE([jpeglib],
|
2009-04-07 19:15:21 +06:00
|
|
|
[AS_HELP_STRING([--enable-jpeglib],[enable snapshots using library libjpeg])],
|
2009-04-05 21:10:33 +06:00
|
|
|
[AC_SUBST([JPEGLIB_INCLUDES], "-DJPEGLIB")
|
2009-04-07 19:15:21 +06:00
|
|
|
AC_CHECK_LIB(jpeg, jpeg_start_compress,
|
|
|
|
AC_SUBST([JPEGLIB_LIBS], "-ljpeg") ,
|
|
|
|
AC_MSG_ERROR([no usable library libjpeg found]))
|
2009-11-02 17:29:13 +05:00
|
|
|
[if test "$enableval" = yes; then jpeglibon=true; else jpeglibon=false; fi]
|
2009-04-05 21:10:33 +06:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2009-11-02 17:29:13 +05:00
|
|
|
ffmpegon=false
|
2009-04-05 21:10:33 +06:00
|
|
|
AC_ARG_ENABLE([ffmpeg],
|
2009-04-07 19:15:21 +06:00
|
|
|
[AS_HELP_STRING([--enable-ffmpeg],[enable video recording with FFmpeg, uses libavcodec])],
|
2012-06-12 00:20:01 +06:00
|
|
|
[AC_SUBST([FFMPEG_INCLUDES], "-DFFMPEG -D__STDC_CONSTANT_MACROS")
|
2009-04-05 21:10:33 +06:00
|
|
|
AC_SUBST([FFMPEG_LIBS], "-lavutil -lavformat -lavcodec -lavutil -lswscale -lz -lbz2")
|
2009-11-02 17:29:13 +05:00
|
|
|
[if test "$enableval" = yes; then ffmpegon=true; else ffmpegon=false; fi]
|
2009-04-05 21:10:33 +06:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2009-01-14 21:29:22 +05:00
|
|
|
|
2013-02-26 19:11:08 +06:00
|
|
|
mklon=false
|
|
|
|
AC_ARG_ENABLE([mkl],
|
|
|
|
[AS_HELP_STRING([--enable-mkl],[link Intel's mkl library, necessary for ngsolve and mkl 11.x])],
|
|
|
|
[if test "$enableval" = yes; then mklon=true; else mklon=false; fi]
|
|
|
|
)
|
2009-01-14 02:14:02 +05:00
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
# only for GUI version
|
2009-01-14 22:27:44 +05:00
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
if test a$ngguion = atrue ; then
|
|
|
|
# Tcl/Tk configuration:
|
|
|
|
TEA_INIT([3.9])
|
|
|
|
TEA_PATH_TCLCONFIG
|
|
|
|
TEA_LOAD_TCLCONFIG
|
|
|
|
TEA_PATH_TKCONFIG
|
|
|
|
TEA_LOAD_TKCONFIG
|
|
|
|
TEA_PUBLIC_TCL_HEADERS
|
2009-09-09 02:37:33 +06:00
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
AC_SUBST([TOGLLIBDIR], ["$togllibfl"])
|
|
|
|
AC_CHECK_HEADER([togl.h])
|
|
|
|
AC_CHECK_HEADER([GL/gl.h])
|
2009-08-25 02:23:51 +06:00
|
|
|
|
|
|
|
|
2009-01-16 01:41:14 +05:00
|
|
|
|
2009-02-05 04:09:28 +05:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# __CHANGE__
|
|
|
|
# Choose OpenGL platform (borrowed from Togl1.7)
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
case "${TEA_WINDOWINGSYSTEM}" in
|
|
|
|
aqua)
|
|
|
|
AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_AGL)
|
|
|
|
TEA_ADD_LIBS([-framework AGL -framework OpenGL -framework ApplicationServices])
|
|
|
|
# libGLU is implicit in OpenGL framework
|
|
|
|
LIBGLU=
|
|
|
|
;;
|
|
|
|
x11)
|
|
|
|
AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11)
|
2011-02-19 00:58:17 +05:00
|
|
|
TEA_ADD_LIBS([-lGL -lXmu])
|
2009-02-05 04:09:28 +05:00
|
|
|
LIBGLU=-lGLU
|
|
|
|
;;
|
|
|
|
win32)
|
|
|
|
AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_WGL)
|
|
|
|
TEA_ADD_LIBS([opengl32.lib user32.lib gdi32.lib])
|
|
|
|
if test "$GCC" = "yes" ; then
|
|
|
|
LIBGLU=-lglu32
|
|
|
|
else
|
|
|
|
LIBGLU=glu32.lib
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(LIBGLU)
|
|
|
|
|
2012-08-30 00:49:42 +06:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL([NGLIB], [test x$nglibon = xtrue])
|
|
|
|
AM_CONDITIONAL([NGGUI], [test x$ngguion = xtrue])
|
2013-02-26 19:11:08 +06:00
|
|
|
AM_CONDITIONAL([NGMKL], [test x$mklon = xtrue])
|
2012-08-30 00:49:42 +06:00
|
|
|
|
|
|
|
AC_CHECK_HEADER(pthread.h)
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS([pow])
|
|
|
|
AC_CHECK_FUNCS([floor])
|
|
|
|
AC_CHECK_FUNCS([matherr])
|
|
|
|
AC_CHECK_HEADERS([limits.h])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(pthread, pthread_create)
|
|
|
|
|
2009-02-05 04:09:28 +05:00
|
|
|
|
2009-08-25 04:51:13 +06:00
|
|
|
|
|
|
|
|
2009-01-18 19:47:12 +05:00
|
|
|
AC_CONFIG_FILES(Makefile libsrc/Makefile libsrc/csg/Makefile
|
|
|
|
libsrc/general/Makefile libsrc/geom2d/Makefile libsrc/gprim/Makefile
|
|
|
|
libsrc/include/Makefile libsrc/interface/Makefile
|
|
|
|
libsrc/linalg/Makefile libsrc/meshing/Makefile libsrc/occ/Makefile
|
2009-01-26 00:37:49 +05:00
|
|
|
libsrc/stlgeom/Makefile
|
2009-01-26 00:24:07 +05:00
|
|
|
libsrc/visualization/Makefile ng/Makefile nglib/Makefile
|
2009-02-01 02:07:21 +05:00
|
|
|
tutorials/Makefile doc/Makefile windows/Makefile )
|
2009-01-13 23:32:10 +05:00
|
|
|
|
2009-01-14 02:14:02 +05:00
|
|
|
AC_OUTPUT
|
2009-11-02 17:29:13 +05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
$PACKAGE $VERSION: Automatic configuration OK.
|
|
|
|
|
|
|
|
Enabled functionality:
|
|
|
|
|
|
|
|
OCC: ............... $occon
|
|
|
|
JPEGlib: ........... $jpeglibon
|
|
|
|
FFMPEG: ............ $ffmpegon
|
|
|
|
NGLIB: ............. $nglibon
|
2012-08-30 00:49:42 +06:00
|
|
|
GUI: ............... $ngguion
|
2009-11-02 17:29:13 +05:00
|
|
|
|
|
|
|
|
|
|
|
Building:
|
|
|
|
|
|
|
|
Type 'make' to compile $PACKAGE.
|
|
|
|
|
|
|
|
Type 'make install' to install $PACKAGE.
|
|
|
|
|
|
|
|
Example programs will be built but not installed.
|
|
|
|
------------------------------------------------------------------------
|
2011-02-14 18:01:51 +05:00
|
|
|
])
|