5796
by Benno Schulenberg
restore the GNU marker in nano's name |
1 |
# Configuration for GNU nano - a small and user-friendly text editor
|
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
2 |
#
|
10148
by Benno Schulenberg
copyright: update the years for the FSF |
3 |
# Copyright (C) 1999-2011, 2013-2023 Free Software Foundation, Inc.
|
6344
by Benno Schulenberg
copyright: update the years, use ranges, and explain this usage |
4 |
# Copyright (C) 2014, 2017 Mike Frysinger
|
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
5 |
#
|
5832
by Benno Schulenberg
update the license text to the preferred version |
6 |
# GNU nano is free software: you can redistribute it and/or modify
|
7 |
# it under the terms of the GNU General Public License as published
|
|
8 |
# by the Free Software Foundation, either version 3 of the License,
|
|
9 |
# or (at your option) any later version.
|
|
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
10 |
#
|
5832
by Benno Schulenberg
update the license text to the preferred version |
11 |
# GNU nano is distributed in the hope that it will be useful,
|
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
13 |
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
14 |
# See the GNU General Public License for more details.
|
|
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
15 |
#
|
16 |
# You should have received a copy of the GNU General Public License
|
|
7494
by Benno Schulenberg
tweaks: change a bunch of URLs to use 'https' instead of 'http' |
17 |
# along with this program. If not, see https://www.gnu.org/licenses/. |
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
18 |
|
10154
by Benno Schulenberg
bump version numbers and add a news item for the 7.2 release |
19 |
AC_INIT([GNU nano], [7.2], [nano-devel@gnu.org], [nano]) |
1351
by Jordi Mallach
Major package reorganization: |
20 |
AC_CONFIG_SRCDIR([src/nano.c]) |
4233
by Chris Allegretta
2013-01-02 Eitan Adler <lists@eitanadler.com> |
21 |
AC_CANONICAL_HOST
|
6221
by Mike Frysinger
configure: require autoconf-2.69/automake-1.14 |
22 |
AM_INIT_AUTOMAKE([1.14]) |
9977
by Benno Schulenberg
build: add the --disable-maintainer-mode option to ./configure |
23 |
AM_MAINTAINER_MODE([enable]) |
1889
by Jordi Mallach
Don't use DEFS to define stuff. Use INCLUDES instead. |
24 |
AC_CONFIG_HEADERS([config.h]) |
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
25 |
|
4385
by Benno Schulenberg
Upping the required version of Automake, to ensure the ONCE macros are defined. |
26 |
dnl Make sure the ONCE macros are available. |
27 |
||
6221
by Mike Frysinger
configure: require autoconf-2.69/automake-1.14 |
28 |
AC_PREREQ([2.69]) |
933
by Jordi Mallach
Move to autoconf 2.5. |
29 |
|
6223
by Mike Frysinger
add support for gnulib |
30 |
dnl Lie about gnulib features we don't use to speed up & shrink down. |
31 |
||
6229
by Mike Frysinger
drop the glib fallback for snprintf/vsnprintf |
32 |
gl_cv_func_printf_directive_n=yes |
6223
by Mike Frysinger
add support for gnulib |
33 |
gl_cv_func_printf_infinite_long_double=yes |
6229
by Mike Frysinger
drop the glib fallback for snprintf/vsnprintf |
34 |
gl_cv_func_printf_long_double=yes |
35 |
gl_cv_func_snprintf_directive_n=yes |
|
6243
by Mike Frysinger
tweaks: disable gnulib's workaround for the globbing of broken symlinks |
36 |
gl_cv_glob_lists_symlinks=yes |
6223
by Mike Frysinger
add support for gnulib |
37 |
|
933
by Jordi Mallach
Move to autoconf 2.5. |
38 |
dnl Checks for programs. |
2516
by David Lawrence Ramsey
comment fixes |
39 |
|
9278
by Benno Schulenberg
tweaks: make two of the changes that 'autoupdate' suggests |
40 |
AC_USE_SYSTEM_EXTENSIONS
|
933
by Jordi Mallach
Move to autoconf 2.5. |
41 |
AC_PROG_CC
|
6223
by Mike Frysinger
add support for gnulib |
42 |
gl_EARLY
|
43 |
gl_INIT
|
|
1660
by David Lawrence Ramsey
automatically install a symlink "rnano" pointing to nano |
44 |
AC_PROG_LN_S
|
9278
by Benno Schulenberg
tweaks: make two of the changes that 'autoupdate' suggests |
45 |
AC_SEARCH_LIBS([strerror], [cposix]) |
933
by Jordi Mallach
Move to autoconf 2.5. |
46 |
AC_SYS_LARGEFILE
|
4352
by Benno Schulenberg
Using the pkg-config files of ncurses, when available. |
47 |
PKG_PROG_PKG_CONFIG
|
933
by Jordi Mallach
Move to autoconf 2.5. |
48 |
|
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
49 |
dnl Internationalization macros. |
2516
by David Lawrence Ramsey
comment fixes |
50 |
|
6222
by Mike Frysinger
configure: require gettext-0.18.3, and drop our bundled m4 files |
51 |
AM_GNU_GETTEXT_VERSION([0.18.3]) |
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
52 |
AM_GNU_GETTEXT([external], [need-ngettext]) |
3550
by David Lawrence Ramsey
add various cosmetic and #ifdef fixes |
53 |
AM_CONDITIONAL(USE_NLS, test x$USE_NLS = xyes) |
1173
by Jordi Mallach
Small cleanups. Add copyright header, add autopoint support and define bug report address and full package name in AC_INIT. Move ALL_LINGUAS to po/LINGUAS, recommended place for gettext 0.11. |
54 |
|
3365
by David Lawrence Ramsey
move color regexes into separate files, and restructure things so that |
55 |
dnl Data location. |
56 |
||
57 |
pkgdatadir=${datadir}/${PACKAGE} |
|
58 |
AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.]) |
|
59 |
||
7532
by Benno Schulenberg
tweaks: move the checks for git and gettext to a far earlier point |
60 |
dnl Whether this is a git repository. |
61 |
||
62 |
AC_MSG_CHECKING([whether building from git]) |
|
9476
by Benno Schulenberg
build: detect a build from git also when building out of tree |
63 |
if test -f "$srcdir/roll-a-release.sh" ; then |
7532
by Benno Schulenberg
tweaks: move the checks for git and gettext to a far earlier point |
64 |
AC_MSG_RESULT([yes]) |
65 |
from_git=yes |
|
66 |
else
|
|
67 |
AC_MSG_RESULT([no]) |
|
68 |
from_git=no |
|
69 |
fi
|
|
70 |
AM_CONDITIONAL(BUILDING_FROM_GIT, test x$from_git = xyes) |
|
71 |
||
7533
by Benno Schulenberg
build: verify that 'pkg.m4' is available when building from git |
72 |
dnl Checks for pkg-config and gettext when building from git. |
7532
by Benno Schulenberg
tweaks: move the checks for git and gettext to a far earlier point |
73 |
|
74 |
if test x$from_git = xyes; then |
|
7533
by Benno Schulenberg
build: verify that 'pkg.m4' is available when building from git |
75 |
if test ! -f $(aclocal --print-ac-dir)/pkg.m4; then |
76 |
AC_MSG_ERROR([ |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
77 |
*** The pkg.m4 macros are missing. |
78 |
*** The pkg-config package needs to be installed when building from git. |
|
79 |
*** After fixing this problem, rerun ./autogen.sh.]) |
|
7533
by Benno Schulenberg
build: verify that 'pkg.m4' is available when building from git |
80 |
fi
|
7532
by Benno Schulenberg
tweaks: move the checks for git and gettext to a far earlier point |
81 |
if test "$ac_cv_path_MSGFMT" = ":"; then |
82 |
AC_MSG_ERROR([ |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
83 |
*** The msgfmt program is missing. |
84 |
*** The gettext package needs to be installed when building from git.]) |
|
7532
by Benno Schulenberg
tweaks: move the checks for git and gettext to a far earlier point |
85 |
fi
|
86 |
fi
|
|
87 |
||
933
by Jordi Mallach
Move to autoconf 2.5. |
88 |
dnl Checks for header files. |
2516
by David Lawrence Ramsey
comment fixes |
89 |
|
6236
by Mike Frysinger
handle builds on systems without termios.h |
90 |
AC_CHECK_HEADERS(libintl.h limits.h pwd.h termios.h sys/param.h) |
933
by Jordi Mallach
Move to autoconf 2.5. |
91 |
|
2202
by David Lawrence Ramsey
in configure.ac, tweak a few more things to make sure that everything |
92 |
dnl Checks for options. |
93 |
||
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
94 |
AC_ARG_ENABLE(browser, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
95 |
AS_HELP_STRING([--disable-browser], [Disable the built-in file browser])) |
6440
by Benno Schulenberg
tweaks: transform the token DISABLE_BROWSER to ENABLE_BROWSER |
96 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
97 |
if test "x$enable_browser" != xyes; then |
98 |
enable_browser=no |
|
99 |
fi
|
|
6440
by Benno Schulenberg
tweaks: transform the token DISABLE_BROWSER to ENABLE_BROWSER |
100 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
101 |
if test "x$enable_browser" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
102 |
AC_DEFINE(ENABLE_BROWSER, 1, [Define this to enable the built-in file browser.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
103 |
fi
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
104 |
|
105 |
AC_ARG_ENABLE(color, |
|
106 |
AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting])) |
|
6779
by Benno Schulenberg
tweaks: transform the token DISABLE_COLOR to ENABLE_COLOR |
107 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
108 |
if test "x$enable_color" = xyes; then |
109 |
if test "x$enable_nanorc" != xyes; then |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
110 |
AC_MSG_ERROR([ |
111 |
*** --enable-color needs --enable-nanorc to work]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
112 |
fi
|
113 |
else
|
|
114 |
enable_color=no |
|
6779
by Benno Schulenberg
tweaks: transform the token DISABLE_COLOR to ENABLE_COLOR |
115 |
fi
|
116 |
fi
|
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
117 |
if test "x$enable_nanorc" = xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
118 |
if test "x$enable_color" = xyes; then |
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
119 |
AC_MSG_ERROR([ |
120 |
*** --enable-color cannot work with --disable-nanorc]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
121 |
else
|
122 |
# Disabling nanorc silently disables color support.
|
|
123 |
enable_color=no |
|
124 |
fi
|
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
125 |
fi
|
6779
by Benno Schulenberg
tweaks: transform the token DISABLE_COLOR to ENABLE_COLOR |
126 |
if test "x$enable_color" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
127 |
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting.]) |
128 |
color_support=yes |
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
129 |
fi
|
4036
by Chris Allegretta
make --enable-tiny disable the new enabled-by-default options as that's presumably the expected behavior |
130 |
|
5575
by Mike Scalora
new feature: comment/uncomment current line or selected lines |
131 |
AC_ARG_ENABLE(comment, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
132 |
AS_HELP_STRING([--disable-comment], [Disable the comment/uncomment function])) |
5575
by Mike Scalora
new feature: comment/uncomment current line or selected lines |
133 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
134 |
if test "x$enable_comment" = xyes; then |
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
135 |
AC_MSG_ERROR([ |
136 |
*** --enable-comment cannot work with --enable-tiny]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
137 |
else
|
138 |
enable_comment=no |
|
139 |
fi
|
|
5575
by Mike Scalora
new feature: comment/uncomment current line or selected lines |
140 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
141 |
if test "x$enable_comment" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
142 |
AC_DEFINE(ENABLE_COMMENT, 1, [Define this to enable the comment/uncomment function.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
143 |
fi
|
5575
by Mike Scalora
new feature: comment/uncomment current line or selected lines |
144 |
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
145 |
AC_ARG_ENABLE(extra, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
146 |
AS_HELP_STRING([--disable-extra], [Disable the Easter egg])) |
6781
by Benno Schulenberg
tweaks: transform the token DISABLE_EXTRA to ENABLE_EXTRA |
147 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
148 |
if test "x$enable_extra" != xyes; then |
149 |
enable_extra=no |
|
150 |
fi
|
|
6781
by Benno Schulenberg
tweaks: transform the token DISABLE_EXTRA to ENABLE_EXTRA |
151 |
fi
|
152 |
if test "x$enable_extra" != xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
153 |
AC_DEFINE(ENABLE_EXTRA, 1, [Define this to have an Easter egg.]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
154 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
155 |
|
10086
by Benno Schulenberg
build: add options --disable-formatter and --disable-linter to configure |
156 |
AC_ARG_ENABLE(formatter, |
157 |
AS_HELP_STRING([--disable-formatter], [Disable the formatting tool])) |
|
158 |
if test "x$enable_tiny" = xyes; then |
|
159 |
if test "x$enable_formatter" = xyes; then |
|
160 |
if test "x$enable_color" != xyes; then |
|
161 |
AC_MSG_ERROR([ |
|
162 |
*** --enable-formatter needs both --enable-color and --enable-nanorc to work]) |
|
163 |
fi
|
|
164 |
else
|
|
165 |
enable_formatter=no |
|
166 |
fi
|
|
167 |
fi
|
|
168 |
if test "x$enable_color" = xno; then |
|
169 |
if test "x$enable_formatter" = xyes; then |
|
170 |
AC_MSG_ERROR([ |
|
171 |
*** --enable-formatter cannot work with --disable-color nor --disable-nanorc]) |
|
172 |
else
|
|
173 |
enable_formatter=no |
|
174 |
fi
|
|
175 |
fi
|
|
176 |
if test "x$enable_formatter" != xno; then |
|
177 |
AC_DEFINE(ENABLE_FORMATTER, 1, [Define this to have access to a formatter.]) |
|
178 |
fi
|
|
179 |
||
933
by Jordi Mallach
Move to autoconf 2.5. |
180 |
AC_ARG_ENABLE(help, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
181 |
AS_HELP_STRING([--disable-help], [Disable the built-in help texts])) |
6388
by Benno Schulenberg
build: make --enable-help properly depend on --enable-multibuffer |
182 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
183 |
if test "x$enable_help" = xyes; then |
184 |
if test "x$enable_multibuffer" != xyes; then |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
185 |
AC_MSG_ERROR([ |
186 |
*** --enable-help needs --enable-multibuffer to work]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
187 |
fi
|
188 |
else
|
|
189 |
enable_help=no |
|
6388
by Benno Schulenberg
build: make --enable-help properly depend on --enable-multibuffer |
190 |
fi
|
191 |
fi
|
|
192 |
if test "x$enable_multibuffer" = xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
193 |
if test "x$enable_help" = xyes; then |
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
194 |
AC_MSG_ERROR([ |
195 |
*** --enable-help cannot work with --disable-multibuffer]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
196 |
else
|
197 |
# Disabling multibuffer silently disables the help texts.
|
|
198 |
enable_help=no |
|
199 |
fi
|
|
6388
by Benno Schulenberg
build: make --enable-help properly depend on --enable-multibuffer |
200 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
201 |
if test "x$enable_help" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
202 |
AC_DEFINE(ENABLE_HELP, 1, [Define this to enable the Ctrl+G help texts.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
203 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
204 |
|
4665
by Benno Schulenberg
Adding a --disable-histories flag, to disable the code for |
205 |
AC_ARG_ENABLE(histories, |
206 |
AS_HELP_STRING([--disable-histories], [Disable search and position histories])) |
|
6770
by Benno Schulenberg
tweaks: transform the token DISABLE_HISTORIES to ENABLE_HISTORIES |
207 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
208 |
if test "x$enable_histories" != xyes; then |
209 |
enable_histories=no |
|
210 |
fi
|
|
6770
by Benno Schulenberg
tweaks: transform the token DISABLE_HISTORIES to ENABLE_HISTORIES |
211 |
fi
|
212 |
if test "x$enable_histories" != xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
213 |
AC_DEFINE(ENABLE_HISTORIES, 1, [Define this to have search and position histories.]) |
4665
by Benno Schulenberg
Adding a --disable-histories flag, to disable the code for |
214 |
fi
|
215 |
||
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
216 |
AC_ARG_ENABLE(justify, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
217 |
AS_HELP_STRING([--disable-justify], [Disable the justify/unjustify functions])) |
6776
by Benno Schulenberg
tweaks: transform the token DISABLE_JUSTIFY to ENABLE_JUSTIFY |
218 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
219 |
if test "x$enable_justify" != xyes; then |
220 |
enable_justify=no |
|
221 |
fi
|
|
6776
by Benno Schulenberg
tweaks: transform the token DISABLE_JUSTIFY to ENABLE_JUSTIFY |
222 |
fi
|
223 |
if test "x$enable_justify" != xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
224 |
AC_DEFINE(ENABLE_JUSTIFY, 1, [Define this to have the routines for justifying.]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
225 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
226 |
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
227 |
AC_ARG_ENABLE(libmagic, |
228 |
AS_HELP_STRING([--disable-libmagic], [Disable detection of file types via libmagic])) |
|
9273
by Benno Schulenberg
build: do not accept --enable-libmagic when not having color support |
229 |
if test "x$enable_libmagic" = xyes; then |
230 |
if test "x$enable_tiny" = xyes; then |
|
231 |
if test "x$enable_color" != xyes; then |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
232 |
AC_MSG_ERROR([ |
10086
by Benno Schulenberg
build: add options --disable-formatter and --disable-linter to configure |
233 |
*** --enable-libmagic needs both --enable-color and --enable-nanorc to work]) |
9273
by Benno Schulenberg
build: do not accept --enable-libmagic when not having color support |
234 |
fi
|
235 |
fi
|
|
236 |
if test "x$enable_color" = xno; then |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
237 |
AC_MSG_ERROR([ |
238 |
*** --enable-libmagic cannot work with --disable-color nor --disable-nanorc]) |
|
9273
by Benno Schulenberg
build: do not accept --enable-libmagic when not having color support |
239 |
fi
|
240 |
fi
|
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
241 |
|
10086
by Benno Schulenberg
build: add options --disable-formatter and --disable-linter to configure |
242 |
AC_ARG_ENABLE(linter, |
243 |
AS_HELP_STRING([--disable-linter], [Disable the linting tool])) |
|
244 |
if test "x$enable_tiny" = xyes; then |
|
245 |
if test "x$enable_linter" = xyes; then |
|
246 |
if test "x$enable_color" != xyes; then |
|
247 |
AC_MSG_ERROR([ |
|
248 |
*** --enable-linter needs both --enable-color and --enable-nanorc to work]) |
|
249 |
fi
|
|
250 |
else
|
|
251 |
enable_linter=no |
|
252 |
fi
|
|
253 |
fi
|
|
254 |
if test "x$enable_color" = xno; then |
|
255 |
if test "x$enable_linter" = xyes; then |
|
256 |
AC_MSG_ERROR([ |
|
257 |
*** --enable-linter cannot work with --disable-color nor --disable-nanorc]) |
|
258 |
else
|
|
259 |
enable_linter=no |
|
260 |
fi
|
|
261 |
fi
|
|
262 |
if test "x$enable_linter" != xno; then |
|
263 |
AC_DEFINE(ENABLE_LINTER, 1, [Define this to have access to a linter.]) |
|
264 |
fi
|
|
265 |
||
5887
by Faissal Bensefia
new feature: the ability to show line numbers before the text |
266 |
AC_ARG_ENABLE(linenumbers, |
267 |
AS_HELP_STRING([--disable-linenumbers], [Disable line numbering])) |
|
268 |
if test "x$enable_tiny" = xyes; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
269 |
if test "x$enable_linenumbers" != xyes; then |
270 |
enable_linenumbers=no |
|
271 |
fi
|
|
5887
by Faissal Bensefia
new feature: the ability to show line numbers before the text |
272 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
273 |
if test "x$enable_linenumbers" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
274 |
AC_DEFINE(ENABLE_LINENUMBERS, 1, [Define this to enable line numbering.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
275 |
fi
|
5887
by Faissal Bensefia
new feature: the ability to show line numbers before the text |
276 |
|
933
by Jordi Mallach
Move to autoconf 2.5. |
277 |
AC_ARG_ENABLE(mouse, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
278 |
AS_HELP_STRING([--disable-mouse], [Disable mouse support])) |
6420
by Benno Schulenberg
tweaks: transform the token DISABLE_MOUSE to ENABLE_MOUSE |
279 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
280 |
if test "x$enable_mouse" != xyes; then |
281 |
enable_mouse=no |
|
282 |
fi
|
|
6420
by Benno Schulenberg
tweaks: transform the token DISABLE_MOUSE to ENABLE_MOUSE |
283 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
284 |
if test "x$enable_mouse" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
285 |
AC_DEFINE(ENABLE_MOUSE, 1, [Define this to enable mouse support.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
286 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
287 |
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
288 |
AC_ARG_ENABLE(multibuffer, |
289 |
AS_HELP_STRING([--disable-multibuffer], [Disable multiple file buffers])) |
|
6419
by Benno Schulenberg
tweaks: transform the token DISABLE_MULTIBUFFER to ENABLE_MULTIBUFFER |
290 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
291 |
if test "x$enable_multibuffer" != xyes; then |
292 |
enable_multibuffer=no |
|
293 |
fi
|
|
6419
by Benno Schulenberg
tweaks: transform the token DISABLE_MULTIBUFFER to ENABLE_MULTIBUFFER |
294 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
295 |
if test "x$enable_multibuffer" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
296 |
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
297 |
fi
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
298 |
|
299 |
AC_ARG_ENABLE(nanorc, |
|
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
300 |
AS_HELP_STRING([--disable-nanorc], [Disable the use of .nanorc files])) |
6443
by Benno Schulenberg
tweaks: transform the token DISABLE_NANORC to ENABLE_NANORC |
301 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
302 |
if test "x$enable_nanorc" != xyes; then |
303 |
enable_nanorc=no |
|
304 |
fi
|
|
6443
by Benno Schulenberg
tweaks: transform the token DISABLE_NANORC to ENABLE_NANORC |
305 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
306 |
if test "x$enable_nanorc" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
307 |
AC_DEFINE(ENABLE_NANORC, 1, [Define this to enable the use of .nanorc files.]) |
308 |
nanorc_support=yes |
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
309 |
fi
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
310 |
|
933
by Jordi Mallach
Move to autoconf 2.5. |
311 |
AC_ARG_ENABLE(operatingdir, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
312 |
AS_HELP_STRING([--disable-operatingdir], [Disable the setting of an operating directory])) |
6773
by Benno Schulenberg
tweaks: transform the token DISABLE_OPERATINGDIR to ENABLE_OPERATINGDIR |
313 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
314 |
if test "x$enable_operatingdir" != xyes; then |
315 |
enable_operatingdir=no |
|
316 |
fi
|
|
6773
by Benno Schulenberg
tweaks: transform the token DISABLE_OPERATINGDIR to ENABLE_OPERATINGDIR |
317 |
fi
|
318 |
if test "x$enable_operatingdir" != xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
319 |
AC_DEFINE(ENABLE_OPERATINGDIR, 1, [Define this to allow setting an operating directory (a chroot of sorts).]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
320 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
321 |
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
322 |
AC_ARG_ENABLE(speller, |
10086
by Benno Schulenberg
build: add options --disable-formatter and --disable-linter to configure |
323 |
AS_HELP_STRING([--disable-speller], [Disable the spell-checking tool])) |
6778
by Benno Schulenberg
tweaks: transform the token DISABLE_SPELLER to ENABLE_SPELLER |
324 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
325 |
if test "x$enable_speller" != xyes; then |
326 |
enable_speller=no |
|
327 |
fi
|
|
6778
by Benno Schulenberg
tweaks: transform the token DISABLE_SPELLER to ENABLE_SPELLER |
328 |
fi
|
329 |
if test "x$enable_speller" != xno; then |
|
10086
by Benno Schulenberg
build: add options --disable-formatter and --disable-linter to configure |
330 |
AC_DEFINE(ENABLE_SPELLER, 1, [Define this to have access to a spell checker.]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
331 |
fi
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
332 |
|
333 |
AC_ARG_ENABLE(tabcomp, |
|
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
334 |
AS_HELP_STRING([--disable-tabcomp], [Disable the tab-completion functions])) |
6442
by Benno Schulenberg
tweaks: transform the token DISABLE_TABCOMP to ENABLE_TABCOMP |
335 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
336 |
if test "x$enable_tabcomp" != xyes; then |
337 |
enable_tabcomp=no |
|
338 |
fi
|
|
6442
by Benno Schulenberg
tweaks: transform the token DISABLE_TABCOMP to ENABLE_TABCOMP |
339 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
340 |
if test "x$enable_tabcomp" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
341 |
AC_DEFINE(ENABLE_TABCOMP, 1, [Define this to have tab completion for filenames and search strings.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
342 |
fi
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
343 |
|
5962
by Benno Schulenberg
build: add configure option --disable-wordcomp to disable word completion |
344 |
AC_ARG_ENABLE(wordcomp, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
345 |
AS_HELP_STRING([--disable-wordcomp], [Disable the word-completion function])) |
5962
by Benno Schulenberg
build: add configure option --disable-wordcomp to disable word completion |
346 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
347 |
if test "x$enable_wordcomp" = xyes; then |
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
348 |
AC_MSG_ERROR([ |
349 |
*** --enable-wordcomp cannot work with --enable-tiny]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
350 |
else
|
351 |
enable_wordcomp=no |
|
352 |
fi
|
|
5962
by Benno Schulenberg
build: add configure option --disable-wordcomp to disable word completion |
353 |
fi
|
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
354 |
if test "x$enable_wordcomp" != xno; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
355 |
AC_DEFINE(ENABLE_WORDCOMPLETION, 1, [Define this to enable the word-completion function.]) |
6465
by Benno Schulenberg
tweaks: adjust the indentation after the preceding change |
356 |
fi
|
5962
by Benno Schulenberg
build: add configure option --disable-wordcomp to disable word completion |
357 |
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
358 |
AC_ARG_ENABLE(wrapping, |
6393
by Benno Schulenberg
tweaks: be more precise about what --disable-extra does |
359 |
AS_HELP_STRING([--disable-wrapping], [Disable all hard-wrapping of text])) |
6772
by Benno Schulenberg
tweaks: transform the token DISABLE_WRAPPING to ENABLE_WRAPPING |
360 |
if test "x$enable_tiny" = xyes; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
361 |
if test "x$enable_wrapping" != xyes; then |
362 |
enable_wrapping=no |
|
363 |
fi
|
|
6772
by Benno Schulenberg
tweaks: transform the token DISABLE_WRAPPING to ENABLE_WRAPPING |
364 |
fi
|
365 |
if test "x$enable_wrapping" != xno; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
366 |
AC_DEFINE(ENABLE_WRAPPING, 1, [Define this to have hard text wrapping.]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
367 |
fi
|
1090
by David Lawrence Ramsey
DLR: prototype overhaul, etc. |
368 |
|
4400
by Benno Schulenberg
Moving the enabling stuff to after the disabling stuff. |
369 |
AC_ARG_ENABLE(debug, |
370 |
AS_HELP_STRING([--enable-debug], [Enable debugging (disabled by default)])) |
|
371 |
if test "x$enable_debug" = xyes; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
372 |
AC_DEFINE(DEBUG, 1, [Define this to enable debug messages and abortion on failing asserts.]) |
4400
by Benno Schulenberg
Moving the enabling stuff to after the disabling stuff. |
373 |
else
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
374 |
AC_DEFINE(NDEBUG, 1, [Shut up assert warnings :-)]) |
4400
by Benno Schulenberg
Moving the enabling stuff to after the disabling stuff. |
375 |
fi
|
376 |
||
377 |
AC_ARG_ENABLE(tiny, |
|
378 |
AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size])) |
|
379 |
if test "x$enable_tiny" = xyes; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
380 |
AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.]) |
381 |
if test "x$enable_libmagic" != xyes; then |
|
382 |
enable_libmagic=no |
|
383 |
fi
|
|
4400
by Benno Schulenberg
Moving the enabling stuff to after the disabling stuff. |
384 |
fi
|
385 |
||
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
386 |
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes) |
387 |
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes) |
|
4028
by Chris Allegretta
Move the wordbounds check down so it will happen if either --enable-all or --enable-color |
388 |
|
2201
by David Lawrence Ramsey
in configure.ac, per Mike Frysinger's patch, add support for |
389 |
AC_MSG_CHECKING([whether to enable UTF-8 support]) |
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
390 |
AC_ARG_ENABLE(utf8, AS_HELP_STRING([--enable-utf8], [Enable UTF-8 support])) |
4368
by Benno Schulenberg
Allowing --disable-utf8 and --enable-utf8 to work. |
391 |
AC_MSG_RESULT(${enable_utf8:-auto}) |
2201
by David Lawrence Ramsey
in configure.ac, per Mike Frysinger's patch, add support for |
392 |
|
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
393 |
AC_ARG_ENABLE(altrcname, |
394 |
AS_HELP_STRING([--enable-altrcname], [Specify an alternate rcfile name (default: .nanorc)]), |
|
395 |
[if test x$enableval != no; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
396 |
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify an alternate rcfile name (default: .nanorc).]) rcfilename=$enableval |
4390
by Benno Schulenberg
Sorting all the disabling configuration options alphabetically. |
397 |
fi]) |
398 |
||
2202
by David Lawrence Ramsey
in configure.ac, tweak a few more things to make sure that everything |
399 |
dnl Checks for functions. |
400 |
||
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
401 |
if test "x$enable_utf8" != xno; then |
9565
by Benno Schulenberg
build: drop the check for two functions that we don't use any more |
402 |
AC_CHECK_FUNCS(iswalpha iswalnum iswpunct mbstowcs wctomb) |
2201
by David Lawrence Ramsey
in configure.ac, per Mike Frysinger's patch, add support for |
403 |
fi
|
933
by Jordi Mallach
Move to autoconf 2.5. |
404 |
|
9973
by Mike Frysinger
general: fix building for Windows |
405 |
AC_CHECK_FUNCS_ONCE(chmod chown fchmod fchown flockfile funlockfile |
406 |
fork fsync geteuid pipe wait waitpid) |
|
407 |
||
4350
by Benno Schulenberg
Compiling with warnings enabled by default, to help prevent |
408 |
dnl Checks for available flags. |
4385
by Benno Schulenberg
Upping the required version of Automake, to ensure the ONCE macros are defined. |
409 |
|
4350
by Benno Schulenberg
Compiling with warnings enabled by default, to help prevent |
410 |
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [], []) |
411 |
||
933
by Jordi Mallach
Move to autoconf 2.5. |
412 |
dnl Checks for libraries. |
2202
by David Lawrence Ramsey
in configure.ac, tweak a few more things to make sure that everything |
413 |
|
414 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
415 |
if test "x$enable_utf8" != xno; then |
416 |
PKG_CHECK_MODULES([NCURSESW], [ncursesw], [ |
|
417 |
CURSES_LIB=$NCURSESW_LIBS |
|
418 |
CPPFLAGS="$NCURSESW_CFLAGS $CPPFLAGS" |
|
419 |
CURSES_LIB_NAME=ncursesw |
|
420 |
CURSES_LIB_WIDE=yes |
|
421 |
], [:]) |
|
4247
by Chris Allegretta
2013-01-19 Chris Allegretta <chrisa@asty.org> |
422 |
else
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
423 |
PKG_CHECK_MODULES([NCURSES], [ncurses], [ |
424 |
CURSES_LIB=$NCURSES_LIBS |
|
425 |
CPPFLAGS="$NCURSES_CFLAGS $CPPFLAGS" |
|
426 |
CURSES_LIB_NAME=ncurses |
|
427 |
], [:]) |
|
428 |
fi
|
|
429 |
fi
|
|
430 |
||
431 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
432 |
AC_CHECK_HEADERS(ncurses.h) |
|
433 |
||
434 |
if test "x$enable_utf8" != xno; then |
|
435 |
OLDLIBS="$LIBS" |
|
436 |
AC_CHECK_TOOL(NCURSESW_CONFIG, ncursesw5-config, no) |
|
437 |
if test "x$NCURSESW_CONFIG" != xno; then |
|
438 |
CURSES_LIB=`$NCURSESW_CONFIG --libs` |
|
439 |
LIBS="$CURSES_LIB $LIBS" |
|
440 |
CPPFLAGS="`$NCURSESW_CONFIG --cflags` $CPPFLAGS" |
|
9242
by Benno Schulenberg
build: to verify wide curses, probe for a function that cannot be a macro |
441 |
AC_CHECK_LIB(ncursesw, wget_wch, [CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes]) |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
442 |
else
|
9242
by Benno Schulenberg
build: to verify wide curses, probe for a function that cannot be a macro |
443 |
AC_CHECK_LIB(ncursesw, wget_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes]) |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
444 |
fi
|
445 |
LIBS="$OLDLIBS" |
|
446 |
fi
|
|
447 |
||
448 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
449 |
AC_CHECK_LIB(ncurses, initscr, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses]) |
|
450 |
fi
|
|
451 |
fi
|
|
452 |
||
453 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
454 |
AC_CHECK_HEADERS(curses.h) |
|
455 |
||
456 |
if test "x$enable_utf8" != xno; then |
|
9242
by Benno Schulenberg
build: to verify wide curses, probe for a function that cannot be a macro |
457 |
AC_CHECK_LIB(curses, wget_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes]) |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
458 |
fi
|
459 |
||
460 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
461 |
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses]) |
|
462 |
fi
|
|
463 |
fi
|
|
464 |
||
465 |
if eval "test x$CURSES_LIB_NAME = x"; then |
|
6957
by Benno Schulenberg
build: let ./configure fail (not just warn) when curses.h is missing |
466 |
AC_MSG_ERROR([ |
7543
by Benno Schulenberg
tweaks: slightly indent warnings and errors during the configure phase |
467 |
*** No curses lib was found. Please install the curses header files |
9336
by Benno Schulenberg
docs: adjust for the changed name of the header-file package on Debian |
468 |
*** from libncurses-dev (Debian), ncurses-devel (Fedora), or similar. |
7543
by Benno Schulenberg
tweaks: slightly indent warnings and errors during the configure phase |
469 |
*** (Or install ncurses from https://ftp.gnu.org/gnu/ncurses/.)]) |
933
by Jordi Mallach
Move to autoconf 2.5. |
470 |
else
|
8989
by Benno Schulenberg
build: make ./configure report which global nanorc file will be used |
471 |
AC_MSG_RESULT([ The curses library to be used is: $CURSES_LIB_NAME]) |
933
by Jordi Mallach
Move to autoconf 2.5. |
472 |
fi
|
473 |
||
5926
by Mike Frysinger
configure: fix ncurses lib symbol checking |
474 |
AC_CHECK_LIB([$CURSES_LIB_NAME], [use_default_colors], |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
475 |
[AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() function.])], |
476 |
[], [$CURSES_LIB]) |
|
6233
by Mike Frysinger
add an explicit test for set_escdelay() |
477 |
AC_CHECK_LIB([$CURSES_LIB_NAME], [set_escdelay], |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
478 |
[AC_DEFINE(HAVE_SET_ESCDELAY, 1, [Define this if your curses library has the set_escdelay() function.])], |
479 |
[], [$CURSES_LIB]) |
|
5926
by Mike Frysinger
configure: fix ncurses lib symbol checking |
480 |
AC_CHECK_LIB([$CURSES_LIB_NAME], [key_defined], |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
481 |
[AC_DEFINE(HAVE_KEY_DEFINED, 1, [Define this if your curses library has the key_defined() function.])], |
482 |
[], [$CURSES_LIB]) |
|
933
by Jordi Mallach
Move to autoconf 2.5. |
483 |
|
484 |
LIBS="$LIBS $CURSES_LIB" |
|
485 |
||
486 |
AC_SUBST(CURSES_LIB) |
|
487 |
||
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
488 |
if test "x$enable_utf8" != xno && \ |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
489 |
test x$CURSES_LIB_WIDE = xyes && \ |
9565
by Benno Schulenberg
build: drop the check for two functions that we don't use any more |
490 |
test x$ac_cv_func_iswalpha = xyes && \ |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
491 |
test x$ac_cv_func_iswalnum = xyes && \ |
492 |
test x$ac_cv_func_iswpunct = xyes && \ |
|
493 |
test x$ac_cv_func_mbstowcs = xyes && \ |
|
494 |
test x$ac_cv_func_wctomb = xyes; then |
|
495 |
AC_DEFINE(ENABLE_UTF8, 1, [Define this if your system has sufficient UTF-8 support.]) |
|
1960
by David Lawrence Ramsey
improvements to wide/multibyte character input and output, using wide |
496 |
else
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
497 |
if test "x$enable_utf8" = xyes; then |
498 |
AC_MSG_ERROR([ |
|
9223
by Benno Schulenberg
build: stop mentioning Slang in two ./configure messages |
499 |
*** UTF-8 support was requested, but insufficient support was |
500 |
*** detected in your curses and/or C libraries. Please verify |
|
501 |
*** that both your curses library and your C library were built |
|
7543
by Benno Schulenberg
tweaks: slightly indent warnings and errors during the configure phase |
502 |
*** with wide-character support.]) |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
503 |
elif test "x$enable_utf8" != xno; then |
504 |
AC_MSG_WARN([ |
|
9223
by Benno Schulenberg
build: stop mentioning Slang in two ./configure messages |
505 |
*** Insufficient UTF-8 support was detected in your curses |
506 |
*** and/or C libraries. If you want UTF-8 support, please |
|
507 |
*** verify that both your curses library and your C library |
|
508 |
*** were built with wide-character support.]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
509 |
fi
|
1960
by David Lawrence Ramsey
improvements to wide/multibyte character input and output, using wide |
510 |
fi
|
511 |
||
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
512 |
AC_CACHE_CHECK([for enhanced regular expression flag], nano_cv_flag_reg_enhanced, |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
513 |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <regex.h>]], |
514 |
[[
|
|
515 |
#ifndef REG_ENHANCED
|
|
516 |
error: No REG_ENHANCED support! |
|
517 |
#endif
|
|
518 |
]])],
|
|
519 |
[nano_cv_flag_reg_enhanced=yes], |
|
520 |
[nano_cv_flag_reg_enhanced=no])]) |
|
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
521 |
dnl The bundled gnulib regex module doesn't support REG_ENHANCED. |
522 |
if test "$ac_use_included_regex" = "yes"; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
523 |
nano_cv_flag_reg_enhanced="no" |
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
524 |
fi
|
525 |
if test "$nano_cv_flag_reg_enhanced" = "yes"; then |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
526 |
nano_reg_extended="REG_EXTENDED | REG_ENHANCED" |
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
527 |
else
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
528 |
nano_reg_extended="REG_EXTENDED" |
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
529 |
fi
|
5402
by Benno Schulenberg
Checking for the existence of the REG_ENHANCED regex flag, and |
530 |
|
6332
by Mike Frysinger
configure: ignore the REG_ENHANCED test when we use gnulib |
531 |
AC_DEFINE_UNQUOTED(NANO_REG_EXTENDED, $nano_reg_extended, |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
532 |
[Flag(s) to use to get the full range of extended regular expressions]) |
5402
by Benno Schulenberg
Checking for the existence of the REG_ENHANCED regex flag, and |
533 |
|
6093
by Benno Schulenberg
build: check for GNU-style word-boundary support also in the tiny version |
534 |
if test x$color_support = xyes; then |
9272
by Benno Schulenberg
tweaks: remove two stray comments and two lines that were commented out |
535 |
AC_MSG_CHECKING([whether _XOPEN_SOURCE_EXTENDED is needed]) |
9277
by Benno Schulenberg
tweaks: replace two more occurrences of 'AC_TRY_RUN' with 'AC_RUN_IFELSE' |
536 |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4088
by Chris Allegretta
2009-02-28 Chris Allegretta <chrisa@asty.org> |
537 |
#include <curses.h> |
538 |
int main(void) |
|
539 |
{
|
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
540 |
int testcolor = COLOR_WHITE; |
541 |
return 0; |
|
9277
by Benno Schulenberg
tweaks: replace two more occurrences of 'AC_TRY_RUN' with 'AC_RUN_IFELSE' |
542 |
}]])],
|
543 |
AC_MSG_RESULT(no), |
|
9276
by Benno Schulenberg
tweaks: stop 'autoupdate' from failing with "end of file in string" |
544 |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
4088
by Chris Allegretta
2009-02-28 Chris Allegretta <chrisa@asty.org> |
545 |
#ifndef _XOPEN_SOURCE_EXTENDED
|
546 |
#define _XOPEN_SOURCE_EXTENDED 1
|
|
547 |
#endif
|
|
548 |
#include <curses.h> |
|
549 |
int main(void) |
|
550 |
{
|
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
551 |
int testcolor = COLOR_WHITE; |
552 |
return 0; |
|
9276
by Benno Schulenberg
tweaks: stop 'autoupdate' from failing with "end of file in string" |
553 |
}]])],
|
9272
by Benno Schulenberg
tweaks: remove two stray comments and two lines that were commented out |
554 |
AC_DEFINE(NEED_XOPEN_SOURCE_EXTENDED, 1, [Define this if you need the _XOPEN_SOURCE_EXTENDED macro for color support.]) |
555 |
AC_MSG_RESULT(yes), |
|
556 |
AC_MSG_RESULT(not sure) |
|
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
557 |
AC_MSG_WARN([ |
558 |
*** Couldn't successfully compile basic color test with or without |
|
559 |
*** _XOPEN_SOURCE_EXTENDED. This build may not compile. Consider |
|
560 |
*** configuring with --disable-color or installing ncurses.])), |
|
561 |
AC_MSG_WARN([ |
|
562 |
*** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling.])) |
|
5402
by Benno Schulenberg
Checking for the existence of the REG_ENHANCED regex flag, and |
563 |
fi
|
4088
by Chris Allegretta
2009-02-28 Chris Allegretta <chrisa@asty.org> |
564 |
|
4353
by Benno Schulenberg
Adding a configure flag to disable the use of the fattening libmagic. |
565 |
AS_IF([test "x$enable_libmagic" != "xno"], [ |
9278
by Benno Schulenberg
tweaks: make two of the changes that 'autoupdate' suggests |
566 |
AC_CHECK_HEADERS([magic.h]) |
567 |
AC_CHECK_LIB(magic, magic_open) |
|
568 |
AC_CHECK_HEADERS([zlib.h]) |
|
569 |
AC_CHECK_LIB(z, inflate) |
|
4353
by Benno Schulenberg
Adding a configure flag to disable the use of the fattening libmagic. |
570 |
])
|
4177
by Chris Allegretta
2010-03-07 Chris Allegretta <chrisa@asty.org> |
571 |
|
4384
by Benno Schulenberg
Trying to build info only when 'makeinfo' is available. |
572 |
# Check for groff html support.
|
4079
by Chris Allegretta
2009-02-15 Chris Allegretta <chrisa@asty.org> |
573 |
AC_MSG_CHECKING([for HTML support in groff]) |
574 |
groff -t -mandoc -Thtml </dev/null >/dev/null |
|
4356
by Benno Schulenberg
Cleaning up most of the --with/--enable flags. Patch by Mike Frysinger. |
575 |
if test $? -ne 0 ; then |
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
576 |
AC_MSG_RESULT([no]) |
7543
by Benno Schulenberg
tweaks: slightly indent warnings and errors during the configure phase |
577 |
AC_MSG_WARN([ |
9275
by Benno Schulenberg
tweaks: harmonize the style of error messages and warnings in ./configure |
578 |
*** Will not generate HTML version of man pages. Consider |
579 |
*** installing a newer version of groff with HTML support.]) |
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
580 |
groff_html_support=no |
4079
by Chris Allegretta
2009-02-15 Chris Allegretta <chrisa@asty.org> |
581 |
else
|
6893
by Benno Schulenberg
tweaks: convert the indentation to use only tabs |
582 |
AC_MSG_RESULT([yes]) |
583 |
groff_html_support=yes |
|
4079
by Chris Allegretta
2009-02-15 Chris Allegretta <chrisa@asty.org> |
584 |
fi
|
585 |
AM_CONDITIONAL(GROFF_HTML, test x$groff_html_support = xyes) |
|
586 |
||
1351
by Jordi Mallach
Major package reorganization: |
587 |
AC_CONFIG_FILES([ |
588 |
Makefile
|
|
589 |
doc/Makefile |
|
6048
by Benno Schulenberg
build: rename the sample config file, so it will be colored like a nanorc |
590 |
doc/sample.nanorc |
6223
by Mike Frysinger
add support for gnulib |
591 |
lib/Makefile |
1351
by Jordi Mallach
Major package reorganization: |
592 |
m4/Makefile |
593 |
po/Makefile.in |
|
594 |
src/Makefile |
|
6047
by Benno Schulenberg
build: move the syntax files out of the doc/ directory |
595 |
syntax/Makefile |
1351
by Jordi Mallach
Major package reorganization: |
596 |
])
|
597 |
||
933
by Jordi Mallach
Move to autoconf 2.5. |
598 |
AC_OUTPUT
|
8989
by Benno Schulenberg
build: make ./configure report which global nanorc file will be used |
599 |
|
600 |
make showinfo |