Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 99 lines (66 sloc) 2.795 kb
bef7963 Build changes
andyv authored
1
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
2 AC_INIT(g95.h)
bef7963 Build changes
andyv authored
3 AM_INIT_AUTOMAKE(g95, 0.25)
4 AM_CONFIG_HEADER(g95-config.h)
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
5
f64da64 Steven Johnson's build scripts.
andyv authored
6 #############################################################################
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
7 AC_PROG_CC
8fc886c Upgrade handling of shape specification.
andyv authored
8 AC_PROG_CPP
f64da64 Steven Johnson's build scripts.
andyv authored
9 AC_CANONICAL_HOST
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
10
f64da64 Steven Johnson's build scripts.
andyv authored
11 AC_C_CONST
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
12
416a97f New version of configure.in
andyv authored
13 case "$host" in
14 hppa*) CFLAGS="-Ae $CFLAGS";;
15 esac
16
8fc886c Upgrade handling of shape specification.
andyv authored
17
18 #####################################################################
19
20 AC_ARG_WITH(gcc-dir, [ --with-gcc-dir=PATH Specify directory for GCC ])
21
bef7963 Build changes
andyv authored
22 ## This option almost works. The last difficulty is creating the gty
23 ## include files, particularly the master language file.
24
8fc886c Upgrade handling of shape specification.
andyv authored
25 if test "x$with_gcc_dir" != x -a -d "$with_gcc_dir"; then
bef7963 Build changes
andyv authored
26 CFLAGS="$CFLAGS -DBACKEND -DIN_GCC -DNO_GTY"
8fc886c Upgrade handling of shape specification.
andyv authored
27 CPPFLAGS="-I- -I$with_gcc_dir/gcc -I$with_gcc_dir/include -I$with_gcc_dir/gcc/config $CPPFLAGS"
28
29 LDFLAGS="$LDFLAGS -L$with_gcc_dir/gcc -L$with_gcc_dir/libiberty"
bef7963 Build changes
andyv authored
30 LIBS="$LIBS -lbackend -liberty"
8fc886c Upgrade handling of shape specification.
andyv authored
31
32 DEFAULT_INCLUDES=" "
33
34 AC_CHECK_HEADER(ansidecl.h, [], [AC_MSG_ERROR([ansidecl.h not found])])
35
36 AC_MSG_CHECKING([for libbackend.a])
37 if test -f $with_gcc_dir/gcc/libbackend.a; then
38 AC_MSG_RESULT([yes])
39 else
bef7963 Build changes
andyv authored
40 AC_MSG_ERROR([could not find libbackend.a])
8fc886c Upgrade handling of shape specification.
andyv authored
41 fi
bef7963 Build changes
andyv authored
42
43 GCC_DIR=$with_gcc_dir
44 AC_SUBST([GCC_DIR])
8fc886c Upgrade handling of shape specification.
andyv authored
45 fi
46
bef7963 Build changes
andyv authored
47 AM_CONDITIONAL(GCC, test "x$with_gcc_dir" != "x")
48
8fc886c Upgrade handling of shape specification.
andyv authored
49
f64da64 Steven Johnson's build scripts.
andyv authored
50 #############################################################################
51 # Find GMP (GNU Multi-Precision) library:
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
52
8fc886c Upgrade handling of shape specification.
andyv authored
53 AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify directory for the GMP library])
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
54
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
55 if test "x$with_gmp_dir" != x -a -d "$with_gmp_dir"; then
8fc886c Upgrade handling of shape specification.
andyv authored
56 CPPFLAGS="$CPPFLAGS -I$with_gmp_dir"
bef7963 Build changes
andyv authored
57 LIBS="$with_gmp_dir/.libs/libgmp.a $LIBS"
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
58 fi
59
86123e5 Attempted to set up alloca in autoconf according to gnu docs. Also...
kholcomb authored
60 AC_FUNC_ALLOCA([AC_MSG_ERROR([alloca not found])])
61
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
62 AC_CHECK_HEADER(gmp.h, [], [AC_MSG_ERROR([gmp.h not found])])
416a97f New version of configure.in
andyv authored
63
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
64 AC_MSG_CHECKING([for correct version of gmp.h])
8fc886c Upgrade handling of shape specification.
andyv authored
65 AC_TRY_COMPILE([#include "gmp.h"],[
f64da64 Steven Johnson's build scripts.
andyv authored
66 #if __GNU_MP_VERSION < 3
67 choke me
68 #endif
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
69 ], [AC_MSG_RESULT([yes])],
70 [AC_MSG_ERROR([gmp version 3.0 or later is required])])
416a97f New version of configure.in
andyv authored
71
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
72 AC_MSG_CHECKING([for mpf_init in -lgmp])
416a97f New version of configure.in
andyv authored
73
ae10045 Simplify configure.in in looking for the GMP libraries.
andyv authored
74 AC_TRY_LINK([#include <gmp.h>], [mpf_t n; mpf_init(n);],
75 [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([could not link with libgmp])])
416a97f New version of configure.in
andyv authored
76
77
8fc886c Upgrade handling of shape specification.
andyv authored
78
f64da64 Steven Johnson's build scripts.
andyv authored
79 #############################################################################
80 # --enable-debug to turn on debugging (currently defaults to yes)
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
81
f64da64 Steven Johnson's build scripts.
andyv authored
82 AC_ARG_ENABLE(debug, [ --enable-debug compile for debugging],
83 [ok=$enableval], [ok=yes])
84 if test "$ok" = "yes"; then
0bac900 Preserve CFLAGS in configure (Erik)
andyv authored
85 CFLAGS="$CFLAGS -g"
f64da64 Steven Johnson's build scripts.
andyv authored
86 # Add more compiler warnings if we are using gcc:
87 # ($GCC is set to "yes" by AC_PROG_CC if we are using gcc.)
88 if test "$GCC" = "yes"; then
214cd5a Remove consts
andyv authored
89 CFLAGS="$CFLAGS -pedantic -Wall -Wmissing-prototypes"
f64da64 Steven Johnson's build scripts.
andyv authored
90 fi
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
91
f64da64 Steven Johnson's build scripts.
andyv authored
92 AC_DEFINE(G95_DEBUG,1,[Define to turn on debugging checks.])
93 fi
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
94
f64da64 Steven Johnson's build scripts.
andyv authored
95 #############################################################################
60d8ae3 Remove Makefile, add support for autoconf.
andyv authored
96
97 AC_OUTPUT(Makefile)
98
Something went wrong with that request. Please try again.