📄 configure.in
字号:
dnl# -*- sh -*-dnl#dnl# $Id: configure.in,v 1.126 2003/03/07 02:32:17 gcw Exp $dnl#dnl# Process this file with autoconf to produce a configure script.dnl#AC_INIT(src/feature.h)AC_CONFIG_AUX_DIR(autoconf)AC_CONFIG_HEADER(config.h:autoconf/config.h.in)dnl RXVT versionchangequote(, )dnlVERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`LSMDATE=`sed -n -e 's/^.*[ \t]LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`changequote([, ])dnlAC_SUBST(VERSION)dnl AC_SUBST(DATE)dnl AC_SUBST(LSMDATE)dnl AC_SUBST(LIBVERSION)dnl echo ""echo "configuring for rxvt $VERSION"echo ""dnl# Checks for programs.dnl AC_MAKE_SETAC_PROG_CCAC_PROG_CPPAC_PROG_INSTALLAC_PROG_AWKdnl# system hacksAC_AIXAC_ISC_POSIXAC_ENABLE_SHARED(no)dnl# libtoolAC_ENABLE_STATIC(yes)dnl# libtoolAC_PROG_LIBTOOL()dnl# libtoolMALLOC_TYPE=Ssupport_addstrings=nosupport_frills=nosupport_linespace=nosupport_graphics=nosupport_inheritpixmap=nosupport_keepscrolling=nosupport_menubar=no support_mousewheel=nosupport_mouseslipwheel=nosupport_oldselection=nosupport_utmp=nosupport_wtmp=nosupport_lastlog=nosupport_xim=nosupport_xpm=nosupport_scroll_rxvt=nosupport_scroll_next=nosupport_scroll_xterm=nomultichar_set=nodnl# --------------------------------------------------------------------------dnl# CHECKING COMMAND LINE OPTIONSdnl# --------------------------------------------------------------------------if test "x$enable_shared" = xyes; then AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) INSTALL_LIBRXVT=yesfiAC_SUBST(INSTALL_LIBRXVT)AC_ARG_ENABLE(everything, [ --enable-everything enable standard non-multichoice features: marked * NOTE: this option is order dependent NOTE: automatically enabled with --enable-shared], [if test x$enableval = xyes; then support_24bit=yes support_frills=yes support_linespace=yes support_graphics=yes support_inheritpixmap=yes support_keepscrolling=yes support_lastlog=yes support_menubar=yes support_mousewheel=yes support_mouseslipwheel=yes support_oldselection=yes support_scroll_rxvt=yes support_scroll_next=yes support_scroll_xterm=yes support_utmp=yes support_wtmp=yes support_xim=yes support_xpm=yes fi])AC_ARG_ENABLE(languages, [ --enable-languages enable multichar glyph language support], [if test x$enableval = xyes; then AC_DEFINE(MULTICHAR_SET, 1, Define to enable multichar glyph language support) multichar_set=yes fi])AC_ARG_WITH(encoding, [ --with-encoding=NAME set language default encoding to NAME (default: sjis) (eucj|sjis|big5|gb|kr|noenc)], [if test x$enableval = xyes; then withval=`echo $withval | tr '[a-z]' '[A-Z]'` AC_DEFINE_UNQUOTED(MULTICHAR_ENCODING, $withval, Define default multichar glyph encoding) fi])AC_ARG_ENABLE(utmp, [ --enable-utmp enable utmp (utmpx) support *], [if test x$enableval = xyes -o x$enableval = xno; then support_utmp=$enableval fi])AC_ARG_ENABLE(wtmp, [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)*], [if test x$enableval = xyes -o x$enableval = xno; then support_wtmp=$enableval fi])AC_ARG_ENABLE(lastlog, [ --enable-lastlog enable lastlog support (requires --enable-utmp) *], [if test x$enableval = xyes -o x$enableval = xno; then support_lastlog=$enableval fi])AC_ARG_ENABLE(xpm-background, [ --enable-xpm-background enable XPM background pixmaps *], [if test x$enableval = xyes -o x$enableval = xno; then support_xpm=$enableval fi])AC_ARG_ENABLE(transparency, [ --enable-transparency enable transparent backgrounds *], [if test x$enableval = xyes -o x$enableval = xno; then support_inheritpixmap=$enableval fi])AC_ARG_ENABLE(menubar, [ --enable-menubar enable menubar *], [if test x$enableval = xyes -o x$enableval = xno; then support_menubar=$enableval fi])AC_ARG_ENABLE(graphics, [ --enable-graphics enable rxvt own graphics mode (see src/graphics) *], [if test x$enableval = xyes -o x$enableval = xno; then support_graphics=$enableval fi])AC_ARG_ENABLE(rxvt-scroll, [ --enable-rxvt-scroll enable rxvt style scrollbar *], [if test x$enableval = xyes; then support_scroll_rxvt=yes fi])AC_ARG_ENABLE(next-scroll, [ --enable-next-scroll enable NeXT style scrollbar *], [if test x$enableval = xyes; then support_scroll_next=yes fi])AC_ARG_ENABLE(xterm-scroll, [ --enable-xterm-scroll enable Xterm style scrollbar *], [if test x$enableval = xyes; then support_scroll_xterm=yes fi])AC_ARG_ENABLE(half-shadow, [ --enable-half-shadow use half width/height shadow on rxvt scrollbar], [if test x$enableval = xyes; then AC_DEFINE(HALFSHADOW, 1, Define if you want the depth of scrollbars and menus to be less) fi])AC_ARG_ENABLE(xim, [ --enable-xim XIM (X Input Method) protocol support *], [if test x$enableval = xyes -o x$enableval = xno; then support_xim=$enableval fi])AC_ARG_ENABLE(greek, [ --enable-greek enable greek keyboard support], [if test x$enableval = xyes; then AC_DEFINE(GREEK_SUPPORT, 1, Define if you want support for Greek Elot-928 & IBM-437 keyboard) OBJGRKELOT="grkelot.o" fi])AC_ARG_ENABLE(ttygid, [ --enable-ttygid enable tty setting to group named "tty"], [if test x$enableval = xyes; then AC_DEFINE(TTY_GID_SUPPORT, 1, Define to change gid of ttys to group tty) fi])AC_ARG_ENABLE(backspace-key, [ --disable-backspace-key disable handling of the backspace key], [if test x$enableval = xno; then AC_DEFINE(NO_BACKSPACE_KEY, 1, Define if you don't want support for the backspace key) fi])AC_ARG_ENABLE(delete-key, [ --disable-delete-key disable handling of the delete key], [if test x$enableval = xno; then AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) fi])AC_ARG_ENABLE(resources, [ --disable-resources disable all resource checking], [if test x$enableval = xno; then AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) fi])AC_ARG_ENABLE(xgetdefault, [ --enable-xgetdefault enable resources via X instead of our small version], [if test x$enableval = xyes; then AC_DEFINE(USE_XGETDEFAULT, 1, Define if you want to use XGetDefault instead of our internal version) fi])AC_ARG_ENABLE(strings, [ --enable-strings enable some replacement system functions], [if test x$enableval = xyes -o x$enableval = xno; then support_addstrings=$enableval fi])AC_ARG_ENABLE(swapscreen, [ --disable-swapscreen disable swap screen support], [if test x$enableval = xno; then AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace) fi])AC_ARG_ENABLE(frills, [ --enable-frills enable support for rarely used features *], [if test x$enableval = xyes -o x$enableval = xno; then support_frills=$enableval fi])AC_ARG_ENABLE(linespace, [ --enable-linespace enable support for linespace *], [if test x$enableval = xyes -o x$enableval = xno; then support_linespace=$enableval fi])AC_ARG_ENABLE(24bit, [ --enable-24bit enable support for using 24bit visuals if available *], [if test x$enableval = xyes -o x$enableval = xno; then support_24bit=$enableval fi])AC_ARG_ENABLE(keepscrolling, [ --enable-keepscrolling enable continual scrolling on scrollbar arrow press *], [if test x$enableval = xyes -o x$enableval = xno; then support_keepscrolling=$enableval fi])AC_ARG_ENABLE(mousewheel, [ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5 *], [if test x$enableval = xyes -o x$enableval = xno; then support_mousewheel=$enableval fi])AC_ARG_ENABLE(slipwheeling, [ --enable-slipwheeling enable slip wheel scrolling (requires previous) *], [if test x$enableval = xyes -o x$enableval = xno; then support_mouseslipwheel=$enableval fi])AC_ARG_ENABLE(old-selection, [ --enable-old-selection enable v2.20 (& prior) mouse selection style support*], [if test x$enableval = xyes -o x$enableval = xno; then support_oldselection=$enableval fi])AC_ARG_ENABLE(new-selection, [ --disable-new-selection disable new mouse (xterm) selection style support], [if test x$enableval = xno; then AC_DEFINE(NO_NEW_SELECTION, 1, Define to remove xterm style mouse selection) fi])AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc enable Gray Watson's malloc - for debugging use], [if test x$enableval = xyes; then MALLOC_TYPE=G DEBUG=-DDEBUG_MALLOC DLIB="-L/usr/local/lib -ldmalloc" DINCLUDE=-I/usr/local/include fi])AC_ARG_ENABLE(dlmalloc, [ --enable-dlmalloc enable Doug Lea's malloc - for production use NOTE: enable only one malloc package], [if test x$enableval = xyes; then MALLOC_TYPE=D DEBUG= DLIB="-L/usr/local/lib -ldlmalloc" DINCLUDE= fi])AC_ARG_ENABLE(smart-resize, [ --enable-smart-resize enable smart growth/shrink behaviour], [if test x$enableval = xyes; then AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) fi])AC_ARG_ENABLE(256-color, [ --enable-256-color enable 256-color support], [if test x$enableval = xyes; then AC_DEFINE(TTY_256COLOR, 1, Define if you want 256 colour support) fi])AC_ARG_WITH(term, [ --with-term=NAME set the terminal to NAME (default \"xterm\")], [if test x$withval != x; then AC_DEFINE_UNQUOTED(TERMENV, "$withval",Set TERM to the value given by configure) term="$withval" fi])AC_ARG_WITH(terminfo, [ --with-terminfo=PATH set the path to the terminfo tree to PATH], [if test x$withval != x; then AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" fi])dnl# --------------------------------------------------------------------------AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes)dnl# --------------------------------------------------------------------------dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'dnl#if test -z "$CFLAGS"; then if test -z "$CCOPTS"; then CCOPTS='-O'dnl> if test "x$GCC" = xyes; thendnl> if test x$system = xLinux; thendnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'dnl> fidnl> fi fi CFLAGS="$CCOPTS"fiAC_PATH_PROG(MV, mv, mv)AC_PATH_PROG(RM, rm, rm)AC_PATH_PROG(CP, cp, cp)AC_PATH_PROG(LN, ln, ln)AC_PATH_PROG(SED, sed, sed)AC_PATH_PROG(ECHO, echo, echo)AC_PATH_PROG(CMP, cmp, cmp)AC_PATH_PROG(TBL, tbl)dnl# need a neat way to detect SVR4 or its featuresdnl# in src/command.c we use these functions:dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h>dnl# - but are these also defined for other systems?dnl# hack to find if this is SVR4 -- who knows?dnl## AC_MSG_CHECKING(for SVR4)dnl## AC_EGREP_CPP(yes,dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__)dnl## yes;dnl## #endifdnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?))AC_PATH_XTRAdnl# the only reasonable way to find libXpm is do-it-yourselfdnl# only check if we want xpm-backgroundif test x$support_xpm = xyes; then VT_FIND_LIBXPM if test x$no_xpm = xyes; then support_xpm=needsmanualspecification fifidnl# --------------------------------------------------------------------------dnl# CHECKING FOR HEADER FILESdnl# --------------------------------------------------------------------------AC_HEADER_SYS_WAITAC_CHECK_HEADERS( \ assert.h \ fcntl.h \ grp.h \ libc.h \ lastlog.h \ stdarg.h \ stdlib.h \ string.h \ termios.h \ unistd.h \ sys/byteorder.h \ sys/ioctl.h \ sys/select.h \ sys/sockio.h \ sys/strredir.h \ sys/time.h \ utmp.h \ utmpx.h \)AC_HEADER_TIMEdnl# check to allow both <termios.h> and <sys/ioctl.h>AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,[AC_TRY_COMPILE([#include <stdio.h>#include <sys/ioctl.h>#ifdef HAVE_TERMIOS_H#include <termios.h>#endif], [int a = ECHO;], rxvt_cv_header_sysioctl=yes, rxvt_cv_header_sysioctl=no)])dnl# ELF systems may want to store paths for dynamic libraries.dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath"dnl# At least one version of SunOS wants "-R path" but it's not checked yet.if test -n "$GCC"; then LDARG="-Wl,"else LDARG=""fichangequote(, )dnlR_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-rpath '$LDARG'\1/g'changequote([, ])dnlac_save_CFLAGS=$CFLAGSac_save_LIBS=$LIBSCFLAGS="$CFLAGS $X_CFLAGS"LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath,[AC_TRY_RUN([main(){ exit(0); (void) XOpenDisplay("foobar");}], rxvt_cv_rpath=yes, rxvt_cv_rpath=no, dnl AC_MSG_WARN([You may need to check the LIBS line]))]) if test x$rxvt_cv_rpath != xyes; then changequote(, )dnl R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' changequote([, ])dnl LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -