Add gtk-doc to build-time dependencies
[platform/upstream/libtasn1.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
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.63])
20 AC_INIT([GNU Libtasn1],[4.14],[help-libtasn1@gnu.org])
21 AC_CONFIG_AUX_DIR([build-aux])
22 AC_CONFIG_MACRO_DIRS([m4 m4-gl])
23 AC_CONFIG_HEADERS(config.h)
24 AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-override])
25 AM_SILENT_RULES([yes])
26
27 # Library code modified:                              REVISION++
28 # Interfaces changed/added/removed:   CURRENT++       REVISION=0
29 # Interfaces added:                             AGE++
30 # Interfaces removed:                           AGE=0
31 AC_SUBST(LT_CURRENT, 11)
32 AC_SUBST(LT_REVISION, 6)
33 AC_SUBST(LT_AGE, 5)
34
35 # Generate version defines for include file
36 AC_SUBST([ASN1_VERSION_MAJOR], [`echo $VERSION|cut -d'.' -f1`])
37 AC_SUBST([ASN1_VERSION_MINOR], [`echo $VERSION|cut -d'.' -f2`])
38 # Let's activate the following line as soon as we change to extended version numbering
39 #AC_SUBST([ASN1_VERSION_PATCH], [`echo $VERSION|cut -d'.' -f3`])
40 AC_SUBST([ASN1_VERSION_PATCH], [`echo 0`])
41 AC_SUBST([ASN1_VERSION_NUMBER], [`printf '0x%02x%02x%02x' $ASN1_VERSION_MAJOR $ASN1_VERSION_MINOR $ASN1_VERSION_PATCH`])
42 AC_CONFIG_FILES([lib/includes/libtasn1.h])
43
44
45 AC_PROG_CC
46 gl_EARLY
47 AC_PROG_YACC
48
49 AC_ARG_ENABLE(doc,
50   AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
51     enable_doc=$enableval, enable_doc=yes)
52 AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
53
54 AC_CHECK_FUNCS([clock_gettime])
55
56 dnl Checks for programs.
57 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
58 AC_LIBTOOL_WIN32_DLL
59 AM_PROG_AR
60 AM_PROG_LIBTOOL
61 GTK_DOC_CHECK(1.2)
62
63 AC_CHECK_SIZEOF(unsigned long int, 4)
64 AC_CHECK_SIZEOF(unsigned int, 4)
65
66 # For gnulib compatibility modules.
67 gl_INIT
68
69 AC_ARG_ENABLE([gcc-warnings],
70   [AS_HELP_STRING([--disable-gcc-warnings],
71                   [disable GCC warnings (for developers)])],
72   [case $enableval in
73      yes|no) ;;
74      *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
75    esac
76    gcc_warnings=$enableval],
77   [gcc_warnings=yes]
78 )
79
80 WARN_CFLAGS=""
81 if test "$gcc_warnings" = yes;then
82   WARN_CFLAGS="$WARN_CFLAGS -Wall"
83 fi
84 AC_SUBST([WARN_CFLAGS])
85
86 AX_CODE_COVERAGE
87
88 AC_CONFIG_FILES([
89   Makefile
90   doc/Makefile
91   doc/cyclo/Makefile
92   doc/reference/Makefile
93   examples/Makefile
94   lib/Makefile
95   lib/gl/Makefile
96   lib/libtasn1.pc
97   src/Makefile
98   tests/Makefile
99 ])
100 AC_OUTPUT
101
102 AC_MSG_NOTICE([summary of build options:
103
104   version:          ${VERSION} shared $LT_CURRENT:$LT_REVISION:$LT_AGE
105   Host type:        ${host}
106   Install prefix:   ${prefix}
107   Compiler:         ${CC}
108   Warning flags:    errors: ${WERROR_CFLAGS} warnings: ${WARN_CFLAGS}
109   Library types:    Shared=${enable_shared}, Static=${enable_static}
110   Valgrind:         ${VALGRIND}
111   Version script:   $have_ld_version_script
112 ])