configure.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. dnl
  2. dnl Configure.in file for the Midnight Commander
  3. dnl
  4. AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
  5. AC_PREREQ(2.52)
  6. AC_CONFIG_SRCDIR(src/main.c)
  7. AC_CONFIG_AUX_DIR(config)
  8. AM_INIT_AUTOMAKE(mc, 4.6.0-pre1a)
  9. AM_CONFIG_HEADER(config.h)
  10. AM_MAINTAINER_MODE
  11. AC_CANONICAL_HOST
  12. AC_AIX
  13. AC_MINIX
  14. AC_ISC_POSIX
  15. AC_PROG_CC_STDC
  16. dnl
  17. dnl Check if the user requested to compile with glib 2.x. If not, use
  18. dnl glib 1.2.x. This check should be kept close to the beginning, as it
  19. dnl fails for the users without any glib.
  20. dnl
  21. AC_ARG_WITH(glib2, [ --with-glib2 Use glib 2.x [[no]]])
  22. if test "x$with_glib2" = "xyes" ; then
  23. PKG_CHECK_MODULES(GLIB, "glib-2.0")
  24. else
  25. dnl This temporary variable is a workaround for a bug in Autoconf-2.53
  26. glib_path=$PATH:/usr/local/bin
  27. dnl Klugde for FreeBSD, where glib-config is renamed to glib12-config.
  28. AC_PATH_PROGS([GLIB_CONFIG], [glib-config glib12-config],,[$glib_path])
  29. AC_ARG_VAR([GLIB_CONFIG], [Path to glib-config (version 1.2.x only)])
  30. AM_PATH_GLIB(1.2.6,,[AC_MSG_ERROR([Test for glib failed.
  31. GNU Midnight Commander requires glib 1.2.6 or above.])])
  32. fi
  33. AC_HEADER_MAJOR
  34. AC_C_CONST
  35. AC_SYS_LARGEFILE
  36. AC_PROG_LN_S
  37. AC_CHECK_TOOL(AR, ar, ar)
  38. dnl Only list browsers here that can be run in background (i.e. with `&')
  39. AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla konqueror opera netscape])
  40. dnl
  41. dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
  42. dnl We use only part of the functionality of mmap, so on AIX,
  43. dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
  44. dnl
  45. AC_ARG_WITH(mmap,
  46. [ --with-mmap Force using the mmap call (only useful on AIX)],
  47. [case $withval in
  48. yes)
  49. ac_cv_func_mmap_fixed_mapped=yes
  50. AC_MSG_NOTICE([forcing MMAP support])
  51. ;;
  52. no)
  53. ac_cv_func_mmap_fixed_mapped=no
  54. AC_MSG_NOTICE([disabling MMAP support])
  55. ;;
  56. esac])
  57. AC_FUNC_MMAP
  58. ALL_LINGUAS="az be bg ca cs da de el es es_ES eu fi fr hu it ja ko lv \
  59. nl no pl pt pt_BR ro ru sk sl sv uk ta tr wa zh_CN zh_TW"
  60. dnl
  61. dnl Internationalization
  62. dnl
  63. AM_GNU_GETTEXT
  64. AM_GNU_GETTEXT_VERSION(0.11.5)
  65. if test "x$USE_INCLUDED_LIBINTL" = xyes; then
  66. CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
  67. fi
  68. dnl
  69. dnl Hack to make extraconf.h visible even if compiling outside srcdir.
  70. dnl
  71. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)"
  72. dnl
  73. dnl Enforce coding standards
  74. dnl
  75. if test "x$GCC" = xyes; then
  76. CFLAGS="$CFLAGS -Wall"
  77. fi
  78. dnl
  79. dnl OS specific flags.
  80. dnl
  81. posix_libs=""
  82. case $host_os in
  83. aux*)
  84. # A/UX
  85. posix_libs="-lposix"
  86. AC_DEFINE(_POSIX_SOURCE)
  87. ;;
  88. sco*)
  89. AC_DEFINE(SCO_FLAVOR, 1, [Define if you want to turn on SCO-specific code])
  90. AC_DEFINE(_SVID3, 1, [Needs to be defined on SCO])
  91. ;;
  92. esac
  93. AC_PROG_INSTALL
  94. AC_CHECK_HEADERS([unistd.h string.h memory.h crypt.h grp.h limits.h \
  95. malloc.h stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h \
  96. sys/time.h sys/timeb.h sys/select.h sys/ioctl.h stropts.h \
  97. arpa/inet.h])
  98. AC_HEADER_TIME
  99. AC_HEADER_SYS_WAIT
  100. AC_HEADER_DIRENT
  101. AC_HEADER_STDC
  102. dnl Missing structure components
  103. AC_STRUCT_ST_BLKSIZE
  104. AC_STRUCT_ST_BLOCKS
  105. AC_STRUCT_ST_RDEV
  106. dnl
  107. dnl Check availability of some functions
  108. dnl
  109. AC_CHECK_FUNCS([strerror statfs strftime \
  110. memmove pwdauth truncate initgroups putenv \
  111. memset memcpy tcsetattr tcgetattr cfgetospeed \
  112. sigaction sigemptyset sigprocmask sigaddset \
  113. sysconf setuid setreuid telldir seekdir])
  114. dnl
  115. dnl getpt is a GNU Extension (glibc 2.1.x)
  116. dnl
  117. AC_CHECK_FUNCS(getpt)
  118. dnl
  119. dnl On SCO and some SVR4, crypt is on libcrypt.a
  120. dnl grantpt in libpt.a
  121. dnl
  122. LCRYPT=""
  123. AC_CHECK_FUNCS(crypt, , [
  124. AC_CHECK_LIB(crypt, crypt, [LCRYPT="-lcrypt"], [
  125. AC_CHECK_LIB(crypt_i, crypt, [LCRYPT="-lcrypt_i"])])])
  126. AC_SUBST(LCRYPT)
  127. AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
  128. dnl replacing lstat with statlstat on sco makes it more portable between
  129. dnl sco clones
  130. AC_CHECK_FUNCS(statlstat)
  131. dnl
  132. dnl If running under AIX, AC_AIX does not tell us that
  133. dnl
  134. AC_MSG_CHECKING([for AIX defines])
  135. AC_EGREP_CPP(yes,
  136. [#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
  137. yes
  138. #endif
  139. ], [
  140. AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
  141. AC_MSG_RESULT(yes)
  142. ], [AC_MSG_RESULT(no)])
  143. dnl
  144. dnl This is from GNU fileutils, check aclocal.m4 for more information
  145. dnl
  146. AC_GET_FS_INFO
  147. dnl
  148. dnl Missing typedefs and replacements
  149. dnl
  150. AC_TYPE_MODE_T
  151. AC_CHECK_TYPE(umode_t, int)
  152. AC_CHECK_TYPE(off_t, long)
  153. AC_TYPE_PID_T
  154. AC_TYPE_UID_T
  155. AC_CHECK_TYPE(nlink_t, unsigned int)
  156. AC_FUNC_ALLOCA
  157. AC_FUNC_STRCOLL
  158. dnl
  159. dnl X11 support.
  160. dnl
  161. textmode_x11_support="no"
  162. AC_ARG_WITH(tm-x-support,
  163. [ --with-tm-x-support Get keyboard events from X Window System [[no]]],
  164. [if test x$withval = xyes; then
  165. AC_PATH_XTRA
  166. CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  167. MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  168. AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT, 1,
  169. [Define to enable getting events from X Window System])
  170. textmode_x11_support="yes"
  171. fi
  172. ])
  173. dnl
  174. dnl Network related functions
  175. dnl
  176. AC_CHECK_LIB(nsl, t_accept)
  177. AC_CHECK_LIB(socket, socket)
  178. have_socket=no
  179. AC_CHECK_FUNCS(socket, have_socket=yes)
  180. if test $have_socket = no; then
  181. # socket is not in the default libraries. See if it's in some other.
  182. for lib in bsd socket inet; do
  183. AC_CHECK_LIB($lib, socket, [
  184. LIBS="$LIBS -l$lib"
  185. have_socket=yes
  186. AC_DEFINE(HAVE_SOCKET)
  187. break])
  188. done
  189. fi
  190. have_gethostbyname=no
  191. AC_CHECK_FUNC(gethostbyname, [have_gethostbyname=yes])
  192. if test $have_gethostbyname = no; then
  193. # gethostbyname is not in the default libraries. See if it's in some other.
  194. for lib in bsd socket inet; do
  195. AC_CHECK_LIB([$lib], [gethostbyname],
  196. [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
  197. done
  198. fi
  199. AC_CHECK_FUNCS(socketpair)
  200. dnl
  201. dnl Sequent wants getprocessstats
  202. dnl
  203. AC_CHECK_LIB(seq, get_process_stats, [
  204. LIBS="$LIBS -lseq"
  205. AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
  206. [Define if you have function `get_process_stats' and
  207. have to use that instead of gettimeofday])])
  208. MC_VFS_CHECKS
  209. vfs_type="normal"
  210. if test x$use_vfs = xyes; then
  211. AC_MSG_NOTICE([enabling VFS code])
  212. vfs_type="Midnight Commander Virtual File System"
  213. fi
  214. dnl This should be unadorned "slang" or "ncurses"
  215. screen_type=""
  216. dnl Screen manager name (for the output only)
  217. screen_manager=unknown
  218. mouse_lib="xterm only"
  219. case $host_os in
  220. linux*)
  221. AC_ARG_WITH(gpm-mouse,
  222. [ --with-gpm-mouse[[=base-dir]] Compile with gpm mouse support (Linux only)
  223. [[yes if found]]],
  224. [if test x$withval != xno
  225. then
  226. if test x$withval != xyes
  227. then
  228. LDFLAGS="$LDFLAGS -L$withval/lib"
  229. CPPFLAGS="$CPPFLAGS -I$withval/include"
  230. fi
  231. AC_DEFINE(HAVE_LIBGPM, 1,
  232. [Define to enable gpm mouse support on Linux])
  233. mouse_lib="GPM and xterm"
  234. MCLIBS="-lgpm $MCLIBS"
  235. fi],
  236. [AC_CHECK_LIB(gpm, Gpm_Repeat,
  237. [AC_DEFINE(HAVE_LIBGPM)
  238. mouse_lib="GPM and xterm"
  239. MCLIBS="-lgpm $MCLIBS"],
  240. [AC_MSG_WARN([libgpm is missing or older than 0.18])],
  241. [$LIBS])
  242. ])
  243. ;;
  244. esac
  245. AC_ARG_WITH(ncurses,
  246. [ --with-ncurses[[=base-dir]] Compile with ncurses [[no]]],
  247. [if test x$withval != xno; then
  248. if test x$withval != xyes; then
  249. LDFLAGS="$LDFLAGS -L$withval/lib"
  250. CPPFLAGS="$CPPFLAGS -I$withval/include"
  251. fi
  252. AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h],
  253. [ncurses_h_found=yes; break])
  254. if test -z "$ncurses_h_found"; then
  255. AC_MSG_ERROR([Could not find ncurses header])
  256. fi
  257. dnl curses_version is specific to ncurses, it's not in old curses
  258. AC_CHECK_LIB(ncurses, has_colors, [MCLIBS="$MCLIBS -lncurses"],
  259. [AC_MSG_ERROR([Could not find ncurses library])])
  260. screen_type="ncurses"
  261. screen_manager="ncurses"
  262. AC_DEFINE(USE_NCURSES, 1,
  263. [Define to use ncurses for screen management])
  264. fi
  265. ])
  266. AC_ARG_WITH(hsc,
  267. [ --with-hsc Compile with support for HSC firewall instead
  268. of FTP proxy [[no]]],
  269. [if test x$withval = xyes; then
  270. AC_DEFINE(HSC_PROXY, 1,
  271. [Define if you want to use the HSC firewall])
  272. fi
  273. ])
  274. dnl
  275. dnl Check for the -mandoc package
  276. dnl
  277. AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
  278. if $HAVE_nroff; then
  279. AC_MSG_CHECKING([for manual formatting macros])
  280. AC_CACHE_VAL(ac_cv_mandoc, [
  281. nroff -mandoc < /dev/null > /dev/null 2>&1
  282. if test $? = 0
  283. then
  284. ac_cv_mandoc=-mandoc
  285. else
  286. ac_cv_mandoc=-man
  287. fi
  288. ])
  289. MANDOC=$ac_cv_mandoc
  290. AC_MSG_RESULT([$MANDOC])
  291. else
  292. MANDOC=-man
  293. fi
  294. AC_SUBST(MANDOC)
  295. dnl
  296. dnl Check if nroff accepts -Tlatin1 or -Tascii
  297. dnl
  298. if $HAVE_nroff; then
  299. AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
  300. AC_CACHE_VAL(ac_cv_nroff_tascii, [
  301. nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
  302. if test $? = 0
  303. then
  304. ac_cv_nroff_tascii=" -Tlatin1"
  305. else
  306. nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
  307. if test $? = 0
  308. then
  309. ac_cv_nroff_tascii=" -Tascii"
  310. else
  311. ac_cv_nroff_tascii=""
  312. fi
  313. fi
  314. ])
  315. if test "x$ac_cv_nroff_tascii" = x; then
  316. AC_MSG_RESULT([no])
  317. else
  318. AC_MSG_RESULT([yes,$ac_cv_nroff_tascii])
  319. fi
  320. fi
  321. TROFFASCII="$ac_cv_nroff_tascii"
  322. AC_SUBST(TROFFASCII)
  323. dnl
  324. dnl Check for - option to file
  325. dnl
  326. AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
  327. if $HAVE_FILECMD; then
  328. AC_MSG_CHECKING([for - option to file command])
  329. AC_CACHE_VAL(ac_cv_filestdin, [[
  330. cat > conftest.c <<\EOF
  331. /* A comment */
  332. #if 0
  333. #endif
  334. void main(void)
  335. { return; }
  336. EOF
  337. cat > conftest.sed <<\EOF
  338. s/^[^:]*:[ ]*//
  339. s/[ ]*$//
  340. EOF
  341. filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
  342. filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
  343. if test "x$filehyphen_1" = "x$filehyphen_2"; then
  344. ac_cv_filestdin=yes
  345. else
  346. ac_cv_filestdin=no
  347. fi
  348. rm conftest.c conftest.sed
  349. ]])
  350. if test x$ac_cv_filestdin = xyes; then
  351. AC_DEFINE(FILE_STDIN, 1,
  352. [Define if the file command accepts - for stdin])
  353. fi
  354. filestdin=$ac_cv_filestdin
  355. AC_MSG_RESULT([$filestdin])
  356. dnl
  357. dnl Check for -L option to file
  358. dnl
  359. AC_MSG_CHECKING([for -L option to file command])
  360. AC_CACHE_VAL(ac_cv_filel, [
  361. file -L . > /dev/null 2>&1
  362. if test $? = 0
  363. then
  364. ac_cv_filel=yes
  365. else
  366. ac_cv_filel=no
  367. fi
  368. ])
  369. if test x$ac_cv_filel = xyes; then
  370. AC_DEFINE(FILE_L, 1, [Define if the file command accepts the -L option])
  371. fi
  372. filel=$ac_cv_filel
  373. AC_MSG_RESULT([$filel])
  374. fi
  375. AC_MSG_CHECKING([for subshell support])
  376. AC_ARG_WITH(subshell,
  377. [ --with-subshell Compile in concurrent subshell [[yes]]
  378. --with-subshell=optional Don't run concurrent shell by default [[no]]],
  379. [result=no
  380. if test x$withval = xoptional
  381. then
  382. AC_DEFINE(SUBSHELL_OPTIONAL, 1,
  383. [Define to make subshell support optional])
  384. result="optional"
  385. fi
  386. if test x$withval = xyes
  387. then
  388. result="yes"
  389. fi],
  390. [dnl Default: enable the subshell support
  391. result="yes"
  392. ])
  393. if test "x$result" != xno; then
  394. AC_DEFINE(HAVE_SUBSHELL_SUPPORT, 1,
  395. [Define to enable subshell support])
  396. fi
  397. AC_MSG_RESULT([$result])
  398. subshell="$result"
  399. if test "x$screen_type" != xncurses; then
  400. slang_check_lib=true
  401. slang_term=""
  402. slang_use_system_installed_lib=false
  403. AC_CHECK_LIB(slang,SLang_init_tty,
  404. [AC_CHECK_HEADERS([slang.h slang/slang.h],
  405. [slang_h_found=yes; break])
  406. if test "x$slang_h_found" = xyes; then
  407. slang_use_system_installed_lib=true
  408. slang_check_lib=false
  409. fi
  410. ])
  411. fi
  412. AC_ARG_WITH(slang,
  413. [ --with-slang Compile with S-Lang screen manager [[yes]]],
  414. [if test x$withval = xyes; then
  415. AC_WITH_SLANG
  416. fi]
  417. )
  418. AC_ARG_WITH(included-slang,
  419. [ --with-included-slang Use S-Lang library included with mc sources
  420. [[use installed library if found]]],
  421. [if test x$withval = xyes; then
  422. slang_use_system_installed_lib=false
  423. slang_check_lib=true
  424. fi]
  425. )
  426. AC_ARG_WITH(termcap,
  427. [ --with-termcap Same as above, and try using termcap database [[no]]],
  428. [if test x$withval = xyes; then
  429. AC_USE_TERMCAP
  430. slang_check_lib=false
  431. slang_use_system_installed_lib=false
  432. fi]
  433. )
  434. dnl
  435. dnl Internal editor support.
  436. dnl
  437. AC_ARG_WITH(edit,
  438. [ --with-edit Enable internal editor [[yes]]])
  439. if test x$with_edit != xno; then
  440. AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
  441. use_edit=yes
  442. EDIT_msg="yes"
  443. AC_MSG_NOTICE([using internal editor])
  444. else
  445. EDIT_msg="no"
  446. fi
  447. if test $use_vfs = yes; then
  448. AC_ARG_WITH(ext2undel,
  449. [ --with-ext2undel Compile with ext2 undelete code [[yes if found]]],
  450. [if test x$withval != xno; then
  451. if test x$withval != xyes; then
  452. LDFLAGS="$LDFLAGS -L$withval/lib"
  453. CPPFLAGS="$CPPFLAGS -I$withval/include"
  454. fi
  455. AC_EXT2_UNDEL
  456. fi],[
  457. dnl Default: detect
  458. AC_CHECK_LIB(ext2fs, ext2fs_close, [AC_EXT2_UNDEL], , [-lcom_err])
  459. ])
  460. fi
  461. dnl Ncurses specific checks
  462. dnl
  463. dnl If ncurses exports the ESCDELAY variable it should be set to 0
  464. dnl or you'll have to press Esc three times to dismiss a dialog box.
  465. dnl
  466. if test "x$screen_type" = xncurses; then
  467. save_LIBS="$LIBS"
  468. LIBS="$MCLIBS $LIBS"
  469. AC_CACHE_CHECK([for ESCDELAY variable],
  470. [mc_cv_ncurses_escdelay],
  471. [AC_TRY_COMPILE([], [
  472. extern int ESCDELAY;
  473. int main ()
  474. {
  475. ESCDELAY = 0;
  476. }
  477. ],
  478. [mc_cv_ncurses_escdelay=yes],
  479. [mc_cv_ncurses_escdelay=no]
  480. )
  481. ])
  482. if test "$mc_cv_ncurses_escdelay" = yes; then
  483. AC_DEFINE(HAVE_ESCDELAY, 1,
  484. [Define if ncurses has ESCDELAY variable])
  485. fi
  486. AC_CHECK_FUNCS(resizeterm)
  487. LIBS="$save_LIBS"
  488. fi
  489. if test "x$screen_type" = "x"; then
  490. AC_WITH_SLANG
  491. fi
  492. dnl
  493. dnl The variables used for expanding the auto saver.
  494. dnl
  495. cons_saver=""
  496. install_saver="no"
  497. PAMLIBS=""
  498. case $host_os in
  499. linux*)
  500. cons_saver="cons.saver"
  501. install_saver="yes"
  502. dnl
  503. dnl On Linux, check for PAM authentication available
  504. dnl
  505. AC_CHECK_LIB(pam, pam_start, [
  506. AC_DEFINE(HAVE_PAM, 1,
  507. [Define if PAM (Pluggable Authentication Modules) is available])
  508. PAMLIBS="-lpam -ldl"
  509. ],[],[-ldl])
  510. ;;
  511. esac
  512. AC_SUBST(cons_saver)
  513. AC_SUBST(PAMLIBS)
  514. dnl
  515. dnl User visible support for charset conversion.
  516. dnl
  517. AC_ARG_ENABLE([charset],
  518. [ --enable-charset Support for charset selection and conversion [[no]]])
  519. have_charset=
  520. if test "x$enable_charset" = xyes; then
  521. if test "x$am_cv_func_iconv" != xyes; then
  522. AC_MSG_WARN([Cannot enable charset support because iconv function is missing])
  523. else
  524. AC_DEFINE(HAVE_CHARSET, 1,
  525. [Define to enable charset selection and conversion])
  526. have_charset=yes
  527. fi
  528. fi
  529. if test "$GLIBC21" != yes; then
  530. AC_DEFINE(USE_INCLUDED_REGEX, 1, [Use the regex included here])
  531. fi
  532. dnl
  533. dnl This code should be moved to the ac_WITH_SLANG
  534. dnl
  535. dnl We check for the existance of setupterm on curses library
  536. dnl this is required to load certain definitions on some termcaps
  537. dnl editions (AIX and OSF/1 I seem to remember).
  538. dnl Note that we avoid using setupterm
  539. if test "x$screen_type" = xslang; then
  540. case $host_os in
  541. linux*)
  542. ;;
  543. *)
  544. AC_CHECK_LIB(curses,setupterm,
  545. [AC_TRY_COMPILE([
  546. #include <curses.h>
  547. #include <term.h>],[
  548. if (key_end == parm_insert_line)
  549. return 1;
  550. return 0;
  551. ],
  552. [MCLIBS="$MCLIBS -lcurses"
  553. AC_DEFINE(USE_SETUPTERM, 1,
  554. [Define to use function `setupterm'
  555. from `curses' library in S-Lang])])
  556. ])
  557. esac
  558. fi
  559. LIBS="$LIBS $posix_libs"
  560. AC_SUBST(CFLAGS)
  561. AC_SUBST(CPPFLAGS)
  562. AC_SUBST(LDFLAGS)
  563. AC_SUBST(LIBS)
  564. dnl Libraries used only when building the mc binary
  565. AC_SUBST(MCLIBS)
  566. dnl Version for the RedHat package, without dashes
  567. RH_VERSION=`echo $VERSION | sed 's/-//'`
  568. AC_SUBST(RH_VERSION)
  569. if test -n "$use_smbfs"; then
  570. AC_CONFIG_SUBDIRS([vfs/samba])
  571. fi
  572. AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])
  573. AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes])
  574. AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue])
  575. AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$use_undelfs"])
  576. AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"])
  577. AM_CONDITIONAL(USE_MCFS, [test -n "$use_mcfs"])
  578. AM_CONDITIONAL(INCLUDED_SLANG,
  579. [test "x$slang_use_system_installed_lib" = xfalse])
  580. AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
  581. AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
  582. AH_BOTTOM([#include <extraconf.h>])
  583. AC_CONFIG_FILES([
  584. Makefile
  585. mc.spec
  586. doc/Makefile
  587. vfs/Makefile
  588. vfs/extfs/Makefile
  589. lib/Makefile
  590. src/Makefile
  591. slang/Makefile
  592. edit/Makefile
  593. syntax/Makefile
  594. pc/Makefile
  595. m4/Makefile
  596. lib/mc.ext
  597. lib/mc.sh
  598. lib/mc.csh
  599. vfs/extfs/deb
  600. vfs/extfs/ftplist
  601. vfs/extfs/lslR
  602. vfs/extfs/uar
  603. vfs/extfs/ucpio
  604. vfs/extfs/ulha
  605. vfs/extfs/uha
  606. vfs/extfs/urar
  607. vfs/extfs/uzoo
  608. doc/mc.1 doc/mcedit.1 doc/mcserv.8
  609. doc/es/mc.1 doc/es/Makefile
  610. doc/hu/Makefile
  611. doc/it/mc.1 doc/it/Makefile
  612. doc/pl/mc.1 doc/pl/Makefile
  613. doc/ru/mc.1 doc/ru/Makefile
  614. intl/Makefile
  615. po/Makefile.in
  616. ])
  617. AC_OUTPUT
  618. if test "x$screen_type" = xslang; then
  619. screen_manager="${screen_manager}${slang_term}"
  620. fi
  621. echo "
  622. Configuration:
  623. Source code location: ${srcdir}
  624. Compiler: ${CC}
  625. Compiler flags: ${CFLAGS}
  626. File system: ${vfs_type}
  627. ${vfs_flags}
  628. Screen manager: ${screen_manager}
  629. Install console saver: ${install_saver}
  630. Mouse support: ${mouse_lib}
  631. X11 events support: ${textmode_x11_support}
  632. With subshell support: ${subshell}
  633. Internal editor: ${EDIT_msg}
  634. Install path: ${prefix}/bin, ${prefix}/lib/mc
  635. "