File: configure.ac

package info (click to toggle)
orgadoc 0.8-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,464 kB
  • ctags: 11,003
  • sloc: ansic: 218,658; sh: 4,128; makefile: 352; yacc: 112; lex: 100; xml: 25
file content (91 lines) | stat: -rw-r--r-- 2,029 bytes parent folder | download | duplicates (2)
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.56)
AC_INIT(orgadoc, 0.8)
AC_CONFIG_SRCDIR([src/orgadoc.e])

# Auxiliary files.
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_FILES(config/Makefile)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

#
# Checks for programs.
#
AC_PROG_INSTALL
AC_PROG_CC
AC_C_CONST

#
# Checks for Eiffel compiler
AC_ARG_WITH(compiler,
 [  --with-compiler=compiler What compiler do you use? ise, se or ve (lowercase!)],
 GOBO_EIFFEL=$withval, GOBO_EIFFEL=se)

# default path for GOBO and ORGADOC
if test x$GOBO = x; then
  export GOBO=/usr/lib/gobo
fi
if test x$ORGADOC = x; then
  export CURRENT_DIR=`pwd`/src
  export ORGADOC=`pwd`
else
  export CURRENT_DIR=$ORGADOC/src
fi

# Expat directory
AC_ARG_WITH(expat, dnl
[  --with-expat            Specify expat path (default /usr)],
            [with_expat=$withval], [with_expat=yes])

if test "$with_expat" = "yes"; then 
  for ac_dir in / /usr; do
    if test -f "$ac_dir/lib/libexpat.so"; then
      with_expat=$ac_dir
      break;
    fi
  done
fi

#set expat path
EXPAT=$with_expat

# We need Gobo as well.
AC_PROG_GOBO
AC_CHECK_RQRD_CLUSTER(GOBO)
AC_CHECK_RQRD_XACE(ORGADOC, src, orgadoc)
AC_CHECK_RQRD_XACE(ORGADOC, src, cgi)
if test x$GOBO_EIFFEL = xse; then
  AC_CHECK_RQRD_CLUSTER2(SmartEiffel)
fi

# enable/disable debug
AC_ARG_ENABLE(debug,
[  --enable-debug          Turn on eiffel debug (not recommended)],
[case "${enableval}" in
   yes|no) ;;
   *) AC_MSG_ERROR([bad value ${enableval} for debug option]) ;;
 esac],
              [enableval=no])
if test "${enableval}" = yes; then
  DEBUG=" DEBUG"
else
  EC="$EC -no_warning"
fi

# Set vars in Makefile(s)
AC_SUBST(EXPAT)
AC_SUBST(GOBO)
AC_SUBST(GOBO_EIFFEL)
AC_SUBST(CURRENT_DIR)
AC_SUBST(DEBUG)

# update version informations in config.e
echo "   VERSION : STRING is \"$VERSION\"" > config.e

AC_CONFIG_FILES([Makefile src/Makefile utils/Makefile])

# Intantiate the output files.
AC_OUTPUT