From 33b3156f43919fb75726db2647d3364037d9e1d5 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 25 Mar 2007 00:28:09 +0000 Subject: [PATCH] ncurses 5.6 - patch 20070324 + eliminate part of the direct use of WINDOW data from Ada95 interface. + fix substitutions for termlib filename to make configure option --enable-reentrant work with --with-termlib. + change a constructor for NCursesWindow to allow compiling with NCURSES_OPAQUE defined, since we cannot pass a reference to an opaque pointer. --- Ada95/src/terminal_interface-curses.adb | 48 ++++++++++++++++++------- NEWS | 10 +++++- aclocal.m4 | 7 ++-- c++/cursesw.cc | 11 ++++-- c++/cursesw.h | 4 +-- configure | 42 ++++++++++++---------- configure.in | 9 +++-- dist.mk | 4 +-- mk-1st.awk | 17 +++++++-- 9 files changed, 105 insertions(+), 47 deletions(-) diff --git a/Ada95/src/terminal_interface-curses.adb b/Ada95/src/terminal_interface-curses.adb index 10452f1e..e2c89038 100644 --- a/Ada95/src/terminal_interface-curses.adb +++ b/Ada95/src/terminal_interface-curses.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -35,8 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.34 $ --- $Date: 2006/06/25 14:30:22 $ +-- $Revision: 1.35 $ +-- $Date: 2007/03/24 23:03:56 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System; @@ -1399,11 +1399,15 @@ package body Terminal_Interface.Curses is Number_Of_Lines : out Line_Count; Number_Of_Columns : out Column_Count) is - -- Please note: in ncurses they are one off. - -- This might be different in other implementations of curses - Y : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxy)) + function GetMaxY (W : Window) return C_Int; + pragma Import (C, GetMaxY, "getmaxy"); + + function GetMaxX (W : Window) return C_Int; + pragma Import (C, GetMaxX, "getmaxx"); + + Y : constant C_Int := GetMaxY (Win) + C_Int (Offset_XY); - X : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxx)) + X : constant C_Int := GetMaxX (Win) + C_Int (Offset_XY); begin Number_Of_Lines := Line_Count (Y); @@ -1415,8 +1419,14 @@ package body Terminal_Interface.Curses is Top_Left_Line : out Line_Position; Top_Left_Column : out Column_Position) is - Y : constant C_Short := W_Get_Short (Win, Offset_begy); - X : constant C_Short := W_Get_Short (Win, Offset_begx); + function GetBegY (W : Window) return C_Int; + pragma Import (C, GetBegY, "getbegy"); + + function GetBegX (W : Window) return C_Int; + pragma Import (C, GetBegX, "getbegx"); + + Y : constant C_Short := C_Short (GetBegY (Win)); + X : constant C_Short := C_Short (GetBegX (Win)); begin Top_Left_Line := Line_Position (Y); Top_Left_Column := Column_Position (X); @@ -1427,8 +1437,14 @@ package body Terminal_Interface.Curses is Line : out Line_Position; Column : out Column_Position) is - Y : constant C_Short := W_Get_Short (Win, Offset_cury); - X : constant C_Short := W_Get_Short (Win, Offset_curx); + function GetCurY (W : Window) return C_Int; + pragma Import (C, GetCurY, "getcury"); + + function GetCurX (W : Window) return C_Int; + pragma Import (C, GetCurX, "getcurx"); + + Y : constant C_Short := C_Short (GetCurY (Win)); + X : constant C_Short := C_Short (GetCurX (Win)); begin Line := Line_Position (Y); Column := Column_Position (X); @@ -1440,8 +1456,14 @@ package body Terminal_Interface.Curses is Top_Left_Column : out Column_Position; Is_Not_A_Subwindow : out Boolean) is - Y : constant C_Int := W_Get_Int (Win, Offset_pary); - X : constant C_Int := W_Get_Int (Win, Offset_parx); + function GetParY (W : Window) return C_Int; + pragma Import (C, GetParY, "getpary"); + + function GetParX (W : Window) return C_Int; + pragma Import (C, GetParX, "getparx"); + + Y : constant C_Int := GetParY (Win); + X : constant C_Int := GetParX (Win); begin if Y = -1 then Top_Left_Line := Line_Position'Last; diff --git a/NEWS b/NEWS index 223ac1fb..624827f4 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1104 2007/03/17 20:43:25 tom Exp $ +-- $Id: NEWS,v 1.1106 2007/03/24 22:58:37 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,14 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20070324 + + eliminate part of the direct use of WINDOW data from Ada95 interface. + + fix substitutions for termlib filename to make configure option + --enable-reentrant work with --with-termlib. + + change a constructor for NCursesWindow to allow compiling with + NCURSES_OPAQUE defined, since we cannot pass a reference to + an opaque pointer. + 20070317 + ignore --with-chtype=unsigned since unsigned is always added to the type in curses.h; do the same for --with-mmask-t. diff --git a/aclocal.m4 b/aclocal.m4 index 7e25da75..10b33ab6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.426 2007/03/17 20:18:53 tom Exp $ +dnl $Id: aclocal.m4,v 1.427 2007/03/24 22:29:27 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1774,7 +1774,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 49 updated: 2007/02/24 17:12:45 +dnl CF_LIB_RULES version: 50 updated: 2007/03/24 18:26:59 dnl ------------ dnl Append definitions and rules for the given models to the subdirectory dnl Makefiles, and the recursion rule for the top-level Makefile. If the @@ -1958,7 +1958,8 @@ do prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ - TermlibRoot=$TINFO_ARG_SUFFIX \ + TermlibRoot=$TINFO_NAME \ + TermlibSuffix=$TINFO_SUFFIX \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ ReLink=${cf_cv_do_relink-no} \ diff --git a/c++/cursesw.cc b/c++/cursesw.cc index 8a42c39b..527bb7c4 100644 --- a/c++/cursesw.cc +++ b/c++/cursesw.cc @@ -42,7 +42,7 @@ #include "internal.h" #include "cursesw.h" -MODULE_ID("$Id: cursesw.cc,v 1.47 2007/03/03 21:49:24 tom Exp $") +MODULE_ID("$Id: cursesw.cc,v 1.48 2007/03/24 19:00:58 tom Exp $") #define COLORS_NEED_INITIALIZATION -1 #define COLORS_NOT_INITIALIZED 0 @@ -165,12 +165,17 @@ NCursesWindow::NCursesWindow(int nlines, int ncols, int begin_y, int begin_x) set_keyboard(); } -NCursesWindow::NCursesWindow(WINDOW* &window) +NCursesWindow::NCursesWindow(WINDOW* window) : w(0), alloced(FALSE), par(0), subwins(0), sib(0) { constructing(); - w = window; + // We used to use a reference on the "window" parameter, but we cannot do + // that with an opaque pointer (see NCURSES_OPAQUE). If the parameter was + // "::stdscr", that is first set via the "constructing() call, and is null + // up to that point. So we allow a null pointer here as meaning the "same" + // as "::stdscr". + w = window ? window : ::stdscr; set_keyboard(); } diff --git a/c++/cursesw.h b/c++/cursesw.h index 217df6da..c275e6b6 100644 --- a/c++/cursesw.h +++ b/c++/cursesw.h @@ -30,7 +30,7 @@ #ifndef NCURSES_CURSESW_H_incl #define NCURSES_CURSESW_H_incl 1 -// $Id: cursesw.h,v 1.42 2007/03/03 21:49:18 tom Exp $ +// $Id: cursesw.h,v 1.43 2007/03/24 18:33:50 tom Exp $ #include #include @@ -741,7 +741,7 @@ protected: NCursesWindow(); public: - NCursesWindow(WINDOW* &window); // useful only for stdscr + NCursesWindow(WINDOW* window); // useful only for stdscr NCursesWindow(int nlines, // number of lines int ncols, // number of columns diff --git a/configure b/configure index cec0bf46..e927724f 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.408 . +# From configure.in Revision: 1.410 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20061216. # @@ -15114,10 +15114,12 @@ if test "$with_termlib" != no ; then if test "$with_termlib" != yes ; then TINFO_NAME=$with_termlib + TINFO_SUFFIX="`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_LIB_SUFFIX="${with_termlib}" else + TINFO_SUFFIX=${DFT_DEP_SUFFIX} TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}" TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}" TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}" @@ -15138,6 +15140,8 @@ if test "$with_termlib" != no ; then fi else # the next lines are needed for linking libtic over libncurses + TINFO_NAME=${LIB_NAME} + TINFO_SUFFIX=${DFT_DEP_SUFFIX} TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX} TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}" @@ -15154,12 +15158,12 @@ fi # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` -echo "$as_me:15157: checking where we will install curses.h" >&5 +echo "$as_me:15161: checking where we will install curses.h" >&5 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6 test "$with_overwrite" = no && \ test "x$includedir" = 'x${prefix}/include' && \ includedir='${prefix}/include/ncurses'${LIB_SUFFIX} -echo "$as_me:15162: result: $includedir" >&5 +echo "$as_me:15166: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15167,7 +15171,7 @@ echo "${ECHO_T}$includedir" >&6 if test "$with_overwrite" != no ; then if test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' - { echo "$as_me:15170: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15174: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} fi fi @@ -15183,7 +15187,7 @@ EOF ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15186: checking for src modules" >&5 +echo "$as_me:15190: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15246,7 +15250,7 @@ EOF fi fi done -echo "$as_me:15249: result: $cf_cv_src_modules" >&5 +echo "$as_me:15253: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -15492,7 +15496,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:15495: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:15499: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -15668,7 +15672,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:15671: error: ambiguous option: $1 + { { echo "$as_me:15675: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -15687,7 +15691,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:15690: error: unrecognized option: $1 + -*) { { echo "$as_me:15694: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -15744,6 +15748,7 @@ TERMINFO="$TERMINFO" TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" +TINFO_SUFFIX="$TINFO_SUFFIX" TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX" TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX" TICS_NAME="$TICS_NAME" @@ -15782,7 +15787,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:15785: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:15790: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -16159,7 +16164,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:16162: creating $ac_file" >&5 + { echo "$as_me:16167: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16177,7 +16182,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16180: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16185: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16190,7 +16195,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16193: error: cannot find input file: $f" >&5 + { { echo "$as_me:16198: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16256,7 +16261,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:16259: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:16264: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -16267,7 +16272,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16270: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16275: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16280,7 +16285,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16283: error: cannot find input file: $f" >&5 + { { echo "$as_me:16288: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16338,7 +16343,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:16341: $ac_file is unchanged" >&5 + { echo "$as_me:16346: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -16627,7 +16632,8 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ - TermlibRoot=$TINFO_ARG_SUFFIX \ + TermlibRoot=$TINFO_NAME \ + TermlibSuffix=$TINFO_SUFFIX \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ ReLink=${cf_cv_do_relink-no} \ diff --git a/configure.in b/configure.in index c0adc58f..dc138c6e 100644 --- a/configure.in +++ b/configure.in @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.408 2007/03/17 20:47:14 tom Exp $ +dnl $Id: configure.in,v 1.410 2007/03/24 23:12:57 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.13.20020210) -AC_REVISION($Revision: 1.408 $) +AC_REVISION($Revision: 1.410 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -1539,10 +1539,12 @@ if test "$with_termlib" != no ; then if test "$with_termlib" != yes ; then TINFO_NAME=$with_termlib + TINFO_SUFFIX="`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`" TINFO_LIB_SUFFIX="${with_termlib}" else + TINFO_SUFFIX=${DFT_DEP_SUFFIX} TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}" TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}" TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}" @@ -1563,6 +1565,8 @@ if test "$with_termlib" != no ; then fi else # the next lines are needed for linking libtic over libncurses + TINFO_NAME=${LIB_NAME} + TINFO_SUFFIX=${DFT_DEP_SUFFIX} TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX} TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}" @@ -1661,6 +1665,7 @@ TERMINFO="$TERMINFO" TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" +TINFO_SUFFIX="$TINFO_SUFFIX" TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX" TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX" TICS_NAME="$TICS_NAME" diff --git a/dist.mk b/dist.mk index 4a682b5b..2da1bad0 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.584 2007/03/12 21:50:47 tom Exp $ +# $Id: dist.mk,v 1.585 2007/03/24 15:38:05 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 6 -NCURSES_PATCH = 20070317 +NCURSES_PATCH = 20070324 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/mk-1st.awk b/mk-1st.awk index 991f47f9..e2f54ea4 100644 --- a/mk-1st.awk +++ b/mk-1st.awk @@ -1,4 +1,4 @@ -# $Id: mk-1st.awk,v 1.77 2007/03/11 13:37:22 tom Exp $ +# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -41,6 +41,7 @@ # ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable) # ShlibVerInfix ("yes" or "no", determines location of version #) # TermlibRoot ("tinfo" or other root for libterm.so) +# TermlibSuffix (".so" or other suffix for libterm.so) # ReLink ("yes", or "no", flag to rebuild shared libs on install) # DoLinks ("yes", "reverse" or "no", flag to add symbolic links) # rmSoLocs ("yes" or "no", flag to add extra clean target) @@ -163,6 +164,15 @@ function sharedlinks(directory) { printf ")\n" } } +# termlib may be named explicitly via "--with-termlib=XXX", which overrides +# any suffix. Temporarily override "suffix" to account for this. +function termlib_end_of() { + termlib_save_suffix = suffix; + suffix = TermlibSuffix; + termlib_temp_result = end_name_of(TermlibRoot); + suffix = termlib_save_suffix; + return termlib_temp_result; +} function shlib_build(directory) { dst_libs = sprintf("%s/%s", directory, end_name); printf "%s : \\\n", dst_libs @@ -171,9 +181,9 @@ function shlib_build(directory) { save_suffix = suffix sub(/^[^.]\./,".",suffix) if (directory != "../lib") { - printf "\t\t%s/%s \\\n", "../lib", end_name_of(TermlibRoot); + printf "\t\t%s/%s \\\n", "../lib", termlib_end_of(); } - printf "\t\t%s/%s \\\n", directory, end_name_of(TermlibRoot); + printf "\t\t%s/%s \\\n", directory, termlib_end_of(); suffix = save_suffix } printf "\t\t$(%s_OBJS)\n", OBJS @@ -231,6 +241,7 @@ BEGIN { printf "# ShlibVer: %s\n", ShlibVer printf "# ShlibVerInfix: %s\n", ShlibVerInfix printf "# TermlibRoot: %s\n", TermlibRoot + printf "# TermlibSuffix: %s\n", TermlibSuffix printf "# ReLink: %s\n", ReLink printf "# DoLinks: %s\n", DoLinks printf "# rmSoLocs: %s\n", rmSoLocs -- 2.44.0