"Fossies" - the Fresh Open Source Software Archive 
Member "gfsview-snapshot-121130/configure.ac" (30 Nov 2012, 3480 Bytes) of package /linux/privat/gfsview-snapshot-121130.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(configure.ac)
4 AC_CONFIG_MACRO_DIR([m4])
5
6
7 AC_CANONICAL_HOST
8
9 AM_INIT_AUTOMAKE(gfsview, 0.5.0)
10 AM_CONFIG_HEADER(config.h)
11 AM_MAINTAINER_MODE
12
13 AC_ARG_WITH(mpicc,
14 [ --with-mpicc=path pick a specific path to mpicc],
15 [with_mpicc=$withval],
16 [with_mpicc=''])
17
18 # check if MPI support is disabled
19 AC_ARG_ENABLE(mpi,
20 [ --disable-mpi do not compile MPI support],
21 [ case "${enableval}" in
22 yes) ;;
23 *) with_mpicc=no ;;
24 esac])
25
26 if test "x$with_mpicc" != "xno" ; then
27 if test "x$with_mpicc" != "x" ; then
28 if test -x "$with_mpicc" ; then
29 use_mpicc=yes
30 CC="$with_mpicc"
31 fi
32 else
33 AC_CHECK_PROG(use_mpicc, mpicc, yes)
34 if test "x$use_mpicc" = "xyes" ; then
35 CC=mpicc
36 fi
37 fi
38 if test "x$use_mpicc" = "xyes" ; then
39 AC_DEFINE(HAVE_MPI, 1, [Define to 1 if you have MPI])
40 fi
41 fi
42
43 AC_ISC_POSIX
44 AC_PROG_CC
45 AM_PROG_CC_STDC
46 AM_PROG_CC_C_O
47 AC_HEADER_STDC
48
49 dnl Initialize libtool
50 AC_LIBTOOL_WIN32_DLL
51 AM_PROG_LIBTOOL
52 AM_PROG_CC_C_O
53
54 if test x$GCC = xyes ; then
55 CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -D_XOPEN_SOURCE=500"
56 fi
57
58 GERRIS_VERSION="1.2.0"
59 PKG_CHECK_MODULES(GERRIS2D, [gerris2D >= $GERRIS_VERSION])
60 PKG_CHECK_MODULES(GERRIS3D, [gerris3D >= $GERRIS_VERSION])
61 PKG_CHECK_MODULES(OSMESA, [ osmesa ], [ have_osmesa=yes ], [ have_osmesa=no ])
62
63 dnl alternative check for systems without pkg-config for OSMesa
64 if test "x$have_osmesa" = "xno"; then
65 AC_CHECK_LIB(OSMesa, OSMesaMakeCurrent, [
66 have_osmesa=yes
67 OSMESA_LIBS="-lOSMesa -lGL -lGLU "
68 ], [
69 FLAGS=$CFLAGS
70 CFLAGS="$CFLAGS -L/usr/X11R6/lib"
71 AC_CHECK_LIB(OSMesa, OSMesaCreateContext, [
72 have_osmesa=yes
73 OSMESA_LIBS="-lOSMesa -lGL -lGLU "
74 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
75 ], [
76 AC_MSG_WARN([OSMesa not found. Batch mode will not be available.])
77 have_osmesa=no
78 OSMESA_LIBS=""
79 ])
80 CFLAGS=$FLAGS
81 ])
82 fi
83
84 AM_CONDITIONAL(HAVE_OSMESA, test "x$have_osmesa" = "xyes")
85
86 dnl Fix for MacOSX and cygwin libtool
87 case "$build" in
88 *-apple-darwin*)
89 NO_UNDEFINED=""
90 CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE"
91 ;;
92 *-pc-cygwin*) NO_UNDEFINED="" ;;
93 *) NO_UNDEFINED="-no-undefined" ;;
94 esac
95 AC_SUBST(NO_UNDEFINED)
96
97 GTK_PACKAGES="gthread-2.0 gtk+-2.0 >= 2.4.0 gtkglext-1.0 >= 1.0.6 libstartup-notification-1.0"
98 if test "x$have_osmesa" = "xyes"; then
99 PKG_CHECK_MODULES(GTK, [ $GTK_PACKAGES ],
100 [
101 have_gtk=yes
102 ],[
103 AC_MSG_WARN([GTK dependencies not met.])
104 have_gtk=no
105 ])
106 else
107 PKG_CHECK_MODULES(GTK, [ $GTK_PACKAGES ])
108 have_gtk=yes
109 fi
110
111 AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")
112
113 PKG_CHECK_MODULES(FTGL, [ ftgl >= 2.1.3 ],
114 [
115 AC_DEFINE(HAVE_FTGL, 1, [Define to 1 if you have FTGL])
116 ],[
117 AC_MSG_WARN([FTGL dependencies not met.])
118 ])
119
120 AC_SUBST(OSMESA_CFLAGS)
121 AC_SUBST(OSMESA_LIBS)
122 AC_SUBST(GTK_CFLAGS)
123 AC_SUBST(GTK_LIBS)
124 AC_SUBST(FTGL_CFLAGS)
125 AC_SUBST(FTGL_LIBS)
126 AC_SUBST(SN_CFLAGS)
127 AC_SUBST(SN_LIBS)
128 AC_SUBST(GERRIS2D_CFLAGS)
129 AC_SUBST(GERRIS2D_LIBS)
130 AC_SUBST(GERRIS3D_CFLAGS)
131 AC_SUBST(GERRIS3D_LIBS)
132
133 # check whether the code is under darcs
134
135 AM_CONDITIONAL(DARCS_CONTROLLED, test -d _darcs)
136
137 AC_OUTPUT([
138 Makefile
139 view/Makefile
140 view/desktop/Makefile
141 gl2ps/Makefile
142 gl/Makefile
143 batch/Makefile
144 debian/Makefile
145 ])
146