File: configure.in

package info (click to toggle)
bibtool 2.55%2Bds-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,376 kB
  • sloc: ansic: 10,685; perl: 6,205; makefile: 477; sh: 351; tcl: 51
file content (128 lines) | stat: -rw-r--r-- 3,803 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
dnl ***************************************************************************
dnl $Id: configure.in,v 1.10 2012-02-12 06:16:08 gene Exp $
dnl ===========================================================================
dnl 
dnl This file is part of BibTool.
dnl It is distributed under the GNU General Public License.
dnl See the file COPYING for details.
dnl 
dnl (c) 1996-2012 Gerd Neugebauer
dnl 
dnl Net: gene@gerd-neugebauer.de
dnl 
dnl ***************************************************************************
AC_REVISION($Revision: 1.10 $)dnl
AC_PREREQ(2.59)

dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
AC_INIT(sbuffer.c)

dnl ---------------------------------------------------------------------------
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

dnl AC_PATH_PROGS(PERL,perl perl5.003 perl4.036 /usr/local/bin/perl)
dnl AC_PATH_PROGS(TCLSH,tclsh tclsh-8.0 tclsh-8.1 tclsh-8.2 tclx,/usr/local/bin/tclsh)

dnl ---------------------------------------------------------------------------
dnl for regexp
dnl AC_AIX
dnl AC_ISC_POSIX
dnl AC_MINIX

dnl ---------------------------------------------------------------------------
dnl Checks for libraries.

dnl ---------------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
AC_STDC_HEADERS

dnl ---------------------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

dnl ---------------------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MEMCMP

dnl ---------------------------------------------------------------------------
dnl Check for headers.
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(stdlib.h)
AC_CHECK_HEADERS(time.h)
AC_CHECK_FUNCS(getenv)
AC_CHECK_FUNCS(strrchr)

dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(maintainer-mode,[],[],[])
AC_ARG_ENABLE(dependency-tracking,[],[],[])

dnl ---------------------------------------------------------------------------
AC_ARG_WITH(kpathsea,Use the KPATHSEA library.,,with_kpathsea=yes)

if test $with_kpathsea = no; then
	kpathsea_dir=
	kpathsea_lib=
	kpathsea_def=
else
	AC_MSG_CHECKING(for kpathsea library)
	kpathsea_dir=
	kpathsea_lib=
	kpathsea_lib_static=
	kpathsea_def=
	AC_TRY_COMPILE(
	[
		#include <stdio.h>
		#include <kpathsea/tex-file.h>
	],[],
	[
		kpathsea_dir=/usr/include
		kpathsea_lib=-lkpathsea
		kpathsea_def=-DHAVE_LIBKPATHSEA
	],
	[
	for cand in .. ../kpse3-2 kpse3-2 . /usr/include /usr/local/include
	do
	  if test -f $cand/kpathsea/tex-file.h ; then
	    if test -f $cand/../lib/libkpathsea.a; then
	      kpathsea_dir=$cand
	      kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand"
	      kpathsea_lib_static=$cand/../lib/libkpathsea.a
	    else
	      if test -f $cand/kpathsea/STATIC/libkpathsea.a; then
	        kpathsea_lib_static=$cand/kpathsea/STATIC/libkpathsea.a
		kpathsea_dir=$cand
		kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand"
	      fi
	    fi
	  fi
	done
	])
	if test -z "$kpathsea_dir"; then
		AC_MSG_WARN(not found)
	else
		AC_MSG_RESULT($kpathsea_dir)
	fi
fi
AC_SUBST(kpathsea_dir)dnl
AC_SUBST(kpathsea_lib)dnl
AC_SUBST(kpathsea_lib_static)dnl
AC_SUBST(kpathsea_def)dnl

dnl ---------------------------------------------------------------------------
dnl AC_CONFIG_SUBDIRS(regex-0.12)
dnl ---------------------------------------------------------------------------

dnl AC_CONFIG_SUBDIRS(BibTcl)

AC_CONFIG_HEADER(include/bibtool/config.h:AutoConf/config.h.in)
dnl AC_CONFIG_HEADER(regex-0.12/config.h:AutoConf/reconfig.h.in)

AC_OUTPUT(makefile:AutoConf/makefile.in)