Diff
Not logged in

Differences From Artifact [6f48a841a3]:

To Artifact [c9637892c0]:


1
2
3
4
5
6
7
8
9
10
# -*- autoconf -*-
# FILE: "/disk01/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Mon Sep 20 02:37:03 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#


|







1
2
3
4
5
6
7
8
9
10
# -*- autoconf -*-
# FILE: "/disk01/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Mon Sep 20 18:16:22 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373


374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
            tlib_library=$withval, tlib_library="")

AC_MSG_CHECKING([where to look for the terminal library])
TERMLIB_DIR=""
TERMLIB_VERSION_SUFFIX=""
for dir in $tlib_library $TCLREADLINE_LPATH $prefix/lib/; do
	for tlib in ncurses termlib termcap curses; do
        dnl echo "(ls ${dir}/lib${tlib}${SHLIB_SUFFIX}*) 2>/dev/null"
        result="`(ls -r ${dir}/lib${tlib}${SHLIB_SUFFIX}*) 2>/dev/null`"
		dnl echo result = $result
		if test "x$result" != "x"; then
			for lib in ${tlib}; do
				dnl It's possible that a library is found but it doesn't work
				dnl e.g., shared library that cannot be found
				dnl compile and run a test program to be sure


				LIBS=-l${lib}
				AC_TRY_RUN([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
			res="OK", res="FAIL", res="FAIL")
				if test "$res" = "OK"; then
					TERMLIB_DIR=-L${dir}
					if test "`(uname) 2>/dev/null`" = SunOS &&
						uname -r | grep '^5' >/dev/null; then
						TERMLIB_DIR_R="${TERMLIB_DIR} -R${dir}"
					fi
					TERMLIB=-l${tlib}
					break
				fi
			done
			if test "x${TERMLIB_DIR}" = "x"; then
				AC_MSG_RESULT(none of $libname is usable)
	        else
				break
			fi
		fi
	done
	if test "x${TERMLIB_DIR}" != "x"; then
		break
	fi
done








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




|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
<







359
360
361
362
363
364
365





366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386

387
388
389
390

391
392
393
394
395
396
397
            tlib_library=$withval, tlib_library="")

AC_MSG_CHECKING([where to look for the terminal library])
TERMLIB_DIR=""
TERMLIB_VERSION_SUFFIX=""
for dir in $tlib_library $TCLREADLINE_LPATH $prefix/lib/; do
	for tlib in ncurses termlib termcap curses; do





		dnl It's possible that a library is found but it doesn't work
		dnl e.g., shared library that cannot be found
		dnl compile and run a test program to be sure
		dnl echo ""
		dnl echo ""
		LIBS="-L${dir} -l${tlib}"
		AC_TRY_RUN([
#ifdef HAVE_TERMCAP_H
# include <termcap.h>
#endif
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
	res="OK", res="FAIL", res="FAIL")
		if test "$res" = "OK"; then
			TERMLIB_DIR=-L${dir}
			if test "`(uname) 2>/dev/null`" = SunOS &&
				uname -r | grep '^5' >/dev/null; then
				TERMLIB_DIR_R="${TERMLIB_DIR} -R${dir}"
			fi
			TERMLIB=-l${tlib}
			break
		fi

		if test "x${TERMLIB_DIR}" = "x"; then
			AC_MSG_RESULT($LIBS is unusable)
		else
			break

		fi
	done
	if test "x${TERMLIB_DIR}" != "x"; then
		break
	fi
done

458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
}],
    READLINE_VERSION=`cat conftestversion`
    AC_MSG_RESULT($READLINE_VERSION),
    AC_MSG_RESULT(failed),
    AC_MSG_RESULT(no cross compiling))


LIBS=$LIBS



# This is a test
#AC_C_BIGENDIAN

# TODO: check for readline version
# (link testprogram with -lreadline)







<
<







453
454
455
456
457
458
459


460
461
462
463
464
465
466
}],
    READLINE_VERSION=`cat conftestversion`
    AC_MSG_RESULT($READLINE_VERSION),
    AC_MSG_RESULT(failed),
    AC_MSG_RESULT(no cross compiling))






# This is a test
#AC_C_BIGENDIAN

# TODO: check for readline version
# (link testprogram with -lreadline)