File: configure.in

package info (click to toggle)
libast 0.7-9
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,732 kB
  • sloc: ansic: 13,136; sh: 10,332; makefile: 78
file content (114 lines) | stat: -rw-r--r-- 3,047 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
dnl# $Id: configure.in,v 1.25 2005/06/07 20:32:37 mej Exp $

test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
test "x$ACLOCAL" = "x" && ACLOCAL=aclocal
test "x$AUTOCONF" = "x" && AUTOCONF=autoconf
test "x$AUTOHEADER" = "x" && AUTOHEADER=autoheader
test "x$AUTOMAKE" = "x" && AUTOMAKE=automake

AC_SUBST(LIBTOOLIZE)
AC_SUBST(ACLOCAL)
AC_SUBST(AUTOCONF)
AC_SUBST(AUTOHEADER)
AC_SUBST(AUTOMAKE)

SAVE_LIBTOOLIZE="$LIBTOOLIZE"
SAVE_ACLOCAL="$ACLOCAL"
SAVE_AUTOCONF="$AUTOCONF"
SAVE_AUTOHEADER="$AUTOHEADER"
SAVE_AUTOMAKE="$AUTOMAKE"

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(libast, 0.7)
AC_DEFINE_UNQUOTED(LIBAST_VERSION, "$VERSION", [Version])
AM_CONFIG_HEADER(config.h include/libast/sysdefs.h)
m4_include([libast.m4])

LIBTOOLIZE="${SAVE_LIBTOOLIZE:-libtoolize}"
ACLOCAL="${SAVE_ACLOCAL:-aclocal}"
AUTOCONF="${SAVE_AUTOCONF:-autoconf}"
AUTOHEADER="${SAVE_AUTOHEADER:-autoheader}"
AUTOMAKE="${SAVE_AUTOMAKE:-automake}"

AC_MSG_CHECKING(for preferred libtoolize)
AC_MSG_RESULT($LIBTOOLIZE)
AC_MSG_CHECKING(for preferred aclocal)
AC_MSG_RESULT($ACLOCAL)
AC_MSG_CHECKING(for preferred autoconf)
AC_MSG_RESULT($AUTOCONF)
AC_MSG_CHECKING(for preferred autoheader)
AC_MSG_RESULT($AUTOHEADER)
AC_MSG_CHECKING(for preferred automake)
AC_MSG_RESULT($AUTOMAKE)

dnl# Set some basic variables
AUTHORS="Michael Jennings (mej@eterm.org)"
AC_SUBST(AUTHORS)
AC_DEFINE_UNQUOTED(AUTHORS, "$AUTHORS", [Authors])

AC_CANONICAL_BUILD()
AC_CANONICAL_HOST()
AC_CANONICAL_TARGET()

AC_PROG_CC
AC_PROG_CPP

AST_STD_CHECKS()
AST_PROG_CHECKS()
AST_VAR_CHECKS()
AST_HEADER_CHECKS()
AST_TYPE_CHECKS()
AST_FUNC_CHECKS()

AC_PROG_LIBTOOL()

AST_ARG_DEBUG(DEBUG)
if test $DEBUG -eq 0 ; then
    AC_WARN(*** Debugging support disabled.  Client programs will ***)
    AC_WARN(*** not have access to any libast debugging routines! ***)
fi

AC_ARG_WITH(pedantry,
    [  --with-pedantry         add -Werror -std=c99 -pedantic to CFLAGS],
    [
        if test "$withval" != "no"; then
            CFLAGS="$CFLAGS -Wall -Werror -std=c99"
            AC_DEFINE(STRICT_ISO_C99, 1, [Defined if strict ISO C99 (9899:1999) is requested or required.])
        fi
    ]
)

AC_MSG_CHECKING(if STRICT_ISO_C99 required)
AC_TRY_RUN([
               int main () {
                   int a = 0, b = 0;
                   (long) a = (long) b;
                   return 0;
               }
           ], AC_MSG_RESULT(no), [
               AC_MSG_RESULT(yes)
               AC_DEFINE(STRICT_ISO_C99, 1, [Defined if strict ISO C99 (9899:1999) is requested or required.])
           ], [
               AC_MSG_RESULT(no - assumed because cross-compiling)
])

AST_X11_SUPPORT()
AST_IMLIB2_SUPPORT()
AST_MMX_SUPPORT()
AST_ARG_REGEXP(REGEXP)
AST_ARG_BACKQUOTE_EXEC(ALLOW_BACKQUOTE_EXEC)

AST_FLAGS()
AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)

basedir=.
AC_OUTPUT(include/libast/types.h Makefile include/Makefile \
          include/libast/Makefile src/Makefile test/Makefile \
          libast-config)
test -f libast-config && chmod 755 libast-config

AST_STATUS()