ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
(Generate patch)

Comparing rxvt-unicode/configure.ac (file contents):
Revision 1.39 by sasha, Fri Jun 8 20:04:10 2007 UTC vs.
Revision 1.51 by ayin, Wed Jun 13 12:34:32 2007 UTC

13changequote(, )dnl 13changequote(, )dnl
14VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 14VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
16dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 16dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
17changequote([, ])dnl 17changequote([, ])dnl
18AC_SUBST(VERSION)dnl 18AC_SUBST(VERSION)dnl
19AC_SUBST(DATE)dnl 19AC_SUBST(DATE)dnl
20AC_SUBST(LSMDATE)dnl 20AC_SUBST(LSMDATE)dnl
21AC_SUBST(LIBVERSION)dnl 21AC_SUBST(LIBVERSION)dnl
22echo "" 22echo ""
23echo "configuring for rxvt $VERSION" 23echo "configuring for rxvt $VERSION"
24echo "" 24echo ""
25 25
26orig_CXXFLAGS="$CXXFLAGS" 26orig_CXXFLAGS="$CXXFLAGS"
46 CXX="$CC" 46 CXX="$CC"
47 LIBS="$LIBS -lsupc++" 47 LIBS="$LIBS -lsupc++"
48 LINKER="$CC" 48 LINKER="$CC"
49 AC_LINK_IFELSE( 49 AC_LINK_IFELSE(
50 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], 50 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
51 [
51 [AC_MSG_RESULT(ok)], 52 AC_MSG_RESULT(ok)
53 CXXLIB="-lsupc++"
54 ],
52 [ 55 [
53 AC_MSG_RESULT([no, making everything bigger and slower]) 56 AC_MSG_RESULT([no, making everything bigger and slower])
54 LIBS="$save_LIBS" 57 LIBS="$save_LIBS"
55 LINKER="$save_CXX" 58 LINKER="$save_CXX"
56 ] 59 ]
57 ) 60 )
58 CXX="$save_CXX" 61 CXX="$save_CXX"
59fi 62fi
60AC_SUBST(LINKER,[$LINKER]) 63AC_SUBST(LINKER,[$LINKER])
64AC_SUBST(CXXLIB)
61 65
62dnl# -------------------------------------------------------------------------- 66dnl# --------------------------------------------------------------------------
63dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' 67dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'
64dnl# 68dnl#
65if test -z "$orig_CXXFLAGS"; then 69if test -z "$orig_CXXFLAGS"; then
237 [ --enable-afterimage enable integration with libAfterImage for background images], 241 [ --enable-afterimage enable integration with libAfterImage for background images],
238 [if test x$enableval = xyes -o x$enableval = xno; then 242 [if test x$enableval = xyes -o x$enableval = xno; then
239 support_afterimage=$enableval 243 support_afterimage=$enableval
240 fi]) 244 fi])
241 245
242AC_ARG_WITH(afterimage_config, [ --with-afterimage-config=DIR use libAfterImage config script in DIR], afterimage_config="$withval",afterimage_config=NO) 246AC_ARG_WITH(afterimage_config,
247 [ --with-afterimage-config=DIR use libAfterImage config script in DIR],
248 [if test "x$withval" != x; then
249 afterimage_config=$withval/afterimage-config
250 fi])
243 251
244AC_ARG_ENABLE(afterstep, 252AC_ARG_ENABLE(afterstep,
245 [ --enable-afterstep enable integration with AfterStep window manager], 253 [ --enable-afterstep enable integration with AfterStep window manager],
246 [if test x$enableval = xyes -o x$enableval = xno; then 254 [if test x$enableval = xyes -o x$enableval = xno; then
247 support_afterstep=$enableval 255 support_afterstep=$enableval
435 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" 443 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
436 fi]) 444 fi])
437 445
438dnl# -------------------------------------------------------------------------- 446dnl# --------------------------------------------------------------------------
439 447
440AC_PATH_PROG(MV, mv, mv)
441AC_PATH_PROG(CP, cp, cp) 448AC_PATH_PROG(CP, cp, cp)
442AC_PATH_PROG(LN, ln, ln)
443AC_PATH_PROG(SED, sed, sed) 449AC_PATH_PROG(SED, sed, sed)
444AC_PATH_PROG(ECHO, echo, echo) 450AC_PATH_PROG(ECHO, echo, echo)
445AC_PATH_PROG(CMP, cmp, cmp)
446AC_PATH_PROG(TIC, tic) 451AC_PATH_PROG(TIC, tic)
447 452
448dnl# need a neat way to detect SVR4 or its features 453dnl# need a neat way to detect SVR4 or its features
449dnl# in src/command.c we use these functions: 454dnl# in src/command.c we use these functions:
450dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> 455dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h>
465 470
466LIBAFTERIMAGE_CFLAGS= 471LIBAFTERIMAGE_CFLAGS=
467AFTERIMAGE_LIBS= 472AFTERIMAGE_LIBS=
468have_afterimage= 473have_afterimage=
469 474
470if test x$support_afterimage == xyes; then 475if test x$support_afterimage = xyes; then
471 AC_MSG_CHECKING(installed libAfterImage)
472 support_afterimage=no 476 support_afterimage=no
477
473 if test "$afterimage_config" = "NO" ; then 478 if test "x$afterimage_config" = "x" ; then
474 if afterimage-config --version > /dev/null 2>&1 ; then 479 AC_PATH_PROG(afterimage_config, afterimage-config, no)
475 afterimage_config=afterimage-config 480 fi
476 else 481
477 if test -x /usr/local/bin/afterimage-config; then 482 AC_MSG_CHECKING(for libAfterImage)
478 afterimage_config=/usr/local/bin/afterimage-config
479 fi
480 fi
481 else
482 afterimage_config=$afterimage_config/afterimage-config
483 fi
484 if $afterimage_config --version > /dev/null 2>&1 ; then 483 if $afterimage_config --version >/dev/null 2>&1 ; then
485 LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` 484 LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
486 AFTERIMAGE_LIBS=`$afterimage_config --libs` 485 AFTERIMAGE_LIBS=`$afterimage_config --libs`
487 if test "x$AFTERIMAGE_LIBS" != "x"; then 486 if test "x$AFTERIMAGE_LIBS" != "x"; then
488 support_afterimage=yes 487 support_afterimage=yes
489 fi 488 fi
490 fi 489 fi
491 490
492 if test "x$support_afterimage" = "xyes"; then 491 if test "x$support_afterimage" = "xyes"; then
493 AC_MSG_RESULT($AFTERIMAGE_LIBS) 492 AC_MSG_RESULT($AFTERIMAGE_LIBS)
494 else 493 else
495 AC_MSG_RESULT(afterimage-config not found in $afterimage_config - can't use libAfterImage for images.) 494 AC_MSG_RESULT(no)
496 fi 495 fi
497fi 496fi
498 497
499if test x$support_afterimage != xyes -a x$support_xpm = xyes ; then 498if test x$support_afterimage != xyes -a x$support_xpm = xyes ; then
500 VT_FIND_LIBXPM 499 VT_FIND_LIBXPM
501 if test x$no_xpm = xyes; then 500 if test x$no_xpm = xyes; then
558#include <stdlib.h> 557#include <stdlib.h>
559main() 558main()
560{ 559{
561 exit(0); 560 exit(0);
562 (void) XOpenDisplay("foobar"); 561 (void) XOpenDisplay("foobar");
563}]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl 562}]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl
564 AC_MSG_WARN(You may need to check the LIBS line)])]) 563 AC_MSG_WARN(You may need to check the LIBS line)])])
565if test x$rxvt_cv_rpath != xyes; then 564if test x$rxvt_cv_rpath != xyes; then
566 changequote(, )dnl 565 changequote(, )dnl
567 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' 566 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g'
568 changequote([, ])dnl 567 changequote([, ])dnl
569 LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` 568 LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
572#include <stdlib.h> 571#include <stdlib.h>
573main() 572main()
574{ 573{
575 exit(0); 574 exit(0);
576 (void) XOpenDisplay("foobar"); 575 (void) XOpenDisplay("foobar");
577}]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) 576}]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])])
578 if test x$rxvt_cv_R != xyes; then 577 if test x$rxvt_cv_R != xyes; then
579 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 578 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
580 fi 579 fi
581fi 580fi
582 581
716dnl# find ttys/ttytab 715dnl# find ttys/ttytab
717AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, 716AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab,
718[for ttys_file in dnl 717[for ttys_file in dnl
719 /etc/ttys /etc/ttytab; 718 /etc/ttys /etc/ttytab;
720do 719do
721 if test -f "$ttys_file" ; then 720 if test -f "$ttys_file" ; then
722 rxvt_cv_path_ttytab=$ttys_file 721 rxvt_cv_path_ttytab=$ttys_file
723 break 722 break
724 fi 723 fi
725done 724done
726]) 725])
959 958
960if test x$support_perl = xyes; then 959if test x$support_perl = xyes; then
961 support_frills=yes 960 support_frills=yes
962fi 961fi
963 962
964AC_SUBST(DEBUG)
965AC_SUBST(DINCLUDE)
966AC_SUBST(CFLAGS) 963AC_SUBST(CFLAGS)
967AC_SUBST(CPPFLAGS) 964AC_SUBST(CPPFLAGS)
968AC_SUBST(LDFLAGS) 965AC_SUBST(LDFLAGS)
969AC_SUBST(X_CFLAGS) 966AC_SUBST(X_CFLAGS)
970 967
971dnl# Attack the libs 968dnl# Attack the libs
972if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then 969if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then
973 DLIB=`echo $DLIB | sed "$R_TRANSLATE"`
974 LIBS=`echo $LIBS | sed "$R_TRANSLATE"` 970 LIBS=`echo $LIBS | sed "$R_TRANSLATE"`
975 X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` 971 X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"`
976 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` 972 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"`
977 XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` 973 XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"`
978fi 974fi
979AC_SUBST(DLIB)
980AC_SUBST(LIBS) 975AC_SUBST(LIBS)
981AC_SUBST(X_LIBS) 976AC_SUBST(X_LIBS)
982AC_SUBST(X_EXTRA_LIBS) 977AC_SUBST(X_EXTRA_LIBS)
983 978
984AC_SUBST(LIBAFTERIMAGE_CFLAGS) 979AC_SUBST(LIBAFTERIMAGE_CFLAGS)
1030if test x$support_xpm = xyes; then 1025if test x$support_xpm = xyes; then
1031 echo " Xpm library: $XPM_LIBS" 1026 echo " Xpm library: $XPM_LIBS"
1032fi 1027fi
1033 1028
1034if test x$support_afterimage = xyes; then 1029if test x$support_afterimage = xyes; then
1035 echo " AfterImage library: $AFTERIMAGE_LIBS" 1030 echo " AfterImage support: yes"
1036fi 1031fi
1037 1032
1038if test x$support_afterstep = xyes; then 1033if test x$support_afterstep = xyes; then
1039 echo " With AfterStep integration" 1034 echo " AfterStep integration: yes"
1040fi 1035fi
1041 1036
1042if test x$term != x; then 1037if test x$term != x; then
1043 echo " set TERM to: $term" 1038 echo " set TERM to: $term"
1044fi 1039fi

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines