configure.in
来自「UUDeview是一个编码解码器」· IN 代码 · 共 650 行 · 第 1/2 页
IN
650 行
if test "x$MAILER" = "x" ; then AC_WARN([I haven't found a suitable mail program. You will not be]) AC_WARN([able to mail files directly from uuenview.]) fi fi fi fi ;;*) AC_MSG_CHECKING([for suitable mailer]) AC_MSG_RESULT($have_sendmail) if test ! -x $have_sendmail ; then AC_WARN([Cannot execute $have_sendmail]) AC_WARN([Make sure this prog exists when running uuenview]) fi MAILER="$have_sendmail" ;;esacif test "x$MAILER" != "x" ; then AC_DEFINE_UNQUOTED(PROG_MAILER,"$MAILER")fi## Look for inews. If it is there, there's no need to make our own#case "x$have_inews" inxno*) INEWS="" have_minews=no newsserver="not_configured" domainname="not_configured" ;;x|xyes*) AC_PATH_PROG(INEWS,inews,,$PATH:/usr/bin:/usr/news:/usr/news/bin:/usr/local/bin:/usr/local/news:/usr/local/news/bin:/usr/share/news:/usr/share/news/bin) if test "x$INEWS" != "x" ; then AC_DEFINE(HAVE_NEWS) AC_DEFINE_UNQUOTED(PROG_INEWS,"$INEWS -h") have_minews=no newsserver="not_needed" domainname="not_needed" else if test "$have_minews" = "yes" ; then AC_DEFINE(HAVE_NEWS) # # we must cheat here to find the final location of minews. # ./configure defines the final values too late. This mimics # what autoconf 2.7 does. # eval "our_prefix=$prefix" eval "our_exec_prefix=$exec_prefix" eval "our_bindir=$bindir" if test "x$our_prefix" = "xNONE" ; then eval "our_prefix=$ac_default_prefix" fi if test "x$our_exec_prefix" = "xNONE" ; then eval "our_exec_prefix=$our_prefix" fi if test "x$our_bindir" = "xNONE/bin" ; then eval "our_bindir=$our_exec_prefix/bin" fi AC_DEFINE_UNQUOTED(PROG_INEWS,"${our_bindir}/minews -h") else AC_WARN([Couldn't find inews and you didn't want minews.]) AC_WARN([You won't be able to post files directly from uuenview]) have_minews=no newsserver="not_configured" domainname="not_configured" fi fi ;;*) AC_MSG_CHECKING([for suitable inews]) AC_MSG_RESULT([$have_inews]) if test ! -x $have_inews ; then AC_WARN([Cannot execute $have_inews]) AC_WARN([Make sure this prog exists when running uuenvew]) fi AC_DEFINE(HAVE_NEWS) AC_DEFINE_UNQUOTED(PROG_INEWS,"$have_inews -h") have_minews=no newsserver="not_needed" domainname="not_needed" ;;esac## check for NNTPSERVER or NNTP_SERVER#if test "$have_minews" = "yes" ; thenAC_MSG_CHECKING([for news server])if test "x$newsserver" = "x" ; thenif test "x$NNTPSERVER" != "x" ; then newsserver=$NNTPSERVERelseif test "x$NNTP_SRVER" != "x" ; then newsserver=$NNTP_SERVERfififiif test "x$newsserver" = "x" ; then AC_MSG_RESULT([not found]) AC_DEFINE(NEED_NNTPSERVER)else AC_MSG_RESULT($newsserver) AC_DEFINE_UNQUOTED(NNTPSERVER,"$newsserver")fifi## If we compile and use minews, we want to know our domain name#if test "$have_minews" = "yes" ; thenAC_PATH_PROG(HOSTNAME,hostname,,$PATH:/sbin:/usr/sbin)AC_MSG_CHECKING([domain name])## try /etc/resolv.conf#if test "x$domainname" = "x" ; thenif test -f /etc/resolv.conf ; then # # note: Parameter for tr is <space><tab> # domainname=`grep '^domain' /etc/resolv.conf | tr -d ' ' | sed 's/domain//'`fifi## on some systems, hostname returns the FQN#if test "x$domainname" = "x" ; thenif test "x$HOSTNAME" != "x" ; then if test "x`$HOSTNAME | grep "\\."`" != "x" ; then domainname=`$HOSTNAME | sed 's/[[a-zA-Z0-9]]*\.//'` fififiif test "x$domainname" = "x" ; then AC_MSG_RESULT([unknown]) AC_WARN([Couldn't figure out your domain name. Configuring bogus]) AC_WARN([domain. If you intend to post directly from uuenview,]) AC_WARN([rerun configure and use --enable-domain=your-domainname]) AC_WARN([with your real domain name.]) domainname="i.dont.know.where.i.am"else AC_MSG_RESULT($domainname)fiAC_DEFINE_UNQUOTED(DOMAINNAME,"$domainname")fi## Check the directory separator. Because this is probably a Unix-like# system, just set it statically to "/". On other systems, change it# in config.h#AC_MSG_CHECKING([directory separator])dirseparator="/"AC_MSG_RESULT($dirseparator)AC_DEFINE_UNQUOTED(DIRSEPARATOR,"$dirseparator")## Checks for header files and library functions#AC_TYPE_SIZE_TAC_HEADER_STDCAC_HEADER_TIMEAC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h direct.h)AC_CHECK_HEADERS(io.h sys/time.h)AC_CHECK_FUNCS(getcwd popen gettimeofday isatty)AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,_FP_tempnam))## strerror might be internally defined. this would cause a# CHECK_FUNCS(strerror) to fail because it'd be called with# zero arguments. So use our own code.#AC_MSG_CHECKING([for strerror])AC_TRY_LINK([char *blubb() { return (char *) strerror (42); }],[(void) blubb();],have_strerror=yes,AC_DEFINE(strerror,_FP_strerror)have_strerror=no)AC_MSG_RESULT($have_strerror)AC_MSG_CHECKING([for stdin])AC_TRY_LINK([#include <stdio.h>char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }],[(void) blubb();],have_stdio=yes,AC_DEFINE(HAVE_STDIO)have_stdio=no)AC_MSG_RESULT($have_stdio)if test "$ac_cv_header_stdc" = "no" ; then AC_CHECK_HEADERS(stdarg.h varargs.h) if test "$ac_cv_header_stdarg_h" = "no" ; then if test "$ac_cv_header_varargs_h" = "no" ; then AC_MSG_ERROR([neither stdarg.h nor varargs.h present]) fi fifiif test "$have_minews" = "yes" ; then AC_CHECK_HEADERS(pwd.h)fi## Check whether this is a DOS-Based system. Another bogus test.# Don't even bother to print a message. This code is needed so# that autoheader includes the #undef into the final config.h# and we can change the definition by hand on a really DOS# system (where ./configure doesn't work anyway ...)#if false ; then AC_DEFINE(SYSTEM_DOS) AC_DEFINE(SYSTEM_QUICKWIN) AC_DEFINE(SYSTEM_WINDLL) AC_DEFINE(SYSTEM_OS2)fiif test "x$have_tcl" != "xno" ; then # # Hack: remove doubly-defined libs # TCL_NEW_LIBS="" for lib in $TCL_LIBS $LIBS ; do found=no for tlib in $TCL_NEW_LIBS ; do if test "x$lib" = "x$tlib" ; then found=yes break fi done if test "x$found" = "xno" ; then TK_NEW_LIBS="$TK_NEW_LIBS $lib" fi donefi## On some systems (so far, OS2 and WINDOWS), functions that are exported# from a DLL must be declared specifically.#AC_DEFINE_UNQUOTED(UUEXPORT,)AC_DEFINE_UNQUOTED(UUTCLEXPORT,)AC_DEFINE_UNQUOTED(TOOLEXPORT,)AC_DEFINE_UNQUOTED(UUTCLFUNC,)## decide which programs and libraries to build#PROGS="uudeview"DOINST="install-uudeview"MPAGES="uudeview.1 uuenview.1"if test "x$have_minews" = "xyes" ; then PROGS="$PROGS minews" DOINST="$DOINST install-minews"fiif test "x$have_tk" != "xno" ; then PROGS="$PROGS xdeview" MPAGES="$MPAGES xdeview.1" DOINST="$DOINST install-tcl"fiif test "x$have_manuals" = "xno" ; then MPAGES=""fiAC_SUBST(DOINST)AC_SUBST(PROGS)AC_SUBST(MPAGES)## set version number#AC_MSG_CHECKING([version number])version_number="$VERSION"pl"$PATCH"AC_MSG_RESULT($version_number)AC_SUBST(VERSION)AC_SUBST(PATCH)## done#AC_OUTPUT(Makefile tcl/Makefile unix/Makefile uulib/Makefile)## copy config.h into our subdirectories##echo copying tcl/config.h#cp config.h tcl#echo copying unix/config.h#cp config.h unix#echo copying uulib/config.h#cp config.h uulib### goodbye#
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?