84 |
13 Mar 06 |
jari |
## Process this file with autoconf to produce a configure script. |
84 |
13 Mar 06 |
jari |
2 |
## |
84 |
13 Mar 06 |
jari |
## $Id$ |
84 |
13 Mar 06 |
jari |
4 |
## |
84 |
13 Mar 06 |
jari |
## If you grabbed the source from subversion you should, at top-level, |
84 |
13 Mar 06 |
jari |
## execute: |
84 |
13 Mar 06 |
jari |
## ./bootstrap |
480 |
09 Oct 07 |
jari |
## To push subsequent changes of this file into the build scripts you |
480 |
09 Oct 07 |
jari |
## must issue: |
480 |
09 Oct 07 |
jari |
## autoreconf |
84 |
13 Mar 06 |
jari |
11 |
|
978 |
12 Dec 09 |
peter |
# Copyright (C) 2005 Jari Häkkinen, Peter Johansson |
978 |
12 Dec 09 |
peter |
# Copyright (C) 2006 Jari Häkkinen |
1635 |
30 Mar 23 |
peter |
# Copyright (C) 2007, 2008, 2009 Jari Häkkinen, Peter Johansson |
1635 |
30 Mar 23 |
peter |
# Copyright (C) 2010, 2011, 2012 Peter Johansson |
1635 |
30 Mar 23 |
peter |
# Copyright (C) 2015 Jari Häkkinen |
1635 |
30 Mar 23 |
peter |
# Copyright (C) 2023 Peter Johansson |
2 |
20 Dec 05 |
jari |
18 |
# |
687 |
04 Aug 08 |
peter |
# This file is part of svndigest, http://dev.thep.lu.se/svndigest |
2 |
20 Dec 05 |
jari |
20 |
# |
149 |
12 Aug 06 |
jari |
# svndigest is free software; you can redistribute it and/or modify it |
84 |
13 Mar 06 |
jari |
# under the terms of the GNU General Public License as published by |
693 |
11 Sep 08 |
jari |
# the Free Software Foundation; either version 3 of the License, or |
84 |
13 Mar 06 |
jari |
# (at your option) any later version. |
2 |
20 Dec 05 |
jari |
25 |
# |
149 |
12 Aug 06 |
jari |
# svndigest is distributed in the hope that it will be useful, but |
84 |
13 Mar 06 |
jari |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
149 |
12 Aug 06 |
jari |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
84 |
13 Mar 06 |
jari |
# General Public License for more details. |
2 |
20 Dec 05 |
jari |
30 |
# |
84 |
13 Mar 06 |
jari |
# You should have received a copy of the GNU General Public License |
693 |
11 Sep 08 |
jari |
# along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
2 |
20 Dec 05 |
jari |
33 |
|
907 |
29 Nov 09 |
peter |
34 |
AC_PREREQ([2.63]) |
547 |
07 Jan 08 |
peter |
35 |
|
775 |
09 Feb 09 |
peter |
36 |
m4_include([m4/version.m4]) |
1475 |
22 Apr 12 |
peter |
37 |
AC_INIT([svndigest], m4_defn([my_VERSION]), |
1182 |
25 Aug 10 |
peter |
38 |
[svndigest-users@lists.sourceforge.net],, |
1652 |
14 Jun 23 |
peter |
39 |
[https://dev.thep.lu.se/svndigest]) |
5 |
29 Dec 05 |
peter |
40 |
AC_CONFIG_SRCDIR([lib/File.h]) |
2 |
20 Dec 05 |
jari |
41 |
AC_CONFIG_AUX_DIR([autotools]) |
720 |
03 Dec 08 |
peter |
dnl arg below should be the same as in Makefile.am |
775 |
09 Feb 09 |
peter |
43 |
AC_CONFIG_MACRO_DIR([m4]) |
2 |
20 Dec 05 |
jari |
44 |
AC_PREFIX_DEFAULT([/usr/local]) |
2 |
20 Dec 05 |
jari |
45 |
|
892 |
26 Nov 09 |
peter |
dnl FIXME remove when we assume autoconf 2.64 |
1486 |
07 Aug 12 |
peter |
47 |
m4_ifndef([AC_PACKAGE_URL], |
1652 |
14 Jun 23 |
peter |
48 |
[AC_DEFINE([PACKAGE_URL], ["https://dev.thep.lu.se/svndigest"], |
907 |
29 Nov 09 |
peter |
49 |
[Define to home page for this package]) |
1652 |
14 Jun 23 |
peter |
50 |
AC_SUBST([PACKAGE_URL], ["https://dev.thep.lu.se/svndigest"])]) |
892 |
26 Nov 09 |
peter |
51 |
|
1475 |
22 Apr 12 |
peter |
52 |
MY_VERSION |
993 |
24 Dec 09 |
peter |
53 |
AC_CONFIG_HEADERS([config.h]) |
1525 |
01 Oct 12 |
peter |
54 |
AM_INIT_AUTOMAKE([1.11 color-tests std-options parallel-tests |
1525 |
01 Oct 12 |
peter |
55 |
silent-rules subdir-objects]) |
2 |
20 Dec 05 |
jari |
56 |
|
480 |
09 Oct 07 |
jari |
# Set default programming language |
880 |
24 Nov 09 |
peter |
58 |
AC_LANG([C++]) |
480 |
09 Oct 07 |
jari |
59 |
|
741 |
19 Dec 08 |
peter |
# propagate selected configure variables to DISTCHECK_CONFIGURE_FLAGS |
741 |
19 Dec 08 |
peter |
61 |
for var in CPPFLAGS CXX CXXFLAGS CXXCPP LDFLAGS LIBS; do |
741 |
19 Dec 08 |
peter |
62 |
eval isset=\${$var+set} |
741 |
19 Dec 08 |
peter |
63 |
if test "$isset" = 'set' ; then |
741 |
19 Dec 08 |
peter |
64 |
eval val=$`echo $var` |
741 |
19 Dec 08 |
peter |
65 |
DISTCHECK_CONFIGURE_FLAGS="${DISTCHECK_CONFIGURE_FLAGS}'${var}=${val}' " |
741 |
19 Dec 08 |
peter |
66 |
fi |
741 |
19 Dec 08 |
peter |
67 |
done |
1486 |
07 Aug 12 |
peter |
68 |
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
741 |
19 Dec 08 |
peter |
69 |
|
1514 |
23 Sep 12 |
peter |
# record if CXXFLAGS was set by user for further use below |
1514 |
23 Sep 12 |
peter |
71 |
AS_IF([test "${CXXFLAGS+set}" = set], [ |
1514 |
23 Sep 12 |
peter |
72 |
CXXFLAGS_set_by_user=yes |
1514 |
23 Sep 12 |
peter |
73 |
],[ |
1514 |
23 Sep 12 |
peter |
74 |
CXXFLAGS_set_by_user=no |
1514 |
23 Sep 12 |
peter |
# set CXXFLAGS to avoid expansion in AC_PROG_CXX |
1514 |
23 Sep 12 |
peter |
76 |
CXXFLAGS= |
1514 |
23 Sep 12 |
peter |
77 |
]) |
687 |
04 Aug 08 |
peter |
78 |
|
2 |
20 Dec 05 |
jari |
# Checks for programs. |
566 |
07 Mar 08 |
peter |
80 |
AC_PROG_CXXCPP |
2 |
20 Dec 05 |
jari |
81 |
AC_PROG_CXX |
668 |
03 Jul 08 |
jari |
82 |
AC_PROG_RANLIB |
586 |
11 Apr 08 |
jari |
83 |
AC_PROG_SED |
1613 |
15 Feb 23 |
peter |
84 |
|
1613 |
15 Feb 23 |
peter |
85 |
AC_ARG_VAR([HELP2MAN], [help2man]) |
1613 |
15 Feb 23 |
peter |
86 |
AC_CHECK_PROG([HELP2MAN], [help2man], [help2man], [false]) |
1613 |
15 Feb 23 |
peter |
87 |
|
880 |
24 Nov 09 |
peter |
# look for pkg-config |
880 |
24 Nov 09 |
peter |
89 |
PKG_PROG_PKG_CONFIG([0.23]) |
2 |
20 Dec 05 |
jari |
90 |
|
640 |
31 May 08 |
peter |
# Save FLAGS |
887 |
25 Nov 09 |
peter |
92 |
APR_SAVE_THE_ENVIRONMENT(CPPFLAGS) |
887 |
25 Nov 09 |
peter |
93 |
APR_SAVE_THE_ENVIRONMENT(CXXFLAGS) |
640 |
31 May 08 |
peter |
94 |
|
1652 |
14 Jun 23 |
peter |
95 |
YAT_CXX11([yes], [], [AC_MSG_FAILURE([$CXX is not a C++11 compiler])]) |
769 |
31 Jan 09 |
peter |
96 |
AC_TYPE_LONG_LONG_INT |
782 |
19 Feb 09 |
peter |
97 |
AS_IF([test x$ac_cv_type_long_long_int = xno], |
782 |
19 Feb 09 |
peter |
98 |
[AC_MSG_ERROR([compiler does not support long long int])] |
782 |
19 Feb 09 |
peter |
99 |
) |
2 |
20 Dec 05 |
jari |
100 |
|
782 |
19 Feb 09 |
peter |
101 |
AC_ARG_ENABLE([debug], |
1514 |
23 Sep 12 |
peter |
102 |
[AS_HELP_STRING([--enable-debug],[turn on debug options and code])], |
1514 |
23 Sep 12 |
peter |
103 |
[], [enable_debug=no]) |
843 |
12 Nov 09 |
peter |
104 |
|
1514 |
23 Sep 12 |
peter |
# Set CXXFLAGS depending on whether CXXFLAGS was provided by user and |
1514 |
23 Sep 12 |
peter |
# whether we are in debug mode |
1514 |
23 Sep 12 |
peter |
107 |
AS_IF([test x$enable_debug = xyes], [ |
1514 |
23 Sep 12 |
peter |
# in debug we alsways add flags below i.e. we turn on warnings, |
1514 |
23 Sep 12 |
peter |
# debug symbols, and low level of optimisation. |
160 |
19 Aug 06 |
jari |
110 |
|
1514 |
23 Sep 12 |
peter |
# -Wno-long-long is needed to suppress compiler diagnostics regarding |
1514 |
23 Sep 12 |
peter |
# using extension beyond the C++ standard (usage of non C++ standard |
1514 |
23 Sep 12 |
peter |
# 'long long' types). |
1652 |
14 Jun 23 |
peter |
114 |
YAT_CXX_ADD_FLAG([CXXFLAGS],[-pedantic -Wall -g -O]) |
1514 |
23 Sep 12 |
peter |
115 |
],[ |
1514 |
23 Sep 12 |
peter |
# in standard mode we set to CXXFLAGS default to '-O3', but only if |
1514 |
23 Sep 12 |
peter |
# CXXFLAGS was not proved by user. If user provided a VALUE FOR |
1514 |
23 Sep 12 |
peter |
# CXXFLAGS we listen to that and leave as is. |
1514 |
23 Sep 12 |
peter |
119 |
AS_IF([test x$CXXFLAGS_set_by_user != xyes], [ |
1514 |
23 Sep 12 |
peter |
120 |
YAT_CXX_ADD_FLAG([CXXFLAGS],[-O3]) |
1514 |
23 Sep 12 |
peter |
121 |
]) |
1514 |
23 Sep 12 |
peter |
122 |
]) |
1514 |
23 Sep 12 |
peter |
123 |
|
1514 |
23 Sep 12 |
peter |
124 |
AC_ARG_ENABLE([assert], |
1514 |
23 Sep 12 |
peter |
125 |
[AS_HELP_STRING([--enable-assert], [turn on assertions])]) |
1514 |
23 Sep 12 |
peter |
126 |
|
1514 |
23 Sep 12 |
peter |
# if assert not enabled/disabled explicitly, default behaviour is to |
1514 |
23 Sep 12 |
peter |
# enable assert in debug mode and disable otherwise |
1514 |
23 Sep 12 |
peter |
129 |
test "${enable_assert+set}" = set || enable_assert=$enable_debug |
1514 |
23 Sep 12 |
peter |
130 |
|
1514 |
23 Sep 12 |
peter |
# FIXME perhaps we should AC_DEFINE NDEBUG instead but then we need to |
1514 |
23 Sep 12 |
peter |
# include config.h in all source files. |
1514 |
23 Sep 12 |
peter |
133 |
# |
1514 |
23 Sep 12 |
peter |
# propagate enable_assert to CPPFLAGS |
1514 |
23 Sep 12 |
peter |
135 |
AS_IF([test x$enable_assert != xyes],[YAT_CPP_ADD_FLAG([CPPFLAGS],[-DNDEBUG])]) |
1514 |
23 Sep 12 |
peter |
136 |
|
1192 |
02 Oct 10 |
peter |
137 |
AC_MSG_CHECKING([g++ deprecation attribute]) |
1192 |
02 Oct 10 |
peter |
138 |
AC_COMPILE_IFELSE( |
1486 |
07 Aug 12 |
peter |
139 |
[AC_LANG_PROGRAM([[void f() __attribute__ ((deprecated));]],)], |
1486 |
07 Aug 12 |
peter |
140 |
[AC_DEFINE([YAT_HAVE_GCC_DEPRECATED], [1], |
1192 |
02 Oct 10 |
peter |
141 |
[Define if compiler supports deprecated attribute, as in g++ 4.0]) |
1192 |
02 Oct 10 |
peter |
142 |
AC_MSG_RESULT([yes])], |
1192 |
02 Oct 10 |
peter |
143 |
[AC_MSG_RESULT([no])] ) |
1192 |
02 Oct 10 |
peter |
144 |
|
164 |
23 Aug 06 |
jari |
# Apache Portable Runtime (APR) API checks |
887 |
25 Nov 09 |
peter |
146 |
APR_FIND_APR(,,[1],[1 0]) |
773 |
01 Feb 09 |
peter |
147 |
AS_IF([test "${with_apr+set}" = set], |
773 |
01 Feb 09 |
peter |
148 |
[DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-apr=$with_apr"] |
773 |
01 Feb 09 |
peter |
149 |
) |
164 |
23 Aug 06 |
jari |
150 |
if test "$apr_found" = "yes" ; then |
1415 |
24 Oct 11 |
peter |
151 |
APR_LIBS="`$apr_config --libs`" |
1415 |
24 Oct 11 |
peter |
152 |
apr_link_ld="`$apr_config --link-ld`" |
1415 |
24 Oct 11 |
peter |
153 |
for i in $apr_link_ld; do |
1415 |
24 Oct 11 |
peter |
154 |
AS_IF([AS_ECHO([$i]) | grep '^-l' > /dev/null], |
1415 |
24 Oct 11 |
peter |
155 |
[APR_LIBS="$i $APR_LIBS"], |
1415 |
24 Oct 11 |
peter |
156 |
[YAT_LD_ADD_FLAG([LDFLAGS], [$i])]) |
1415 |
24 Oct 11 |
peter |
157 |
done |
1415 |
24 Oct 11 |
peter |
158 |
YAT_CPP_ADD_FLAG([CPPFLAGS],[`$apr_config --includes --cppflags`]) |
1415 |
24 Oct 11 |
peter |
159 |
AC_CHECK_HEADER([apr_allocator.h],,[apr_found="no"]) |
164 |
23 Aug 06 |
jari |
160 |
fi |
887 |
25 Nov 09 |
peter |
161 |
AC_SUBST([APR_LIBS]) |
96 |
28 Mar 06 |
jari |
162 |
|
164 |
23 Aug 06 |
jari |
# Subversion API checks |
164 |
23 Aug 06 |
jari |
164 |
svn_found="yes" |
887 |
25 Nov 09 |
peter |
165 |
AC_ARG_WITH([svn], |
1415 |
24 Oct 11 |
peter |
166 |
[AS_HELP_STRING([--with-svn=DIR], |
1487 |
07 Aug 12 |
peter |
167 |
[prefix for svn developer files])], |
905 |
27 Nov 09 |
peter |
168 |
[ AS_CASE([$withval], [yes|no], |
905 |
27 Nov 09 |
peter |
169 |
[AC_MSG_ERROR([--with-svn requires a directory to be provided])]) |
1486 |
07 Aug 12 |
peter |
170 |
AS_IF([test -d $with_svn], [], |
973 |
11 Dec 09 |
peter |
171 |
[AC_MSG_ERROR([$with_svn: no such directory])]) |
973 |
11 Dec 09 |
peter |
# transform argument to absolute path |
973 |
11 Dec 09 |
peter |
173 |
with_svn=`cd $with_svn && pwd` |
973 |
11 Dec 09 |
peter |
174 |
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-svn=$with_svn" |
1182 |
25 Aug 10 |
peter |
175 |
YAT_LD_ADD_FLAG([LDFLAGS], [-L$with_svn/lib]) |
1182 |
25 Aug 10 |
peter |
176 |
YAT_CPP_ADD_FLAG([CPPFLAGS], [-I$with_svn/include]) |
774 |
01 Feb 09 |
peter |
177 |
]) |
887 |
25 Nov 09 |
peter |
# svn needs needs apr headers |
887 |
25 Nov 09 |
peter |
179 |
AC_CHECK_HEADER([subversion-1/svn_types.h],,[svn_found="no"]) |
640 |
31 May 08 |
peter |
180 |
|
1416 |
24 Oct 11 |
peter |
# In some versions, such as 1.7, of Subversion header file `svn_wc.h' |
1416 |
24 Oct 11 |
peter |
# does not conform to C++98 and therefore compiling with -pedantic |
1416 |
24 Oct 11 |
peter |
# fails. As -pedantic is automatically turned on in --enable-debug |
1416 |
24 Oct 11 |
peter |
# mode we need to turn it off -pedantic to allow building with |
1416 |
24 Oct 11 |
peter |
# --enable-debug (see ticket #506) |
1416 |
24 Oct 11 |
peter |
186 |
AS_IF([test x$enable_debug = xyes], |
1486 |
07 Aug 12 |
peter |
187 |
[AC_MSG_CHECKING([subversion-1/svn_wc.h usability with -pedantic]) |
1416 |
24 Oct 11 |
peter |
188 |
AC_COMPILE_IFELSE( |
1416 |
24 Oct 11 |
peter |
189 |
[AC_LANG_PROGRAM([@%:@include <subversion-1/svn_wc.h>])], |
1416 |
24 Oct 11 |
peter |
190 |
[AC_MSG_RESULT([yes])], |
1416 |
24 Oct 11 |
peter |
191 |
[AC_MSG_RESULT([no]) |
1416 |
24 Oct 11 |
peter |
192 |
CXXFLAGS=`AS_ECHO(["$CXXFLAGS"]) | $SED 's|-pedantic||'` |
1416 |
24 Oct 11 |
peter |
193 |
AC_MSG_NOTICE([remove -pedantic from \$CXXFLAGS]) |
1416 |
24 Oct 11 |
peter |
194 |
] |
1416 |
24 Oct 11 |
peter |
195 |
) |
1416 |
24 Oct 11 |
peter |
196 |
]) |
1416 |
24 Oct 11 |
peter |
197 |
|
887 |
25 Nov 09 |
peter |
198 |
save_LIBS=$LIBS |
887 |
25 Nov 09 |
peter |
199 |
tmp_LIBS="$APR_LIBS $save_LIBS" |
887 |
25 Nov 09 |
peter |
200 |
LIBS="" |
640 |
31 May 08 |
peter |
201 |
AC_SEARCH_LIBS([svn_cmdline_setup_auth_baton],[svn_subr-1], |
887 |
25 Nov 09 |
peter |
202 |
[], [svn_found="no"], [$tmp_LIBS]) |
887 |
25 Nov 09 |
peter |
203 |
AC_SEARCH_LIBS([svn_ra_initialize],[svn_ra-1], [], [svn_found="no"],[$tmp_LIBS]) |
887 |
25 Nov 09 |
peter |
204 |
AC_SEARCH_LIBS([svn_wc_adm_open3],[svn_wc-1], [], [svn_found="no"], [$tmp_LIBS]) |
1486 |
07 Aug 12 |
peter |
205 |
AC_SEARCH_LIBS([svn_diff_file_options_create],[svn_diff-1],[], |
887 |
25 Nov 09 |
peter |
206 |
[svn_found="no"], [$tmp_LIBS]) |
887 |
25 Nov 09 |
peter |
207 |
AC_SEARCH_LIBS([svn_client_log3],[svn_client-1],,[svn_found="no"], [$tmp_LIBS]) |
887 |
25 Nov 09 |
peter |
208 |
SVN_LIBS=$LIBS |
887 |
25 Nov 09 |
peter |
209 |
LIBS=$save_LIBS |
887 |
25 Nov 09 |
peter |
210 |
AC_SUBST([SVN_LIBS]) |
96 |
28 Mar 06 |
jari |
211 |
|
858 |
19 Nov 09 |
jari |
# PLplot API checks |
901 |
27 Nov 09 |
peter |
# plplot_found can get values: skip, noheader, old, or nolib if an |
901 |
27 Nov 09 |
peter |
# error is detected. |
858 |
19 Nov 09 |
jari |
215 |
plplot_found="yes" |
1573 |
06 Feb 15 |
jari |
216 |
plplot_version=5.10.0 |
888 |
25 Nov 09 |
peter |
217 |
save_PKG_CONFIG_PATH=$PKG_CONFIG_PATH |
888 |
25 Nov 09 |
peter |
218 |
AC_ARG_WITH([plplot], |
888 |
25 Nov 09 |
peter |
219 |
[AS_HELP_STRING([--with-plplot=DIR],[prefix for plplot developer files])], |
888 |
25 Nov 09 |
peter |
220 |
[DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-plplot=$withval" |
901 |
27 Nov 09 |
peter |
221 |
AS_IF([test "x$withval" = "xno"], [ dnl |
901 |
27 Nov 09 |
peter |
222 |
plplot_found=skip; |
901 |
27 Nov 09 |
peter |
223 |
], [ dnl |
973 |
11 Dec 09 |
peter |
224 |
AS_IF([test -d $with_plplot], [], |
973 |
11 Dec 09 |
peter |
225 |
[AC_MSG_ERROR([$with_plplot: no such directory])]) |
1486 |
07 Aug 12 |
peter |
226 |
with_plplot=`cd $with_plplot && pwd` |
901 |
27 Nov 09 |
peter |
# help pkg-config find .pc file |
973 |
11 Dec 09 |
peter |
228 |
PKG_CONFIG_PATH=$with_plplot/lib/pkgconfig$PATH_SEPARATOR$PKG_CONFIG_PATH |
1486 |
07 Aug 12 |
peter |
229 |
export PKG_CONFIG_PATH |
901 |
27 Nov 09 |
peter |
230 |
]) |
888 |
25 Nov 09 |
peter |
231 |
]) |
858 |
19 Nov 09 |
jari |
232 |
|
1598 |
26 Aug 15 |
jari |
# PLPLOT_USE_D is set to character 'd' for plplot versions prior to |
1598 |
26 Aug 15 |
jari |
# 5.11 since library names changed in plplot 5.11, i.e., the 'd' to |
1598 |
26 Aug 15 |
jari |
# indicate double floating number precision was removed from library |
1598 |
26 Aug 15 |
jari |
# names. |
1598 |
26 Aug 15 |
jari |
237 |
PLPLOT_USE_D= |
901 |
27 Nov 09 |
peter |
238 |
use_plplot_pc="no" |
901 |
27 Nov 09 |
peter |
239 |
AS_IF([test "x$plplot_found" = "xyes" && test -n "$PKG_CONFIG"], [ |
1598 |
26 Aug 15 |
jari |
# check for plplot 5.11 or later first |
1598 |
26 Aug 15 |
jari |
241 |
AC_MSG_CHECKING([for plplot-c++.pc]) |
1598 |
26 Aug 15 |
jari |
242 |
AS_IF([$PKG_CONFIG --exists plplot-c++], [ |
901 |
27 Nov 09 |
peter |
243 |
AC_MSG_RESULT([yes]) |
901 |
27 Nov 09 |
peter |
244 |
use_plplot_pc="yes" |
901 |
27 Nov 09 |
peter |
245 |
],[ |
1598 |
26 Aug 15 |
jari |
# fall back to check for plplot prior to version 5.11 |
1598 |
26 Aug 15 |
jari |
247 |
AC_MSG_CHECKING([for plplotd-c++.pc]) |
1598 |
26 Aug 15 |
jari |
248 |
AS_IF([$PKG_CONFIG --exists plplotd-c++], [ |
1598 |
26 Aug 15 |
jari |
249 |
AC_MSG_RESULT([yes]) |
1598 |
26 Aug 15 |
jari |
250 |
use_plplot_pc="yes" |
1598 |
26 Aug 15 |
jari |
# plplot prior to 5.11 found, use 'd' |
1598 |
26 Aug 15 |
jari |
252 |
PLPLOT_USE_D=d |
1598 |
26 Aug 15 |
jari |
253 |
],[ |
1598 |
26 Aug 15 |
jari |
254 |
AC_MSG_RESULT([no]) |
1598 |
26 Aug 15 |
jari |
255 |
AC_MSG_WARN([cannot find plplotd-c++ nor plplot-c++; |
1598 |
26 Aug 15 |
jari |
256 |
please use --with-plplot with appropriate argument to get more accurate |
1598 |
26 Aug 15 |
jari |
257 |
configuration.]) |
1598 |
26 Aug 15 |
jari |
258 |
]) |
901 |
27 Nov 09 |
peter |
259 |
]) |
888 |
25 Nov 09 |
peter |
260 |
]) |
901 |
27 Nov 09 |
peter |
261 |
|
901 |
27 Nov 09 |
peter |
262 |
AS_IF([test "x$plplot_found" = "xyes"], [ |
901 |
27 Nov 09 |
peter |
# copy flags if we have found pc file |
901 |
27 Nov 09 |
peter |
264 |
AS_IF([test "$use_plplot_pc" = "yes"], [ |
1346 |
06 Mar 11 |
peter |
# plplot typically returns <prefix>/include/plplot because plplot |
1346 |
06 Mar 11 |
peter |
# people assumes users include header files as <foo.h>. We prefer |
1346 |
06 Mar 11 |
peter |
# including files as <plplot/foo.h> and therefore need to trim off |
1346 |
06 Mar 11 |
peter |
# trailing '/plplot'. Space is included in sed expression to avoid |
1346 |
06 Mar 11 |
peter |
# substituting potential '/plplot' in PREFIX. |
1486 |
07 Aug 12 |
peter |
270 |
YAT_CPP_ADD_FLAG([CPPFLAGS], |
1598 |
26 Aug 15 |
jari |
271 |
[`$PKG_CONFIG plplot$PLPLOT_USE_D-c++ --cflags-only-I | sed 's|/plplot | |g'`]) |
1598 |
26 Aug 15 |
jari |
272 |
YAT_LD_ADD_FLAG([LDFLAGS], [`$PKG_CONFIG plplot$PLPLOT_USE_D-c++ --libs-only-L`]) |
1598 |
26 Aug 15 |
jari |
273 |
PLPLOT_LIBS="`$PKG_CONFIG plplot$PLPLOT_USE_D-c++ --libs-only-l --libs-only-other`" |
901 |
27 Nov 09 |
peter |
274 |
],[ |
901 |
27 Nov 09 |
peter |
# otherwise guess |
1598 |
26 Aug 15 |
jari |
276 |
PLPLOT_LIBS="-lplplotcxx -lplplot"; |
901 |
27 Nov 09 |
peter |
277 |
AS_IF([test -n "$with_plplot" && test "x$with_plplot" != "xyes"], [ |
1182 |
25 Aug 10 |
peter |
278 |
YAT_LD_ADD_FLAG([LDFLAGS], [-L$with_plplot/lib]) |
1346 |
06 Mar 11 |
peter |
279 |
YAT_CPP_ADD_FLAG([CPPFLAGS], [-I$with_plplot/include]) |
901 |
27 Nov 09 |
peter |
280 |
]) |
901 |
27 Nov 09 |
peter |
281 |
]) |
901 |
27 Nov 09 |
peter |
282 |
]) |
1486 |
07 Aug 12 |
peter |
283 |
|
888 |
25 Nov 09 |
peter |
284 |
AS_IF([test "x$plplot_found" = "xyes"], [ |
888 |
25 Nov 09 |
peter |
285 |
AC_CHECK_HEADER([plplot/plstream.h], [], [plplot_found="noheader"]) |
888 |
25 Nov 09 |
peter |
286 |
]) |
888 |
25 Nov 09 |
peter |
287 |
|
901 |
27 Nov 09 |
peter |
288 |
AS_IF([test "x$plplot_found" = "xyes" && test -n "$PKG_CONFIG"], [ |
901 |
27 Nov 09 |
peter |
289 |
AC_MSG_CHECKING([plplot version >= $plplot_version]) |
1598 |
26 Aug 15 |
jari |
290 |
AS_IF([$PKG_CONFIG --atleast-version=$plplot_version plplot$PLPLOT_USE_D-c++], [ |
901 |
27 Nov 09 |
peter |
291 |
AC_MSG_RESULT([yes]) |
901 |
27 Nov 09 |
peter |
292 |
],[ |
1598 |
26 Aug 15 |
jari |
293 |
have_plplot_version=`$PKG_CONFIG --modversion plplot$PLPLOT_USE_D-c++` |
1182 |
25 Aug 10 |
peter |
294 |
AC_MSG_RESULT([$have_plplot_version]) |
901 |
27 Nov 09 |
peter |
295 |
plplot_found="old" |
888 |
25 Nov 09 |
peter |
296 |
]) |
888 |
25 Nov 09 |
peter |
297 |
]) |
901 |
27 Nov 09 |
peter |
298 |
|
904 |
27 Nov 09 |
peter |
299 |
AS_IF([test "x$plplot_found" = "xyes"], [ |
901 |
27 Nov 09 |
peter |
300 |
save_LIBS=$LIBS |
901 |
27 Nov 09 |
peter |
301 |
LIBS="$PLPLOT_LIBS $LIBS" |
901 |
27 Nov 09 |
peter |
302 |
AC_MSG_CHECKING([for library containing plstream]) |
901 |
27 Nov 09 |
peter |
303 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <plplot/plstream.h>], |
1029 |
14 Feb 10 |
peter |
304 |
[plstream pls(1,1,"svg", "conftest.svg"); |
1029 |
14 Feb 10 |
peter |
305 |
pls.scolbga(255, 255, 255, 0); |
1486 |
07 Aug 12 |
peter |
306 |
])], |
901 |
27 Nov 09 |
peter |
307 |
[AC_MSG_RESULT([yes]); |
1486 |
07 Aug 12 |
peter |
308 |
AC_DEFINE([HAVE_PLPLOT], [1], |
1486 |
07 Aug 12 |
peter |
309 |
[Define to 1 if you have plplot])], |
901 |
27 Nov 09 |
peter |
310 |
[AC_MSG_RESULT([no]) |
901 |
27 Nov 09 |
peter |
311 |
plplot_found=nolib;]) |
989 |
14 Dec 09 |
jari |
312 |
LIBS=$save_LIBS |
901 |
27 Nov 09 |
peter |
313 |
]) |
888 |
25 Nov 09 |
peter |
# restore variable |
888 |
25 Nov 09 |
peter |
315 |
export PKG_CONFIG_PATH=$save_PKG_CONFIG_PATH |
888 |
25 Nov 09 |
peter |
316 |
AC_SUBST(PLPLOT_LIBS) |
888 |
25 Nov 09 |
peter |
317 |
|
730 |
15 Dec 08 |
peter |
# checking if we have test repo |
730 |
15 Dec 08 |
peter |
319 |
test_repo_filename=$srcdir/test/repo; |
1486 |
07 Aug 12 |
peter |
320 |
AS_IF([test -r $test_repo_filename], |
744 |
08 Jan 09 |
peter |
321 |
[AC_DEFINE([HAVE_TEST_REPO],[1],[define if test repo is available]) |
744 |
08 Jan 09 |
peter |
322 |
test_repo_found="yes"], |
730 |
15 Dec 08 |
peter |
323 |
[test_repo_found="no"]) |
748 |
09 Jan 09 |
peter |
324 |
AC_SUBST([test_repo_found]) |
772 |
01 Feb 09 |
peter |
325 |
AS_IF([test "x$test_repo_found" = xyes], |
772 |
01 Feb 09 |
peter |
326 |
[abs_test_repo=`cd $test_repo_filename && pwd`; |
772 |
01 Feb 09 |
peter |
327 |
AC_SUBST(abs_test_repo)] |
772 |
01 Feb 09 |
peter |
328 |
) |
952 |
06 Dec 09 |
peter |
329 |
AC_CONFIG_FILES([test/init.sh]) |
772 |
01 Feb 09 |
peter |
330 |
AC_CONFIG_FILES([test/svn_update.sh], [chmod +x test/svn_update.sh]) |
540 |
29 Dec 07 |
peter |
331 |
|
1628 |
16 Mar 23 |
peter |
# prefer in-tree versions rather than installed (detected in |
1628 |
16 Mar 23 |
peter |
# YAT_SVN_RELEASE below |
1628 |
16 Mar 23 |
peter |
334 |
: ${SVNDIGEST_COPY_CACHE=bin/svndigest-copy-cache} |
1628 |
16 Mar 23 |
peter |
335 |
: ${SVNCOPYRIGHT=bin/svncopyright} |
1628 |
16 Mar 23 |
peter |
336 |
|
1618 |
12 Mar 23 |
peter |
337 |
YAT_AM_LOCAL |
1618 |
12 Mar 23 |
peter |
338 |
YAT_SVN_REVISION |
1618 |
12 Mar 23 |
peter |
339 |
YAT_REVISION_HEADER |
1618 |
12 Mar 23 |
peter |
340 |
YAT_SVN_RELEASE_YEAR |
1618 |
12 Mar 23 |
peter |
341 |
YAT_SVN_TIMESTAMP |
1618 |
12 Mar 23 |
peter |
342 |
|
1670 |
05 Jul 23 |
peter |
# look for git program needed while doing a release |
1670 |
05 Jul 23 |
peter |
344 |
AC_CHECK_PROG([GIT], [git], [git], [false]) |
1670 |
05 Jul 23 |
peter |
345 |
AC_ARG_VAR([GIT], [git command]) |
1670 |
05 Jul 23 |
peter |
346 |
|
1337 |
12 Feb 11 |
peter |
dnl maintainer make rules from yat project |
1618 |
12 Mar 23 |
peter |
348 |
YAT_SVN_RELEASE([], |
1616 |
21 Feb 23 |
peter |
349 |
[$(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)], |
1616 |
21 Feb 23 |
peter |
350 |
[libyat@frs.sourceforge.net:/home/frs/project/s/sv/svndigest], |
1616 |
21 Feb 23 |
peter |
351 |
[https://sourceforge.net/projects/svndigest/files/$(distdir).tar.gz/files], |
1616 |
21 Feb 23 |
peter |
352 |
[https://dev.thep.lu.se/svndigest/browser/tags/$(VERSION)/NEWS]) |
1616 |
21 Feb 23 |
peter |
353 |
|
901 |
27 Nov 09 |
peter |
# Restore FLAGS |
1182 |
25 Aug 10 |
peter |
355 |
APR_RESTORE_THE_ENVIRONMENT([CPPFLAGS], [SVNDIGEST_]) |
1182 |
25 Aug 10 |
peter |
356 |
APR_RESTORE_THE_ENVIRONMENT([CXXFLAGS], [SVNDIGEST_]) |
1182 |
25 Aug 10 |
peter |
357 |
APR_RESTORE_THE_ENVIRONMENT([LDFLAGS], [SVNDIGEST_]) |
901 |
27 Nov 09 |
peter |
358 |
|
1525 |
01 Oct 12 |
peter |
359 |
AC_CONFIG_FILES([Makefile test/environment.h]) |
2 |
20 Dec 05 |
jari |
360 |
|
1495 |
27 Aug 12 |
peter |
361 |
AC_CONFIG_FILES([build_support/tag_and_release.sh], |
1495 |
27 Aug 12 |
peter |
362 |
[chmod +x-w build_support/tag_and_release.sh]) |
1613 |
15 Feb 23 |
peter |
363 |
AC_CONFIG_FILES([build_support/dummy_help2man.sh], |
1613 |
15 Feb 23 |
peter |
364 |
[chmod +x-w build_support/dummy_help2man.sh]) |
1495 |
27 Aug 12 |
peter |
365 |
|
1616 |
21 Feb 23 |
peter |
366 |
AC_CONFIG_HEADERS([yat/config_public.h]) |
795 |
30 Jun 09 |
peter |
367 |
|
164 |
23 Aug 06 |
jari |
# Print failure status information about selected items, and exit if |
164 |
23 Aug 06 |
jari |
# fatal errors were encountered. No output will be created if |
164 |
23 Aug 06 |
jari |
# configure is halted prematurely. |
156 |
14 Aug 06 |
jari |
371 |
|
164 |
23 Aug 06 |
jari |
# used to trigger exit before creation of output |
164 |
23 Aug 06 |
jari |
373 |
all_reqs_ok="true" |
160 |
19 Aug 06 |
jari |
374 |
|
1598 |
26 Aug 15 |
jari |
# checking for help2man, missing help2man is non-fatal but subsequent |
1598 |
26 Aug 15 |
jari |
# use of `make dist` and `make distcheck` is constructed to fail. |
1613 |
15 Feb 23 |
peter |
377 |
AC_MSG_CHECKING([whether to use help2man]) |
1613 |
15 Feb 23 |
peter |
# avoid running help2man when cross-compiling (as it involves invoking binaries) |
1613 |
15 Feb 23 |
peter |
379 |
AS_IF([test x$cross_compiling = x"yes"], [have_help2man=cross_compiling], |
1613 |
15 Feb 23 |
peter |
380 |
[test x"$HELP2MAN" = x"false"], [have_help2man=no], |
1613 |
15 Feb 23 |
peter |
381 |
[have_help2man=yes]) |
1598 |
26 Aug 15 |
jari |
382 |
AM_CONDITIONAL([HAVE_HELP2MAN], [test "x$have_help2man" = "xyes"]) |
1598 |
26 Aug 15 |
jari |
383 |
AC_MSG_RESULT([$have_help2man]) |
1598 |
26 Aug 15 |
jari |
384 |
|
1598 |
26 Aug 15 |
jari |
# if we work in an svn wc we should have a test repository and warn if |
1598 |
26 Aug 15 |
jari |
# help2man missing |
1337 |
12 Feb 11 |
peter |
387 |
AS_VAR_IF([have_svn_wc], [yes], [ |
730 |
15 Dec 08 |
peter |
388 |
if (test "$test_repo_found" = "no"); then |
730 |
15 Dec 08 |
peter |
389 |
all_reqs_ok="false"; |
1598 |
26 Aug 15 |
jari |
390 |
AC_MSG_WARN(m4_text_wrap(m4_normalize([ |
1598 |
26 Aug 15 |
jari |
391 |
Cannot find test repository (test/repo), which should be |
1598 |
26 Aug 15 |
jari |
392 |
available when building from a subversion working copy. |
1598 |
26 Aug 15 |
jari |
393 |
Try svn update in top directory. |
1598 |
26 Aug 15 |
jari |
394 |
]), |
1598 |
26 Aug 15 |
jari |
395 |
[ ],[ ],79)) |
730 |
15 Dec 08 |
peter |
396 |
fi |
1598 |
26 Aug 15 |
jari |
397 |
if (test "$have_help2man" = "no"); then |
1598 |
26 Aug 15 |
jari |
# non-fatal, only issue warning |
1598 |
26 Aug 15 |
jari |
399 |
AC_MSG_WARN(m4_text_wrap(m4_normalize([ |
1598 |
26 Aug 15 |
jari |
400 |
`help2man' is missing on your system. You will not be |
1598 |
26 Aug 15 |
jari |
401 |
able to create the man page. A sound man page should be |
1598 |
26 Aug 15 |
jari |
402 |
included in a distribution, and since you will not able |
1598 |
26 Aug 15 |
jari |
403 |
to create a complete distribution `make dist' will fail. |
1613 |
15 Feb 23 |
peter |
404 |
You may want to install the GNU Help2man package: |
1613 |
15 Feb 23 |
peter |
405 |
<https://www.gnu.org/software/help2man/> |
1598 |
26 Aug 15 |
jari |
406 |
]), |
1598 |
26 Aug 15 |
jari |
407 |
[ ],[ ],79)) |
1598 |
26 Aug 15 |
jari |
408 |
fi |
1337 |
12 Feb 11 |
peter |
409 |
]) |
540 |
29 Dec 07 |
peter |
410 |
|
164 |
23 Aug 06 |
jari |
# Non-existing APR is fatal -- sub-sequent compilation will fail. |
164 |
23 Aug 06 |
jari |
412 |
if (test "$apr_found" = "no") ; then |
670 |
04 Jul 08 |
jari |
413 |
AC_MSG_WARN([APR not found. The Apache Portable Runtime |
670 |
04 Jul 08 |
jari |
414 |
(APR) library cannot be found. Please make sure APR is installed |
670 |
04 Jul 08 |
jari |
415 |
and supply the appropriate --with-apr option to 'configure'.]) |
670 |
04 Jul 08 |
jari |
416 |
all_reqs_ok="false" |
164 |
23 Aug 06 |
jari |
417 |
fi |
160 |
19 Aug 06 |
jari |
418 |
|
164 |
23 Aug 06 |
jari |
# Non-existing subversion API is fatal -- sub-sequent compilation will fail. |
164 |
23 Aug 06 |
jari |
420 |
if (test "$svn_found" = "no") ; then |
670 |
04 Jul 08 |
jari |
421 |
svn_msg="Subversion API not found. Subversion API libraries cannot |
670 |
04 Jul 08 |
jari |
422 |
be found. Make sure the APIs are installed and supply the |
670 |
04 Jul 08 |
jari |
423 |
appropriate --with-svn option to 'configure'." |
670 |
04 Jul 08 |
jari |
424 |
if (test "$apr_found" = "no") ; then |
383 |
24 Jun 07 |
jari |
425 |
svn_msg="$svn_msg |
557 |
05 Feb 08 |
jari |
426 |
Note, APR was not found. Failure to locate APR affects the search |
557 |
05 Feb 08 |
jari |
427 |
of the subversion API. Please fix the APR problem before trying |
557 |
05 Feb 08 |
jari |
428 |
to resolve the subversion related issues." |
670 |
04 Jul 08 |
jari |
429 |
fi |
670 |
04 Jul 08 |
jari |
430 |
AC_MSG_WARN([$svn_msg]) |
670 |
04 Jul 08 |
jari |
431 |
all_reqs_ok="false" |
383 |
24 Jun 07 |
jari |
432 |
fi |
162 |
19 Aug 06 |
jari |
433 |
|
858 |
19 Nov 09 |
jari |
# Non-existing PLplot API is fatal -- sub-sequent compilation will fail. |
1486 |
07 Aug 12 |
peter |
435 |
AS_CASE([$plplot_found], |
901 |
27 Nov 09 |
peter |
436 |
[noheader], |
901 |
27 Nov 09 |
peter |
437 |
[AC_MSG_WARN([ |
901 |
27 Nov 09 |
peter |
438 |
PLplot developer files cannot be found. Make sure PLplot is installed.]) |
901 |
27 Nov 09 |
peter |
439 |
all_reqs_ok="false"], |
901 |
27 Nov 09 |
peter |
440 |
[old], |
901 |
27 Nov 09 |
peter |
441 |
[AC_MSG_WARN([ |
901 |
27 Nov 09 |
peter |
442 |
PLplot developer files found but not required API version. |
901 |
27 Nov 09 |
peter |
443 |
Version at least $plplot_version is required. Please upgrade PLplot.]) |
901 |
27 Nov 09 |
peter |
444 |
all_reqs_ok="false"], |
901 |
27 Nov 09 |
peter |
445 |
[nolib], |
901 |
27 Nov 09 |
peter |
446 |
[AC_MSG_WARN([ |
901 |
27 Nov 09 |
peter |
447 |
PLplot developer files found but linking against plplot library failed.]) |
901 |
27 Nov 09 |
peter |
448 |
all_reqs_ok="false"]) |
858 |
19 Nov 09 |
jari |
449 |
|
567 |
07 Mar 08 |
peter |
450 |
if test $ac_cv_type_long_long_int != yes ; then |
670 |
04 Jul 08 |
jari |
451 |
AC_MSG_WARN([Compiler $CXX does not support `long long'. |
670 |
04 Jul 08 |
jari |
452 |
svndigest must be compiled with a compiler that supports `long long'.]) |
670 |
04 Jul 08 |
jari |
453 |
all_reqs_ok="false" |
564 |
07 Mar 08 |
peter |
454 |
fi |
564 |
07 Mar 08 |
peter |
455 |
|
164 |
23 Aug 06 |
jari |
456 |
if (test "$all_reqs_ok" = "false") ; then |
670 |
04 Jul 08 |
jari |
457 |
AC_MSG_ERROR([Some pre-requisites were not fulfilled, aborting |
670 |
04 Jul 08 |
jari |
458 |
configure. Please consult the 'README' file for more information |
670 |
04 Jul 08 |
jari |
459 |
about what is needed to compile svndigest and refer to above |
670 |
04 Jul 08 |
jari |
460 |
warning messages. Needed files were NOT created.]) |
164 |
23 Aug 06 |
jari |
461 |
fi |
164 |
23 Aug 06 |
jari |
462 |
|
164 |
23 Aug 06 |
jari |
# Create output. |
164 |
23 Aug 06 |
jari |
464 |
AC_OUTPUT |
164 |
23 Aug 06 |
jari |
465 |
|
164 |
23 Aug 06 |
jari |
# Some more messages. |
887 |
25 Nov 09 |
peter |
467 |
AC_MSG_NOTICE([ |
887 |
25 Nov 09 |
peter |
468 |
Ready to compile the executables of svndigest $VERSION |
887 |
25 Nov 09 |
peter |
469 |
The following flags and libs will be used: |
887 |
25 Nov 09 |
peter |
470 |
+++++++++++++++++++++++++++++++++++++++++++++++ |
887 |
25 Nov 09 |
peter |
471 |
Compiler: $CXX |
1182 |
25 Aug 10 |
peter |
472 |
Preprocessor flags: |
1182 |
25 Aug 10 |
peter |
473 |
CPPFLAGS: $CPPFLAGS |
1182 |
25 Aug 10 |
peter |
474 |
SVNDIGEST_CPPFLAGS: $SVNDIGEST_CPPFLAGS |
887 |
25 Nov 09 |
peter |
475 |
C++ flags: |
1182 |
25 Aug 10 |
peter |
476 |
CXXFLAGS: $CXXFLAGS |
1182 |
25 Aug 10 |
peter |
477 |
SVNDIGEST_CXXFLAGS: $SVNDIGEST_CXXFLAGS |
887 |
25 Nov 09 |
peter |
478 |
Linker flags: |
1182 |
25 Aug 10 |
peter |
479 |
LDFLAGS: $LDFLAGS |
1182 |
25 Aug 10 |
peter |
480 |
SVNDIGEST_LDFLAGS: $SVNDIGEST_LDFLAGS |
1486 |
07 Aug 12 |
peter |
481 |
Libraries: |
1182 |
25 Aug 10 |
peter |
482 |
LIBS $LIBS |
1182 |
25 Aug 10 |
peter |
483 |
APR_LIBS $APR_LIBS |
1182 |
25 Aug 10 |
peter |
484 |
SVN_LIBS $SVN_LIBS |
1182 |
25 Aug 10 |
peter |
485 |
PLPLOT_LIBS $PLPLOT_LIBS |
887 |
25 Nov 09 |
peter |
486 |
+++++++++++++++++++++++++++++++++++++++++++++++]dnl |
887 |
25 Nov 09 |
peter |
487 |
) |
164 |
23 Aug 06 |
jari |
488 |
|
880 |
24 Nov 09 |
peter |
489 |
AC_MSG_NOTICE([Now type 'make all check'.]) |