Debian Codegraph @

configure.ac

raw ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 dnl ***************************************************************************
2 dnl
3 dnl This file is part of BibTool.
4 dnl It is distributed under the GNU General Public License.
5 dnl See the file COPYING for details.
6 dnl
7 dnl (c) 1996-2019 Gerd Neugebauer
8 dnl
9 dnl Net: [email protected]
10 dnl
11 dnl This program is free software; you can redistribute it and/or modify
12 dnl it under the terms of the GNU General Public License as published by
13 dnl the Free Software Foundation; either version 2, or (at your option)
14 dnl any later version.
15 dnl
16 dnl This program is distributed in the hope that it will be useful,
17 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
18 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 dnl GNU General Public License for more details.
20 dnl
21 dnl You should have received a copy of the GNU General Public License
22 dnl along with this program; if not, write to the Free Software
23 dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 dnl
25 dnl ***************************************************************************
26
27 AC_REVISION($Revision: 1.12 $)
28 AC_COPYRIGHT(Copyright (C) 2017-2019 Gerd Neugebauer
29 This configure script is part of BibTool.
30 Revision 1.12)
31 AC_PREREQ(2.69)
32
33 dnl ---------------------------------------------------------------------------
34 dnl Process this file with autoconf to produce a configure script.
35 AC_INIT(BibTool,2.*)
36
37 dnl ---------------------------------------------------------------------------
38 AC_PREREQ(2.69)
39
40 dnl ---------------------------------------------------------------------------
41 dnl Checks for programs.
42 AC_PROG_CC
43 AC_PROG_INSTALL
44 AC_PROG_RANLIB
45
46 dnl AC_PATH_PROGS(PERL,perl perl5.003 perl4.036 /usr/local/bin/perl)
47 dnl AC_PATH_PROGS(TCLSH,tclsh tclsh-8.0 tclsh-8.1 tclsh-8.2 tclx,/usr/local/bin/tclsh)
48
49 dnl ---------------------------------------------------------------------------
50 dnl for regexp
51 dnl AC_AIX
52 dnl AC_ISC_POSIX
53 dnl AC_MINIX
54
55 dnl ---------------------------------------------------------------------------
56 dnl Checks for libraries.
57
58 dnl ---------------------------------------------------------------------------
59 dnl Checks for header files.
60 AC_STDC_HEADERS
61
62 dnl ---------------------------------------------------------------------------
63 dnl Checks for typedefs, structures, and compiler characteristics.
64 AC_C_CONST
65 AC_TYPE_SIZE_T
66
67 dnl ---------------------------------------------------------------------------
68 dnl Checks for library functions.
69 AC_FUNC_ALLOCA
70 AC_FUNC_MEMCMP
71
72 dnl ---------------------------------------------------------------------------
73 dnl Check for headers.
74 AC_CHECK_HEADERS(string.h)
75 AC_CHECK_HEADERS(stdlib.h)
76 AC_CHECK_HEADERS(stdbool.h)
77 AC_CHECK_HEADERS(stdint.h)
78 AC_CHECK_HEADERS(time.h)
79 AC_CHECK_FUNCS(getenv)
80 AC_CHECK_FUNCS(strrchr)
81
82 dnl ---------------------------------------------------------------------------
83 AX_APPEND_COMPILE_FLAGS(-Wno-old-style-definition)
84
85 dnl ---------------------------------------------------------------------------
86 AC_ARG_ENABLE(maintainer-mode,[],[],[])
87 AC_ARG_ENABLE(dependency-tracking,[],[],[])
88
89 dnl ---------------------------------------------------------------------------
90 AC_ARG_WITH(kpathsea,Use the KPATHSEA library.,,with_kpathsea=yes)
91
92 if test $with_kpathsea = no; then
93 kpathsea_dir=
94 kpathsea_lib=
95 kpathsea_def=
96 else
97 AC_MSG_CHECKING(for kpathsea library)
98 kpathsea_dir=
99 kpathsea_lib=
100 kpathsea_lib_static=
101 kpathsea_def=
102 AC_TRY_COMPILE(
103 [
104 #include <stdio.h>
105 #include <kpathsea/tex-file.h>
106 ],[],
107 [
108 kpathsea_dir=/usr/include
109 kpathsea_lib=-lkpathsea
110 kpathsea_def=-DHAVE_LIBKPATHSEA
111 ],
112 [
113 for cand in .. ../kpse3-2 kpse3-2 . /usr/include /usr/local/include
114 do
115 if test -f $cand/kpathsea/tex-file.h ; then
116 if test -f $cand/../lib/libkpathsea.a; then
117 kpathsea_dir=$cand
118 kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand"
119 kpathsea_lib_static=$cand/../lib/libkpathsea.a
120 else
121 if test -f $cand/kpathsea/STATIC/libkpathsea.a; then
122 kpathsea_lib_static=$cand/kpathsea/STATIC/libkpathsea.a
123 kpathsea_dir=$cand
124 kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand"
125 fi
126 fi
127 fi
128 done
129 ])
130 if test -z "$kpathsea_dir"; then
131 AC_MSG_WARN(not found)
132 else
133 AC_MSG_RESULT($kpathsea_dir)
134 fi
135 fi
136 AC_SUBST(kpathsea_dir)dnl
137 AC_SUBST(kpathsea_lib)dnl
138 AC_SUBST(kpathsea_lib_static)dnl
139 AC_SUBST(kpathsea_def)dnl
140
141 dnl ---------------------------------------------------------------------------
142 dnl AC_CONFIG_SUBDIRS(regex-0.12)
143 dnl ---------------------------------------------------------------------------
144
145 dnl AC_CONFIG_SUBDIRS(BibTcl)
146
147 AC_CONFIG_HEADER(include/bibtool/config.h:AutoConf/config.h.in)
148 dnl AC_CONFIG_HEADER(regex-0.12/config.h:AutoConf/reconfig.h.in)
149
150 AC_OUTPUT(makefile:AutoConf/makefile.in)
151 dnl ---------------------------------------------------------------------------