configure.in 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  1. dnl
  2. dnl Configure.in file for the Midnight Commander
  3. dnl
  4. AC_INIT(create_vcs)
  5. AC_CONFIG_HEADER(config.h)
  6. PACKAGE=mc
  7. VERSION=4.5.2
  8. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  9. AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  10. AC_SUBST(VERSION)
  11. dnl This is path where we're looking for headers in addition to /usr/include
  12. dnl and whatever cpp defaults to.
  13. include_additional_path="/usr/local/include /opt/gnu/include"
  14. dnl This sets/resets compiling with -g by default. It should be set to yes for
  15. dnl development versions and set to no for release versions.
  16. use_cc_g_flag=yes
  17. dnl We want autoconf to check whether -g is available
  18. dnl We reset it back soon.
  19. CCOPTS="$CFLAGS"
  20. unset CFLAGS
  21. dnl Find out, if we should default to /usr/local or /usr
  22. AC_PREFIX_PROGRAM(mc)
  23. AC_PROG_MAKE_SET
  24. AC_PROG_CC
  25. AC_PROG_CPP
  26. AC_PROG_RANLIB
  27. AC_PROG_LN_S
  28. AC_PROG_AWK
  29. if test x"$AWK" = x; then
  30. AWK=":"
  31. AWK_VAR_OPTION=""
  32. dep=slowdep
  33. else
  34. dep=fastdep
  35. # test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4)
  36. if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then
  37. AWK_VAR_OPTION=""
  38. else
  39. AWK_VAR_OPTION="-v"
  40. fi
  41. fi
  42. AC_SUBST(AWK_VAR_OPTION)
  43. AC_SUBST(dep)
  44. AC_PROG_GNU_MAKE
  45. AC_AIX
  46. AC_MINIX
  47. AC_ISC_POSIX
  48. MC_HPUX_PROG_CC_STDC
  49. AC_HEADER_MAJOR
  50. AC_C_CONST
  51. AC_PATH_PROG(MV, mv, mv)
  52. AC_PATH_PROG(CP, cp, cp)
  53. AC_PATH_PROG(RM, rm, rm)
  54. AC_PATH_PROG(CHMOD, chmod, :)
  55. AC_PATH_PROG(AR, ar, ar)
  56. AC_CHECK_PROG(system,uname,`uname`,unknown)
  57. AC_CHECK_PROGS(X11_WWW,netscape arena Mosaic chimera)
  58. if test x"$X11_WWW" = x; then
  59. X11_WWW=lynx
  60. fi
  61. ALL_LINGUAS="es fr ru ko it de pl no"
  62. AM_GNU_GETTEXT
  63. AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
  64. dnl
  65. dnl This part supplies reasonable defaults for CFLAGS, if they weren't
  66. dnl specified by ''CFLAGS=flags ./configure''
  67. dnl
  68. cc_uses_g=yes
  69. if test x$GCC = xyes; then
  70. if test x$ac_cv_prog_gcc_g = xyes; then
  71. :
  72. else
  73. cc_uses_g=no
  74. fi
  75. fi
  76. dnl Debug mode is turned ON for now
  77. if test "x$CCOPTS" = x; then
  78. CCOPTS='-g'
  79. fi
  80. if test "x$CCOPTS" = x; then
  81. if test x$GCC = xyes; then
  82. if test x$system = xLinux; then
  83. CCOPTS='-O2 -fno-strength-reduce'
  84. if test x$use_cc_g_flag = xyes; then
  85. if test $cc_uses_g = yes; then
  86. CCOPTS='-g -O'
  87. fi
  88. fi
  89. else
  90. CCOPTS='-O'
  91. if test x$use_cc_g_flag = xyes; then
  92. if test $cc_uses_g = yes; then
  93. CCOPTS='-g -O'
  94. fi
  95. fi
  96. fi
  97. else
  98. if test x$use_cc_g_flag = xyes; then
  99. CCOPTS="$CFLAGS"
  100. else
  101. CCOPTS=
  102. fi
  103. fi
  104. fi
  105. CFLAGS="$CCOPTS"
  106. dnl
  107. dnl We now use glib
  108. dnl
  109. AM_PATH_GLIB
  110. LIBS="$LIBS $GLIB_LIBS"
  111. CFLAGS="$CFLAGS $GLIB_CFLAGS"
  112. dnl
  113. dnl For A/UX. Do not move
  114. dnl
  115. posix_libs=""
  116. if test $system = A/UX
  117. then
  118. posix_libs="-lposix"
  119. AC_DEFINE(_POSIX_SOURCE)
  120. fi
  121. AC_PROG_INSTALL
  122. AC_CHECK_HEADERS(unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h)
  123. AC_CHECK_HEADERS(stdlib.h termios.h)
  124. if test x$ac_cv_header_malloc_h = xno; then
  125. echo '/* NeXTStep malloc.h stub */' > $srcdir/malloc.h
  126. fi
  127. dnl (rx.h)
  128. AC_HEADER_SYS_WAIT
  129. AC_HEADER_DIRENT
  130. AC_SHORT_D_NAME_LEN
  131. AC_HEADER_STDC
  132. dnl
  133. dnl Let me check for an incompatible regcomp in HP-UX before making this
  134. dnl the default
  135. dnl
  136. dnl if test x$ac_cv_header_rx_h = xyes; then
  137. dnl AC_CHECK_FUNCS(regcomp)
  138. dnl if test x$ac_cv_func_regcomp = xyes; then
  139. dnl REGEX_O=""
  140. dnl fi
  141. dnl fi
  142. REGEX_O="regex.o"
  143. AC_SUBST(REGEX_O)
  144. dnl Missing structure components
  145. AC_STRUCT_ST_BLKSIZE
  146. AC_STRUCT_ST_BLOCKS
  147. AC_STRUCT_ST_RDEV
  148. dnl
  149. dnl Check availability of some functions
  150. dnl
  151. AC_CHECK_FUNCS(strerror statfs getwd strcasecmp strncasecmp)
  152. AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv)
  153. AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed)
  154. AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset)
  155. AC_CHECK_FUNCS(sysconf)
  156. SHADOWLIB=
  157. if test x$system = xLinux; then
  158. AC_CHECK_LIB(shadow,pw_encrypt,[
  159. shadow_header=no
  160. AC_CHECK_HEADERS(shadow.h)
  161. if test x$ac_cv_header_shadow_h = xyes; then
  162. shadow_header=yes
  163. else
  164. AC_CHECK_HEADERS(shadow/shadow.h)
  165. if test x$ac_cv_shadow_shadow_h = xyes; then
  166. shadow_header=yes
  167. fi
  168. fi
  169. if test $shadow_header = yes; then
  170. AC_DEFINE(LINUX_SHADOW)
  171. SHADOWLIB=-lshadow
  172. fi
  173. ])
  174. fi
  175. AC_SUBST(SHADOWLIB)
  176. NEED_CRYPT_PROTOTYPE=yes
  177. if test x$ac_cv_header_crypt_h = xyes; then
  178. AC_TRY_WARNINGS([#include <crypt.h>], [char *p = crypt("xxx", "yyy");],[
  179. NEED_CRYPT_PROTOTYPE=no])
  180. else
  181. if test x$ac_cv_header_unistd_h = xyes; then
  182. AC_TRY_WARNINGS([#include <unistd.h>], [char *p = crypt("xxx", "yyy");],[
  183. NEED_CRYPT_PROTOTYPE=no])
  184. fi
  185. fi
  186. if test x$NEED_CRYPT_PROTOTYPE=xyes; then
  187. AC_DEFINE(NEED_CRYPT_PROTOTYPE)
  188. fi
  189. dnl
  190. dnl AIX and Sequent need <sys/select.h> for fd_set
  191. dnl
  192. AC_CHECK_HEADERS(sys/select.h)
  193. dnl
  194. dnl On SCO and some SVR4, crypt is on libcrypt.a
  195. dnl grantpt in libpt.a
  196. dnl
  197. LCRYPT=""
  198. AC_CHECK_FUNCS(crypt, , [
  199. AC_CHECK_LIB(crypt, crypt, LCRYPT="-lcrypt",[
  200. AC_CHECK_LIB(crypt_i, crypt, LCRYPT="-lcrypt_i")])])
  201. AC_SUBST(LCRYPT)
  202. dnl This is the correct version
  203. dnl AC_CHECK_FUNCS(grantpt, , AC_CHECK_LIB(pt, grantpt))
  204. dnl
  205. dnl And workaround for a Autoconf 2.4 bug:
  206. AC_CHECK_FUNCS(grantpt)
  207. if test x$ac_cv_func_grantpt = xyes; then
  208. :
  209. else
  210. AC_CHECK_LIB(pt, grantpt)
  211. fi
  212. dnl
  213. dnl libintl.a required on SCO to provide proper NLS support
  214. dnl (using native cc links it by default)
  215. dnl
  216. if test x$GCC = xyes; then
  217. AC_CHECK_LIB(intl, tolower)
  218. fi
  219. dnl replacing lstat with statlstat on sco makes it more portable between
  220. dnl sco clones
  221. AC_CHECK_FUNCS(statlstat)
  222. dnl
  223. dnl If running under AIX, AC_AIX does not tell us that
  224. dnl
  225. AC_MSG_CHECKING(for AIX defines)
  226. AC_EGREP_CPP(yes,
  227. [#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
  228. yes
  229. #endif
  230. ], [
  231. AC_DEFINE(IS_AIX)
  232. AC_MSG_RESULT(yes)
  233. ], AC_MSG_RESULT(no))
  234. dnl
  235. dnl This hack is here until autoconf adds it
  236. dnl Needed for Unixware: getmntent is on libgen.a
  237. dnl
  238. AC_CHECK_LIB(gen, getmntent, [LIBS="-lgen $LIBS"])
  239. dnl
  240. dnl This is from GNU fileutils, check aclocal.m4 for more information
  241. dnl
  242. AC_GET_FS_INFO
  243. dnl
  244. dnl Missing typedefs and replacements
  245. dnl
  246. AC_TYPE_MODE_T
  247. AC_CHECK_TYPE(umode_t, int)
  248. AC_CHECK_TYPE(off_t, long)
  249. AC_TYPE_PID_T
  250. AC_TYPE_UID_T
  251. AC_CHECK_TYPE(nlink_t, unsigned int)
  252. AC_FUNC_MMAP
  253. AC_FUNC_ALLOCA
  254. dnl
  255. dnl Cool hack, but we don't use it currently
  256. dnl
  257. dnl AC_MSG_CHECKING(for token pasting method)
  258. dnl AC_EGREP_CPP(portable,[
  259. dnl #define tken(a, b) a##b
  260. dnl tken(port, able)
  261. dnl ], [AC_DEFINE(HAVE_PORTABLE_TOKEN_PASTING)
  262. dnl AC_MSG_RESULT(portable)
  263. dnl ], [
  264. dnl AC_MSG_RESULT(non-portable)
  265. dnl ])
  266. AC_PATH_XTRA
  267. dnl
  268. dnl Network related functions
  269. dnl
  270. AC_CHECK_LIB(nsl, t_accept)
  271. AC_CHECK_LIB(socket, socket)
  272. have_socket=no
  273. AC_CHECK_FUNCS(socket, have_socket=yes)
  274. if test $have_socket = no; then
  275. # socket is not in the default libraries. See if it's in some other.
  276. for lib in bsd socket inet; do
  277. AC_CHECK_LIB($lib, socket, [
  278. LIBS="$LIBS -l$lib"
  279. have_socket=yes
  280. AC_DEFINE(HAVE_SOCKET)
  281. break])
  282. done
  283. fi
  284. have_gethostbyname=no
  285. AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
  286. if test $have_gethostbyname = no; then
  287. # gethostbyname is not in the default libraries. See if it's in some other.
  288. for lib in bsd socket inet; do
  289. AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
  290. done
  291. fi
  292. AC_CHECK_FUNCS(socketpair)
  293. dnl
  294. dnl Sequent wants getprocessstats
  295. dnl
  296. AC_CHECK_LIB(seq, get_process_stats, [
  297. LIBS="$LIBS -lseq"
  298. AC_DEFINE(HAVE_GET_PROCESS_STATS)])
  299. GNOME_VFS_CHECKS
  300. NETFILES=
  301. if test $have_socket = yes; then
  302. NETFILES="\$(NETFILES)"
  303. fi
  304. AC_SUBST(NETFILES)
  305. screen_manager=unknown
  306. search_ncurses=false
  307. CFLAGS=${CFLAGS--O}
  308. LDFLAGS=${LDFLAGS--O}
  309. AC_DEFUN(AC_USE_SUNOS_CURSES, [
  310. search_ncurses=false
  311. screen_manager="SunOS 4.x /usr/5include curses"
  312. AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
  313. AC_DEFINE(USE_SUNOS_CURSES)
  314. AC_DEFINE(NO_COLOR_CURSES)
  315. AC_DEFINE(USE_SYSV_CURSES)
  316. CPPFLAGS="$CPPFLAGS -I/usr/5include"
  317. XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
  318. AC_MSG_RESULT(Please note that some screen refreshs may fail)
  319. AC_WARN(Reconsider using Slang)
  320. ])
  321. AC_DEFUN(AC_USE_OSF1_CURSES, [
  322. AC_MSG_RESULT(Using OSF1 curses)
  323. search_ncurses=false
  324. screen_manager="OSF1 curses"
  325. AC_DEFINE(NO_COLOR_CURSES)
  326. AC_DEFINE(USE_SYSV_CURSES)
  327. XCURSES="xcurses.o"
  328. LIBS="$LIBS -lcurses"
  329. ])
  330. AC_DEFUN(AC_USE_SYSV_CURSES, [
  331. AC_MSG_RESULT(Using SysV curses)
  332. AC_DEFINE(USE_SYSV_CURSES)
  333. XCURSES=""
  334. search_ncurses=false
  335. screen_manager="SysV/curses"
  336. LIBS="$LIBS -lcurses"
  337. ])
  338. XCURSES=""
  339. AC_SUBST(XCURSES)
  340. dnl AC_ARG_WITH(bsd-curses,
  341. dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy],
  342. dnl search_ncurses=false
  343. dnl screen_manager="Ultrix/cursesX"
  344. dnl if test $system = ULTRIX
  345. dnl then
  346. dnl THIS_CURSES=cursesX
  347. dnl else
  348. dnl THIS_CURSES=curses
  349. dnl fi
  350. dnl
  351. dnl LIBS="$LIBS -l$THIS_CURSES -ltermcap"
  352. dnl AC_DEFINE(USE_BSD_CURSES)
  353. dnl XCURSES="xcurses.o"
  354. dnl AC_MSG_RESULT(Please note that some screen refreshs may fail)
  355. dnl AC_WARN(Use of the bsdcurses extension has some)
  356. dnl AC_WARN(display/input problems.)
  357. dnl AC_WARN(Reconsider using xcurses)
  358. dnl)
  359. AC_ARG_WITH(sco,
  360. [--with-sco Use this to turn on SCO-specific code],[
  361. if test x$withval = xyes; then
  362. AC_DEFINE(SCO_FLAVOR)
  363. CFLAGS="$CFLAGS -D_SVID3"
  364. fi
  365. ])
  366. AC_ARG_WITH(sunos-curses,
  367. [--with-sunos-curses Used to force SunOS 4.x curses],[
  368. if test x$withval = xyes; then
  369. AC_USE_SUNOS_CURSES
  370. fi
  371. ])
  372. AC_ARG_WITH(osf1-curses,
  373. [--with-osf1-curses Used to force OSF/1 curses],[
  374. if test x$withval = xyes; then
  375. AC_USE_OSF1_CURSES
  376. fi
  377. ])
  378. AC_ARG_WITH(vcurses,
  379. [--with-vcurses[=incdir] Used to force SysV curses],
  380. if test x$withval = xyes; then
  381. CPPFLAGS="$CPPFLAGS"
  382. else
  383. CPPFLAGS="$CPPFLAGS -I$withval"
  384. fi
  385. AC_USE_SYSV_CURSES
  386. )
  387. mouse_lib="xterm only"
  388. LGPM=""
  389. AC_ARG_WITH(gpm-mouse,
  390. [--with-gpm-mouse[=base-dir] Compile with gpm mouse support],[
  391. if test x$withval != xno
  392. then
  393. if test x$withval != xyes
  394. then
  395. LIBS="$LIBS -L$withval/lib"
  396. CPPFLAGS="$CPPFLAGS -I$withval/include"
  397. fi
  398. AC_DEFINE(HAVE_LIBGPM)
  399. mouse_lib="GPM and xterm"
  400. LGPM="-lgpm"
  401. fi
  402. ],[
  403. AC_CHECK_LIB(gpm, Gpm_Repeat,[
  404. AC_DEFINE(HAVE_LIBGPM)
  405. mouse_lib="GPM and xterm"
  406. LGPM="-lgpm"],[
  407. if test $system = Linux
  408. then
  409. AC_MSG_WARN("libgpm.a is missing or older than 0.18")
  410. fi
  411. ], $LIBS)
  412. ]
  413. )
  414. AC_SUBST(LGPM)
  415. AC_ARG_WITH(ncurses,
  416. [--with-ncurses[=base-dir] Compile with ncurses/locate base dir],
  417. if test x$withval = xyes
  418. then
  419. search_ncurses=true
  420. else
  421. LIBS="$LIBS -L$withval/lib -lncurses"
  422. CPPFLAGS="$CPPFLAGS -I$withval/include"
  423. search_ncurses=false
  424. screen_manager="ncurses"
  425. AC_DEFINE(USE_NCURSES)
  426. fi
  427. )
  428. AC_ARG_WITH(hsc,
  429. [--with-hsc Compile with support for the HSC firewall],
  430. if test x$withval = xyes; then
  431. AC_DEFINE(HSC_PROXY)
  432. fi
  433. )
  434. dnl
  435. dnl Check for Gnome
  436. dnl
  437. gmc=""
  438. gmcdep=""
  439. libgtkedit=""
  440. AC_SUBST(insticons)
  441. GNOME_INIT_HOOK([
  442. gmc=gmc
  443. gmcdep=gmcdep
  444. libgtkedit="libgtkedit.a"
  445. insticons=install_icons
  446. if test x"$xvers" = xnone; then
  447. xvers="Gnome"
  448. else
  449. xvers="Gnome+$xvers"
  450. fi
  451. ])
  452. AC_SUBST(gmc)
  453. AC_SUBST(gmcdep)
  454. AC_SUBST(libgtkedit)
  455. AC_SUBST(GNOMEGNORBA_LIBS)
  456. dnl
  457. dnl Check for the -mandoc package
  458. dnl
  459. AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
  460. if $HAVE_nroff; then
  461. AC_MSG_CHECKING(for manual formatting macros)
  462. AC_CACHE_VAL(ac_cv_mandoc, [
  463. nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null
  464. if test $? = 0
  465. then
  466. ac_cv_mandoc=-mandoc
  467. else
  468. ac_cv_mandoc=-man
  469. fi
  470. ])
  471. MANDOC=$ac_cv_mandoc
  472. AC_MSG_RESULT($MANDOC)
  473. else
  474. MANDOC=-man
  475. fi
  476. AC_SUBST(MANDOC)
  477. dnl
  478. dnl Check if nroff accepts -Tascii
  479. dnl
  480. if $HAVE_nroff; then
  481. AC_MSG_CHECKING(If nroff accepts -Tascii)
  482. AC_CACHE_VAL(ac_cv_nroff_tascii, [
  483. nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
  484. if test $? = 0
  485. then
  486. ac_cv_nroff_tascii=" -Tascii"
  487. AC_MSG_RESULT(yes)
  488. else
  489. ac_cv_nroff_tascii=""
  490. AC_MSG_RESULT(no)
  491. fi
  492. ])
  493. fi
  494. TROFFASCII="$ac_cv_nroff_tascii"
  495. AC_SUBST(TROFFASCII)
  496. dnl
  497. dnl Check for - option to file
  498. dnl
  499. AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
  500. if $HAVE_FILECMD; then
  501. AC_MSG_CHECKING(for - option to file command)
  502. AC_CACHE_VAL(ac_cv_filestdin, [
  503. cat > conftest.c <<EOF
  504. /* A comment */
  505. #if 0
  506. #endif
  507. void main(void)
  508. { return; }
  509. EOF
  510. changequote(, )
  511. cat > conftest.sed <<EOF
  512. s/^[^:]*:[\ \ ]*//
  513. s/[\ \ ]*$//
  514. EOF
  515. filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
  516. filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
  517. if test "$filehyphen_1" = "$filehyphen_2"; then
  518. ac_cv_filestdin=yes
  519. else
  520. ac_cv_filestdin=no
  521. fi
  522. changequote([, ])
  523. rm conftest.c conftest.sed
  524. unset filehyphen_1
  525. unset filehyphen_2
  526. ])
  527. if test x$ac_cv_filestdin = xyes; then
  528. AC_DEFINE(FILE_STDIN)
  529. fi
  530. filestdin=$ac_cv_filestdin
  531. AC_MSG_RESULT($filestdin)
  532. dnl
  533. dnl Check for -L option to file
  534. dnl
  535. AC_MSG_CHECKING(for -L option to file command)
  536. AC_CACHE_VAL(ac_cv_filel, [
  537. file -L . > /dev/null 2>&1
  538. if test $? = 0
  539. then
  540. ac_cv_filel=yes
  541. else
  542. ac_cv_filel=no
  543. fi
  544. ])
  545. if test x$ac_cv_filel = xyes; then
  546. AC_DEFINE(FILE_L)
  547. fi
  548. filel=$ac_cv_filel
  549. AC_MSG_RESULT($filel)
  550. fi
  551. dnl
  552. dnl Check to see if grep program allowes dash to denote stdin
  553. dnl
  554. AC_MSG_CHECKING(for - option to grep command)
  555. AC_CACHE_VAL(ac_cv_grep_stdin, [
  556. grep ac_cv_grep_stdin - > /dev/null 2>&1 < ./configure
  557. if test $? = 0; then
  558. ac_cv_grep_stdin=yes
  559. else
  560. ac_cv_grep_stdin=no
  561. fi
  562. ])
  563. if test x$ac_cv_grep_stdin = xyes; then
  564. AC_DEFINE(GREP_STDIN)
  565. fi
  566. AC_MSG_RESULT($ac_cv_grep_stdin)
  567. dnl
  568. dnl HAVE_DUSUM is on by default, only if you have a strange du, you can
  569. dnl turn it off by --without-dusum
  570. dnl
  571. have_dusum=yes
  572. AC_MSG_CHECKING(for du arguments)
  573. AC_ARG_WITH(dusum,
  574. [--with-dusum Support the du -s summaries],[
  575. if test x$withval = xno; then
  576. have_dusum=no
  577. fi
  578. ])
  579. if test x$have_dusum = xyes; then
  580. AC_DEFINE(HAVE_DUSUM)
  581. AC_CACHE_VAL(ac_cv_dusum, [
  582. du -s -b $srcdir/configure >/dev/null 2>&1
  583. if test $? = 0; then
  584. ac_cv_dusum='dusum_useb=yes; dusum_factor=1'
  585. else
  586. ac_cv_dusum='dusum_useb=; dusum_factor=512'
  587. fi
  588. ])
  589. eval "$ac_cv_dusum"
  590. if test x$dusum_useb = xyes; then
  591. AC_DEFINE(DUSUM_USEB)
  592. AC_MSG_RESULT(-b)
  593. else
  594. AC_MSG_RESULT(block size $dusum_factor)
  595. fi
  596. AC_DEFINE_UNQUOTED(DUSUM_FACTOR, $dusum_factor)
  597. fi
  598. dnl
  599. dnl The termnet support
  600. dnl
  601. termnet=false
  602. AC_ARG_WITH(termnet,
  603. [--with-termnet If you want a termified net support],[
  604. if test x$withval = xyes; then
  605. AC_DEFINE(USE_TERMNET)
  606. termnet=true
  607. fi
  608. ])
  609. dnl
  610. dnl The subshell support
  611. dnl
  612. AC_MSG_CHECKING(for subshell support)
  613. AC_ARG_WITH(subshell,
  614. [--with-subshell If you want to use a concurrent shell],
  615. result=no
  616. if test x$withval = xoptional
  617. then
  618. AC_DEFINE(SUBSHELL_OPTIONAL)
  619. AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
  620. result="optional"
  621. fi
  622. if test x$withval = xyes
  623. then
  624. AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
  625. result="yes"
  626. fi,
  627. dnl Default: provide the subshell support on non-ultrix machines
  628. if test $system = ULTRIX
  629. then
  630. result=no
  631. else
  632. AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
  633. result=yes
  634. fi
  635. )
  636. AC_MSG_RESULT($result)
  637. subshell="$result"
  638. dnl
  639. dnl Check for GCC
  640. dnl
  641. if test x$GCC = x
  642. then
  643. AC_DEFINE(OLD_TOOLS)
  644. CPPFLAGS="$CPPFLAGS"
  645. fi
  646. dnl
  647. dnl This option is only inteded for being used by me :-)
  648. dnl It has some nasty hacks built in.
  649. dnl
  650. mem_debug="none"
  651. AC_ARG_WITH(debug,
  652. [--with-debug For use by developers only: activates -Wall and MAD],
  653. [if test x$withval = xyes; then
  654. CFLAGS="$CFLAGS -Wall"
  655. mem_debug="Janne's MAD library"
  656. AC_DEFINE(HAVE_MAD)
  657. AC_DEFINE(MCDEBUG)
  658. if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
  659. then
  660. CFLAGS="$CFLAGS -Wno-implicit"
  661. fi
  662. if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
  663. :
  664. else
  665. if test $cc_uses_g = yes; then
  666. CFLAGS="$CFLAGS -g"
  667. fi
  668. fi
  669. AC_MSG_RESULT(compiling with -Wall and the memory leak detector)
  670. fi])
  671. dnl
  672. dnl This option is only inteded for being used by me :-)
  673. dnl It has some nasty hacks built in.
  674. dnl
  675. AC_ARG_WITH(efence,
  676. [--with-efence Developers only: activates -Wall and efence],
  677. [if test x$withval = xyes; then
  678. CFLAGS="$CFLAGS -Wall"
  679. AC_DEFINE(MCDEBUG)
  680. LIBS="$LIBS -lefence"
  681. if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
  682. then
  683. CFLAGS="$CFLAGS -Wno-implicit"
  684. fi
  685. if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
  686. :
  687. else
  688. if test $cc_uses_g = yes; then
  689. CFLAGS="$CFLAGS -g"
  690. fi
  691. fi
  692. AC_MSG_RESULT(compiling with -Wall and Electric fence)
  693. mem_debug="Electric Fence"
  694. fi])
  695. INTLSUB=""
  696. LINTL=""
  697. if test x$USE_NLS = xyes; then
  698. if test x$USE_INCLUDED_LIBINTL = xyes; then
  699. CPPFLAGS="$CPPFLAGS -I\$(builddir)/intl"
  700. LINTL="-L\$(builddir)/intl -lintl"
  701. fi
  702. INTLSUB=intl
  703. fi
  704. AC_SUBST(INTLSUB)
  705. AC_SUBST(LINTL)
  706. dnl
  707. dnl To force mmap support
  708. dnl We use only part of the functionality of mmap, so on AIX,
  709. dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
  710. dnl
  711. AC_ARG_WITH(mmap,
  712. [--with-mmap To force using the mmap call (AIX)],
  713. [if test x$withval = xyes; then
  714. AC_DEFINE(HAVE_MMAP)
  715. AC_MSG_RESULT(forcing MMAP support)
  716. fi])
  717. AC_DEFUN(AC_USE_TERMINFO,
  718. AC_DEFINE(SLANG_TERMINFO)
  719. AC_MSG_RESULT(Using SLang screen manager/terminfo)
  720. slang_term=" with terminfo"
  721. )
  722. AC_DEFUN(AC_USE_TERMCAP,
  723. AC_MSG_RESULT(Using SLang screen manager/termcap)
  724. AC_DEFINE(USE_TERMCAP)
  725. dnl Check with $LIBS at the end so that it works with ELF libs.
  726. AC_CHECK_LIB(termcap, tgoto, LIBS="$LIBS -ltermcap", , $LIBS)
  727. slang_term=" with termcap"
  728. )
  729. slang_check_lib=true
  730. slang_term=""
  731. slang_use_system_installed_lib=false
  732. AC_CHECK_LIB(slang,SLang_init_tty,
  733. AC_CHECK_HEADERS(slang.h)
  734. if test x$ac_cv_header_slang_h = xyes
  735. then
  736. slang_use_system_installed_lib=true
  737. slang_check_lib=false
  738. else
  739. AC_CHECK_HEADERS(slang/slang.h)
  740. if test x$ac_cv_header_slang_slang_h = xyes
  741. then
  742. slang_use_system_installed_lib=true
  743. slang_check_lib=false
  744. AC_DEFINE(SLANG_H_INSIDE_SLANG_DIR)
  745. fi
  746. fi
  747. )
  748. AC_ARG_WITH(terminfo,
  749. [--with-terminfo SLANG: Force usage of terminfo],[
  750. AC_USE_TERMINFO
  751. slang_check_lib=false
  752. slang_use_system_installed_lib=false
  753. ]
  754. )
  755. AC_ARG_WITH(termcap,
  756. [--with-termcap SLANG: Force usage of termcap],[
  757. AC_USE_TERMCAP
  758. slang_check_lib=false
  759. slang_use_system_installed_lib=false
  760. ]
  761. )
  762. AC_ARG_WITH(included-slang,
  763. [--with-included-slang SLANG: use the SLang library included here],[
  764. slang_use_system_installed_lib=false
  765. slang_check_lib=true
  766. ]
  767. )
  768. AC_DEFUN(AC_WITH_SLANG,
  769. AC_DEFINE(HAVE_SLANG)
  770. search_ncurses=false
  771. if $slang_use_system_installed_lib
  772. then
  773. AC_DEFINE(HAVE_SYSTEM_SLANG)
  774. LSLANG="-lslang"
  775. screen_manager="SLang (using system-installed library)"
  776. AC_MSG_RESULT(Using system installed SLang library)
  777. else
  778. MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)"
  779. LIBSLANG="libmcslang.a"
  780. screen_manager="SLang"
  781. LSLANG="-lmcslang"
  782. fastdepslang=fastdepslang
  783. fi
  784. if $slang_check_lib
  785. then
  786. use_terminfo=false
  787. if test -d /usr/lib/terminfo; then
  788. use_terminfo=true;
  789. fi
  790. if test -d /usr/share/lib/terminfo; then
  791. use_terminfo=true;
  792. fi
  793. if test -d /usr/local/lib/terminfo; then
  794. use_terminfo=true;
  795. fi
  796. if test -d /lib/terminfo; then
  797. use_terminfo=true;
  798. fi
  799. if test -d /usr/local/share/terminfo; then
  800. use_terminfo=true;
  801. fi
  802. if test -d /usr/share/terminfo; then
  803. use_terminfo=true;
  804. fi
  805. if $use_terminfo; then
  806. AC_USE_TERMINFO
  807. else
  808. AC_USE_TERMCAP
  809. fi
  810. fi
  811. )
  812. LIBSLANG=""
  813. LSLANG=""
  814. fastdepslang=""
  815. AC_ARG_WITH(slang,
  816. [--with-slang Compile with the slang screen manager],[
  817. if test x$withval = xyes; then
  818. AC_WITH_SLANG
  819. fi
  820. ])
  821. AC_SUBST(LIBSLANG)
  822. AC_SUBST(LSLANG)
  823. AC_SUBST(fastdepslang)
  824. TERMNET=""
  825. AC_DEFUN(AC_WITH_VFS, [
  826. AC_DEFINE(USE_VFS)
  827. if $use_net_code; then
  828. AC_DEFINE(USE_NETCODE)
  829. fi
  830. LIBVFS="libvfs-mc.a"
  831. LVFS="-lvfs-mc"
  832. fastdepvfs=fastdepvfs
  833. MCCPPFLAGS="$MCCPPFLAGS -I\$(vfsdir)"
  834. AC_MSG_RESULT(Using the VFS switch code)
  835. vfs_type="Midnight Commander Virtual File System"
  836. ])
  837. AC_SUBST(TERMNET)
  838. LIBVFS=""
  839. LVFS=""
  840. fastdepvfs=""
  841. vfs_type="normal"
  842. AC_ARG_WITH(vfs,
  843. [--with-vfs Compile with the VFS code],
  844. if test x$withval = xyes
  845. then
  846. AC_WITH_VFS
  847. else
  848. vfs_flags=""
  849. TERMNET=""
  850. mcserv=""
  851. fi,
  852. dnl Default: provide the VFS code
  853. AC_WITH_VFS
  854. )
  855. AC_SUBST(LIBVFS)
  856. AC_SUBST(LVFS)
  857. AC_SUBST(fastdepvfs)
  858. AC_DEFUN(AC_WITH_EDIT, [
  859. AC_DEFINE(USE_INTERNAL_EDIT)
  860. LIBEDIT_A="libedit.a"
  861. MCEDIT="mcedit"
  862. LEDIT="-ledit"
  863. CPPFLAGS="$CPPFLAGS -I\$(rootdir)"
  864. EDIT_msg="yes"
  865. AC_MSG_RESULT(will call internal editor)
  866. ])
  867. LIBEDIT_A=""
  868. MCEDIT=""
  869. LEDIT=""
  870. EDIT_msg=""
  871. AC_ARG_WITH(edit,
  872. [--with-edit Define INTERNAL_EDIT],
  873. if test x$withval = xyes
  874. then
  875. AC_WITH_EDIT
  876. else
  877. EDIT_msg="no"
  878. fi,
  879. dnl Default: provide the internal editor
  880. AC_WITH_EDIT
  881. )
  882. AC_SUBST(LIBEDIT_A)
  883. AC_SUBST(MCEDIT)
  884. AC_SUBST(LEDIT)
  885. AC_ARG_WITH(netrc,
  886. [--with-netrc Compile with ftp .netrc support],[
  887. AC_DEFINE(USE_NETRC)
  888. AC_MSG_RESULT(ftpfs will have .netrc parsing code)
  889. ])
  890. undelfs_o=""
  891. AC_DEFUN(AC_EXT2_UNDEL, [
  892. GNOME_UNDELFS_CHECKS
  893. if test "$ext2fs_undel" = yes; then
  894. AC_MSG_RESULT(With ext2fs file recovery code)
  895. vfs_flags="${vfs_flags} undelfs"
  896. undelfs_o="undelfs.o"
  897. LIBS="$LIBS $EXT2FS_UNDEL_LIBS"
  898. else
  899. AC_MSG_WARN(No ext2fs file recovery code)
  900. fi
  901. ])
  902. AC_ARG_WITH(ext2undel,
  903. [--with-ext2undel Compile with ext2 undelete code],[
  904. if test x$withval != xno;
  905. then
  906. if test x$withval != xyes
  907. then
  908. LIBS="$LIBS -L$withval/lib"
  909. CPPFLAGS="$CPPFLAGS -I$withval/include"
  910. fi
  911. AC_EXT2_UNDEL
  912. fi],
  913. dnl Default: detect
  914. AC_CHECK_LIB(ext2fs, ext2fs_close, AC_EXT2_UNDEL,,-lcom_err)
  915. )
  916. AC_SUBST(undelfs_o)
  917. dnl
  918. dnl Parameters: directory filename LIBS_append CPPFLAGS_append nicename
  919. dnl
  920. AC_DEFUN(AC_NCURSES, [
  921. if $search_ncurses
  922. then
  923. if test -f $1/$2
  924. then
  925. AC_MSG_RESULT(Found ncurses on $1/$2)
  926. LIBS="$LIBS $3"
  927. CPPFLAGS="$CPPFLAGS $4"
  928. search_ncurses=false
  929. screen_manager=$5
  930. AC_DEFINE(USE_NCURSES)
  931. fi
  932. fi
  933. ])
  934. if $search_ncurses
  935. then
  936. AC_CHECKING("location of ncurses.h file")
  937. AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
  938. AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
  939. AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
  940. AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
  941. AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
  942. AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
  943. dnl
  944. dnl We couldn't find ncurses, try SysV curses
  945. dnl
  946. if $search_ncurses
  947. then
  948. AC_EGREP_HEADER(init_color, /usr/include/curses.h,
  949. AC_USE_SYSV_CURSES)
  950. AC_EGREP_CPP(USE_NCURSES,[
  951. #include <curses.h>
  952. #ifdef __NCURSES_H
  953. #undef USE_NCURSES
  954. USE_NCURSES
  955. #endif
  956. ],[
  957. CPPFLAGS="$CPPFLAGS -DRENAMED_NCURSES"
  958. AC_DEFINE(USE_NCURSES)
  959. search_ncurses=false
  960. screen_manager="ncurses installed as curses"
  961. ])
  962. fi
  963. dnl
  964. dnl Try SunOS 4.x /usr/5{lib,include} ncurses
  965. dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
  966. dnl should be replaced by a more fine grained selection routine
  967. dnl
  968. if $search_ncurses
  969. then
  970. if test -f /usr/5include/curses.h
  971. then
  972. AC_USE_SUNOS_CURSES
  973. fi
  974. else
  975. # check for ncurses version, to properly ifdef mouse-fix
  976. AC_MSG_CHECKING(for ncurses version)
  977. ncurses_version=unknown
  978. cat > conftest.$ac_ext <<EOF
  979. [#]line __oline__ "configure"
  980. #include "confdefs.h"
  981. #ifdef RENAMED_NCURSES
  982. #include <curses.h>
  983. #else
  984. #include <ncurses.h>
  985. #endif
  986. #undef VERSION
  987. VERSION:NCURSES_VERSION
  988. EOF
  989. if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
  990. egrep "VERSION:" >conftest.out 2>&1; then
  991. changequote(,)dnl
  992. ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'`
  993. changequote([,])dnl
  994. fi
  995. rm -rf conftext*
  996. AC_MSG_RESULT($ncurses_version)
  997. case "$ncurses_version" in
  998. changequote(,)dnl
  999. 4.[01])
  1000. changequote([,])dnl
  1001. AC_DEFINE(NCURSES_970530,2)
  1002. ;;
  1003. 1.9.9g)
  1004. AC_DEFINE(NCURSES_970530,1)
  1005. ;;
  1006. 1*)
  1007. AC_DEFINE(NCURSES_970530,0)
  1008. ;;
  1009. esac
  1010. fi
  1011. fi
  1012. AC_CHECK_FUNCS(resizeterm keyok)
  1013. if test "x$screen_manager" = "xunknown"; then
  1014. AC_WITH_SLANG
  1015. fi
  1016. dnl
  1017. dnl The variables used for expanding the auto saver.
  1018. dnl
  1019. saver=""
  1020. saver_target=""
  1021. vcs=""
  1022. install_saver="no"
  1023. PAMLIBS=""
  1024. if test $system = Linux
  1025. then
  1026. saver="install.saver"
  1027. saver_target="cons.saver"
  1028. vcs="install.create_vcs"
  1029. install_saver="yes"
  1030. dnl
  1031. dnl On Linux, check for PAM authentication available
  1032. dnl
  1033. AC_CHECK_LIB(pam, pam_start, [
  1034. AC_DEFINE(HAVE_PAM)
  1035. PAMLIBS="-lpam -ldl"
  1036. ],[],[-ldl])
  1037. fi
  1038. AC_SUBST(saver_target)
  1039. AC_SUBST(saver)
  1040. AC_SUBST(vcs)
  1041. AC_SUBST(PAMLIBS)
  1042. dnl
  1043. dnl We need sed in order to fix the library files
  1044. dnl
  1045. SEDCMD="sed 's/-man/$MANDOC/'"
  1046. SEDCMD2="sed 's%@prefix@%\$(prefix)%'"
  1047. AC_SUBST(SEDCMD)
  1048. AC_SUBST(SEDCMD2)
  1049. if test x$no_xview = xyes; then
  1050. :
  1051. else
  1052. AC_LIB_XPM
  1053. if test x$ac_cv_has_xpm = xyes; then
  1054. XPM_LIB=-lXpm
  1055. AC_SUBST(XPM_LIB)
  1056. AC_X_SHAPE_EXTENSION
  1057. if test x$ac_cv_has_shape = xyes; then
  1058. AC_DEFINE(HAVE_XPM_SHAPE)
  1059. XEXT_LIB=-lXext
  1060. AC_SUBST(XEXT_LIB)
  1061. fi
  1062. fi
  1063. fi
  1064. dnl
  1065. dnl This code should be moved to the ac_WITH_SLANG
  1066. dnl
  1067. dnl We check for the existance of setupterm on curses library
  1068. dnl this is required to load certain definitions on some termcaps
  1069. dnl editions (AIX and OSF/1 I seem to remember).
  1070. dnl Note that we avoid using setupterm
  1071. case $screen_manager in
  1072. changequote(,)dnl
  1073. [Ss][Ll][Aa][Nn][Gg]*)
  1074. changequote([, ])dnl
  1075. if test $system = Linux
  1076. then
  1077. echo
  1078. else
  1079. AC_CHECK_LIB(curses,setupterm,[
  1080. AC_TRY_COMPILE([
  1081. #include <curses.h>
  1082. #include <term.h>],[
  1083. if (key_end == parm_insert_line)
  1084. return 1;
  1085. return 0;
  1086. ],[
  1087. LIBS="$LIBS -lcurses"
  1088. AC_DEFINE(USE_SETUPTERM)])])
  1089. fi
  1090. ;;
  1091. esac
  1092. LIBS="$LIBS $posix_libs"
  1093. CPPFLAGS="-I.. $CPPFLAGS"
  1094. AC_SUBST(CFLAGS)
  1095. AC_SUBST(CPPFLAGS)
  1096. AC_SUBST(MCCPPFLAGS)
  1097. AC_SUBST(LDFLAGS)
  1098. AC_SUBST(LIBS)
  1099. ac_cv_make_with_percent_rules=no
  1100. if test x$ac_cv_prog_gnu_make = xyes; then
  1101. MCFG='include ../Make.common'
  1102. MCFGR='include ./Make.common'
  1103. MCF=/dev/null
  1104. PHONY='.PHONY:'
  1105. DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \
  1106. include .depend \
  1107. endif'
  1108. WRITEDEP=":"
  1109. ac_cv_make_with_percent_rules=yes
  1110. else
  1111. MCFG=""
  1112. MCFGR=""
  1113. MCF=./Make.common
  1114. PHONY='#'
  1115. DOTDEPEND=""
  1116. WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend'
  1117. fi
  1118. AC_SUBST(PHONY)
  1119. AC_SUBST(WRITEDEP)
  1120. AC_SUBST(MCFG)
  1121. AC_SUBST(MCFGR)
  1122. AC_SUBST(DOTDEPEND)
  1123. AC_SUBST_FILE(MCF)
  1124. if test x$ac_cv_make_with_percent_rules = xyes; then
  1125. PCENTRULE=""
  1126. else
  1127. PCENTRULE="#"
  1128. fi
  1129. AC_SUBST(PCENTRULE)
  1130. AC_SUBST(builddir)
  1131. builddir=`pwd`
  1132. dnl
  1133. dnl Output configuration filesn
  1134. dnl
  1135. AC_OUTPUT([
  1136. Make.common
  1137. Makefile
  1138. VERSION
  1139. doc/Makefile
  1140. vfs/Makefile:vfs/Make-mc.in
  1141. lib/Makefile
  1142. gnome/Makefile
  1143. idl/Makefile
  1144. src/Makefile
  1145. slang/Makefile
  1146. edit/Makefile
  1147. gtkedit/Makefile
  1148. new_icons/Makefile
  1149. lib/mc.ext
  1150. lib/mc-gnome.ext
  1151. mcfn_install
  1152. vfs/extfs/ftplist vfs/extfs/uzip vfs/extfs/uzoo vfs/extfs/lslR
  1153. vfs/extfs/ulha vfs/extfs/ucpio vfs/extfs/deb vfs/extfs/urar vfs/extfs/uar
  1154. doc/mc.1 doc/mcedit.1 doc/mcserv.8
  1155. intl/Makefile po/Makefile.in
  1156. ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
  1157. if test x$srcdir != x; then
  1158. if test $srcdir != .; then
  1159. cp $srcdir/VERSION VERSION
  1160. mkdir nt
  1161. mkdir os2
  1162. cp $srcdir/nt/Makefile nt/Makefile
  1163. cp $srcdir/os2/Makefile os2/Makefile
  1164. fi
  1165. fi
  1166. if test "x$screen_manager" = xSLang; then
  1167. screen_manager="${screen_manager}${slang_term}"
  1168. fi
  1169. echo "
  1170. Configuration:
  1171. Source code location: ${srcdir}
  1172. Compiler: ${CC}
  1173. Compiler flags: ${CFLAGS}
  1174. File system: ${vfs_type}
  1175. ${vfs_flags}
  1176. Text mode screen manager: ${screen_manager}
  1177. Install console saver: ${install_saver}
  1178. Text mode mouse library: ${mouse_lib}
  1179. Debugger code: ${mem_debug}
  1180. With subshell support: ${subshell}
  1181. X11 versions: ${xvers}
  1182. Internal editor: ${EDIT_msg}
  1183. Install path: ${prefix}/bin, ${prefix}/lib/mc"
  1184. if test -n "$xv_bindir"; then
  1185. echo " XView version install path: ${xv_bindir}"
  1186. fi
  1187. echo ""