File: configure.in

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 2,245
  • sloc: cpp: 18,495; python: 6,134; sh: 1,543; ansic: 1,535; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 82
file content (147 lines) | stat: -rw-r--r-- 3,946 bytes parent folder | download | duplicates (10)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
dnl
dnl $Id: configure.in 682 2003-12-25 21:32:57Z blais $
dnl $Date: 2003-12-25 16:32:57 -0500 (Thu, 25 Dec 2003) $
dnl
dnl Copyright (C) 1999-2001  Martin Blais <blais@furius.ca>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/defs.h)

XXDIFF_MAJOR_VERSION=1
XXDIFF_MINOR_VERSION=13

AC_SUBST(XXDIFF_MAJOR_VERSION)
AC_SUBST(XXDIFF_MINOR_VERSION)

XXDIFF_VERSION=$XXDIFF_MAJOR_VERSION.$XXDIFF_MINOR_VERSION
AC_SUBST(XXDIFF_VERSION)

dnl Use the following for version with micro number.
dnl XXDIFF_MICRO_VERSION=0
dnl AC_SUBST(XXDIFF_MICRO_VERSION)
dnl XXDIFF_VERSION=$XXDIFF_MAJOR_VERSION.$XXDIFF_MINOR_VERSION.$XXDIFF_MICRO_VERSION


AM_INIT_AUTOMAKE(xxdiff,${XXDIFF_VERSION})
AM_PROG_LIBTOOL

dnl Really required since autoconf 2.50.
AC_CANONICAL_BUILD

AC_PROG_MAKE_SET

dnl Checks for programs.
AC_PROG_CXX
AC_PROG_YACC
dnl AM_PROG_LEX

AC_PATH_QT_MOC
AC_PATH_PROG(UIC, uic, $QTDIR/bin/uic, $QTDIR/bin:$PATH)

dnl Checks for libraries +
dnl Checks for C compiler flags that X needs and the X linker flags
AC_PATH_XTRA
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl AC_SUBST(LDFLAGS)

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_HEADER_STAT
AC_TYPE_SIGNAL
dnl AC_REPLACE_GNU_GETOPT

AC_CHECK_HEADERS(limits.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_CHECK_FUNCS(strdup strerror strstr)


dnl
dnl Automake does not let us have GNU make conditionals inside Makefile.am
dnl so we've got to use automake conditionals instead, which have to be 
dnl declared here.
dnl 
AM_CONDITIONAL(IS_COMPILER_GNU, test x$GXX = xyes)

AM_CONDITIONAL(IS_COMPILER_MIPSPRO,
test x$build_vendor = xsgi)

AM_CONDITIONAL(IS_COMPILER_SUNWSPRO,
test x$build_vendor = xsun)

AM_CONDITIONAL(IS_COMPILER_COMPAQCXX,
echo $build_triplet | grep -q '\-osf' && $CXX -V | grep -q Compaq)

dnl
dnl xxdiff options
dnl

dnl
dnl debug option
dnl
AC_ARG_ENABLE(debug,
[  --enable-debug          turn on debugging],
[case "${enableval}" in
yes) debug=true ;;
no)  debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac
AC_MSG_RESULT([xxdiff option: debugging is on.])
AC_DEFINE(XX_DEBUG)],
[debug=false
AC_MSG_RESULT([xxdiff option: debugging is off.])])

AM_CONDITIONAL(DEBUG, test x$debug = xtrue)


dnl
dnl static vs. dynamic linking
dnl
AC_ARG_ENABLE(linkstatic,
[  --enable-linkstatic     restricts linking to static STLport and Qt libs],
[case "${enableval}" in
yes) linkstatic=true ;;
no)  linkstatic=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-linkstatic) ;;
esac
AC_MSG_RESULT([xxdiff option: linking statically to STLport and Qt.])]
AC_DEFINE(XX_LINKSTATIC),
[linkstatic=false
AC_MSG_RESULT([xxdiff option: linking dynamically to STLport and Qt.])])

AM_CONDITIONAL(LINKSTATIC, test x$linkstatic = xtrue)


dnl
dnl use STLport or libstdc++
dnl
AC_ARG_ENABLE(stlport,
[  --enable-stlport	   enable compiling with STLport.],
AC_MSG_RESULT([xxdiff option: compiling using STLport.])
AC_DEFINE(XX_USE_STLPORT),
AC_MSG_RESULT([xxdiff option: compiling using libstdc++.])
)

AM_CONDITIONAL(USE_STLPORT, test x$stlport = xtrue)

AC_OUTPUT(Makefile src/Makefile)