home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / configure.in < prev    next >
Encoding:
Text File  |  1995-07-10  |  19.7 KB  |  699 lines

  1.  
  2. dnl ###########################################################################
  3. dnl #                                          #
  4. dnl #            Autoconf input file for GNU Interactive Tools 4.3.7          #
  5. dnl #      Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.      #
  6. dnl #                                          #
  7. dnl ###########################################################################
  8.  
  9.  
  10. dnl #################################
  11. dnl # Initializing autoconf stuff.  #
  12. dnl #################################
  13.  
  14. AC_REVISION($Revision: 4.3.7 $)
  15. AC_INIT(src/git.c)
  16. AC_CONFIG_HEADER(config.h)
  17. AC_PREREQ(2.1)
  18.  
  19.  
  20. dnl ###################
  21. dnl # The message...  #
  22. dnl ###################
  23.  
  24. echo
  25. echo
  26. echo "                 ###########################################"
  27. echo "                 # Configuring GNU Interactive Tools 4.3.7 #"
  28. echo "                 ###########################################"
  29. echo
  30. echo
  31. echo "     ******************************************************************"
  32. echo "     *     WARNING: some old losing shells fail to run './configure', *"
  33. echo "     * trying to execute configure itself.  You can prevent  this  by *"
  34. echo "     * running 'sh configure'.  The configure script will be executed *"
  35. echo "     * by /bin/sh.                                                    *"
  36. echo "     ******************************************************************"
  37. echo
  38. echo
  39. echo "     ******************************************************************"
  40. echo "     *     If you find bugs in this software or in  the  installation *"
  41. echo "     * procedure please send a description to tudor@chang.pub.ro.     *"
  42. echo "     ******************************************************************"
  43. echo
  44. echo
  45.  
  46. echo "5 seconds delay..."
  47. sleep 5
  48. echo
  49.  
  50.  
  51. dnl ################################################
  52. dnl # Set up the product name and version number.  #
  53. dnl ################################################
  54.  
  55. PRODUCT="GNU Interactive Tools"
  56. VERSION="4.3.7"
  57.  
  58.  
  59. dnl ################################################
  60. dnl # Chack for a BSD compatible install program.  #
  61. dnl ################################################
  62.  
  63. AC_PROG_INSTALL
  64.  
  65. dnl #########################################
  66. dnl # Check for the canonical system name.  #
  67. dnl #########################################
  68.  
  69. AC_CANONICAL_HOST
  70.  
  71. HOST=$host
  72.  
  73.  
  74. dnl ###################################################################
  75. dnl # Checking the system type. We are especially looking for Linux.  #
  76. dnl ###################################################################
  77.  
  78. if test "$host_os" = "linux"; then
  79.     AC_DEFINE(HAVE_LINUX)
  80. else
  81.     if test `echo "$host_os" | cut -c1-4` = "hpux"; then
  82.     AC_DEFINE(HAVE_HPUX)
  83.     fi
  84. fi
  85.  
  86.  
  87. dnl #############################
  88. dnl # Checking the C compiler.  #
  89. dnl #############################
  90.  
  91. AC_PROG_CC
  92.  
  93.  
  94. dnl #######################################################################
  95. dnl # Checking the hardware type.  If this is a i486 and we are using the #
  96. dnl # GNU C compiler, perform i486 specific optimizations.                #
  97. dnl #######################################################################
  98.  
  99. if test "$CC" = "gcc"; then
  100.     AC_DEFINE(HAVE_GCC)
  101.     CFLAGS="$CFLAGS -Wall";
  102. fi
  103.  
  104.  
  105. dnl ########################################################################
  106. dnl # Checking for some UNIX variants.  These ones need special treatement #
  107. dnl # due to exceptional oddities in their header files or libraries.       #
  108. dnl ########################################################################
  109.  
  110. AC_AIX
  111. AC_ISC_POSIX
  112. AC_MINIX
  113. AC_CHECK_LIB(sun, getpwnam)
  114.  
  115.  
  116. dnl #################################
  117. dnl # Checking the C preprocessor.  #
  118. dnl #################################
  119.  
  120. AC_PROG_CPP
  121.  
  122.  
  123. dnl ##########################################
  124. dnl # Checking for standard C header files.  #
  125. dnl ##########################################
  126.  
  127. AC_HEADER_STDC
  128. AC_CHECK_HEADERS(unistd.h stdlib.h string.h memory.h values.h)
  129.  
  130.  
  131. dnl ################################################
  132. dnl # Checking for system dependent header files.  #
  133. dnl ################################################
  134.  
  135. AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/vfs.h sys/filsys.h fcntl.h)
  136. AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h)
  137.  
  138.  
  139. dnl ###################################################################
  140. dnl # Checking for system specific directory functions declarations.  #
  141. dnl ###################################################################
  142.  
  143. AC_HEADER_DIRENT
  144.  
  145.  
  146. dnl ####################################################################
  147. dnl # Checking whether the C compiler do support the 'const' keyword.  #
  148. dnl ####################################################################
  149.  
  150. AC_C_CONST
  151.  
  152.  
  153. dnl ###############################################################
  154. dnl # Checking for predefined C types.  Fixing when necessary...  #
  155. dnl ###############################################################
  156.  
  157. AC_TYPE_SIGNAL
  158. AC_TYPE_PID_T
  159. AC_TYPE_UID_T
  160. AC_TYPE_MODE_T
  161. AC_TYPE_SIZE_T
  162.  
  163.  
  164. dnl ###################################################
  165. dnl # Checking how to include time.h and sys/time.h.  #
  166. dnl ###################################################
  167.  
  168. AC_CHECK_HEADERS(sys/time.h)
  169. AC_HEADER_TIME
  170.  
  171.  
  172. dnl ########################################################################
  173. dnl # Checking whether the system supports long file names.  GIT will give #
  174. dnl # a warning at run time if long file names are not supported.       #
  175. dnl ########################################################################
  176.  
  177. AC_SYS_LONG_FILE_NAMES
  178.  
  179.  
  180. dnl ####################################
  181. dnl # Checking the sys/stat.h macros.  #
  182. dnl ####################################
  183.  
  184. AC_HEADER_STAT
  185.  
  186.  
  187. dnl ##################################################################
  188. dnl # Checking whether the system supports the lstat() system call.  #
  189. dnl ##################################################################
  190.  
  191. AC_CHECK_FUNCS(lstat)
  192.  
  193.  
  194. dnl ########################################################################
  195. dnl # Checking for the presence of the strerror().  This function is a new #
  196. dnl # feature of ANSI C and many older C systems do not support it yet.    #
  197. dnl ########################################################################
  198.  
  199. AC_CHECK_FUNCS(strerror)
  200.  
  201.  
  202. dnl ####################################################################
  203. dnl # Checking for the presence of the strcasecmp().  This function is #
  204. dnl # derived from BSD 4.3 and other systems might not have it.           #
  205. dnl ####################################################################
  206.  
  207. AC_CHECK_FUNCS(strcasecmp)
  208.  
  209.  
  210. dnl ####################################################################
  211. dnl # Checking for the presence of the strcasecmp().  This function is #
  212. dnl # a GNU extension so only a few systems support it.     Too bad :-(   #
  213. dnl ####################################################################
  214.  
  215. AC_CHECK_FUNCS(strncasecmp)
  216.  
  217.  
  218. dnl #################################################################
  219. dnl # Checking for the presence of the strstr().  Older BSD systems #
  220. dnl # might not have it.                                            #
  221. dnl #################################################################
  222.  
  223. AC_CHECK_FUNCS(strstr)
  224.  
  225.  
  226. dnl ##################################################################
  227. dnl # Checking for the presence of the memmove().  Older BSD systems #
  228. dnl # might not have it.                                             #
  229. dnl ##################################################################
  230.  
  231. AC_CHECK_FUNCS(memmove)
  232.  
  233.  
  234. dnl #################################################################
  235. dnl # Checking for the presence of the putenv().  Older BSD systems #
  236. dnl # might not have it.                                            #
  237. dnl #################################################################
  238.  
  239. AC_CHECK_FUNCS(putenv)
  240.  
  241.  
  242. dnl #################################################################
  243. dnl # Checking for the presence of the getcwd().  Older BSD systems #
  244. dnl # might not have it.                                            #
  245. dnl #################################################################
  246.  
  247. AC_CHECK_FUNCS(getcwd)
  248.  
  249.  
  250. dnl ########################################################################
  251. dnl # This configure.in code has been stolen from GNU fileutils-3.12.  Its #
  252. dnl # job is to detect a method to get file system information.               #
  253. dnl ########################################################################
  254.  
  255. AC_CHECKING(how to get filesystem space usage)
  256. space=no
  257.  
  258. # Here we'll compromise a little (and perform only the link test)
  259. # since it seems there are no variants of the statvfs function.
  260. if test $space = no; then
  261.   # SVR4
  262.   AC_CHECK_FUNCS(statvfs)
  263.   if test $ac_cv_func_statvfs = yes; then
  264.     space=yes
  265.     AC_DEFINE(STAT_STATVFS)
  266.   fi
  267. fi
  268.  
  269. if test $space = no; then
  270.   # DEC Alpha running OSF/1
  271.   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
  272.   AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
  273.   [AC_TRY_RUN([
  274. #include <sys/param.h>
  275. #include <sys/types.h>
  276. #include <sys/mount.h>
  277.   main ()
  278.   {
  279.     struct statfs fsd;
  280.     fsd.f_fsize = 0;
  281.     exit (statfs (".", &fsd, sizeof (struct statfs)));
  282.   }],
  283.   fu_cv_sys_stat_statfs3_osf1=yes,
  284.   fu_cv_sys_stat_statfs3_osf1=no,
  285.   fu_cv_sys_stat_statfs3_osf1=no)])
  286.   AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
  287.   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
  288.     space=yes
  289.     AC_DEFINE(STAT_STATFS3_OSF1)
  290.   fi
  291. fi
  292.  
  293. if test $space = no; then
  294. # AIX
  295.   AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
  296. member (AIX, 4.3BSD)])
  297.   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
  298.   [AC_TRY_RUN([
  299. #ifdef HAVE_SYS_PARAM_H
  300. #include <sys/param.h>
  301. #endif
  302. #ifdef HAVE_SYS_MOUNT_H
  303. #include <sys/mount.h>
  304. #endif
  305. #ifdef HAVE_SYS_VFS_H
  306. #include <sys/vfs.h>
  307. #endif
  308.   main ()
  309.   {
  310.   struct statfs fsd;
  311.   fsd.f_bsize = 0;
  312.   exit (statfs (".", &fsd));
  313.   }],
  314.   fu_cv_sys_stat_statfs2_bsize=yes,
  315.   fu_cv_sys_stat_statfs2_bsize=no,
  316.   fu_cv_sys_stat_statfs2_bsize=no)])
  317.   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
  318.   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
  319.     space=yes
  320.     AC_DEFINE(STAT_STATFS2_BSIZE)
  321.   fi
  322. fi
  323.  
  324. if test $space = no; then
  325. # SVR3
  326.   AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
  327.   AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
  328.   [AC_TRY_RUN([#include <sys/types.h>
  329. #include <sys/statfs.h>
  330.   main ()
  331.   {
  332.   struct statfs fsd;
  333.   exit (statfs (".", &fsd, sizeof fsd, 0));
  334.   }],
  335.     fu_cv_sys_stat_statfs4=yes,
  336.     fu_cv_sys_stat_statfs4=no,
  337.     fu_cv_sys_stat_statfs4=no)])
  338.   AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
  339.   if test $fu_cv_sys_stat_statfs4 = yes; then
  340.     space=yes
  341.     AC_DEFINE(STAT_STATFS4)
  342.   fi
  343. fi
  344.  
  345. if test $space = no; then
  346. # 4.4BSD and NetBSD
  347.   AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
  348. member (4.4BSD and NetBSD)])
  349.   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
  350.   [AC_TRY_RUN([#include <sys/types.h>
  351. #ifdef HAVE_SYS_PARAM_H
  352. #include <sys/param.h>
  353. #endif
  354. #ifdef HAVE_SYS_MOUNT_H
  355. #include <sys/mount.h>
  356. #endif
  357.   main ()
  358.   {
  359.   struct statfs fsd;
  360.   fsd.f_fsize = 0;
  361.   exit (statfs (".", &fsd));
  362.   }],
  363.   fu_cv_sys_stat_statfs2_fsize=yes,
  364.   fu_cv_sys_stat_statfs2_fsize=no,
  365.   fu_cv_sys_stat_statfs2_fsize=no)])
  366.   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
  367.   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
  368.     space=yes
  369.     AC_DEFINE(STAT_STATFS2_FSIZE)
  370.   fi
  371. fi
  372.  
  373. if test $space = no; then
  374.   # Ultrix
  375.   AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
  376.   AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
  377.   [AC_TRY_RUN([#include <sys/types.h>
  378. #ifdef HAVE_SYS_PARAM_H
  379. #include <sys/param.h>
  380. #endif
  381. #ifdef HAVE_SYS_MOUNT_H
  382. #include <sys/mount.h>
  383. #endif
  384. #ifdef HAVE_SYS_FS_TYPES_H
  385. #include <sys/fs_types.h>
  386. #endif
  387.   main ()
  388.   {
  389.   struct fs_data fsd;
  390.   /* Ultrix's statfs returns 1 for success,
  391.      0 for not mounted, -1 for failure.  */
  392.   exit (statfs (".", &fsd) != 1);
  393.   }],
  394.   fu_cv_sys_stat_fs_data=yes,
  395.   fu_cv_sys_stat_fs_data=no,
  396.   fu_cv_sys_stat_fs_data=no)])
  397.   AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
  398.   if test $fu_cv_sys_stat_fs_data = yes; then
  399.     space=yes
  400.     AC_DEFINE(STAT_STATFS2_FS_DATA)
  401.   fi
  402. fi
  403.  
  404. dnl Not supported
  405. dnl if test $space = no; then
  406. dnl # SVR2
  407. dnl AC_TRY_CPP([#include <sys/filsys.h>],
  408. dnl   AC_DEFINE(STAT_READ_FILSYS) space=yes)
  409. dnl fi
  410.  
  411.  
  412. dnl ###########################################################################
  413. dnl # If we can't find fnmatch() in the standard C library we have to use the #
  414. dnl # version of fnmatch.c included in the package.                  #
  415. dnl # I've stopped checking for  fnmatch()  because  too  many  systems  have #
  416. dnl # undocumented fnmatch() functions in the C library so this test  is  not #
  417. dnl # relevant.  The distribution provided fnmatch.o is now always linked in. #
  418. dnl ###########################################################################
  419.  
  420. dnl AC_FUNC_CHECK(fnmatch,,
  421. dnl           GIT_OBJS="$GIT_OBJS fnmatch.o"
  422. dnl           GITMATCH_OBJS="$GITMATCH_OBJS fnmatch.o")
  423.  
  424.  
  425. dnl ###########################################################################
  426. dnl # If the GNU readline library is installed on the system, we will use its #
  427. dnl # tilde_expand() and history functions.  Otherwise, we have  to  use  the #
  428. dnl # versions of tilde.c and history.c included in the package.  These files #
  429. dnl # belong to the GNU readline library version 2.0.1.                  #
  430. dnl ###########################################################################
  431.  
  432. AC_CHECK_LIB(readline, main)
  433. AC_FUNC_CHECK(tilde_expand,,
  434.           GIT_OBJS="$GIT_OBJS tilde.o"
  435.           GITPS_OBJS="$GITPS_OBJS tilde.o"
  436.           GITVIEW_OBJS="$GITVIEW_OBJS tilde.o")
  437. AC_FUNC_CHECK(using_history,,
  438.           GIT_OBJS="$GIT_OBJS history.o")
  439.  
  440.  
  441. dnl ####################################################
  442. dnl # Checking if ioctl(1, TIOCGWINSZ, &winsz) works.  #
  443. dnl ####################################################
  444.  
  445. AC_MSG_CHECKING([for struct winsz])
  446.  
  447. AC_CACHE_VAL(git_cv_struct_winsz,
  448.     git_cv_struct_winsz="no"
  449.     AC_TRY_LINK(
  450.     [#include <sys/types.h>
  451.      #include <sys/ioctl.h>
  452.      #if defined TIOCGSIZE && !defined TIOCGWINSZ
  453.      #define TIOCGWINSZ TIOCGSIZE
  454.      #endif],
  455.     [{
  456.         struct winsize winsz;
  457.         ioctl(1, TIOCGWINSZ, &winsz);
  458.         winsz.ws_col = winsz.ws_row;
  459.     }],
  460.     git_cv_struct_winsz="yes"
  461.     )
  462. )
  463.  
  464. if test "$git_cv_struct_winsz" = "yes"; then
  465.     AC_DEFINE(HAVE_WINSZ)
  466. fi
  467.  
  468. AC_MSG_RESULT([$git_cv_struct_winsz])
  469.  
  470.  
  471. dnl #############################################
  472. dnl # Checking if struct utsname is available.  #
  473. dnl #############################################
  474.  
  475. AC_MSG_CHECKING([for struct utsname])
  476.  
  477. AC_CACHE_VAL(git_cv_struct_utsname,
  478.     git_cv_struct_utsname="no"
  479.     AC_TRY_LINK(
  480.     [#include <sys/utsname.h>],
  481.     [{
  482.         char *ptr;
  483.         struct utsname u;
  484.  
  485.         uname(&u);
  486.         ptr = u.nodename;
  487.         ptr = u.sysname;
  488.         ptr = u.machine;
  489.         }],
  490.     git_cv_struct_utsname="yes"
  491.     )
  492. )
  493.  
  494. if test "$git_cv_struct_utsname" = "yes"; then
  495.     AC_DEFINE(HAVE_UTSNAME)
  496. fi
  497.  
  498. AC_MSG_RESULT([$git_cv_struct_utsname])
  499.  
  500.  
  501. dnl ######################################################
  502. dnl # Checking for POSIX compatible terminal interface.  #
  503. dnl ######################################################
  504.  
  505. AC_MSG_CHECKING([for POSIX compatible terminal interface])
  506.  
  507. AC_CACHE_VAL(git_cv_sys_posix_tty,
  508.     git_cv_sys_posix_tty="no"
  509.     AC_TRY_LINK(
  510.     [#include <termios.h>],
  511.     [{
  512.         struct termios term;
  513.  
  514.         tcgetattr(0, &term);
  515.     }],
  516.     git_cv_sys_posix_tty="yes"
  517.     )
  518. )
  519.  
  520. if test "$git_cv_sys_posix_tty" = "yes"; then
  521.     AC_DEFINE(HAVE_POSIXTTY)
  522. fi
  523.  
  524. AC_MSG_RESULT([$git_cv_sys_posix_tty])
  525.  
  526.  
  527. dnl #########################################################
  528. dnl # Checking for System V compatible terminal interface.  #
  529. dnl #########################################################
  530.  
  531. AC_MSG_CHECKING([for System V compatible terminal interface])
  532.  
  533. AC_CACHE_VAL(git_cv_sys_systemv_tty,
  534.     git_cv_sys_systemv_tty="no"
  535.     AC_TRY_LINK(
  536.     [#include <termio.h>],
  537.     [{
  538.         struct termio term;
  539.  
  540.         ioctl(0, TCGETA, &term);
  541.     }],
  542.     git_cv_sys_systemv_tty="yes"
  543.     )
  544. )
  545.  
  546. if test "$git_cv_sys_systemv_tty" = "yes"; then
  547.     AC_DEFINE(HAVE_SYSTEMVTTY)
  548. fi
  549.  
  550. AC_MSG_RESULT([$git_cv_sys_systemv_tty])
  551.  
  552.  
  553. dnl ####################################################
  554. dnl # Checking for BSD compatible terminal interface.  #
  555. dnl ####################################################
  556.  
  557. AC_MSG_CHECKING([for BSD compatible terminal interface])
  558.  
  559. AC_CACHE_VAL(git_cv_sys_bsd_tty,
  560.     git_cv_sys_bsd_tty="no"
  561.     AC_TRY_LINK(
  562.     [#include <sgtty.h>],
  563.     [{
  564.         struct sgttyb arg;
  565.         struct tchars targ;
  566.         struct ltchars ltarg;
  567.  
  568.         ioctl(0, TIOCGETP,&arg);
  569.         ioctl(0, TIOCGETC,&targ);
  570.         ioctl(0, TIOCGLTC,<arg);
  571.     }],
  572.     git_cv_sys_bsd_tty="yes"
  573.     )
  574. )
  575.  
  576. if test "$git_cv_sys_bsd_tty" = "yes"; then
  577.     AC_DEFINE(HAVE_BSDTTY)
  578. fi
  579.  
  580. AC_MSG_RESULT([$git_cv_sys_bsd_tty])
  581.  
  582.  
  583. dnl #######################################################
  584. dnl # Checking the terminal capabilities library to use.  #
  585. dnl #######################################################
  586.  
  587. define(git_TERMINFO_LIBRARY,
  588. [    AC_CHECK_LIB(ncurses, main, AC_DEFINE(HAVE_LIBTERMINFO)
  589.                  LIBS="$LIBS -lncurses"
  590.                  TERMLIB_FOUND="yes",
  591.     AC_CHECK_LIB(termlib, main, AC_DEFINE(HAVE_LIBTERMINFO)
  592.                     LIBS="$LIBS -ltermlib"
  593.                     TERMLIB_FOUND="yes",
  594.             AC_CHECK_LIB(curses, main, AC_DEFINE(HAVE_LIBTERMINFO)
  595.                        LIBS="$LIBS -lcurses"
  596.                        TERMLIB_FOUND="yes",
  597.         AC_CHECK_LIB(tinfo, main, AC_DEFINE(HAVE_LIBTERMINFO)
  598.                       LIBS="$LIBS -ltinfo"
  599.                       TERMLIB_FOUND="yes",
  600.             AC_CHECK_LIB(terminfo, main, AC_DEFINE(HAVE_LIBTERMINFO)
  601.                          LIBS="$LIBS -lterminfo"
  602.                          TERMLIB_FOUND="yes",
  603.             TERMLIB_FOUND="no"
  604.             )
  605.         )
  606.         )
  607.     )
  608.     )
  609. ]
  610. )dnl
  611.  
  612. AC_ARG_ENABLE(terminfo, --enable-terminfo     use terminfo insted of termcap,
  613.       TERMINFO="$enableval", TERMINFO="no")
  614.  
  615. if test "$host_os" = "linux"; then
  616.     if test "$TERMINFO" = "yes"; then
  617.     AC_MSG_WARN([don't use the terminfo library on Linux  systems,])
  618.     AC_MSG_WARN([termcap is *MUCH* better because it has  features])
  619.     AC_MSG_WARN([that terminfo lacks. Start the 'configure' script])
  620.     AC_MSG_WARN([like this: './configure'.])
  621.     fi
  622. fi
  623.  
  624. if test "$host_os" = "HP-UX"; then
  625.     if test "$TERMINFO" = "no"; then
  626.     AC_MSG_WARN([don't use the termcap library on  HP-UX  systems,])
  627.     AC_MSG_WARN([terminfo is *MUCH* better. Start the  'configure'])
  628.     AC_MSG_WARN([script like this: './configure --enable-terminfo'])
  629.     AC_MSG_WARN([or like this: 'sh configure --enable-terminfo' if])
  630.     AC_MSG_WARN([you are using an old shell (/bin/sh).])
  631.     fi
  632. fi
  633.  
  634. if test "$TERMINFO" = "yes"; then
  635.     git_TERMINFO_LIBRARY
  636.     if test "$TERMLIB_FOUND" = "no"; then
  637.     AC_CHECK_LIB(termcap, main,
  638.              AC_DEFINE(HAVE_LIBTERMCAP)
  639.              LIBS="$LIBS -ltermcap"
  640.              TERMLIB_FOUND="yes")
  641.     fi
  642. else
  643.     AC_CHECK_LIB(termcap, main,
  644.          AC_DEFINE(HAVE_LIBTERMCAP)
  645.          LIBS="$LIBS -ltermcap"
  646.          TERMLIB_FOUND="yes",
  647.          git_TERMINFO_LIBRARY)
  648. fi
  649.  
  650. if test "$TERMLIB_FOUND" = "no"; then
  651.     AC_MSG_ERROR([no library for handling terminal capabilities])
  652. fi
  653.  
  654.  
  655. dnl #######################################################################
  656. dnl # Checking the makeinfo utility.  If we can't find it, we can't build #
  657. dnl # build the info documentation.                          #
  658. dnl #######################################################################
  659.  
  660. AC_PROGRAM_CHECK(MAKEINFO, makeinfo, makeinfo, false)
  661. if test "$MAKEINFO" = "false"; then
  662.     AC_MSG_WARN(***** makeinfo utility not found *****)
  663. fi
  664.  
  665.  
  666. dnl #######################################################################
  667. dnl # Checking the texi2dvi utility.  If we can't find it, we can't build #
  668. dnl # build the dvi documentation.                          #
  669. dnl #######################################################################
  670.  
  671. AC_PROGRAM_CHECK(TEXI2DVI, texi2dvi, texi2dvi, false)
  672. if test "$TEXI2DVI" = "false"; then
  673.     AC_MSG_WARN(***** texi2dvi utility not found *****)
  674. fi
  675.  
  676.  
  677. dnl #######################################
  678. dnl # Make final variable substitutions.  #
  679. dnl #######################################
  680.  
  681. AC_SUBST(PRODUCT)dnl
  682. AC_SUBST(VERSION)dnl
  683. AC_SUBST(HOST)dnl
  684. AC_SUBST(INSTALL)dnl
  685. AC_SUBST(INSTALL_PROGRAM)dnl
  686. AC_SUBST(INSTALL_DATA)dnl
  687. AC_SUBST(CFLAGS)dnl
  688. AC_SUBST(GIT_OBJS)dnl
  689. AC_SUBST(GITMATCH_OBJS)dnl
  690. AC_SUBST(GITPS_OBJS)dnl
  691. AC_SUBST(GITVIEW_OBJS)dnl
  692.  
  693.  
  694. dnl ##########
  695. dnl # Done.  #
  696. dnl ##########
  697.  
  698. AC_OUTPUT(Makefile src/Makefile info/Makefile man/Makefile term/Makefile)
  699.