Diff
Not logged in

Differences From Artifact [60c4ecbda9]:

To Artifact [c19b6f76b5]:


     1         -# -*- autoconf -*-
     2         -# FILE: "/home/joze/src/tclreadline/configure.in"
     3         -# LAST MODIFICATION: "Tue Sep 28 22:51:45 1999 (joze)"
     4         -# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
     5         -# $Id$
     6         -# ---
     7         -#
     8         -# tclreadline -- gnu readline for tcl
     9         -# Copyright (C) 1999  Johannes Zellner
    10         -#
    11         -# This program is free software; you can redistribute it and/or
    12         -# modify it under the terms of the GNU General Public License
    13         -# as published by the Free Software Foundation; either version 2
    14         -# of the License, or (at your option) any later version.
    15         -#
    16         -# This program is distributed in the hope that it will be useful,
    17         -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    18         -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19         -# GNU General Public License for more details.
    20         -#
    21         -# You should have received a copy of the GNU General Public License
    22         -# along with this program; if not, write to the Free Software
    23         -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    24         -#
    25         -# johannes@zellner.org
    26         -# http://www.zellner.org/tclreadline/
    27         -#
    28         -# ================================================================== */  
            1  +dnl -*- autoconf -*-
            2  +dnl FILE: "/home/joze/src/tclreadline/configure.in"
            3  +dnl LAST MODIFICATION: "Thu Dec 16 22:01:33 1999 (joze)"
            4  +dnl (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
            5  +dnl $Id$
            6  +dnl ---
            7  +dnl
            8  +dnl tclreadline -- gnu readline for tcl
            9  +dnl Copyright (C) 1999  Johannes Zellner
           10  +dnl
           11  +dnl This program is free software; you can redistribute it and/or
           12  +dnl modify it under the terms of the GNU General Public License
           13  +dnl as published by the Free Software Foundation; either version 2
           14  +dnl of the License, or (at your option) any later version.
           15  +dnl
           16  +dnl This program is distributed in the hope that it will be useful,
           17  +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
           18  +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
           19  +dnl GNU General Public License for more details.
           20  +dnl
           21  +dnl You should have received a copy of the GNU General Public License
           22  +dnl along with this program; if not, write to the Free Software
           23  +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
           24  +dnl
           25  +dnl johannes@zellner.org
           26  +dnl http://www.zellner.org/tclreadline/
           27  +dnl
           28  +dnl ================================================================== */  
    29     29   
    30     30   dnl	This file is an input file used by the GNU "autoconf" program to
    31     31   dnl	generate the file "configure", which is run during Tk installation
    32     32   dnl	to configure the system for the local environment.
    33     33   
    34         -AC_REVISION($Revision$)
    35     34   
    36     35   AC_INIT(tclreadline.c)
    37     36   AC_CONFIG_HEADER(config.h)
           37  +AC_PREREQ(2.13)
           38  +AC_REVISION($Revision$)
           39  +AC_CONFIG_AUX_DIR(./aux)
    38     40   
    39     41   TCLREADLINE_MAJOR_VERSION=1
    40     42   TCLREADLINE_MINOR_VERSION=0
    41         -TCLREADLINE_PATCHLEVEL=3
           43  +TCLREADLINE_PATCHLEVEL=5
    42     44   TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
    43     45   TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
    44     46   VERSION=$TCLREADLINE_VERSION
    45     47   
           48  +dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION)
    46     49   
    47         -AC_PREREQ(2.13)
    48         -AC_CONFIG_AUX_DIR(./aux)
    49     50   AC_CANONICAL_HOST
    50     51   
    51     52   
    52     53   TCLREADLINE_LPATH=`echo $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH | sed 's/:/ /g'`
    53     54   TCLREADLINE_LPATH="$TCLREADLINE_LPATH /usr/local/lib /lib /usr/lib /usr/shlib"
    54     55   
    55     56   
