📄 configure.in
字号:
dnl $Id: configure.in,v 1.14 2001/09/30 13:10:33 walker Exp $dnl configure.in autoconf/automake input scriptdnl for minicomdnlAC_INIT(src/minicom.c)AC_CONFIG_AUX_DIR(aux)AC_PREREQ(2.12)AM_CONFIG_HEADER(config.h)dnl Don't use '-' in version ! RPM doesn't like this.AM_INIT_AUTOMAKE([minicom], [2.00.0])dnl Checks for programs.AC_PROG_CCAC_PROG_GCC_TRADITIONALAC_PROG_INSTALLAC_PROG_RANLIBAC_ISC_POSIXAC_MINIXAC_AIXAM_PROG_CC_STDCAC_ARG_ENABLE(music, [ --enable-music Enable music for certain events (def: DISABLED)], if test "x$enable_music" != xyes; then feature_music="no" else feature_music="yes" fi, feature_music="no")AC_ARG_ENABLE(history, [ --disable-history Disable history buffer (def: enabled)], if test "x$enable_history" != xyes; then feature_history="no" else feature_history="yes" fi, feature_history="yes")AC_ARG_ENABLE(history-search, [ --disable-history-search Disable hist buf searching (def: enabled)], if test "x$enable_history_search" != xyes; then feature_history_search="no" else feature_history_search="yes" fi, feature_history_search="yes")AC_ARG_ENABLE(fkey-macros, [ --disable-fkey-macros Disable F-Key macros (def: enabled)], if test "x$enable_fkey_macros" != xyes; then feature_fkey_macros="no" else feature_fkey_macros="yes" fi, feature_fkey_macros="yes")AC_ARG_ENABLE(rh-fkey-fix, [ --enable-rh-fkey-fix Enable fix for RedHat 4.1 F-keys (def: DISABLED)], if test "x$enable_rd_fkey_fix" = "xyes"; then AC_DEFINE(_RH_FIX) fi)AC_ARG_ENABLE(lock-dir, [ --enable-lock-dir=DIR Set com line lock directory (def: try common locations)], if test "x$enable_lock_dir" = xyes; then UUCPLOCK="" else if test "x$enable_lock_dir" = xno; then AC_MSG_ERROR(Lock directory required) else UUCPLOCK="$enable_lock_dir" fi fi, UUCPLOCK="")AC_ARG_ENABLE(dfl-port, [ --enable-dfl-port=DEVFILE Set default /dev/.. modem device (def: try common locations)], if test "x$enable_dfl_port" = xyes; then DFL_PORT="" else if test "x$enable_dfl_port" = xno; then AC_MSG_ERROR(Default port required) else DFL_PORT="$enable_dfl_port" fi fi, DFL_PORT="")AC_ARG_ENABLE(dfl-baud, [ --enable-dfl-baud=NNNNN Set default baud rate (def: 38400)], if test "x$enable_dfl_baud" = xyes; then DEF_BAUD="38400" else if test "x$enable_dfl_baud" = xno; then AC_MSG_ERROR(Default baud rate required) else DEF_BAUD="$enable_dfl_baud" fi fi, DEF_BAUD="38400")AC_ARG_ENABLE(cfg-dir, [ --enable-cfg-dir=DIR Set minicom cfg file path (def: sysconfdir)], if test "x$enable_cfg_dir" = xyes; then MINICOM_LIBDIR="$sysconfdir" else if test "x$enable_cfg_dir" = xno; then AC_MSG_ERROR(Config directory required) else MINICOM_LIBDIR="$enable_cfg_dir" fi fi, MINICOM_LIBDIR="$sysconfdir")AC_ARG_ENABLE(kermit, [ --enable-kermit=FILE Set default path to kermit (def: search PATH)], if test "x$enable_kermit" = xyes; then PATH_KERMIT="" else if test "x$enable_kermit" = xno; then PATH_KERMIT="" else PATH_KERMIT="$enable_kermit" fi fi, PATH_KERMIT="")AC_ARG_ENABLE(dgux, [ --enable-dgux Enable DG/UX extensions (def: DISABLED)], if test "x$enable_dgux" = xyes; then AC_DEFINE(_DGUX_SOURCE) fi)AC_ARG_ENABLE(hpux, [ --enable-hpux Enable HP/UX extensions (def: DISABLED)], if test "x$enable_hpux" = xyes; then AC_DEFINE(_HPUX_SOURCE) fi)if test "x$feature_history" = xyes; then AC_DEFINE(_HISTORY) AC_DEFINE(HISTORY) if test "x$feature_history_search" = xyes; then AC_DEFINE(_SEARCH_HISTORY) fifiif test "x$feature_fkey_macros" = xyes; then AC_DEFINE(_HAVE_MACROS)fiif test "x$feature_music" = xyes; then AC_DEFINE(VC_MUSIC)fidnl Set of available languages.ALL_LINGUAS="cs_CZ es fr fi_FI ja ja_JP.SJIS pl pt_BR ru"dnl Checks for programs.AM_GNU_GETTEXTtest "x$USE_INCLUDED_LIBINTL" = xyes && CFLAGS="$CFLAGS -I\$(top_srcdir)/intl"if test "x$enable_kermit" != xno && test "x$PATH_KERMIT" = xthenAC_PATH_PROG(PATH_KERMIT, kermit, no, $PATH:/bin:/usr/bin:/usr/local/bin:/opt/gnu/bin)else AC_MSG_CHECKING(manual Kermit setting) AC_MSG_RESULT($PATH_KERMIT)fiif test "x$PATH_KERMIT" = x -o "x$PATH_KERMIT" = xnothen AC_DEFINE(KERMIT, "")else AC_DEFINE_UNQUOTED(KERMIT, "$PATH_KERMIT -l %l -b %b")fi# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but# rather ncurses. So we check for it.TERMLIBS=for termlib in tinfo ncurses curses termcap terminfo termlib ; do AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"; break])doneLIBS="$LIBS $TERMLIBS"if test "x$gt_cv_func_gettext_libc" != xyesthen if test "x$nls_cv_force_use_gnu_gettext" != xyes then AC_CHECK_LIB(intl, gettext) fifidnl Checks for header files.dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses.if test "x$termlib" = xncurses; then dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined. AC_CHECK_HEADERS(ncurses/termcap.h)fidnl Checks for header files.AC_HEADER_DIRENTAC_HEADER_STDCAC_HEADER_SYS_WAITAC_HEADER_STATAC_HEADER_TIMEAM_SYS_POSIX_TERMIOSAM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTLif test $am_cv_sys_posix_termios = yes; then AC_DEFINE(POSIX_TERMIOS)fiAC_CHECK_HEADERS(stdarg.h varargs.h termcap.h termio.h termios.h \ setjmp.h errno.h pwd.h signal.h fcntl.h sgtty.h locale.h \ sys/ptem.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h \ sys/ttold.h sys/param.h unistd.h posix1_lim.h sgtty.h features.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAM_C_PROTOTYPESAC_TYPE_UID_TAC_TYPE_MODE_TAC_TYPE_PID_TAC_TYPE_SIZE_TAC_STRUCT_TMdnl Checks for library functions.AC_TYPE_SIGNALAM_FUNC_ERROR_AT_LINEAC_FUNC_CLOSEDIR_VOIDAM_WITH_DMALLOCAC_CHECK_FUNCS(getcwd getwd strerror strstr vsnprintf vprintf)AC_CHECK_FUNC(select, AC_DEFINE(HAVE_SELECT) KEYSERV="", KEYSERV="minicom.keyserv")AC_SUBST(KEYSERV)AC_REPLACE_FUNCS(snprintf usleep getopt getopt_long)dnl system capabilitiesAC_SYS_LONG_FILE_NAMESdnl ---------------------------------------------------------------AC_MSG_CHECKING(for com line lock directory)if test "x$UUCPLOCK" != xthen if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/etc/locks if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/var/lock if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/usr/spool/locks if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/var/spool/locks if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/usr/spool/uucp if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen UUCPLOCK=/var/spool/uucp if test -d $UUCPLOCK then AC_MSG_RESULT($UUCPLOCK) AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK") else UUCPLOCK="" fifiif test "x$UUCPLOCK" = xthen AC_MSG_ERROR(No suitable lock directory)fidnl ---------------------------------------------------------------AC_MSG_CHECKING(for default serial port device)if test "x$DFL_PORT" != xthen if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/modem if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/cua/b if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/cua2p0 if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/ttyS1 if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/tty01 if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen DFL_PORT=/dev/tty8 if test -c $DFL_PORT then AC_MSG_RESULT($DFL_PORT) AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT") else DFL_PORT="" fifiif test "x$DFL_PORT" = xthen AC_MSG_ERROR(No suitable default serial port)fidnl ---------------------------------------------------------------AC_MSG_CHECKING(for default baud rate)tmp_match=nofor tmp_baud_rate in 300 1200 2400 4800 9600 19200 38400 57600 115200 230400do if test "x$DEF_BAUD" = "x$tmp_baud_rate" then tmp_match=yes AC_DEFINE_UNQUOTED(DEF_BAUD, "$DEF_BAUD") AC_MSG_RESULT($DEF_BAUD) fidoneif test "x$tmp_match" != xyesthen AC_MSG_ERROR(No suitable default baud rate)fiif test "x$ac_cv_header_getopt_h" = xnothen CFLAGS="$CFLAGS -I\$(top_srcdir)/lib"fidnl ---------------------------------------------------------------dnl minicom config file directoryAC_DEFINE_DIR(LIBDIR, MINICOM_LIBDIR)dnl locale base directory, off of arch-independent data dirlocaledir="$datadir/locale"AC_DEFINE_DIR(LOCALEDIR, localedir)AC_OUTPUT(Makefile \ doc/Makefile \ extras/Makefile \ extras/linux/Makefile \ extras/tables/Makefile \ extras/termcap/Makefile \ extras/terminfo/Makefile \ man/Makefile \ po/Makefile.in \ intl/Makefile \ lib/Makefile \ src/Makefile \ minicom.spec)echo ""echo ""echo "Configuration finished. You may now issue"echo ""echo " make ; make install"echo ""echo "Note 1: The \"make install\" step is usually executed as root."echo "Note 2: AFTER \"make install\" completes, you may have to change"echo " device permissions, or make minicom setuid, in order to"echo " properly access the serial devices."echo ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -