1 | dnl# -*- sh -*- |
1 | dnl# -*- sh -*- |
2 | dnl# |
2 | dnl# |
3 | dnl# Process this file with autoconf to produce a configure script. |
3 | dnl# Process this file with autoconf to produce a configure script. |
4 | dnl# |
4 | dnl# |
|
|
5 | orig_CXXFLAGS="$CXXFLAGS" |
|
|
6 | |
5 | AC_INIT |
7 | AC_INIT |
6 | AC_CONFIG_SRCDIR([src/feature.h]) |
8 | AC_CONFIG_SRCDIR([src/feature.h]) |
7 | AC_CONFIG_AUX_DIR(autoconf) |
9 | AC_CONFIG_AUX_DIR(autoconf) |
8 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
10 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
9 | |
11 | |
… | |
… | |
33 | AC_PROG_INSTALL |
35 | AC_PROG_INSTALL |
34 | AC_PROG_AWK |
36 | AC_PROG_AWK |
35 | |
37 | |
36 | AC_LANG(C) |
38 | AC_LANG(C) |
37 | |
39 | |
|
|
40 | dnl# -------------------------------------------------------------------------- |
|
|
41 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
|
|
42 | dnl# |
|
|
43 | if test -z "$orig_CXXFLAGS"; then |
|
|
44 | CXXFLAGS='-O' |
|
|
45 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
|
|
46 | CXXFLAGS="-g -O3" |
|
|
47 | fi |
|
|
48 | CFLAGS="$CXXFLAGS" |
|
|
49 | fi |
|
|
50 | |
38 | LINKER="$CXX" |
51 | LINKER="$CXX" |
39 | if test x$GCC = xyes && test x$GXX = xyes; then |
52 | if test x$GCC = xyes && test x$GXX = xyes; then |
40 | AC_CHECK_LIB(supc++, main, [ |
53 | AC_CHECK_LIB(supc++, main, [ |
41 | LINKER="$CC" |
54 | LINKER="$CC" |
42 | LIBS="$LIBS -lsupc++" |
55 | LIBS="$LIBS -lsupc++" |
… | |
… | |
76 | AC_PROG_LIBTOOL()dnl# libtool |
89 | AC_PROG_LIBTOOL()dnl# libtool |
77 | |
90 | |
78 | MALLOC_TYPE=S |
91 | MALLOC_TYPE=S |
79 | support_addstrings=no |
92 | support_addstrings=no |
80 | support_frills=no |
93 | support_frills=no |
81 | support_linespace=no |
|
|
82 | support_inheritpixmap=no |
94 | support_inheritpixmap=no |
83 | support_tinting=no |
95 | support_tinting=no |
84 | support_fading=no |
96 | support_fading=no |
85 | support_keepscrolling=no |
97 | support_keepscrolling=no |
86 | support_selectionscrolling=no |
98 | support_selectionscrolling=no |
… | |
… | |
122 | NOTE: this option is order dependent |
134 | NOTE: this option is order dependent |
123 | NOTE: automatically enabled with --enable-shared], |
135 | NOTE: automatically enabled with --enable-shared], |
124 | [if test x$enableval = xyes; then |
136 | [if test x$enableval = xyes; then |
125 | support_24bit=yes |
137 | support_24bit=yes |
126 | support_frills=yes |
138 | support_frills=yes |
127 | support_linespace=yes |
|
|
128 | support_inheritpixmap=yes |
139 | support_inheritpixmap=yes |
129 | support_tinting=yes |
140 | support_tinting=yes |
130 | support_fading=yes |
141 | support_fading=yes |
131 | support_keepscrolling=yes |
142 | support_keepscrolling=yes |
132 | support_selectionscrolling=yes |
143 | support_selectionscrolling=yes |
… | |
… | |
358 | [ --enable-frills enable support for rarely used features], |
369 | [ --enable-frills enable support for rarely used features], |
359 | [if test x$enableval = xyes -o x$enableval = xno; then |
370 | [if test x$enableval = xyes -o x$enableval = xno; then |
360 | support_frills=$enableval |
371 | support_frills=$enableval |
361 | fi]) |
372 | fi]) |
362 | |
373 | |
363 | AC_ARG_ENABLE(linespace, |
|
|
364 | [ --enable-linespace enable support for linespace], |
|
|
365 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
366 | support_linespace=$enableval |
|
|
367 | fi]) |
|
|
368 | |
|
|
369 | AC_ARG_ENABLE(24bit, |
374 | AC_ARG_ENABLE(24bit, |
370 | [ --enable-24bit enable support for using 24bit visuals if available], |
375 | [ --enable-24bit enable support for using 24bit visuals if available], |
371 | [if test x$enableval = xyes -o x$enableval = xno; then |
376 | [if test x$enableval = xyes -o x$enableval = xno; then |
372 | support_24bit=$enableval |
377 | support_24bit=$enableval |
373 | fi]) |
378 | fi]) |
… | |
… | |
452 | fi]) |
457 | fi]) |
453 | |
458 | |
454 | dnl# -------------------------------------------------------------------------- |
459 | dnl# -------------------------------------------------------------------------- |
455 | |
460 | |
456 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
461 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
457 | |
|
|
458 | dnl# -------------------------------------------------------------------------- |
|
|
459 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
|
|
460 | dnl# |
|
|
461 | if test -z "$CFLAGS"; then |
|
|
462 | if test -z "$CCOPTS"; then |
|
|
463 | CCOPTS='-O' |
|
|
464 | dnl> if test "x$GCC" = xyes; then |
|
|
465 | dnl> if test x$system = xLinux; then |
|
|
466 | dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce' |
|
|
467 | dnl> fi |
|
|
468 | dnl> fi |
|
|
469 | fi |
|
|
470 | CFLAGS="$CCOPTS" |
|
|
471 | fi |
|
|
472 | |
462 | |
473 | AC_PATH_PROG(MV, mv, mv) |
463 | AC_PATH_PROG(MV, mv, mv) |
474 | AC_PATH_PROG(RM, rm, rm) |
464 | AC_PATH_PROG(RM, rm, rm) |
475 | AC_PATH_PROG(CP, cp, cp) |
465 | AC_PATH_PROG(CP, cp, cp) |
476 | AC_PATH_PROG(LN, ln, ln) |
466 | AC_PATH_PROG(LN, ln, ln) |
… | |
… | |
528 | sys/stropts.h \ |
518 | sys/stropts.h \ |
529 | sys/time.h \ |
519 | sys/time.h \ |
530 | utmp.h \ |
520 | utmp.h \ |
531 | utmpx.h \ |
521 | utmpx.h \ |
532 | stdint.h \ |
522 | stdint.h \ |
|
|
523 | pty.h \ |
|
|
524 | wchar.h \ |
|
|
525 | cwchar \ |
|
|
526 | clocale \ |
533 | ) |
527 | ) |
534 | |
528 | |
535 | AC_HEADER_TIME |
529 | AC_HEADER_TIME |
536 | |
530 | |
537 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
531 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
… | |
… | |
615 | |
609 | |
616 | dnl# see usage below |
610 | dnl# see usage below |
617 | AC_DEFUN(RXVT_CHECK_SIZE, |
611 | AC_DEFUN(RXVT_CHECK_SIZE, |
618 | [AC_CACHE_CHECK([for $2], $1, |
612 | [AC_CACHE_CHECK([for $2], $1, |
619 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
613 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
620 | if test $ac_cv_sizeof_char -ge $3; then |
614 | if test "$ac_cv_sizeof_char" -ge $3; then |
621 | $1="$4 char" |
615 | $1="$4 char" |
622 | else |
616 | else |
623 | if test $ac_cv_sizeof_short -ge $3; then |
617 | if test "$ac_cv_sizeof_short" -ge $3; then |
624 | $1="$4 short" |
618 | $1="$4 short" |
625 | else |
619 | else |
626 | if test $ac_cv_sizeof_int -ge $3; then |
620 | if test "$ac_cv_sizeof_int" -ge $3; then |
627 | $1="$4 int" |
621 | $1="$4 int" |
628 | else |
622 | else |
629 | if test $ac_cv_sizeof_long -ge $3; then |
623 | if test "$ac_cv_sizeof_long" -ge $3; then |
630 | $1="$4 long" |
624 | $1="$4 long" |
631 | else |
625 | else |
632 | if test $ac_cv_sizeof_long_long -ge $3; then |
626 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
633 | $1="$4 long long" |
627 | $1="$4 long long" |
634 | else |
628 | else |
635 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
629 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
636 | fi |
630 | fi |
637 | fi |
631 | fi |
… | |
… | |
664 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
658 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
665 | dnl AC_SUBST(rxvt_uint64_typedef) |
659 | dnl AC_SUBST(rxvt_uint64_typedef) |
666 | dnl# |
660 | dnl# |
667 | dnl# Now look for another we use |
661 | dnl# Now look for another we use |
668 | dnl# |
662 | dnl# |
669 | if test $ac_cv_sizeof_int_p -eq 8; then |
663 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
670 | rxvt_intp_define="#define intp_t int64_t" |
664 | rxvt_intp_define="#define intp_t int64_t" |
671 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
665 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
672 | else |
666 | else |
673 | if test $ac_cv_sizeof_int_p -eq 4; then |
667 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
674 | rxvt_intp_define="#define intp_t int32_t" |
668 | rxvt_intp_define="#define intp_t int32_t" |
675 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
669 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
676 | else |
670 | else |
677 | if test $ac_cv_sizeof_int_p -eq 2; then |
671 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
678 | rxvt_intp_define="#define intp_t int16_t" |
672 | rxvt_intp_define="#define intp_t int16_t" |
679 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
673 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
680 | else |
674 | else |
681 | rxvt_intp_define="#error set intp_t" |
675 | rxvt_intp_define="#error set intp_t" |
682 | rxvt_u_intp_define="#error set u_intp_t" |
676 | rxvt_u_intp_define="#error set u_intp_t" |
… | |
… | |
1233 | AC_DEFINE(MENUBAR, 1, Define if you want Menubar support) |
1227 | AC_DEFINE(MENUBAR, 1, Define if you want Menubar support) |
1234 | fi |
1228 | fi |
1235 | if test x$support_frills = xyes; then |
1229 | if test x$support_frills = xyes; then |
1236 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
1230 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
1237 | fi |
1231 | fi |
1238 | if test x$support_linespace = xno; then |
|
|
1239 | AC_DEFINE(NO_LINESPACE, 1, Define if you don't want support linespace) |
|
|
1240 | fi |
|
|
1241 | if test x$support_24bit = xyes; then |
1232 | if test x$support_24bit = xyes; then |
1242 | 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) |
1233 | 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) |
1243 | fi |
1234 | fi |
1244 | if test x$support_mousewheel = xyes; then |
1235 | if test x$support_mousewheel = xyes; then |
1245 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
1236 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
… | |
… | |
1373 | |
1364 | |
1374 | AC_CONFIG_FILES([autoconf/Make.common \ |
1365 | AC_CONFIG_FILES([autoconf/Make.common \ |
1375 | Makefile \ |
1366 | Makefile \ |
1376 | doc/Makefile \ |
1367 | doc/Makefile \ |
1377 | src/Makefile \ |
1368 | src/Makefile \ |
1378 | src/test/Makefile \ |
|
|
1379 | src/rxvtlib.h \ |
1369 | src/rxvtlib.h \ |
1380 | W11/Makefile \ |
|
|
1381 | ]) |
1370 | ]) |
1382 | AC_OUTPUT |
1371 | AC_OUTPUT |
1383 | |
1372 | |
1384 | echo "Configuration: |
1373 | echo "Configuration: |
1385 | |
1374 | |