................................................................................
    78     79       AC_MSG_ERROR(Can't find Tcl libraries.  Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
    79     80   else
    80     81       . $TCL_LIB_DIR/tclConfig.sh
    81     82       AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh)
    82     83       AC_MSG_CHECKING([for your tcl version])
    83     84       AC_MSG_RESULT([$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL])
    84     85   fi
           86  +
           87  +#--------------------------------------------------------------------
           88  +#    eventually check for tkConfig.sh
           89  +#--------------------------------------------------------------------
           90  +
           91  +tk_search="no"
           92  +AC_ARG_WITH(
           93  +    tk,
           94  +    [  --with-tk=DIR           where to look for tclConfig.sh],
           95  +    tk_search=$withval,
           96  +    tk_search="yes"
           97  +)
           98  +
           99  +if test "$tk_search" != "no"; then
          100  +    AC_MSG_CHECKING([which tkConfig.sh to use])
          101  +    TK_LIB_DIR=""
          102  +    for dir in $tk_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix /opt/tcl/lib; do
          103  +	if test -r $dir/tkConfig.sh; then
          104  +	    TK_LIB_DIR=$dir
          105  +	    break
          106  +	fi
          107  +    done
          108  +
          109  +    if test -z "$TK_LIB_DIR"; then
          110  +	AC_MSG_ERROR(Can't find Tk libraries.)
          111  +    else
          112  +	. $TK_LIB_DIR/tkConfig.sh
          113  +	AC_MSG_RESULT($TK_LIB_DIR/tkConfig.sh)
          114  +	AC_MSG_CHECKING([for your tk version])
          115  +	AC_MSG_RESULT([$TK_VERSION, patchlevel $TK_PATCH_LEVEL])
          116  +    fi
          117  +    AC_SUBST(TK_LIB_SPEC)
          118  +fi
    85    119   
    86    120   #--------------------------------------------------------------------
    87    121   #   Read in configuration information generated by Tcl for shared
    88    122   #   libraries, and arrange for it to be substituted into our
    89    123   #   Makefile.
    90    124   #--------------------------------------------------------------------
    91    125   
................................................................................
   203    237   #--------------------------------------------------------------------
   204    238   #   The statements below define a collection of symbols related to
   205    239   #   building libtclreadline as a shared library instead of a static library.
   206    240   #   (static is not implemented yet anyway).
   207    241   #--------------------------------------------------------------------
   208    242   
   209    243   AC_ARG_ENABLE(shared,
   210         -    [  --disable-shared        don't build libtclreadline as a shared library
   211         -                          (not implemented -- probably never).],
          244  +    [  --disable-shared        don't build libtclreadline as a shared library.],
   212    245       [ok=$enableval], [ok=yes])
   213    246   if test "$ok" = "yes"; then
   214    247       if test ${TCL_SHARED_BUILD} = 0; then
   215    248           AC_MSG_ERROR(Tcl was not built with --enable-shared, so you can't use shared libraries.)
   216    249       fi
   217    250       SHLIB_CFLAGS="${SHLIB_CFLAGS}"
   218    251       eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}${SHLIB_SUFFIX}"
   219    252       TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
   220    253       MAKE_LIB="\$(SHLIB_LD) -o ${TCLREADLINE_LIB_FILE} \$(OBJS) ${SHLIB_LD_LIBS}"
   221    254       RANLIB=":"
   222    255   else
   223         -    AC_MSG_ERROR(non-shared not implemented yet. (probably never))
   224    256       SHLIB_CFLAGS=""
   225    257       eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}.a"
   226         -    TCLREADLINE_PKG_FILE=""
          258  +    TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
   227    259       MAKE_LIB="ar cr ${TCLREADLINE_LIB_FILE} \${OBJS}"
   228    260   fi
   229    261   
   230    262   # Note:  in the following variable, it's important to use the absolute
   231    263   # path name of the Tcl directory rather than "..":  this is because
   232    264   # AIX remembers this path and will attempt to use it at run-time to look
   233    265   # up the Tcl library.
................................................................................
   298    330     Can't find readline.h.
   299    331     Use --with-readline-includes to specify the directory
   300    332     containing readline.h on your system.])
   301    333   else
   302    334       AC_MSG_RESULT($READLINE_INCLUDE_DIR/readline.h)
   303    335   	base="`(basename ${READLINE_INCLUDE_DIR}) 2>/dev/null`"
   304    336   	if test "x${base}" != "xreadline"; then
   305         -		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1)
          337  +		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1, [ Define if we have libreadline. ])
   306    338   	fi
   307    339   fi
   308    340   
   309    341   
   310    342   
   311    343   #--------------------------------------------------------------------
   312    344   #   Check for libreadline
................................................................................
   423    455   # _rl_executing_macro.
   424    456   
   425    457   AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
   426    458   AC_TRY_LINK(,[
   427    459   	extern char* _rl_executing_macro;
   428    460   	_rl_executing_macro = (char*) 0;
   429    461   ],
   430         -    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1),
          462  +    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1, [define, if _rl_executing_macro is resolved in libreadline]),
   431    463       AC_MSG_RESULT(no))
   432    464   
   433    465   # check for readline's rl_cleanup_after_signal
   434    466   
   435    467   AC_MSG_CHECKING([for rl_cleanup_after_signal() in -lreadline])
   436    468   AC_TRY_LINK(,[
   437    469       extern void rl_cleanup_after_signal();
   438    470   	rl_cleanup_after_signal();
   439    471   ],
   440         -    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1),
          472  +    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1, [define, if rl_cleanup_after_signal is resolved in libreadline]),
   441    473       AC_MSG_RESULT(no))
   442    474   
   443    475   
   444    476   AC_MSG_CHECKING([for the readline version number])
   445    477   AC_TRY_RUN([
   446    478   #include <stdio.h>
   447    479   int main () {
................................................................................
   470    502   AC_SUBST(TCLREADLINE_VERSION)
   471    503   AC_SUBST(TCLREADLINE_PATCHLEVEL)
   472    504   AC_SUBST(TCLREADLINE_LIBRARY)
   473    505   AC_SUBST(TCLREADLINE_PATCHLEVEL_STR)
   474    506   
   475    507   
   476    508   AC_SUBST(TCL_LIB_DIR)
          509  +AC_SUBST(TCL_LIB_SPEC)
   477    510   AC_SUBST(TCL_INCLUDE_DIR)
   478    511   AC_SUBST(READLINE_INCLUDE_DIR)
   479    512   
   480    513   AC_SUBST(CFLAGS)
   481    514   AC_SUBST(DL_LIBS)
   482    515   AC_SUBST(LD_FLAGS)
   483    516   AC_SUBST(RANLIB)