File: configure.in

package info (click to toggle)
freefem 3.5.8-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 2,456 kB
  • sloc: cpp: 10,323; sh: 10,270; perl: 121; makefile: 120
file content (179 lines) | stat: -rwxr-xr-x 4,680 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#! /bin/sh 
#
# $Id: configure.in,v 1.16 2002/09/23 18:48:49 prudhomm Exp $
#
# SUMMARY:      
# USAGE:        <script-name>
#
# AUTHOR:       Christophe Prud'homme 
# ORG:          
# E-MAIL:       prudhomm@users.sourceforge.net
#
# ORIG-DATE:    26-Apr-89
# LAST-MOD: 23-Sep-02 at 14:05:46 by Christophe Prud'homme
# DESCRIPTION:  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# DESCRIP-END.

AC_REVISION($Id: configure.in,v 1.16 2002/09/23 18:48:49 prudhomm Exp $)dnl
AC_INIT(./Makefile.am) 

dnl ----------------------------------------------------------------------
dnl PACKAGE+VERSION
dnl stole in gtk configure.in
dnl  ----------------------------------------------------------------------
FREEFEM_MAJOR_VERSION=3
FREEFEM_MINOR_VERSION=5
FREEFEM_MICRO_VERSION=8
dnl
FREEFEM_VERSION=$FREEFEM_MAJOR_VERSION.$FREEFEM_MINOR_VERSION.$FREEFEM_MICRO_VERSION
AC_SUBST(FREEFEM_MAJOR_VERSION)
AC_SUBST(FREEFEM_MINOR_VERSION)
AC_SUBST(FREEFEM_MICRO_VERSION)
AC_SUBST(FREEFEM_VERSION)
dnl libtool versioning
LT_RELEASE=$FREEFEM_MAJOR_VERSION.$FREEFEM_MINOR_VERSION
LT_CURRENT=$FREEFEM_MICRO_VERSION
LT_REVISION=$FREEFEM_MINOR_VERSION
LT_AGE=0
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

PACKAGE=freefem
VERSION=$FREEFEM_VERSION


dnl Where are the files for the configure script
AC_CONFIG_AUX_DIR(admin)
AM_ACLOCAL_INCLUDE(admin)

     
dnl What the current system and host
AC_CANONICAL_HOST
AC_CANONICAL_SYSTEM

# init automake
AM_INIT_AUTOMAKE(${PACKAGE},${VERSION})
AM_PROG_LIBTOOL
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CXX

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h unistd.h)

AC_FIND_X
AC_FIND_XTRA

dnl AC_CHECK_PROG(LATEX,latex,latex)
dnl AC_CHECK_PROG(LATEX2HTML,hyperlatex,hyperlatex)
dnl AC_CHECK_TOOL(INSTALL_INFO, install-info, $srcdir/config/install-info)


dnl Where is EMacs ??
dnl AM_PATH_LISPDIR

dnl KDE_CHECK_MICO(2.2.3)

LDFLAGS="${LDFLAGS} $X_LIBS"
AC_CHECK_LIB(X11, XOpenDisplay)

topdir=`pwd`
AC_SUBST(topdir)
top_builddir=`pwd`

KFEM_LIBS="$topdir/freefem/fem/libfem.la " #$topdir/lib/adapt/libadapt.la "
AC_SUBST(KFEM_LIBS)

KFEM_INCLUDES="-I\$(top_srcdir)/freefem/fem  -I$top_srcdir/"
AC_SUBST(KFEM_INCLUDES)

#
# Do we want some optimisation in the generated code
#
enable_kde=yes
AC_ARG_ENABLE(kde,[--with-kde    compile with kde support freefem will be a library: libfem.a],[
    CPPFLAGS="${CPPFLAGS} "
])
    
AC_ARG_WITH(optimization,[--with-optimization       Experimental add additional flags to optimize the code. Depends on the compiler],[
dnl
dnl case g++ or linux machine 
dnl
    if test "$CXX" = "g++" || test "$CXX" = "c++" || test "$host_os" = "linux" ; then
	CXXFLAGS="-O3 -fforce-mem -fforce-addr -fomit-frame-pointer"
    fi
dnl
dnl case hpux system
dnl
    if test "$CXX" = "CC" && test "$host_os" = "hpux" ; then
	CXXFLAGS="+O3 +a1"
    fi
dnl
dnl case silicon graphics system
dnl
    if test "$CXX" = "CC" && test "$host_os" = "irix" ; then
	CXXFLAGS="-O3"
    fi],[
	if test "$CXX" = "CC" && test "$host_os" = "hpux" ; then
		CXXFLAGS="+a1"
    	fi])

#
# check corelinux presence
# 
#AC_CHECK_LIB(cl++, ACCheckCoreLinux,[
#CXXFLAGS="${CXXFLAGS} -I/usr/include/corelinux"
#LDFLAGS="${LDFLAGS} "
#LIBS="${LIBS} -lcl++"
#],[
# echo "You need to install corelinux. see http://corelinux.sourceforge.net"
# exit;
#],)

CXXFLAGS="-Wall ${CXXFLAGS} ${X_CFLAGS}"

dnl show the results
echo "** Here are the make variables for $host"
echo "* Compiler:"
echo "**  CXX=$CXX"
echo "* Compilation options:"
echo "**  DEFS=$DEFS"
echo "**  CPPFLAGS=$CPPFLAGS"
echo "**  CXXFLAGS=$CXXFLAGS"
echo "**  X_CFLAGS=$X_CFLAGS"
echo "* Linking:"
echo "**  LDFLAGS=$LDFLAGS"
echo "**  LIBS=$LIBS"
echo "**  X_PRE_LIBS=$X_PRE_LIBS"
echo "**  X_LIBS=$X_LIBS"
echo "**  X_EXTRA_LIBS=$X_EXTRA_LIBS"


dnl now create the Makefile 
AC_OUTPUT(Makefile \
	  freefem.spec \
	  admin/Makefile \
	  doc/Makefile \
          freefem-api/Makefile \
          freefem/Makefile \
	  freefem/fem/Makefile \
	  examples/Makefile )