📄 configure.in
字号:
dnl This file is an input file used by the GNU "autoconf" program todnl generate the file "configure", which tries to guess your systemdnl configuration so that no manual editing of the Makefile should bednl necessarydnldnl $Id: configure.in,v 1.34 2004/03/01 23:06:18 fp Exp $dnlAC_INIT(uudeview.lsm)AC_PREREQ(2.9)AC_CONFIG_HEADER(config.h)## package revision#VERSION=0.5PATCH=20AC_ARG_ENABLE(tcl, [ --enable-tcl=dir looks for TCL files files below this directory],have_tcl=$enableval,have_tcl="yes")AC_ARG_ENABLE(tk, [ --enable-tk=dir looks for TK files below this directory],have_tk=$enableval,have_tk="yes")AC_ARG_ENABLE(minews, [ --disable-minews don't build the mini-inews],have_minews=$enableval,have_minews=yes)AC_ARG_ENABLE(posting, [ --enable-posting=server if using minews, sets the default name of your news server (will fall back to NNTPSERVER)],newsserver=$enableval,newsserver="")AC_ARG_ENABLE(domain, [ --enable-domain=domain if using minews, and autoconf cannot figure out your domain name, use this option to set it. Otherwise, a bogus domainname is used (causing the reply address of your postings to be invalid)],domainname=$enableval,domainname="")AC_ARG_ENABLE(sendmail,[ --enable-sendmail=prog Use prog to mail a file with recipients on the command line and the mail via stdin],have_sendmail=$enableval,have_sendmail=yes)AC_ARG_ENABLE(inews, [ --enable-inews=prog Use prog to post a file. -h is given on the command line, the article is piped through standard input],have_inews=$enableval,have_inews=yes)AC_ARG_ENABLE(manuals, [ --disable-manuals disables installation of the manual pages],have_manuals=$enableval,have_manuals=yes)## proc to look for a file in a number of places#AC_DEFUN(FP_FIND_FILE, [ if test "x$4" = "x" ; then ff_name=[`echo $1 | sed 's/[-.*/ ]/_/g'`] else ff_name="$4" fi eval $ff_name= eval ${ff_name}_dir= ff_file= ff_file_dir= for ff_dir in $2 ; do if test -f $ff_dir/$1 ; then ff_file_dir=$ff_dir ff_file=$ff_dir/$1 break fi for ff_subdir in $3 ; do if test -f $ff_dir/$ff_subdir/$1 ; then ff_file_dir=$ff_dir/$ff_subdir ff_file=$ff_dir/$ff_subdir/$1 break fi done if test "x$ff_file" != "x" ; then break fi done eval ${ff_name}_dir="$ff_file_dir" eval $ff_name="$ff_file"])## Basic setup#AC_PROG_CCAC_PROG_CPPwi_PROTOTYPESAC_PROG_MAKE_SETdnl AC_PROG_INSTALLAC_PROG_RANLIBAC_PROG_LN_Sif test "$wi_cv_prototypes" = no ; then AC_WARN([Your compiler does not support function prototyping and]) AC_WARN([is not able to properly compile this package. What a pity.]) AC_WARN([Get gcc, or any compiler that supports function prototypes.]) exit 1fi## ----------------------------------------------------------------------# Prepare for setup# ----------------------------------------------------------------------#orb_to_use=more_incs="`echo $with_includes | sed 's/:/ /g'`"more_libs="`echo $with_libs | sed 's/:/ /g'`"base_incs="`echo $CPLUS_INCLUDE_PATH | sed 's/:/ /g'` /local/include /usr/local/include /usr/include"base_libs="`echo $LIBPATH $LIBRARY_PATH $LD_LIBRARY_PATH $SHLIB_PATH | sed 's/:/ /g'` /local/lib /usr/local/lib /usr/lib"base_bins="`echo $PATH | sed 's/:/\/.. /g'` /local/bin /usr/local/bin /usr/bin"base_dirs="$prefix `echo $PATH | sed 's/:/\/.. /g'`"## ----------------------------------------------------------------------# Check Tcl setup# ----------------------------------------------------------------------#if test "x$have_tcl" != "xno" ; then AC_MSG_CHECKING(for tclConfig.sh) FP_FIND_FILE(tclConfig.sh,$have_tcl $have_tk $more_libs $base_libs $base_dirs,lib) if test "x$tclConfig_sh" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tcl parts disabled) AC_MSG_WARN(use --enable-tcl to locate tclConfig.sh) have_tcl=no else AC_MSG_RESULT($tclConfig_sh) fifiif test "x$have_tcl" != "xno" ; then AC_MSG_CHECKING(contents of tcl config) . $tclConfig_sh AC_MSG_RESULT(done) AC_MSG_CHECKING(tcl version) AC_MSG_RESULT(${TCL_VERSION}${TCL_PATCH_LEVEL}) if test "$TCL_MAJOR_VERSION" -lt 8 ; then AC_MSG_WARN([Oops, I need at least Tcl 8.0, sorry. Tcl parts disabled.]) AC_MSG_WARN(use --enable-tcl to locate tclConfig.sh) have_tcl=no fifiif test "x$have_tcl" != "xno" ; then AC_MSG_CHECKING(for tcl.h) FP_FIND_FILE(tcl.h,$TCL_PREFIX $TCL_EXEC_PREFIX $TCL_SRC_DIR $have_tcl $have_tk $more_incs $base_incs $base_dirs, include) if test "x$tcl_h_dir" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tcl parts disabled) AC_MSG_WARN(use --enable-tcl to locate tcl.h) have_tcl=no else AC_MSG_RESULT(found in $tcl_h_dir) fifiif test "x$have_tcl" != "xno" ; then tcllibfile=`eval echo $TCL_LIB_FILE` tcllibpath= for item in $TCL_LIB_SPEC $TCL_BUILD_LIB_SPEC ; do case $item in -L*) tcllibpath="$tcllibpath `echo $item | sed 's/^-L//'`" ;; esac done AC_MSG_CHECKING(for $tcllibfile) FP_FIND_FILE($tcllibfile,$tcllibpath $TCL_PREFIX $TCL_EXEC_PREFIX $TCL_SRC_DIR $have_tcl $have_tk $more_libs $base_libs $base_dirs,lib unix,tcl_lib) if test "x$tcl_lib_dir" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tcl parts disabled) AC_MSG_WARN(use --enable-tcl to locate $tcllibfile) have_tcl="no" else AC_MSG_RESULT(found in $tcl_lib_dir) fi case $TCL_DEFS in *TCL_THREADS*) CFLAGS="-D_REENTRANT $CFLAGS" ;; esacfi## Tcl setup complete#if test "x$have_tcl" != "xno" ; then tcllibflag=`eval echo $TCL_LIB_FLAG` TCL_CPPFLAGS="-I$tcl_h_dir $TCL_CPPFLAGS" TCL_LDFLAGS="-L$tcl_lib_dir" TCL_LIBS="$tcllibflag $TCL_LIBS" AC_DEFINE(HAVE_TCL) AC_DEFINE(TMAIN_THREE)fiAC_SUBST(TCL_CPPFLAGS)AC_SUBST(TCL_LDFLAGS)AC_SUBST(TCL_LIBS)## ----------------------------------------------------------------------# Check Tk setup# ----------------------------------------------------------------------#if test "x$have_tcl" = "xno" ; then have_tk=nofiif test "x$have_tk" != "xno" ; then AC_MSG_CHECKING(for tkConfig.sh) FP_FIND_FILE(tkConfig.sh,$have_tcl $have_tk $more_libs $base_libs $base_dirs,lib) if test "x$tkConfig_sh" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tk parts disabled) AC_MSG_WARN(use --enable-tk to locate tkConfig.sh) have_tk=no else AC_MSG_RESULT($tkConfig_sh) fifiif test "x$have_tk" != "xno" ; then AC_MSG_CHECKING(contents of tk config) . $tkConfig_sh AC_MSG_RESULT(done) AC_MSG_CHECKING(tk version) AC_MSG_RESULT(${TK_VERSION}${TK_PATCH_LEVEL}) if test "$TK_MAJOR_VERSION" -lt 8 ; then AC_MSG_WARN([Oops, I need at least Tk 8.0, sorry. Tk parts disabled.]) AC_MSG_WARN(use --enable-tk to locate tkConfig.sh) have_tk=no fifiif test "x$have_tk" != "xno" ; then AC_MSG_CHECKING(for tk.h) FP_FIND_FILE(tk.h,$TK_PREFIX $TK_EXEC_PREFIX $TK_SRC_DIR $have_tk $have_tcl $tcl_h_dir $more_incs $base_incs $base_dirs, include) if test "x$tk_h_dir" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tk parts disabled) AC_MSG_WARN(use --enable-tk to locate tk.h) have_tk=no else AC_MSG_RESULT(found in $tk_h_dir) fifiif test "x$have_tk" != "xno" ; then tklibfile=`eval echo $TK_LIB_FILE` tcllibpath= for item in $TK_LIB_SPEC $TK_BUILD_LIB_SPEC ; do case $item in -L*) tklibpath="$tklibpath `echo $item | sed 's/^-L//'`" ;; esac done AC_MSG_CHECKING(for $tklibfile) FP_FIND_FILE($tklibfile,$tklibpath $TK_PREFIX $TK_EXEC_PREFIX $TK_SRC_DIR $have_tcl $have_tk $more_libs $base_libs $base_dirs,lib unix,tk_lib) if test "x$tk_lib_dir" = "x" ; then AC_MSG_RESULT(not found) AC_MSG_WARN(Tk parts disabled) AC_MSG_WARN(use --enable-tk to locate $tklibfile) have_tk="no" else AC_MSG_RESULT(found in $tk_lib_dir) fifi## Tk setup complete#if test "x$have_tk" != "xno" ; then tklibflag=`eval echo $TK_LIB_FLAG` TCL_CPPFLAGS="-I$tk_h_dir $TK_XINCLUDES $TCL_CPPFLAGS" TCL_LDFLAGS="-L$tk_lib_dir $TCL_LDFLAGS" TCL_LIBS="$tklibflag $TCL_LIBS" AC_DEFINE(HAVE_TK)fi## we might need various libraries if we decide to go for TCL/TK#AC_CHECK_FUNC(sin,, LIBS="$LIBS -lm")## these libs are needed for both TK and minews (from tk's configure.in)# and in some cases -lsocket features gettimeofday, needed for TCL#tk_checkBoth=0AC_CHECK_FUNC(connect, tk_checkSocket=0, tk_checkSocket=1)if test "$tk_checkSocket" = 1; then AC_CHECK_LIB(socket, connect, LIBS="$LIBS -lsocket", tk_checkBoth=1)fiif test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tk_checkNsl=0, [LIBS=$tk_oldLibs])fiAC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"]))## Look for a mailing program to be used by uuenview#case "x$have_sendmail" inxno*) MAILER="" ;;x|xyes*) AC_PATH_PROG(MAILER,sendmail,,$PATH:/sbin:/usr/lib:/usr/sbin:/usr/etc) if test "x$MAILER" = "x" ; then AC_PATH_PROG(MAILER,mailx,,$PATH:/sbin:/usr/lib:/usr/sbin:/usr/etc) if test "x$MAILER" != "x" ; then AC_DEFINE(MAILER_NEEDS_SUBJECT) # mailx wants -s "subject" else AC_PATH_PROG(MAILER,elm,,$PATH) if test "x$MAILER" != "x" ; then AC_DEFINE(MAILER_NEEDS_SUBJECT) # elm wants -s "subject" else AC_PATH_PROG(MAILER,mail,,$PATH:/sbin:/usr/lib:/usr/sbin:/usr/etc)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -