Rename.
[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 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, 5)
31 AC_SUBST(LT_REVISION, 0)
32 AC_SUBST(LT_AGE, 0)
33
34 AC_PROG_CC
35 gl_EARLY
36 AC_PROG_YACC
37 AC_PROG_LN_S
38
39 dnl Checks for programs.
40 AC_PROG_INSTALL
41 AM_MISSING_PROG(PERL, perl, $missing_dir)
42 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
43
44 AC_LIBTOOL_WIN32_DLL
45 AM_PROG_LIBTOOL
46
47 AC_CHECK_SIZEOF(unsigned long int, 4)
48 AC_CHECK_SIZEOF(unsigned int, 4)
49
50 sj_VALGRIND
51 sj_LINKER_SCRIPT
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 in gl/.
58 gl_INIT
59
60 gl_WARN_SUPPORTED([WARNINGS])
61
62 # Useless warnings for libtasn1.
63 USELESS_WARNINGS=" \
64   -Wc++-compat \
65   -Wsystem-headers \
66   -Wtraditional \
67   -Wtraditional-conversion"
68 gl_WARN_COMPLEMENT(WARNINGS, [$WARNINGS], [$USELESS_WARNINGS])
69 # Review these from time to time.
70 USELESS_WARNINGS=" \
71   -Wconversion \
72   -Wsign-conversion \
73   -Wold-style-definition \
74   -Wpadded \
75   -Wundef \
76   -Wsign-compare \
77   -Wunreachable-code \
78   -Wunsafe-loop-optimizations \
79   -Wstrict-overflow"
80 gl_WARN_COMPLEMENT(WARNINGS, [$WARNINGS], [$USELESS_WARNINGS])
81
82 for w in $WARNINGS; do
83   gl_WARN_ADD([$w])
84 done
85
86 gl_WARN_ADD([-Wno-missing-field-initializers])
87 gl_WARN_ADD([-Wno-pointer-sign])
88 gl_WARN_ADD([-Wno-unused-parameter])
89 gl_WARN_ADD([-fdiagnostics-show-option])
90
91 AC_CONFIG_FILES([
92   Makefile
93   doc/Makefile
94   doc/cyclo/Makefile
95   doc/reference/Makefile
96   examples/Makefile
97   gl/Makefile
98   lib/Makefile
99   lib/libtasn1.pc
100   src/Makefile
101   tests/Makefile
102 ])
103 AC_OUTPUT
104
105 AC_MSG_NOTICE([summary of build options:
106
107   version:          ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
108   Host type:        ${host}
109   Install prefix:   ${prefix}
110   Compiler:         ${CC}
111   Warning flags:    ${WARN_CFLAGS}
112   Library types:    Shared=${enable_shared}, Static=${enable_static}
113   Valgrind:         ${VALGRIND}
114   Linker script:    $have_ld_version_script
115 ])