*** empty log message ***
[libtasn1.git] / configure.in
blob92ad1ed1df4321be64d3ef343ebef0e2e71ebc42
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.
20 AC_PREREQ(2.59)
21 AC_INIT(libtasn1, 0.2.17, bug-gnutls@gnu.org)
22 AM_INIT_AUTOMAKE([1.9 gnits])
23 AM_CONFIG_HEADER(config.h)
24 AB_INIT
26 # Library code modified:                              REVISION++
27 # Interfaces changed/added/removed:   CURRENT++       REVISION=0
28 # Interfaces added:                             AGE++
29 # Interfaces removed:                           AGE=0
30 AC_SUBST(LT_CURRENT, 2)
31 AC_SUBST(LT_REVISION, 17)
32 AC_SUBST(LT_AGE, 0)
34 AC_PROG_CC
35 gl_EARLY
36 AC_PROG_YACC
37 AC_PROG_LN_S
39 dnl Checks for programs.
40 AC_PROG_INSTALL
41 AM_MISSING_PROG(PERL,perl,$missing_dir)
43 AC_MSG_NOTICE([Detecting compiler options])
44 AC_C_CONST
46 dnl In order to use the reentrant libc functions.
47 dnl I hope it is portable enough.
48 CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
50 if test "$GCC" = "yes"; then
51         CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wstrict-prototypes"
53         AC_MSG_CHECKING([whether we have GNU assembler])
54         
55         GAS=`as --version < /dev/null 2>/dev/null|grep GNU`
56         if test "$GAS"; then
57           CFLAGS="${CFLAGS} -pipe"
58           AC_MSG_RESULT(yes)
59         else
60           AC_MSG_RESULT(no)
61         fi
65 AC_MSG_NOTICE([Detecting C library capabilities])
67 AC_HEADER_STDC
68 AC_CHECK_HEADERS(unistd.h getopt.h strings.h inttypes.h stdint.h)
69 AC_CHECK_FUNCS(getopt_long)
70 AC_FUNC_ALLOCA
72 AC_MSG_NOTICE([Detecting system's parameters])
74 AC_C_BIGENDIAN
76 AC_CHECK_SIZEOF(unsigned long long, 8)
77 AC_CHECK_SIZEOF(unsigned long int, 4)
78 AC_CHECK_SIZEOF(unsigned int, 4)
79 AC_CHECK_SIZEOF(unsigned short int, 2)
80 AC_CHECK_SIZEOF(unsigned char, 1)
82 # For some systems we know that we have ld_version scripts.
83 # Use it then as default.
84 have_ld_version_script=no
85 case "${host}" in
86     *-*-linux*)
87         have_ld_version_script=yes
88         ;;
89     *-*-gnu*)
90         have_ld_version_script=yes
91         ;;
92 esac
93 AC_ARG_ENABLE([ld-version-script],
94               AC_HELP_STRING([--enable-ld-version-script],
95                              [enable/disable use of linker version script.
96                               (default is system dependent)]),
97               [have_ld_version_script=$enableval],
98               [ : ] )
99 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
101 gl_SOURCE_BASE(gl)
102 gl_M4_BASE(gl/m4)
103 gl_MODULES(memmove)
104 gl_LGPL
105 gl_INIT
107 AC_MSG_NOTICE([Detecting options for shared libraries])
108 AM_PROG_LIBTOOL
110 LIBTASN1_LIBS="-L${libdir} -ltasn1 $LIBS"
111 LIBTASN1_CFLAGS="-I${includedir}"
112 AC_SUBST(LIBTASN1_LIBS)
113 AC_SUBST(LIBTASN1_CFLAGS)
115 AC_CONFIG_COMMANDS([lib/libtasn1.h],[[
116  chmod +x lib/libtasn1-config
117 ]],[[]])
119 # Check for gtk-doc.
120 GTK_DOC_CHECK(1.2)
122 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile lib/Makefile \
123         lib/libtasn1.pc lib/libtasn1-config doc/Makefile \
124         doc/reference/Makefile])
125 AC_OUTPUT