Fix typo.
[platform/upstream/libtasn1.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
3 #
4 # This file is part of LIBTASN1.
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 AC_PREREQ(2.61)
20 AC_INIT([libtasn1], [2.0], [bug-gnutls@gnu.org])
21 AC_CONFIG_AUX_DIR([build-aux])
22 AC_CONFIG_MACRO_DIR([m4])
23 AC_CONFIG_HEADERS(config.h)
24 AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
25
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, 4)
31 AC_SUBST(LT_REVISION, 3)
32 AC_SUBST(LT_AGE, 1)
33
34 AC_PROG_CC
35 gl_EARLY
36 lgl_EARLY
37 AC_PROG_YACC
38 AC_PROG_LN_S
39
40 dnl Checks for programs.
41 AC_PROG_INSTALL
42 AM_MISSING_PROG(PERL, perl, $missing_dir)
43 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
44
45 AC_LIBTOOL_WIN32_DLL
46 AM_PROG_LIBTOOL
47
48 AC_CHECK_SIZEOF(unsigned long int, 4)
49 AC_CHECK_SIZEOF(unsigned int, 4)
50
51 sj_VALGRIND
52 sj_UPDATE_HEADER_VERSION([$srcdir/lib/libtasn1.h])
53
54 # Check for gtk-doc.
55 GTK_DOC_CHECK(1.2)
56
57 # For gnulib compatibility modules.
58 gl_INIT
59 lgl_INIT
60
61 # Add many warnings, except some...
62 if test "$GCC" = "yes"; then
63   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
64   nw="$nw -Wc++-compat"             # We don't care strongly about C++ compilers
65   nw="$nw -Wtraditional"            # Warns on #elif which we use often
66   nw="$nw -Wtraditional-conversion" # Too many warnings for now
67   nw="$nw -Wconversion"             # Too many warnings for now
68   nw="$nw -Wsign-conversion"        # Too many warnings for now
69   nw="$nw -Wold-style-definition"   # 
70   nw="$nw -Wpadded"                 # Our structs are not padded
71   nw="$nw -Wundef"                  # 
72   nw="$nw -Wunreachable-code"       # Too many false positives
73   nw="$nw -Wunused-macros"          # Breaks on bison generated ASN1.c
74   nw="$nw -Wunsafe-loop-optimizations"
75   nw="$nw -Wstrict-overflow"
76   gl_MANYWARN_ALL_GCC([ws])
77   gl_MANYWARN_COMPLEMENT(ws, [$ws], [$nw])
78   for w in $ws; do
79     gl_WARN_ADD([$w])
80   done
81   gl_WARN_ADD([-Wno-missing-field-initializers])
82   gl_WARN_ADD([-Wno-sign-compare])
83   gl_WARN_ADD([-Wno-pointer-sign])
84   gl_WARN_ADD([-Wno-unused-parameter])
85   gl_WARN_ADD([-fdiagnostics-show-option])
86 fi
87
88 AC_CONFIG_FILES([
89   Makefile
90   doc/Makefile
91   doc/cyclo/Makefile
92   doc/reference/Makefile
93   examples/Makefile
94   gl/Makefile
95   lib/Makefile
96   lib/gllib/Makefile
97   lib/libtasn1.pc
98   src/Makefile
99   tests/Makefile
100 ])
101 AC_OUTPUT
102
103 AC_MSG_NOTICE([summary of build options:
104
105   version:          ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
106   Host type:        ${host}
107   Install prefix:   ${prefix}
108   Compiler:         ${CC}
109   Warning flags:    ${WARN_CFLAGS}
110   Library types:    Shared=${enable_shared}, Static=${enable_static}
111   Valgrind:         ${VALGRIND}
112   Version script:   $have_ld_version_script
113 ])