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
|
dnl Process this file with autoconf to produce a configure script.
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
#
# This file is part of LIBTASN1.
#
# This file 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 file 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 file; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
AC_PREREQ(2.59)
AC_INIT([libtasn1], [0.3.1], [bug-gnutls@gnu.org])
AM_INIT_AUTOMAKE([1.9 gnits])
AM_CONFIG_HEADER(config.h)
AB_INIT
# Library code modified: REVISION++
# Interfaces changed/added/removed: CURRENT++ REVISION=0
# Interfaces added: AGE++
# Interfaces removed: AGE=0
AC_SUBST(LT_CURRENT, 3)
AC_SUBST(LT_REVISION, 1)
AC_SUBST(LT_AGE, 0)
AC_PROG_CC
gl_EARLY
AC_PROG_YACC
AC_PROG_LN_S
dnl Checks for programs.
AC_PROG_INSTALL
AM_MISSING_PROG(PERL,perl,$missing_dir)
AC_MSG_NOTICE([Detecting options for shared libraries])
AM_PROG_LIBTOOL
AC_MSG_NOTICE([Detecting compiler options])
AC_C_CONST
dnl In order to use the reentrant libc functions.
dnl I hope it is portable enough.
CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
if test "$GCC" = "yes"; then
CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wstrict-prototypes"
AC_MSG_CHECKING([whether we have GNU assembler])
GAS=`as --version < /dev/null 2>/dev/null|grep GNU`
if test "$GAS"; then
CFLAGS="${CFLAGS} -pipe"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
AC_MSG_NOTICE([Detecting C library capabilities])
AC_CHECK_HEADERS(getopt.h strings.h inttypes.h stdint.h)
AC_CHECK_FUNCS(getopt_long)
AC_FUNC_ALLOCA
AC_MSG_NOTICE([Detecting system's parameters])
AC_CHECK_SIZEOF(unsigned long int, 4)
AC_CHECK_SIZEOF(unsigned int, 4)
# For some systems we know that we have ld_version scripts.
# Use it then as default.
have_ld_version_script=no
case "${host}" in
*-*-linux*)
have_ld_version_script=yes
;;
*-*-gnu*)
have_ld_version_script=yes
;;
esac
AC_ARG_ENABLE([ld-version-script],
AC_HELP_STRING([--enable-ld-version-script],
[enable/disable use of linker version script.
(default is system dependent)]),
[have_ld_version_script=$enableval],
[ : ] )
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
# For gnulib compatibility modules in gl/.
gl_INIT
# For libtasn1-config.
LIBTASN1_LIBS="-L${libdir} -ltasn1 $LIBS"
LIBTASN1_CFLAGS="-I${includedir}"
AC_SUBST(LIBTASN1_LIBS)
AC_SUBST(LIBTASN1_CFLAGS)
AC_CONFIG_COMMANDS([chmod],[[
chmod +x lib/libtasn1-config
]],[[]])
# Check for gtk-doc.
GTK_DOC_CHECK(1.2)
# Update version number in lib/libtasn1.h.
if ! sed 's/_VERSION ".*"/_VERSION "'$PACKAGE_VERSION'"/' \
$srcdir/lib/libtasn1.h > fixhdr.tmp; then
AC_MSG_ERROR([[*** Failed to update version number in lib/libtasn1.h...]])
fi
if cmp -s $srcdir/lib/libtasn1.h fixhdr.tmp 2>/dev/null; then
rm -f fixhdr.tmp
elif ! mv fixhdr.tmp $srcdir/lib/libtasn1.h; then
AC_MSG_ERROR([[*** Failed to move fixhdr.tmp to lib/libtasn1.h...]])
fi
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile lib/Makefile \
lib/libtasn1.pc lib/libtasn1-config doc/Makefile \
doc/reference/Makefile])
AC_OUTPUT
|