📄 configure.in
字号:
dnl# find lastlogxAC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx,[AC_TRY_RUN([#include <stdio.h>#ifdef HAVE_UTMPX_H#include <utmpx.h>#endif#include <errno.h>main(){ char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL }; FILE *a, *f=fopen("conftestval", "w"); if (!f) exit(1);#ifdef LASTLOGX_FILE fprintf(f, "%s\n", LASTLOGX_FILE); exit(0);#endif#ifdef _PATH_LASTLOGX fprintf(f, "%s\n", _PATH_LASTLOGX); exit(0);#endif for (w = wtmplist; *w; w++) { if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { fprintf(f, "%s\n", *w); exit(0); } } exit(0);}], rxvt_cv_path_lastlogx=`cat conftestval`, rxvt_cv_path_lastlogx=, dnl AC_MSG_WARN([Define RXVT_LASTLOGX_FILE in config.h manually]))])if test x$rxvt_cv_path_lastlogx != x; then AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx)fidnl# --------------------------------------------------------------------------dnl# find ttys/ttytabAC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab,[for ttys_file in dnl /etc/ttys /etc/ttytab;do if test -f "$ttys_file" ; then rxvt_cv_path_ttytab=$ttys_file break fidone])if test x$rxvt_cv_path_ttytab != x; then AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab)fidnl# --------------------------------------------------------------------------dnl# --------------------------------------------------------------------------dnl# this is a really hack test for some basic Xlocale stuffac_save_LIBS=$LIBSac_save_CFLAGS=$CFLAGSCFLAGS="$CFLAGS $X_CFLAGS"LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then LIBS=`echo $LIBS | sed "$R_TRANSLATE"`fiAC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,[AC_TRY_RUN([#include <X11/Xlib.h>main() {char *p;if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)exit (XSupportsLocale() ? 0 : 1);elseexit (1);}], dnl rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no, dnl AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))])if test x$rxvt_cv_func_xlocale = xyes; then AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works)fiAC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,[AC_TRY_LINK([#define X_LOCALE 1#include <X11/Xlocale.h>], [setlocale(LC_CTYPE, "");], rxvt_cv_func_xsetlocale=yes, rxvt_cv_func_xsetlocale=no)])if test x$rxvt_cv_func_xsetlocale = xyes; then AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)fiLIBS=$ac_save_LIBSCFLAGS=$ac_save_CFLAGSAC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,[AC_TRY_LINK([#include <locale.h>], [setlocale(LC_CTYPE, "");], rxvt_cv_func_setlocale=yes, rxvt_cv_func_setlocale=no)])if test x$rxvt_cv_func_setlocale = xyes; then AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)fiAC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,[AC_TRY_LINK([#include <langinfo.h>], [nl_langinfo(CODESET);], rxvt_cv_func_nl_langinfo=yes, rxvt_cv_func_nl_langinfo=no)])if test x$rxvt_cv_func_nl_langinfo = xyes; then AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)fiAC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt,[AC_TRY_LINK([#define _GNU_SOURCE#ifdef HAVE_STDLIB_H# include <stdlib.h>#endif], [(void)getpt();], rxvt_cv_func_getpt=yes, rxvt_cv_func_getpt=no)])if test x$rxvt_cv_func_getpt = xyes; then AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() )fidnl# if we don't guess right then it's up to the userAC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys,[if test x$ac_cv_func_openpty = xyes; then rxvt_cv_ptys=OPENPTY else if test x$ac_cv_func__getpty = xyes; then rxvt_cv_ptys=SGI4 else if test -c /dev/ttyp20; then rxvt_cv_ptys=SCO else if test -c /dev/ptym/clone; then rxvt_cv_ptys=HPUX else if test x$rxvt_cv_func_getpt = xyes; then rxvt_cv_ptys=GLIBC else if test -c /dev/ptc -a -c /dev/pts; then rxvt_cv_ptys=PTC else if test -c /dev/ptc -a -d /dev/pts; then rxvt_cv_ptys=PTC else if test -c /dev/ptmx -a -c /dev/pts/0; then rxvt_cv_ptys=STREAMS else if test x$ac_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; thendnl# catch CYGWIN rxvt_cv_ptys=STREAMS else rxvt_cv_ptys=BSDfififififififififi])if test x$rxvt_cv_ptys = xOPENPTY; then AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xSCO; then AC_DEFINE(PTYS_ARE_NUMERIC, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xSTREAMS; then AC_DEFINE(PTYS_ARE_PTMX, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xPTC; then AC_DEFINE(PTYS_ARE_PTC, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xSGI4; then AC_DEFINE(PTYS_ARE__GETPTY, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xCONVEX; then AC_DEFINE(PTYS_ARE_GETPTY, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xGLIBC; then AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xHPUX; then AC_DEFINE(PTYS_ARE_CLONE, 1, Define for this pty type)fiif test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type)fiAC_CHECKING(for pty ranges)ptys=`echo /dev/pty??`pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`if test x$pch1 != x; then AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX)fiif test x$pch2 != x; then AC_DEFINE_UNQUOTED(PTYCHAR2, "$pch2", Define for second char in devptyXX)fidnl# FreeBSD needs to link libxpg4AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])dnl# --------------------------------------------------------------------------dnl# now add and remove other stuffdnl# --------------------------------------------------------------------------if test x$support_graphics = xyes; then AC_DEFINE(RXVT_GRAPHICS, 1, Define if you want Rob Nation's own graphic mode) OBJGRAPHICS="graphics.o"fiif test x$support_inheritpixmap = xyes; then AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background)fiif test x$support_keepscrolling = xno; then AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)fiif test x$support_menubar = xyes; then AC_DEFINE(MENUBAR, 1, Define if you want Menubar support) OBJMENUBAR="menubar.o"fiif test x$support_frills = xno; then AC_DEFINE(NO_FRILLS, 1, Define if you don't want handling for rarely used features)fiif test x$support_linespace = xno; then AC_DEFINE(NO_LINESPACE, 1, Define if you don't want support linespace)fiif test x$support_24bit = xyes; then AC_DEFINE(PREFER_24BIT, 1, Define to use a 24 bit visual if the screen has 24 bit mode, even if the default is 8 bit)fiif test x$support_mousewheel = xyes; then AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)fiif test x$support_mouseslipwheel = xyes; then AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)fiif test x$support_oldselection = xno; then AC_DEFINE(NO_OLD_SELECTION, 1, Define to remove old rxvt (ver 2.20 and before) style selection)fiif test x$support_utmp = xyes; then AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) OBJLOGGING="logging.o"fiif test x$support_wtmp = xyes; then AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled)fiif test x$support_lastlog = xyes; then AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled)fiif test x$support_xim = xyes -o x$multichar_set = xyes; then if test x$rxvt_cv_func_xlocale = xyes; then AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) fifiif test x$support_xpm = xyes; then AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm) OBJXPM="xpm.o"fiif test x$support_scroll_rxvt = xyes; then AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars - specify via configure only) OBJSCROLLBAR="scrollbar-rxvt.o" scrolltypes="rxvt"fiif test x$support_scroll_next = xyes; then AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars - specify via configure only) OBJSCROLLBAR="$OBJSCROLLBAR scrollbar-next.o" scrolltypes="$scrolltypes next"fiif test x$support_scroll_xterm = xyes; then AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars - specify via configure only) OBJSCROLLBAR="$OBJSCROLLBAR scrollbar-xterm.o" scrolltypes="$scrolltypes xterm"fidnl> AC_CHECK_FUNCS(gettimeofday putenv select socket)CFLAGS=${CFLAGS--O}LDFLAGS=${LDFLAGS--O}CPPFLAGS="$CPPFLAGS"AC_SUBST(DEBUG)AC_SUBST(DINCLUDE)AC_SUBST(CFLAGS)AC_SUBST(CPPFLAGS)AC_SUBST(LDFLAGS)AC_SUBST(X_CFLAGS)dnl# Attack the libsif test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then DLIB=`echo $DLIB | sed "$R_TRANSLATE"` LIBS=`echo $LIBS | sed "$R_TRANSLATE"` X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"`fiAC_SUBST(DLIB)AC_SUBST(LIBS)AC_SUBST(X_LIBS)AC_SUBST(X_EXTRA_LIBS)if test x$support_addstrings = xyes; then OBJSTRINGS="strings.o"else AC_DEFINE(NO_STRINGS, 1, Define if you don't need to use our replacement string functions)fiOBJLIST="command.o defaultfont.o init.o $OBJGRAPHICS $OBJGRKELOT $OBJLOGGING main.o $OBJMENUBAR misc.o netdisp.o ptytty.o screen.o scrollbar.o $OBJSCROLLBAR $OBJSTRINGS xdefaults.o $OBJXPM"AC_SUBST(OBJLIST)LIBOBJLIST=`echo $OBJLIST | sed 's/\.o/.lo/g'`AC_SUBST(LIBOBJLIST)dnl# common parts of the MakefileMCOMMON=./autoconf/Make.commonAC_SUBST_FILE(MCOMMON)AC_ARG_PROGRAMRXVTNAME=`echo rxvt|sed "$program_transform_name"`AC_SUBST(RXVTNAME)dnl# test for "sun" or "__sun__" before include sys_ioctldnl# revert HAVE_BLAH_H into a "#include <blah.h>"AC_DEFUN(RXVT_DEFINE_TO_INCLUDE, dnl[if test "$$3" = "$4" -o "$$5" = "$6"; then $1="#include <$2>"else $1="/* #include <$2> */"fi dnlAC_SUBST($1)])RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, stdarg.h, ac_cv_header_stdarg_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, stdlib.h, ac_cv_header_stdlib_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_string_h, string.h, ac_cv_header_string_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch)RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes)if test "$multichar_set" = yes; then lib_multicharset="#define MULTICHAR_SET 1"else lib_multicharset="/* #undef MULTICHAR_SET */"fiAC_SUBST(lib_multicharset)AC_OUTPUT(autoconf/Make.common \Makefile \doc/Makefile \src/Makefile \src/graphics/Makefile \src/test/Makefile \src/rxvtlib.h \rclock/Makefile \W11/Makefile \)echo "Configuration: Rxvt version: $VERSION : $DATE Source code location: $srcdir Install path: ${prefix}/bin Compiler: $CC Compiler flags: $CFLAGS"if test "$MALLOC_TYPE" = S; then echo " malloc support: system default"fiif test "$MALLOC_TYPE" = G; then echo " malloc support: Gray Watson's dmalloc"fiif test "$MALLOC_TYPE" = D; then echo " malloc support: Doug Lea's malloc"fiif test x$support_xpm = xyes; then echo " Xpm library: $XPM_LIBS"fiecho "Adding modules:"if test x$OBJGRAPHICS != x; then HASIT="yes"; else HASIT="no"; fiecho " graphics.o: "$HASITif test x$OBJGRKELOT != x; then HASIT="yes"; else HASIT="no"; fiecho " grkelot.o: "$HASITif test x$OBJLOGGING != x; then HASIT="yes"; else HASIT="no"; fiecho " logging.o: "$HASITif test x$OBJMENUBAR != x; then HASIT="yes"; else HASIT="no"; fiecho " menubar.o: "$HASITif test x$support_scroll_rxvt = xyes; then HASIT="yes"; else HASIT="no"; fiecho " scrollbar-rxvt.o: "$HASITif test x$support_scroll_next = xyes; then HASIT="yes"; else HASIT="no"; fiecho " scrollbar-next.o: "$HASITif test x$support_scroll_xterm = xyes; then HASIT="yes"; else HASIT="no"; fiecho " scrollbar-xterm.o: "$HASITif test x$OBJSTRINGS != x; then HASIT="yes"; else HASIT="no"; fiecho " strings.o: "$HASITif test x$OBJXPM != x; then HASIT="yes"; else HASIT="no"; fiecho " xpm.o: "$HASITecho "The following are set in config.h"echo " multichar glyph languages: "$multichar_setecho " pty/tty type: "$rxvt_cv_ptysif test x$support_utmp != xyes; then echo " utmp support: disabled"else echo " utmp support: enabled utmp file: $rxvt_cv_path_utmp utmpx file: $rxvt_cv_path_utmpx wtmp file: $rxvt_cv_path_wtmp wtmpx file: $rxvt_cv_path_wtmpx lastlog file: $rxvt_cv_path_lastlog ttys/ttytab file: $rxvt_cv_path_ttytab"fiif test x$term != x; then echo " set TERM to: $term"fiif test x$terminfo != x; then echo " set TERMINFO to: $terminfo"fiif test x$rxvt_cv_ptys = xUNKNOWN; then echo ".----------------------------------------------------------------." echo ". WARNING: could not determine pty/tty type. Do not build until ." echo ". the appropriate PTYS_ARE_* is defined in config.h ." echo ".----------------------------------------------------------------."fiif test x$support_xpm = xneedsmanualspecification; then echo ".----------------------------------------------------------------." echo ". WARNING: --enable-xpm-background was specified however the ." echo ". XPM includes files and libraries could not be found. ." echo ". XPM backgrounds are now being DISABLED! If you want ." echo ". to use them you should rerun configure with the ." echo ". appropriate --with-xpm-includes=/path/to/xpm/includes ." echo ". and --with-xpm-library=/path/to/xpm/library lines. ." echo ".----------------------------------------------------------------."fiif test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then echo ".----------------------------------------------------------------." echo ". WARNING: --enable-xim was specified however the locale support ." echo ". functions could not be found. ." echo ". XIM is now being DISABLED! ." echo ".----------------------------------------------------------------."fiecho " *** Please check src/feature.h for further options ***"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -