Diff
Not logged in

Differences From Artifact [60c4ecbda9]:

To Artifact [c19b6f76b5]:


1
2
3
4
5
6
7

8
9
10

11
12
13
14
15

16
17
18
19
20

21
22
23
24

25
26
27

28
29
30
31
32
33
34
35
36
37



38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
54
55
# -*- autoconf -*-
# FILE: "/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Tue Sep 28 22:51:45 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#

# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#

# johannes@zellner.org
# http://www.zellner.org/tclreadline/
#

# ================================================================== */  

dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which is run during Tk installation
dnl	to configure the system for the local environment.

AC_REVISION($Revision$)

AC_INIT(tclreadline.c)
AC_CONFIG_HEADER(config.h)




TCLREADLINE_MAJOR_VERSION=1
TCLREADLINE_MINOR_VERSION=0
TCLREADLINE_PATCHLEVEL=3
TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
VERSION=$TCLREADLINE_VERSION



AC_PREREQ(2.13)
AC_CONFIG_AUX_DIR(./aux)
AC_CANONICAL_HOST


TCLREADLINE_LPATH=`echo $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH | sed 's/:/ /g'`
TCLREADLINE_LPATH="$TCLREADLINE_LPATH /usr/local/lib /lib /usr/lib /usr/shlib"


|
|
|
|
|
|
<
>
|
|
<
>
|
|
|
|
<
>
|
|
|
|
<
>
|
|
|
<
>
|
|
<
>
|





<



>
>
>



|




>

<
<







1
2
3
4
5
6

7
8
9

10
11
12
13
14

15
16
17
18
19

20
21
22
23

24
25
26

27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49


50
51
52
53
54
55
56
dnl -*- autoconf -*-
dnl FILE: "/home/joze/src/tclreadline/configure.in"
dnl LAST MODIFICATION: "Thu Dec 16 22:01:33 1999 (joze)"
dnl (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
dnl $Id$
dnl ---

dnl
dnl tclreadline -- gnu readline for tcl
dnl Copyright (C) 1999  Johannes Zellner

dnl
dnl This program is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License
dnl as published by the Free Software Foundation; either version 2
dnl of the License, or (at your option) any later version.

dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.

dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

dnl
dnl johannes@zellner.org
dnl http://www.zellner.org/tclreadline/

dnl
dnl ================================================================== */  

dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which is run during Tk installation
dnl	to configure the system for the local environment.



AC_INIT(tclreadline.c)
AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.13)
AC_REVISION($Revision$)
AC_CONFIG_AUX_DIR(./aux)

TCLREADLINE_MAJOR_VERSION=1
TCLREADLINE_MINOR_VERSION=0
TCLREADLINE_PATCHLEVEL=5
TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION
TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL}
VERSION=$TCLREADLINE_VERSION

dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION)



AC_CANONICAL_HOST


TCLREADLINE_LPATH=`echo $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH | sed 's/:/ /g'`
TCLREADLINE_LPATH="$TCLREADLINE_LPATH /usr/local/lib /lib /usr/lib /usr/shlib"


78
79
80
81
82
83
84

































85
86
87
88
89
90
91
    AC_MSG_ERROR(Can't find Tcl libraries.  Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
else
    . $TCL_LIB_DIR/tclConfig.sh
    AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh)
    AC_MSG_CHECKING([for your tcl version])
    AC_MSG_RESULT([$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL])
fi


































#--------------------------------------------------------------------
#   Read in configuration information generated by Tcl for shared
#   libraries, and arrange for it to be substituted into our
#   Makefile.
#--------------------------------------------------------------------








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
    AC_MSG_ERROR(Can't find Tcl libraries.  Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
else
    . $TCL_LIB_DIR/tclConfig.sh
    AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh)
    AC_MSG_CHECKING([for your tcl version])
    AC_MSG_RESULT([$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL])
fi

#--------------------------------------------------------------------
#    eventually check for tkConfig.sh
#--------------------------------------------------------------------

tk_search="no"
AC_ARG_WITH(
    tk,
    [  --with-tk=DIR           where to look for tclConfig.sh],
    tk_search=$withval,
    tk_search="yes"
)

if test "$tk_search" != "no"; then
    AC_MSG_CHECKING([which tkConfig.sh to use])
    TK_LIB_DIR=""
    for dir in $tk_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix /opt/tcl/lib; do
	if test -r $dir/tkConfig.sh; then
	    TK_LIB_DIR=$dir
	    break
	fi
    done

    if test -z "$TK_LIB_DIR"; then
	AC_MSG_ERROR(Can't find Tk libraries.)
    else
	. $TK_LIB_DIR/tkConfig.sh
	AC_MSG_RESULT($TK_LIB_DIR/tkConfig.sh)
	AC_MSG_CHECKING([for your tk version])
	AC_MSG_RESULT([$TK_VERSION, patchlevel $TK_PATCH_LEVEL])
    fi
    AC_SUBST(TK_LIB_SPEC)
fi

#--------------------------------------------------------------------
#   Read in configuration information generated by Tcl for shared
#   libraries, and arrange for it to be substituted into our
#   Makefile.
#--------------------------------------------------------------------

203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#--------------------------------------------------------------------
#   The statements below define a collection of symbols related to
#   building libtclreadline as a shared library instead of a static library.
#   (static is not implemented yet anyway).
#--------------------------------------------------------------------

AC_ARG_ENABLE(shared,
    [  --disable-shared        don't build libtclreadline as a shared library
                          (not implemented -- probably never).],
    [ok=$enableval], [ok=yes])
if test "$ok" = "yes"; then
    if test ${TCL_SHARED_BUILD} = 0; then
        AC_MSG_ERROR(Tcl was not built with --enable-shared, so you can't use shared libraries.)
    fi
    SHLIB_CFLAGS="${SHLIB_CFLAGS}"
    eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}${SHLIB_SUFFIX}"
    TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
    MAKE_LIB="\$(SHLIB_LD) -o ${TCLREADLINE_LIB_FILE} \$(OBJS) ${SHLIB_LD_LIBS}"
    RANLIB=":"
else
    AC_MSG_ERROR(non-shared not implemented yet. (probably never))
    SHLIB_CFLAGS=""
    eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}.a"
    TCLREADLINE_PKG_FILE=""
    MAKE_LIB="ar cr ${TCLREADLINE_LIB_FILE} \${OBJS}"
