configure.ac 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. dnl
  2. dnl Configure.in file for the Midnight Commander
  3. dnl
  4. dnl 2.64 is required at least for m4_esyscmd_s()
  5. AC_PREREQ(2.64)
  6. AC_INIT([GNU Midnight Commander], m4_esyscmd_s([./version.sh .]),
  7. [https://www.midnight-commander.org/wiki/NewTicket], [mc],
  8. [https://www.midnight-commander.org/])
  9. m4_pattern_forbid(MC_)
  10. AC_CONFIG_MACRO_DIR([m4])
  11. AC_CONFIG_AUX_DIR(config)
  12. AC_CONFIG_SRCDIR(src/main.c)
  13. AC_CONFIG_HEADERS(config.h)
  14. dnl Apply "no-define" to avoid defining the VERSION macro in config.h
  15. AM_INIT_AUTOMAKE([no-define])
  16. dnl PACKAGE macro isn't defined if "no-define" is applied
  17. AC_DEFINE([PACKAGE], ["mc"], [Name of package])
  18. dnl Enable silent rules by default (if yes)
  19. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  20. mc_VERSION
  21. AM_MAINTAINER_MODE
  22. AC_CANONICAL_HOST
  23. AC_USE_SYSTEM_EXTENSIONS
  24. dnl ############################################################################
  25. dnl Check for compiler
  26. dnl ############################################################################
  27. dnl This should be checked before toolchain macros, otherwise they will remember
  28. dnl that ar cannot be found and linking via libtool will fail at a later stage
  29. AC_CHECK_TOOLS([AR], [ar gar])
  30. AC_PROG_CC
  31. AM_PROG_CC_C_O
  32. mc_CHECK_CFLAGS
  33. CFLAGS_OPTS=""
  34. if test "x$CFLAGS" = "x"; then
  35. CFLAGS_OPTS=" -O2 "
  36. fi
  37. if test x$USE_MAINTAINER_MODE = xyes; then
  38. CFLAGS_OPTS="-g3 -O -ggdb"
  39. AC_DEFINE(USE_MAINTAINER_MODE, 1, [Use maintainer mode])
  40. fi
  41. AC_ARG_ENABLE([werror],
  42. AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors]))
  43. if test "x$enable_werror" = xyes; then
  44. AX_APPEND_COMPILE_FLAGS([-Werror], [mc_configured_cflags])
  45. fi
  46. dnl Compiler can generate warnings for unrecognized flags added to CFLAGS
  47. dnl which causes attribute checks to fail
  48. ax_gcc_func_attribute_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
  49. _AC_LANG_PREFIX[]FLAGS=
  50. AX_GCC_FUNC_ATTRIBUTE([fallthrough])
  51. _AC_LANG_PREFIX[]FLAGS=$ax_gcc_func_attribute_save_flags
  52. unset ax_gcc_func_attribute_save_flags
  53. LT_INIT
  54. dnl ############################################################################
  55. dnl Check for programs
  56. dnl ############################################################################
  57. AC_PROG_SED
  58. PKG_PROG_PKG_CONFIG
  59. AC_PROG_INSTALL
  60. AC_PROG_LN_S
  61. dnl See also the "OS specific stuff" section below.
  62. dnl Check nroff and the options it supports
  63. AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
  64. dnl Default values
  65. MANDOC=-man
  66. MAN_FLAGS=
  67. if $HAVE_nroff; then
  68. AC_MSG_CHECKING([for manual formatting macros])
  69. AC_CACHE_VAL(mc_cv_mandoc, [
  70. nroff -mandoc < /dev/null > /dev/null 2>&1
  71. if test $? = 0; then
  72. mc_cv_mandoc=-mandoc
  73. else
  74. mc_cv_mandoc=-man
  75. fi
  76. ])
  77. MANDOC=$mc_cv_mandoc
  78. AC_MSG_RESULT([$MANDOC])
  79. AC_MSG_CHECKING([for option to disable ANSI color in manuals])
  80. AC_CACHE_VAL(mc_cv_man_nocolor, [
  81. nroff -c < /dev/null > /dev/null 2>&1
  82. if test $? = 0; then
  83. mc_cv_man_nocolor=-c
  84. else
  85. mc_cv_man_nocolor=
  86. fi
  87. ])
  88. MAN_FLAGS=$mc_cv_man_nocolor
  89. AC_MSG_RESULT([${MAN_NOCOLOR-none}])
  90. AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
  91. AC_CACHE_VAL(mc_cv_nroff_tascii, [
  92. mc_cv_nroff_tascii=
  93. nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
  94. if test $? = 0; then
  95. mc_cv_nroff_tascii=-Tlatin1
  96. else
  97. nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
  98. if test $? = 0; then
  99. mc_cv_nroff_tascii=-Tascii
  100. fi
  101. fi
  102. ])
  103. AC_MSG_RESULT([${mc_cv_nroff_tascii-no}])
  104. MAN_FLAGS="$MAN_FLAGS $mc_cv_nroff_tascii"
  105. fi
  106. AC_SUBST(MANDOC)
  107. AC_SUBST(MAN_FLAGS)
  108. dnl Check for -z, -b, -L, and -S options to file
  109. AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
  110. if $HAVE_FILECMD; then
  111. dnl Don't use the file command if it doesn't accept the -z option
  112. AC_MSG_CHECKING([for -z option to file command])
  113. AC_CACHE_VAL(mc_cv_file_z, [
  114. file -z . > /dev/null 2>&1
  115. if test $? = 0; then
  116. mc_cv_file_z=yes
  117. else
  118. mc_cv_file_z=no
  119. fi
  120. ])
  121. AC_MSG_RESULT([$mc_cv_file_z])
  122. if test x$mc_cv_file_z = xyes; then
  123. AC_DEFINE(USE_FILE_CMD, 1, [Define if the file command accepts the -z option])
  124. else
  125. AC_MSG_WARN([The file command doesn't accept the -z option and will not be used])
  126. fi
  127. if test x$mc_cv_file_z = xyes; then
  128. dnl file is used; check -b, -L and -S options
  129. AC_MSG_CHECKING([for -b option to file command])
  130. AC_CACHE_VAL(mc_cv_file_b, [
  131. file -b . > /dev/null 2>&1
  132. if test $? = 0; then
  133. mc_cv_file_b=yes
  134. else
  135. mc_cv_file_b=no
  136. fi
  137. ])
  138. AC_MSG_RESULT([$mc_cv_file_b])
  139. if test x$mc_cv_file_b = xyes; then
  140. AC_DEFINE(FILE_B, "-b ", [Define if the file command accepts the -b option])
  141. fi
  142. AC_MSG_CHECKING([for -L option to file command])
  143. AC_CACHE_VAL(mc_cv_file_L, [
  144. file -L . > /dev/null 2>&1
  145. if test $? = 0; then
  146. mc_cv_file_L=yes
  147. else
  148. mc_cv_file_L=no
  149. fi
  150. ])
  151. AC_MSG_RESULT([$mc_cv_file_L])
  152. if test x$mc_cv_file_L = xyes; then
  153. AC_DEFINE(FILE_L, "-L ", [Define if the file command accepts the -L option])
  154. else
  155. AC_DEFINE(FILE_L, "", [Define if the file command accepts the -L option])
  156. fi
  157. dnl The file command accepts the -S option since 5.33
  158. AC_MSG_CHECKING([for -S option to file command])
  159. AC_CACHE_VAL(mc_cv_file_S, [
  160. file -S . > /dev/null 2>&1
  161. if test $? = 0; then
  162. mc_cv_file_S=yes
  163. else
  164. mc_cv_file_S=no
  165. fi
  166. ])
  167. AC_MSG_RESULT([$mc_cv_file_S])
  168. if test x$mc_cv_file_S = xyes; then
  169. AC_DEFINE(FILE_S, "-S ", [Define if file command accepts the -S option])
  170. else
  171. AC_DEFINE(FILE_S, "", [Define if file command accepts the -S option])
  172. fi
  173. fi
  174. fi
  175. dnl Only list browsers here that can be run in background (i.e. with `&')
  176. AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla firefox konqueror opera])
  177. dnl ############################################################################
  178. dnl Check for other tools
  179. dnl ############################################################################
  180. AC_CHECK_TOOLS([INDENT], [gindent indent])
  181. mc_UNIT_TESTS
  182. dnl ############################################################################
  183. dnl Check for main libraries
  184. dnl ############################################################################
  185. mc_CHECK_GLIB
  186. mc_G_MODULE_SUPPORTED
  187. mc_WITH_SCREEN
  188. mc_CHECK_SEARCH_TYPE
  189. dnl X11 support. Used to read keyboard modifiers when running under X11.
  190. mc_WITH_X
  191. dnl ############################################################################
  192. dnl Check for header files
  193. dnl ############################################################################
  194. AC_CHECK_HEADERS([string.h memory.h limits.h malloc.h \
  195. utime.h sys/statfs.h sys/vfs.h \
  196. sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
  197. sys/socket.h])
  198. dnl This macro is redefined in m4.include/gnulib/sys_types_h.m4
  199. dnl to work around a buggy version in autoconf <= 2.69.
  200. AC_HEADER_MAJOR
  201. dnl ############################################################################
  202. dnl Check for types
  203. dnl ############################################################################
  204. dnl Check largefile before type sizeof checks
  205. AC_SYS_LARGEFILE
  206. AC_CHECK_SIZEOF(long)
  207. AC_TYPE_UINTMAX_T
  208. AC_CHECK_SIZEOF(uintmax_t)
  209. AC_TYPE_OFF_T
  210. AC_CHECK_SIZEOF(off_t)
  211. AC_TYPE_MODE_T
  212. gl_PROMOTED_TYPE_MODE_T
  213. AC_TYPE_PID_T
  214. AC_TYPE_UID_T
  215. AC_CHECK_TYPE([major_t], [], [AC_DEFINE([major_t], [int], [Type of major device numbers.])])
  216. AC_CHECK_TYPE([minor_t], [], [AC_DEFINE([minor_t], [int], [Type of minor device numbers.])])
  217. AC_STRUCT_ST_BLOCKS
  218. AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec])
  219. gl_STAT_SIZE
  220. AH_TEMPLATE([sig_atomic_t],
  221. [/* Define to `int' if <signal.h> doesn't define.])
  222. AH_TEMPLATE([SIG_ATOMIC_VOLATILE_T],
  223. [Some systems declare sig_atomic_t as volatile, some others -- no.
  224. This define will have value `sig_atomic_t' or
  225. `volatile sig_atomic_t' accordingly.])
  226. AC_MSG_CHECKING(for sig_atomic_t in signal.h)
  227. AC_EGREP_HEADER(sig_atomic_t,signal.h,
  228. [
  229. ac_cv_type_sig_atomic_t=yes;
  230. AC_EGREP_HEADER(volatile.*sig_atomic_t,
  231. signal.h,
  232. [
  233. is_sig_atomic_t_volatile=yes;
  234. AC_MSG_RESULT([yes, volatile])
  235. ],
  236. [
  237. is_sig_atomic_t_volatile=no;
  238. AC_MSG_RESULT([yes, non volatile])
  239. ])
  240. ],
  241. [
  242. AC_MSG_RESULT(no)
  243. AC_CHECK_TYPE(sig_atomic_t, int)
  244. is_sig_atomic_t_volatile=no
  245. ])
  246. if test $is_sig_atomic_t_volatile = 'yes'
  247. then
  248. AC_DEFINE(SIG_ATOMIC_VOLATILE_T, sig_atomic_t)
  249. else
  250. AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t])
  251. fi
  252. dnl ############################################################################
  253. dnl Check for functions
  254. dnl ############################################################################
  255. AC_CHECK_FUNCS([\
  256. strverscmp \
  257. strncasecmp \
  258. realpath
  259. ])
  260. dnl getpt is a GNU Extension (glibc 2.1.x)
  261. AC_CHECK_FUNCS(posix_openpt, , [AC_CHECK_FUNCS(getpt)])
  262. AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
  263. dnl replacing lstat with statlstat on sco makes it more portable between
  264. dnl sco clones
  265. AC_CHECK_FUNCS(statlstat)
  266. mc_GET_FS_INFO
  267. dnl ############################################################################
  268. dnl Internationalization
  269. dnl ############################################################################
  270. AC_CHECK_FUNCS([setlocale])
  271. AM_GNU_GETTEXT([external], [need-ngettext])
  272. AM_GNU_GETTEXT_VERSION([0.18.2])
  273. mc_I18N
  274. dnl ############################################################################
  275. dnl OS specific stuff
  276. dnl ############################################################################
  277. case $host_os in
  278. *os400)
  279. AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl])
  280. AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/QOpenSys/pkgs/bin/perl])
  281. AC_PATH_PROG([PYTHON], [python], [/QOpenSys/pkgs/bin/python2])
  282. AC_PATH_PROG([RUBY], [ruby], [/QOpenSys/pkgs/bin/ruby])
  283. ;;
  284. *)
  285. AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
  286. AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/usr/bin/perl])
  287. AC_PATH_PROG([PYTHON], [python], [/usr/bin/python])
  288. AC_PATH_PROG([RUBY], [ruby], [/usr/bin/ruby])
  289. esac
  290. case $host_os in
  291. aux*)
  292. # A/UX
  293. LIBS="$LIBS -lposix"
  294. AC_DEFINE(_POSIX_SOURCE)
  295. ;;
  296. esac
  297. dnl If running under AIX, AC_AIX does not tell us that
  298. AC_MSG_CHECKING([for AIX defines])
  299. AC_EGREP_CPP([yes],
  300. [
  301. #if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
  302. yes
  303. #endif
  304. ],
  305. [
  306. AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
  307. AC_MSG_RESULT(yes)
  308. ],
  309. [
  310. AC_MSG_RESULT(no)
  311. ])
  312. dnl utimensat is supported since glibc 2.6 and specified in POSIX.1-2008
  313. AC_CHECK_FUNCS([utimensat])
  314. case $host_os in
  315. *os400)
  316. AC_DEFINE([PTY_ZEROREAD], [1], [read(1) can return 0 for a non-closed fd])
  317. esac
  318. dnl Check linux/fs.h for FICLONE to support BTRFS's file clone operation
  319. case $host_os in
  320. linux*)
  321. AC_CHECK_HEADERS([linux/fs.h])
  322. esac
  323. dnl Check if the OS is supported by the console saver.
  324. cons_saver=""
  325. case $host_os in
  326. linux*)
  327. cons_saver=yes
  328. esac
  329. dnl Check for gpm mouse support (Linux only)
  330. mouse_lib="xterm only"
  331. AC_ARG_WITH([gpm-mouse],
  332. AS_HELP_STRING([--with-gpm-mouse], [Compile with gpm mouse support (Linux only) @<:@yes if found@:>@]))
  333. case $host_os in
  334. linux*)
  335. if test x$with_gpm_mouse != xno; then
  336. AC_CHECK_LIB(gpm, Gpm_Repeat,
  337. [AC_DEFINE(HAVE_LIBGPM, 1,
  338. [Define to enable gpm mouse support on Linux])
  339. mouse_lib="gpm and xterm"
  340. MCLIBS="$MCLIBS -lgpm"],
  341. if test "x$with_gpm_mouse" = "xyes"; then
  342. [AC_MSG_ERROR([libgpm is missing or older than 0.18])]
  343. else
  344. [AC_MSG_WARN([libgpm is missing or older than 0.18])]
  345. fi
  346. )
  347. fi
  348. ;;
  349. esac
  350. dnl ############################################################################
  351. dnl libmc
  352. dnl ############################################################################
  353. LIBMC_VERSION="0.0.1"
  354. LIBMC_RELEASE="1"
  355. AC_SUBST(LIBMC_VERSION)
  356. AC_SUBST(LIBMC_RELEASE)
  357. AC_ARG_ENABLE([mclib],
  358. [AS_HELP_STRING([--enable-mclib], [Compile shared library libmc.so @<:@no@:>@])],
  359. [
  360. if test "x$enableval" = "xno" ; then
  361. enable_mclib=no
  362. else
  363. if test "x$enable_shared" = "xno" ; then
  364. AC_MSG_WARN([Build of shared library is disabled. Specify --enable-shared first])
  365. enable_mclib=no
  366. else
  367. enable_mclib=yes
  368. fi
  369. fi
  370. ],
  371. [enable_mclib=no])
  372. AM_CONDITIONAL([ENABLE_MCLIB], [test x$enable_mclib = xyes])
  373. dnl ############################################################################
  374. dnl MC options
  375. dnl ############################################################################
  376. mc_ASSERT
  377. mc_WITH_INTERNAL_EDIT
  378. dnl Diff viewer support.
  379. AC_ARG_WITH([diff_viewer],
  380. AS_HELP_STRING([--with-diff-viewer], [Compile with diff viewer @<:@yes@:>@]))
  381. if test x$with_diff_viewer != xno; then
  382. AC_DEFINE(USE_DIFF_VIEW, 1, [Define to enable diff viewer])
  383. use_diff=yes
  384. diff_msg="yes"
  385. AC_MSG_NOTICE([using diff viewer])
  386. else
  387. diff_msg="no"
  388. fi
  389. mc_SUBSHELL
  390. mc_BACKGROUND
  391. mc_EXT2FS_ATTR
  392. mc_VFS_CHECKS
  393. dnl ############################################################################
  394. dnl Directories
  395. dnl ############################################################################
  396. dnl ${prefix} and ${exec_prefix} are undefined here if --prefix is not used in command line
  397. dnl Let define ${prefix} and ${exec_prefix}
  398. test "x$prefix" = "xNONE" && prefix="$ac_default_prefix"
  399. test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
  400. if test x${libexecdir} = x'${exec_prefix}/libexec'; then
  401. EXTHELPERSDIR=${prefix}/libexec/${PACKAGE}/ext.d
  402. elif test x${libexecdir} = x'${exec_prefix}/lib'; then
  403. EXTHELPERSDIR=${prefix}/lib/${PACKAGE}/ext.d
  404. else
  405. EXTHELPERSDIR=${libexecdir}/${PACKAGE}/ext.d
  406. fi
  407. AC_SUBST(EXTHELPERSDIR)
  408. dnl ############################################################################
  409. dnl Documentation
  410. dnl ############################################################################
  411. MAN_DATE="$(LC_ALL=C date "+%B %Y")"
  412. AC_SUBST(MAN_DATE)
  413. dnl Determine which help translations we want to install.
  414. ALL_DOC_LINGUAS="es hu it pl ru sr"
  415. DOC_LINGUAS=
  416. if test "x$USE_NLS" = xyes; then
  417. if test -z "$LINGUAS"; then
  418. langs="`grep -v '^#' $srcdir/po/LINGUAS`"
  419. else
  420. langs="$LINGUAS"
  421. fi
  422. else
  423. langs=
  424. fi
  425. for h_lang in $ALL_DOC_LINGUAS; do
  426. for lang in $langs; do
  427. if test "$lang" = "$h_lang"; then
  428. DOC_LINGUAS="$DOC_LINGUAS $lang"
  429. break
  430. fi
  431. done
  432. done
  433. AC_SUBST(DOC_LINGUAS)
  434. DX_HTML_FEATURE(ON)
  435. DX_CHM_FEATURE(OFF)
  436. DX_CHI_FEATURE(OFF)
  437. DX_MAN_FEATURE(OFF)
  438. DX_RTF_FEATURE(OFF)
  439. DX_XML_FEATURE(OFF)
  440. DX_PDF_FEATURE(OFF)
  441. DX_PS_FEATURE(OFF)
  442. DX_INIT_DOXYGEN(mc,doxygen.cfg,devel)
  443. dnl ############################################################################
  444. dnl Configure results
  445. dnl ############################################################################
  446. CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS"
  447. AC_SUBST(MCLIBS)
  448. AC_SUBST(CFLAGS)
  449. AC_SUBST(CPPFLAGS)
  450. AC_SUBST(LDFLAGS)
  451. AC_SUBST(LIBS)
  452. AM_CONDITIONAL(USE_NLS, [test x"$USE_NLS" = xyes])
  453. AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
  454. AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
  455. AM_CONDITIONAL(USE_INTERNAL_EDIT, [test x"$use_internal_edit" = xyes ])
  456. AM_CONDITIONAL(USE_ASPELL, [test x"$enable_aspell" = xyes ])
  457. AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
  458. AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
  459. AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
  460. dnl Clarify do we really need GModule
  461. AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \
  462. test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"])
  463. AC_ARG_ENABLE([configure-args],
  464. AS_HELP_STRING([--enable-configure-args], [Embed ./configure arguments into binaries]))
  465. if test "x$enable_configure_args" != xno; then
  466. AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help])
  467. AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
  468. fi
  469. AC_CONFIG_FILES(
  470. [
  471. src/man2hlp/man2hlp
  472. ],
  473. [
  474. chmod +x src/man2hlp/man2hlp
  475. ])
  476. AC_CONFIG_FILES([
  477. Makefile
  478. contrib/Makefile
  479. misc/Makefile
  480. misc/mc.charsets
  481. misc/mc.menu
  482. misc/mcedit.menu
  483. misc/skins/Makefile
  484. misc/ext.d/Makefile
  485. misc/ext.d/doc.sh
  486. misc/ext.d/misc.sh
  487. misc/ext.d/text.sh
  488. misc/ext.d/web.sh
  489. misc/macros.d/Makefile
  490. misc/mc.ext.ini
  491. src/Makefile
  492. src/consaver/Makefile
  493. src/editor/Makefile
  494. src/man2hlp/Makefile
  495. src/subshell/Makefile
  496. src/viewer/Makefile
  497. src/diffviewer/Makefile
  498. src/filemanager/Makefile
  499. src/vfs/Makefile
  500. src/vfs/cpio/Makefile
  501. src/vfs/extfs/Makefile
  502. src/vfs/extfs/helpers/Makefile
  503. src/vfs/extfs/helpers/a+
  504. src/vfs/extfs/helpers/apt+
  505. src/vfs/extfs/helpers/audio
  506. src/vfs/extfs/helpers/deb
  507. src/vfs/extfs/helpers/deba
  508. src/vfs/extfs/helpers/debd
  509. src/vfs/extfs/helpers/dpkg+
  510. src/vfs/extfs/helpers/iso9660
  511. src/vfs/extfs/helpers/hp48+
  512. src/vfs/extfs/helpers/lslR
  513. src/vfs/extfs/helpers/mailfs
  514. src/vfs/extfs/helpers/patchfs
  515. src/vfs/extfs/helpers/rpms+
  516. src/vfs/extfs/helpers/s3+
  517. src/vfs/extfs/helpers/uace
  518. src/vfs/extfs/helpers/ualz
  519. src/vfs/extfs/helpers/uar
  520. src/vfs/extfs/helpers/uarc
  521. src/vfs/extfs/helpers/uarj
  522. src/vfs/extfs/helpers/ucab
  523. src/vfs/extfs/helpers/uha
  524. src/vfs/extfs/helpers/ulha
  525. src/vfs/extfs/helpers/ulib
  526. src/vfs/extfs/helpers/unar
  527. src/vfs/extfs/helpers/urar
  528. src/vfs/extfs/helpers/uwim
  529. src/vfs/extfs/helpers/uzip
  530. src/vfs/extfs/helpers/uzoo
  531. src/vfs/shell/Makefile
  532. src/vfs/shell/helpers/Makefile
  533. src/vfs/ftpfs/Makefile
  534. src/vfs/sftpfs/Makefile
  535. src/vfs/local/Makefile
  536. src/vfs/sfs/Makefile
  537. src/vfs/tar/Makefile
  538. src/vfs/undelfs/Makefile
  539. lib/Makefile
  540. lib/event/Makefile
  541. lib/filehighlight/Makefile
  542. lib/mcconfig/Makefile
  543. lib/search/Makefile
  544. lib/skin/Makefile
  545. lib/strutil/Makefile
  546. lib/tty/Makefile
  547. lib/vfs/Makefile
  548. lib/widget/Makefile
  549. misc/syntax/Makefile
  550. doc/Makefile
  551. doc/hints/Makefile
  552. doc/hints/l10n/Makefile
  553. doc/man/Makefile
  554. doc/man/es/Makefile
  555. doc/man/hu/Makefile
  556. doc/man/it/Makefile
  557. doc/man/pl/Makefile
  558. doc/man/ru/Makefile
  559. doc/man/sr/Makefile
  560. doc/hlp/Makefile
  561. doc/hlp/es/Makefile
  562. doc/hlp/hu/Makefile
  563. doc/hlp/it/Makefile
  564. doc/hlp/pl/Makefile
  565. doc/hlp/ru/Makefile
  566. doc/hlp/sr/Makefile
  567. po/Makefile.in
  568. ])
  569. dnl https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable/30932102#30932102
  570. AC_CONFIG_FILES(
  571. [misc/syntax/Syntax], [${SED-sed} -e "s%\${prefix}%$PREFIX%" misc/syntax/Syntax > misc/syntax/Syntax.tmp && \
  572. mv -f misc/syntax/Syntax.tmp misc/syntax/Syntax], [export PREFIX=$prefix]
  573. )
  574. AC_CONFIG_FILES([
  575. tests/Makefile
  576. tests/lib/Makefile
  577. tests/lib/mcconfig/Makefile
  578. tests/lib/search/Makefile
  579. tests/lib/strutil/Makefile
  580. tests/lib/vfs/Makefile
  581. tests/lib/widget/Makefile
  582. tests/src/Makefile
  583. tests/src/filemanager/Makefile
  584. tests/src/editor/Makefile
  585. tests/src/editor/test-data.txt
  586. tests/src/vfs/Makefile
  587. tests/src/vfs/extfs/Makefile
  588. tests/src/vfs/extfs/helpers-list/Makefile
  589. tests/src/vfs/extfs/helpers-list/data/config.sh
  590. tests/src/vfs/extfs/helpers-list/misc/Makefile
  591. tests/src/vfs/ftpfs/Makefile
  592. ])
  593. AC_OUTPUT
  594. AC_MSG_NOTICE([
  595. Configuration:
  596. Source code location: ${srcdir}
  597. Compiler: ${CC}
  598. Compiler flags: ${CFLAGS}
  599. Assertions: ${enable_assert}
  600. Unit tests: ${tests_msg}
  601. File system: ${vfs_type}
  602. ${vfs_flags}
  603. Screen library: ${screen_msg}
  604. Mouse support: ${mouse_lib}
  605. X11 events support: ${textmode_x11_support}
  606. With subshell support: ${subshell}
  607. With background operations: ${enable_background}
  608. With ext2fs attributes support: ${ext2fs_attr_msg}
  609. Internal editor: ${edit_msg}
  610. Diff viewer: ${diff_msg}
  611. Support for charset: ${charset_msg}
  612. Search type: ${SEARCH_TYPE}
  613. ])
  614. dnl option checking is disable by default due to AC_CONFIG_SUBDIRS
  615. dnl we enable it back for top-level ./configure
  616. if test -n "$ac_unrecognized_opts"; then
  617. case $enable_option_checking in
  618. fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
  619. *) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
  620. esac
  621. fi