1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
4 # This file is part of LIBTASN1.
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This file is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this file; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 AC_INIT(libtasn1, 0.2.14, bug-gnutls@gnu.org)
22 AM_INIT_AUTOMAKE([1.9 gnits])
23 AM_CONFIG_HEADER(config.h)
25 # Library code modified: REVISION++
26 # Interfaces changed/added/removed: CURRENT++ REVISION=0
27 # Interfaces added: AGE++
28 # Interfaces removed: AGE=0
29 AC_SUBST(LT_CURRENT, 2)
30 AC_SUBST(LT_REVISION, 14)
37 dnl Checks for programs.
39 AM_MISSING_PROG(PERL,perl,$missing_dir)
41 AC_MSG_NOTICE([Detecting compiler options])
45 AC_MSG_CHECKING([whether C99 macros are supported])
53 AC_DEFINE(C99_MACROS, 1, [C99 macros are supported])
57 AC_MSG_WARN([C99 macros are not supported by your compiler. This may
61 dnl In order to use the reentrant libc functions.
62 dnl I hope it is portable enough.
63 CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
65 if test "$GCC" = "yes"; then
66 CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wstrict-prototypes"
68 AC_MSG_CHECKING([whether we have GNU assembler])
70 GAS=`as --version < /dev/null 2>/dev/null|grep GNU`
72 CFLAGS="${CFLAGS} -pipe"
80 AC_MSG_NOTICE([Detecting C library capabilities])
83 AC_CHECK_HEADERS(getopt.h unistd.h strings.h inttypes.h stdint.h)
84 AC_CHECK_FUNCS(bzero memset memmove bcopy)
85 AC_CHECK_FUNCS(getopt_long)
88 AC_MSG_NOTICE([Detecting system's parameters])
92 AC_CHECK_SIZEOF(unsigned long long, 8)
93 AC_CHECK_SIZEOF(unsigned long int, 4)
94 AC_CHECK_SIZEOF(unsigned int, 4)
95 AC_CHECK_SIZEOF(unsigned short int, 2)
96 AC_CHECK_SIZEOF(unsigned char, 1)
98 AC_MSG_NOTICE([Detecting options for shared libraries])
101 LIBTASN1_LIBS="-L${libdir} -ltasn1 $LIBS"
102 LIBTASN1_CFLAGS="-I${includedir}"
104 AC_SUBST(LIBTASN1_LIBS)
105 AC_SUBST(LIBTASN1_CFLAGS)
107 AC_CONFIG_COMMANDS([lib/libtasn1.h],[[
108 chmod +x lib/libtasn1-config
114 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile lib/Makefile \
115 lib/libtasn1.pc lib/libtasn1-config doc/Makefile \
116 doc/reference/Makefile])