fi

# Note:  in the following variable, it's important to use the absolute
# path name of the Tcl directory rather than "..":  this is because
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.







|
<











<


|







237
238
239
240
241
242
243
244

245
246
247
248
249
250
251
252
253
254
255

256
257
258
259
260
261
262
263
264
265
#--------------------------------------------------------------------
#   The statements below define a collection of symbols related to
#   building libtclreadline as a shared library instead of a static library.
#   (static is not implemented yet anyway).
#--------------------------------------------------------------------

AC_ARG_ENABLE(shared,
    [  --disable-shared        don't build libtclreadline as a shared library.],

    [ok=$enableval], [ok=yes])
if test "$ok" = "yes"; then
    if test ${TCL_SHARED_BUILD} = 0; then
        AC_MSG_ERROR(Tcl was not built with --enable-shared, so you can't use shared libraries.)
    fi
    SHLIB_CFLAGS="${SHLIB_CFLAGS}"
    eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}${SHLIB_SUFFIX}"
    TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
    MAKE_LIB="\$(SHLIB_LD) -o ${TCLREADLINE_LIB_FILE} \$(OBJS) ${SHLIB_LD_LIBS}"
    RANLIB=":"
else

    SHLIB_CFLAGS=""
    eval "TCLREADLINE_LIB_FILE=libtclreadline${VERSION}.a"
    TCLREADLINE_PKG_FILE="[[file join [file dirname \$dir] ${TCLREADLINE_LIB_FILE}]]"
    MAKE_LIB="ar cr ${TCLREADLINE_LIB_FILE} \${OBJS}"
fi

# Note:  in the following variable, it's important to use the absolute
# path name of the Tcl directory rather than "..":  this is because
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
  Can't find readline.h.
  Use --with-readline-includes to specify the directory
  containing readline.h on your system.])
else
    AC_MSG_RESULT($READLINE_INCLUDE_DIR/readline.h)
	base="`(basename ${READLINE_INCLUDE_DIR}) 2>/dev/null`"
	if test "x${base}" != "xreadline"; then
		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1)
	fi
fi



#--------------------------------------------------------------------
#   Check for libreadline







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
  Can't find readline.h.
  Use --with-readline-includes to specify the directory
  containing readline.h on your system.])
else
    AC_MSG_RESULT($READLINE_INCLUDE_DIR/readline.h)
	base="`(basename ${READLINE_INCLUDE_DIR}) 2>/dev/null`"
	if test "x${base}" != "xreadline"; then
		AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1, [ Define if we have libreadline. ])
	fi
fi



#--------------------------------------------------------------------
#   Check for libreadline
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# _rl_executing_macro.

AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
AC_TRY_LINK(,[
	extern char* _rl_executing_macro;
	_rl_executing_macro = (char*) 0;
],
    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1),
    AC_MSG_RESULT(no))

# check for readline's rl_cleanup_after_signal

AC_MSG_CHECKING([for rl_cleanup_after_signal() in -lreadline])
AC_TRY_LINK(,[
    extern void rl_cleanup_after_signal();
	rl_cleanup_after_signal();
],
    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1),
    AC_MSG_RESULT(no))


AC_MSG_CHECKING([for the readline version number])
AC_TRY_RUN([
#include <stdio.h>
int main () {







|









|







455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# _rl_executing_macro.

AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
AC_TRY_LINK(,[
	extern char* _rl_executing_macro;
	_rl_executing_macro = (char*) 0;
],
    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1, [define, if _rl_executing_macro is resolved in libreadline]),
    AC_MSG_RESULT(no))

# check for readline's rl_cleanup_after_signal

AC_MSG_CHECKING([for rl_cleanup_after_signal() in -lreadline])
AC_TRY_LINK(,[
    extern void rl_cleanup_after_signal();
	rl_cleanup_after_signal();
],
    AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1, [define, if rl_cleanup_after_signal is resolved in libreadline]),
    AC_MSG_RESULT(no))


AC_MSG_CHECKING([for the readline version number])
AC_TRY_RUN([
#include <stdio.h>
int main () {
470
471
472
473
474
475
476

477
478
479
480
481
482
483
AC_SUBST(TCLREADLINE_VERSION)
AC_SUBST(TCLREADLINE_PATCHLEVEL)
AC_SUBST(TCLREADLINE_LIBRARY)
AC_SUBST(TCLREADLINE_PATCHLEVEL_STR)


AC_SUBST(TCL_LIB_DIR)

AC_SUBST(TCL_INCLUDE_DIR)
AC_SUBST(READLINE_INCLUDE_DIR)

AC_SUBST(CFLAGS)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(RANLIB)







>







502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
AC_SUBST(TCLREADLINE_VERSION)
AC_SUBST(TCLREADLINE_PATCHLEVEL)
AC_SUBST(TCLREADLINE_LIBRARY)
AC_SUBST(TCLREADLINE_PATCHLEVEL_STR)


AC_SUBST(TCL_LIB_DIR)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TCL_INCLUDE_DIR)
AC_SUBST(READLINE_INCLUDE_DIR)

AC_SUBST(CFLAGS)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(RANLIB)