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 | |
… | |
… | |
11 | |
13 | |
12 | dnl RXVT version |
14 | dnl RXVT version |
13 | changequote(, )dnl |
15 | changequote(, )dnl |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
17 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | LSMDATE=`sed -n -e 's/^.*[ \t]LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
|
|
17 | LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
18 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
18 | changequote([, ])dnl |
19 | changequote([, ])dnl |
19 | AC_SUBST(VERSION)dnl |
20 | AC_SUBST(VERSION)dnl |
20 | AC_SUBST(DATE)dnl |
21 | AC_SUBST(DATE)dnl |
21 | AC_SUBST(LSMDATE)dnl |
22 | AC_SUBST(LSMDATE)dnl |
22 | AC_SUBST(LIBVERSION)dnl |
23 | AC_SUBST(LIBVERSION)dnl |
… | |
… | |
33 | AC_PROG_INSTALL |
34 | AC_PROG_INSTALL |
34 | AC_PROG_AWK |
35 | AC_PROG_AWK |
35 | |
36 | |
36 | AC_LANG(C) |
37 | AC_LANG(C) |
37 | |
38 | |
|
|
39 | dnl# -------------------------------------------------------------------------- |
|
|
40 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
|
|
41 | dnl# |
|
|
42 | if test -z "$orig_CXXFLAGS"; then |
|
|
43 | CXXFLAGS='-O' |
|
|
44 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
|
|
45 | CXXFLAGS="-g -O3" |
|
|
46 | fi |
|
|
47 | CFLAGS="$CXXFLAGS" |
|
|
48 | fi |
|
|
49 | |
38 | LINKER="$CXX" |
50 | LINKER="$CXX" |
39 | if test x$GCC = xyes && test x$GXX = xyes; then |
51 | if test x$GCC = xyes && test x$GXX = xyes; then |
40 | AC_CHECK_LIB(supc++, main, [ |
52 | AC_CHECK_LIB(supc++, main, [ |
41 | LINKER="$CC" |
53 | LINKER="$CC" |
42 | LIBS="$LIBS -lsupc++" |
54 | LIBS="$LIBS -lsupc++" |
… | |
… | |
69 | |
81 | |
70 | dnl solaris needs to link libnsl and socket |
82 | dnl solaris needs to link libnsl and socket |
71 | AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"]) |
83 | AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"]) |
72 | AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) |
84 | AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) |
73 | |
85 | |
74 | AC_ENABLE_SHARED(no)dnl# libtool |
86 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
75 | AC_ENABLE_STATIC(yes)dnl# libtool |
87 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
76 | AC_PROG_LIBTOOL()dnl# libtool |
88 | dnl AC_PROG_LIBTOOL()dnl# libtool |
77 | |
89 | |
78 | MALLOC_TYPE=S |
90 | MALLOC_TYPE=S |
79 | support_addstrings=no |
91 | support_addstrings=no |
80 | support_frills=no |
92 | support_frills=no |
81 | support_inheritpixmap=no |
93 | support_inheritpixmap=no |
… | |
… | |
445 | |
457 | |
446 | dnl# -------------------------------------------------------------------------- |
458 | dnl# -------------------------------------------------------------------------- |
447 | |
459 | |
448 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
460 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
449 | |
461 | |
450 | dnl# -------------------------------------------------------------------------- |
|
|
451 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
|
|
452 | dnl# |
|
|
453 | if test -z "$CFLAGS"; then |
|
|
454 | if test -z "$CCOPTS"; then |
|
|
455 | CCOPTS='-O' |
|
|
456 | dnl> if test "x$GCC" = xyes; then |
|
|
457 | dnl> if test x$system = xLinux; then |
|
|
458 | dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce' |
|
|
459 | dnl> fi |
|
|
460 | dnl> fi |
|
|
461 | fi |
|
|
462 | CFLAGS="$CCOPTS" |
|
|
463 | fi |
|
|
464 | |
|
|
465 | AC_PATH_PROG(MV, mv, mv) |
462 | AC_PATH_PROG(MV, mv, mv) |
466 | AC_PATH_PROG(RM, rm, rm) |
463 | AC_PATH_PROG(RM, rm, rm) |
467 | AC_PATH_PROG(CP, cp, cp) |
464 | AC_PATH_PROG(CP, cp, cp) |
468 | AC_PATH_PROG(LN, ln, ln) |
465 | AC_PATH_PROG(LN, ln, ln) |
469 | AC_PATH_PROG(SED, sed, sed) |
466 | AC_PATH_PROG(SED, sed, sed) |
… | |
… | |
520 | sys/stropts.h \ |
517 | sys/stropts.h \ |
521 | sys/time.h \ |
518 | sys/time.h \ |
522 | utmp.h \ |
519 | utmp.h \ |
523 | utmpx.h \ |
520 | utmpx.h \ |
524 | stdint.h \ |
521 | stdint.h \ |
|
|
522 | pty.h \ |
|
|
523 | wchar.h \ |
|
|
524 | cwchar \ |
|
|
525 | clocale \ |
525 | ) |
526 | ) |
526 | |
527 | |
527 | AC_HEADER_TIME |
528 | AC_HEADER_TIME |
528 | |
529 | |
529 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
530 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
… | |
… | |
607 | |
608 | |
608 | dnl# see usage below |
609 | dnl# see usage below |
609 | AC_DEFUN(RXVT_CHECK_SIZE, |
610 | AC_DEFUN(RXVT_CHECK_SIZE, |
610 | [AC_CACHE_CHECK([for $2], $1, |
611 | [AC_CACHE_CHECK([for $2], $1, |
611 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
612 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
612 | if test $ac_cv_sizeof_char -ge $3; then |
613 | if test "$ac_cv_sizeof_char" -ge $3; then |
613 | $1="$4 char" |
614 | $1="$4 char" |
614 | else |
615 | else |
615 | if test $ac_cv_sizeof_short -ge $3; then |
616 | if test "$ac_cv_sizeof_short" -ge $3; then |
616 | $1="$4 short" |
617 | $1="$4 short" |
617 | else |
618 | else |
618 | if test $ac_cv_sizeof_int -ge $3; then |
619 | if test "$ac_cv_sizeof_int" -ge $3; then |
619 | $1="$4 int" |
620 | $1="$4 int" |
620 | else |
621 | else |
621 | if test $ac_cv_sizeof_long -ge $3; then |
622 | if test "$ac_cv_sizeof_long" -ge $3; then |
622 | $1="$4 long" |
623 | $1="$4 long" |
623 | else |
624 | else |
624 | if test $ac_cv_sizeof_long_long -ge $3; then |
625 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
625 | $1="$4 long long" |
626 | $1="$4 long long" |
626 | else |
627 | else |
627 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
628 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
628 | fi |
629 | fi |
629 | fi |
630 | fi |
… | |
… | |
656 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
657 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
657 | dnl AC_SUBST(rxvt_uint64_typedef) |
658 | dnl AC_SUBST(rxvt_uint64_typedef) |
658 | dnl# |
659 | dnl# |
659 | dnl# Now look for another we use |
660 | dnl# Now look for another we use |
660 | dnl# |
661 | dnl# |
661 | if test $ac_cv_sizeof_int_p -eq 8; then |
662 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
662 | rxvt_intp_define="#define intp_t int64_t" |
663 | rxvt_intp_define="#define intp_t int64_t" |
663 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
664 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
664 | else |
665 | else |
665 | if test $ac_cv_sizeof_int_p -eq 4; then |
666 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
666 | rxvt_intp_define="#define intp_t int32_t" |
667 | rxvt_intp_define="#define intp_t int32_t" |
667 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
668 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
668 | else |
669 | else |
669 | if test $ac_cv_sizeof_int_p -eq 2; then |
670 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
670 | rxvt_intp_define="#define intp_t int16_t" |
671 | rxvt_intp_define="#define intp_t int16_t" |
671 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
672 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
672 | else |
673 | else |
673 | rxvt_intp_define="#error set intp_t" |
674 | rxvt_intp_define="#error set intp_t" |
674 | rxvt_u_intp_define="#error set u_intp_t" |
675 | rxvt_u_intp_define="#error set u_intp_t" |
… | |
… | |
1362 | |
1363 | |
1363 | AC_CONFIG_FILES([autoconf/Make.common \ |
1364 | AC_CONFIG_FILES([autoconf/Make.common \ |
1364 | Makefile \ |
1365 | Makefile \ |
1365 | doc/Makefile \ |
1366 | doc/Makefile \ |
1366 | src/Makefile \ |
1367 | src/Makefile \ |
1367 | src/test/Makefile \ |
|
|
1368 | src/rxvtlib.h \ |
1368 | src/rxvtlib.h \ |
1369 | W11/Makefile \ |
|
|
1370 | ]) |
1369 | ]) |
1371 | AC_OUTPUT |
1370 | AC_OUTPUT |
1372 | |
1371 | |
1373 | echo "Configuration: |
1372 | echo "Configuration: |
1374 | |
1373 | |