-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
156 lines (120 loc) · 3.76 KB
/
configure.ac
File metadata and controls
156 lines (120 loc) · 3.76 KB
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
148
149
150
151
152
153
154
155
156
# -*- Autoconf -*-
#
# Copyright (C) 2011-2021 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#
# ---------------------------------------------------------------------------- #
#
# IMPORTANT NOTE
#
# Please DO NOT EDIT this file unless you REALLY know what you are doing.
# Everything is important, in particular the order of the various commands
# executed here. YOU HAVE BEEN WARNED !
#
# ---------------------------------------------------------------------------- #
#
# Autoconf & Automake startup
#
# Initialize Autoconf
AC_PREREQ(2.62)
AC_INIT([ABINIT-Documentation],[9.6.2],
[https://bugs.launchpad.net/abinit/],[abinit-doc])
AC_REVISION([Autotools support for the ABINIT Documentation])
AC_CONFIG_AUX_DIR([config/gnu])
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_SRCDIR([rules.am])
# ---------------------------------------------------------------------------- #
#
# Startup
#
# Initial setup
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.10)
# Check for common programs
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_AWK
AC_PROG_GREP
# Workaround for the "grep -e" issue on Solaris systems
AC_PROG_EGREP
# Workaround for the wrong path to install-sh on Mac systems
AX_PROG_MKDIR_P
# Option to test the absence of LaTeX
AC_ARG_ENABLE(portability-tests,
AS_HELP_STRING([--enable-portability-tests],
[Maintainer-only option to force build parameters (default: disabled)]))
test "${enable_portability_tests}" = "" && enable_portability_tests="no"
# ---------------------------------------------------------------------------- #
#
# Graphviz support
#
# Define options and environment variables
AC_ARG_VAR([GVDFLAGS],[Graphviz dot flags])
AC_SUBST(GVDFLAGS)
# Look for the compiler
AC_CHECK_PROGS(GRAPHVIZ_DOT,[dot])
# Check whether dot is able to output PDF
abi_gv_ok="no"
if test "${GRAPHVIZ_DOT}" != ""; then
AC_MSG_CHECKING([whether dot (Graphviz) can create PDF documents])
abi_gv_pdf=`${GRAPHVIZ_DOT} -Thelp 2>&1 | grep 'pdf'`
test "${abi_gv_pdf}" != "" && abi_gv_ok="yes"
AC_MSG_RESULT([${abi_gv_ok}])
fi
# ---------------------------------------------------------------------------- #
#
# LaTeX support
#
# Define options and environment variables
AC_ARG_VAR([TEXFLAGS],[LaTeX flags])
AC_SUBST(TEXFLAGS)
TEXFLAGS="${TEXFLAGS} -interaction=nonstopmode"
# Look for the compiler
AC_CHECK_PROGS(LATEX,[pdflatex xetex])
# ---------------------------------------------------------------------------- #
#
# Markdown support
#
# Define options and environment variables
AC_ARG_VAR([MDFLAGS],[Markdown flags])
AC_SUBST(MDFLAGS)
# Look for required utilities
AC_CHECK_PROGS(PERL,[perl perl6 perl5])
AC_CHECK_PROGS(MARKDOWN,[markdown])
# Make sure we can use markdown
if test "${MARKDOWN}" = ""; then
AC_MSG_NOTICE([using internal version of Markdown])
MARKDOWN='[$](top_srcdir)/config/util/markdown.pl'
MARKDOWN="${PERL} ${MARKDOWN}"
fi
# ---------------------------------------------------------------------------- #
#
# Final adjustments
#
# Make sure LaTeX is usable
abi_latex_ok="no"
if test "${LATEX}" != ""; then
if test "${abi_gv_ok}" = "yes"; then
abi_latex_ok="yes"
else
AC_MSG_WARN([dot (Graphviz) cannot create PDF documents - disabling LaTeX])
fi
fi
# Decide whether to test portability by disabling document builders
if test "${enable_portability_tests}" = "yes"; then
abi_gv_ok="no"
abi_latex_ok="no"
fi
# Set conditionals
AM_CONDITIONAL([DO_BUILD_GV], [test "${abi_gv_ok}" = "yes"])
AM_CONDITIONAL([DO_BUILD_TEX], [test "${abi_gv_ok}" = "yes" -a "${abi_latex_ok}" = "yes"])
# ---------------------------------------------------------------------------- #
#
# Output configuration
#
ABIDOC_OUTPUT