source: sources/configure.ac @ 47

Last change on this file since 47 was 47, checked in by buchmann, 15 years ago

This patch simplifies SystemCASS.

Remove:

  • ckeckings about multiwriting on registers and ports
  • checkings related to FSM modeling
  • regression tests related to the checkings
File size: 3.2 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.63)
5AC_INIT([SystemCASS],[1.0.0])
6AC_CANONICAL_TARGET
7
8AC_CONFIG_HEADER([config.h])
9
10AM_INIT_AUTOMAKE
11
12# Checks for programs.
13AC_PROG_CXX
14AC_PROG_CC
15AC_PROG_CPP
16AC_PROG_INSTALL
17AC_PROG_LN_S
18AC_PROG_MAKE_SET
19AC_PROG_LIBTOOL
20
21AC_CHECK_PROG(has_latex, latex, yes)
22AC_CHECK_PROG(has_bibtex, bibtex, yes)
23AC_CHECK_PROG(has_fig2dev, fig2dev, yes)
24AC_CHECK_PROG(has_ps2pdf, ps2pdf, yes)
25AC_CHECK_PROG(has_dvips, dvips, yes)
26
27
28# User choices
29AC_DEFUN([MY_ARG_ENABLE],
30            [AC_ARG_ENABLE(m4_translit([[$1]], [_], [-]),
31               [AS_HELP_STRING([--enable-m4_translit([$1], [_], [-])],
32                               [$2 (default is $3)])],
33                                                   [do_$1=${enableval}],
34                                                   [do_$1=$3])
35             AS_IF([test x${do_$1} != "xno"],
36                         AC_DEFINE(m4_toupper([CONFIG_$1]), [], [$2]),
37                         )])
38
39MY_ARG_ENABLE(debug, [Enable debugging], [no])
40
41MY_ARG_ENABLE(default_runtime_compilation, [Compile scheduling code], [no])
42
43# Also set -DNDEBUG when not debugging, this disables assert()s
44AS_IF([test "x$do_debug"  = "xyes"], [CXXFLAGS="-g"         ],
45      [test "x$do_debug" != "xyes"], [CXXFLAGS="-O2 -DNDEBUG"])
46
47case $target_os in
48         linux*)
49                AC_DEFINE(CONFIG_OS_LINUX,1,We have a linux system)
50                AC_SUBST(SC_LIB_TARGET,linux)
51                ;;
52         darwin*)
53                AC_DEFINE(CONFIG_OS_DARWIN,1,We have a MacOS system)
54                AC_SUBST(SC_LIB_TARGET,macosx)
55                ;;
56         *)
57                AC_SUBST(SC_LIB_TARGET,unknown)
58                ;;
59esac
60
61AC_ARG_WITH([pat],
62            [AS_HELP_STRING([--with-pat=PATH],
63              [Use PAT trace format, this needs Alliance in PATH])],
64            [],
65            [with_pat=no])
66
67# Checks for libraries.
68AS_IF([test "x$with_pat" != "xno"],
69          ALLIANCE_CFLAGS="-I$with_pat/include"
70          [AC_CHECK_HEADER([pat.h],,
71                   [AC_MSG_ERROR([You asked for PAT trace format but no pat.h dnl
72can be found. Try --with-pat=/search/dir/])])
73      AC_SEARCH_LIBS([pat_message], [Pat],
74                   AC_DEFINE(CONFIG_PAT_TRACE_FORMAT,1,Use PAT trace format),
75                   AC_MSG_ERROR([You asked for PAT trace format but no libpat dnl
76can be found. Try --with-pat=/search/dir/]),
77                   [-lMut -lPpt -lPgn])]
78          AC_SUBST(ALLIANCE_PATH, $withval)
79          AC_SUBST(ALLIANCE_CFLAGS)
80)
81
82AM_CONDITIONAL(WITH_ALLIANCE, test x$with_pat != xno)
83
84AC_ARG_WITH([soclib],
85            [AS_HELP_STRING([--with-soclib=PATH],
86              [Use SoCLib in PATH to compile examples])],
87            [AC_SUBST(SOCLIB_PATH, $withval)],
88                        [with_soclib=no])
89AM_CONDITIONAL(HAS_SOCLIB, test x$with_soclib != xno)
90
91# OpenMP
92AC_OPENMP([C])
93
94AM_CONDITIONAL(BUILD_DOCS,
95[test x$has_latex$has_bibtex$has_fig2dev$has_ps2pdf$has_dvips = xyesyesyesyesyes])
96
97# Checks for header files.
98AC_HEADER_STDC
99AC_CHECK_HEADERS([stdint.h stdlib.h sys/time.h unistd.h])
100
101# Checks for typedefs, structures, and compiler characteristics.
102AC_HEADER_STDBOOL
103AC_C_CONST
104AC_C_INLINE
105AC_TYPE_INT32_T
106AC_TYPE_PID_T
107AC_TYPE_SIZE_T
108AC_STRUCT_TM
109AC_TYPE_UINT64_T
110
111# Checks for library functions.
112AC_FUNC_MALLOC
113AC_FUNC_REALLOC
114AC_FUNC_STRFTIME
115AC_CHECK_FUNCS([memset strchr strdup strstr])
116
117
118AC_CONFIG_FILES([
119  Makefile
120  src/Makefile
121  doc/Makefile
122  examples/Makefile
123  examples/soclib_date04/Makefile
124  examples/soclib_date04/timer4_gmn_handmade/Makefile
125])
126AC_OUTPUT
127
Note: See TracBrowser for help on using the repository browser.