Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4d09be4

Browse files
committed
fix for tcl/tk in configure
1 parent 9b381a6 commit 4d09be4

File tree

2 files changed

+19
-119
lines changed

2 files changed

+19
-119
lines changed

src/configure

Lines changed: 17 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5426,43 +5426,6 @@ else
54265426
echo "$ac_t""no" 1>&6
54275427
fi
54285428

5429-
for f in /usr/include /usr/include/tcl /usr/include/tcl8.0 /usr/local/include /usr/local/include/tcl /usr/local/include/tcl8.0; do
5430-
if test "$TCL_INCDIR" = "no"; then
5431-
ac_safe=`echo "$f/tcl.h" | sed 'y%./+-%__p_%'`
5432-
echo $ac_n "checking for $f/tcl.h""... $ac_c" 1>&6
5433-
echo "configure:5434: checking for $f/tcl.h" >&5
5434-
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5435-
echo $ac_n "(cached) $ac_c" 1>&6
5436-
else
5437-
cat > conftest.$ac_ext <<EOF
5438-
#line 5439 "configure"
5439-
#include "confdefs.h"
5440-
#include <$f/tcl.h>
5441-
EOF
5442-
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5443-
{ (eval echo configure:5444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5444-
ac_err=`grep -v '^ *+' conftest.out`
5445-
if test -z "$ac_err"; then
5446-
rm -rf conftest*
5447-
eval "ac_cv_header_$ac_safe=yes"
5448-
else
5449-
echo "$ac_err" >&5
5450-
echo "configure: failed program was:" >&5
5451-
cat conftest.$ac_ext >&5
5452-
rm -rf conftest*
5453-
eval "ac_cv_header_$ac_safe=no"
5454-
fi
5455-
rm -f conftest*
5456-
fi
5457-
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5458-
echo "$ac_t""yes" 1>&6
5459-
TCL_INCDIR=$f
5460-
else
5461-
echo "$ac_t""no" 1>&6
5462-
fi
5463-
5464-
fi
5465-
done
54665429
if test "$TCL_INCDIR" = "no"; then
54675430
echo "configure: warning: tcl support disabled; tcl.h missing" 1>&2
54685431
USE_TCL=
@@ -5473,25 +5436,23 @@ fi
54735436
if test "$USE_TCL" = "true"
54745437
then
54755438
TCL_LIB=
5476-
for f in tcl tcl8.0 tcl80; do
5477-
if test -z "$TCL_LIB"; then
5478-
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
5479-
echo "configure:5480: checking for main in -l$f" >&5
5480-
ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
5439+
echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
5440+
echo "configure:5441: checking for main in -ltcl" >&5
5441+
ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
54815442
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
54825443
echo $ac_n "(cached) $ac_c" 1>&6
54835444
else
54845445
ac_save_LIBS="$LIBS"
5485-
LIBS="-l$f $LIBS"
5446+
LIBS="-ltcl $LIBS"
54865447
cat > conftest.$ac_ext <<EOF
5487-
#line 5488 "configure"
5448+
#line 5449 "configure"
54885449
#include "confdefs.h"
54895450
54905451
int main() {
54915452
main()
54925453
; return 0; }
54935454
EOF
5494-
if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5455+
if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
54955456
rm -rf conftest*
54965457
eval "ac_cv_lib_$ac_lib_var=yes"
54975458
else
@@ -5506,13 +5467,11 @@ LIBS="$ac_save_LIBS"
55065467
fi
55075468
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
55085469
echo "$ac_t""yes" 1>&6
5509-
TCL_LIB=$f
5470+
TCL_LIB=tcl
55105471
else
55115472
echo "$ac_t""no" 1>&6
55125473
fi
55135474

5514-
fi
5515-
done
55165475
if test -z "$TCL_LIB"; then
55175476
echo "configure: warning: tcl support disabled; Tcl library missing" 1>&2
55185477
USE_TCL=
@@ -5536,17 +5495,17 @@ CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
55365495
TK_INCDIR=no
55375496
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
55385497
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5539-
echo "configure:5540: checking for tk.h" >&5
5498+
echo "configure:5499: checking for tk.h" >&5
55405499
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
55415500
echo $ac_n "(cached) $ac_c" 1>&6
55425501
else
55435502
cat > conftest.$ac_ext <<EOF
5544-
#line 5545 "configure"
5503+
#line 5504 "configure"
55455504
#include "confdefs.h"
55465505
#include <tk.h>
55475506
EOF
55485507
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5549-
{ (eval echo configure:5550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5508+
{ (eval echo configure:5509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
55505509
ac_err=`grep -v '^ *+' conftest.out`
55515510
if test -z "$ac_err"; then
55525511
rm -rf conftest*
@@ -5567,43 +5526,6 @@ else
55675526
echo "$ac_t""no" 1>&6
55685527
fi
55695528

5570-
for f in /usr/include /usr/include/tk /usr/include/tk8.0 /usr/local/include /usr/local/include/tk /usr/local/include/tk8.0; do
5571-
if test "$TK_INCDIR" = "no"; then
5572-
ac_safe=`echo "$f/tk.h" | sed 'y%./+-%__p_%'`
5573-
echo $ac_n "checking for $f/tk.h""... $ac_c" 1>&6
5574-
echo "configure:5575: checking for $f/tk.h" >&5
5575-
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5576-
echo $ac_n "(cached) $ac_c" 1>&6
5577-
else
5578-
cat > conftest.$ac_ext <<EOF
5579-
#line 5580 "configure"
5580-
#include "confdefs.h"
5581-
#include <$f/tk.h>
5582-
EOF
5583-
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5584-
{ (eval echo configure:5585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5585-
ac_err=`grep -v '^ *+' conftest.out`
5586-
if test -z "$ac_err"; then
5587-
rm -rf conftest*
5588-
eval "ac_cv_header_$ac_safe=yes"
5589-
else
5590-
echo "$ac_err" >&5
5591-
echo "configure: failed program was:" >&5
5592-
cat conftest.$ac_ext >&5
5593-
rm -rf conftest*
5594-
eval "ac_cv_header_$ac_safe=no"
5595-
fi
5596-
rm -f conftest*
5597-
fi
5598-
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5599-
echo "$ac_t""yes" 1>&6
5600-
TK_INCDIR=$f
5601-
else
5602-
echo "$ac_t""no" 1>&6
5603-
fi
5604-
5605-
fi
5606-
done
56075529
if test "$TK_INCDIR" = "no"; then
56085530
echo "configure: warning: tcl support disabled; tk.h missing" 1>&2
56095531
USE_TCL=
@@ -5619,25 +5541,23 @@ fi
56195541
if test "$USE_TCL" = "true"
56205542
then
56215543
TK_LIB=
5622-
for f in tk tk8.0 tk80; do
5623-
if test -z "$TK_LIB"; then
5624-
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
5625-
echo "configure:5626: checking for main in -l$f" >&5
5626-
ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
5544+
echo $ac_n "checking for main in -ltk""... $ac_c" 1>&6
5545+
echo "configure:5546: checking for main in -ltk" >&5
5546+
ac_lib_var=`echo tk'_'main | sed 'y%./+-%__p_%'`
56275547
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
56285548
echo $ac_n "(cached) $ac_c" 1>&6
56295549
else
56305550
ac_save_LIBS="$LIBS"
5631-
LIBS="-l$f $LIBS"
5551+
LIBS="-ltk $LIBS"
56325552
cat > conftest.$ac_ext <<EOF
5633-
#line 5634 "configure"
5553+
#line 5554 "configure"
56345554
#include "confdefs.h"
56355555
56365556
int main() {
56375557
main()
56385558
; return 0; }
56395559
EOF
5640-
if { (eval echo configure:5641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5560+
if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
56415561
rm -rf conftest*
56425562
eval "ac_cv_lib_$ac_lib_var=yes"
56435563
else
@@ -5652,13 +5572,11 @@ LIBS="$ac_save_LIBS"
56525572
fi
56535573
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
56545574
echo "$ac_t""yes" 1>&6
5655-
TK_LIB=$f
5575+
TK_LIB=tk
56565576
else
56575577
echo "$ac_t""no" 1>&6
56585578
fi
56595579

5660-
fi
5661-
done
56625580
if test -z "$TK_LIB"; then
56635581
echo "configure: warning: tcl support disabled; Tk library missing" 1>&2
56645582
USE_TCL=

src/configure.in

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,6 @@ if test "$USE_TCL" = "true"
564564
then
565565
TCL_INCDIR=no
566566
AC_CHECK_HEADER(tcl.h, TCL_INCDIR=)
567-
for f in /usr/include /usr/include/tcl /usr/include/tcl8.0 /usr/local/include /usr/local/include/tcl /usr/local/include/tcl8.0; do
568-
if test "$TCL_INCDIR" = "no"; then
569-
AC_CHECK_HEADER($f/tcl.h, TCL_INCDIR=$f)
570-
fi
571-
done
572567
if test "$TCL_INCDIR" = "no"; then
573568
AC_MSG_WARN(tcl support disabled; tcl.h missing)
574569
USE_TCL=
@@ -580,11 +575,7 @@ dnl Check for Tcl archive
580575
if test "$USE_TCL" = "true"
581576
then
582577
TCL_LIB=
583-
for f in tcl tcl8.0 tcl80; do
584-
if test -z "$TCL_LIB"; then
585-
AC_CHECK_LIB($f, main, TCL_LIB=$f)
586-
fi
587-
done
578+
AC_CHECK_LIB(tcl, main, TCL_LIB=tcl)
588579
if test -z "$TCL_LIB"; then
589580
AC_MSG_WARN(tcl support disabled; Tcl library missing)
590581
USE_TCL=
@@ -610,11 +601,6 @@ CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
610601

611602
TK_INCDIR=no
612603
AC_CHECK_HEADER(tk.h, TK_INCDIR=)
613-
for f in /usr/include /usr/include/tk /usr/include/tk8.0 /usr/local/include /usr/local/include/tk /usr/local/include/tk8.0; do
614-
if test "$TK_INCDIR" = "no"; then
615-
AC_CHECK_HEADER($f/tk.h, TK_INCDIR=$f)
616-
fi
617-
done
618604
if test "$TK_INCDIR" = "no"; then
619605
AC_MSG_WARN(tcl support disabled; tk.h missing)
620606
USE_TCL=
@@ -631,11 +617,7 @@ dnl Check for Tk archive
631617
if test "$USE_TCL" = "true"
632618
then
633619
TK_LIB=
634-
for f in tk tk8.0 tk80; do
635-
if test -z "$TK_LIB"; then
636-
AC_CHECK_LIB($f, main, TK_LIB=$f)
637-
fi
638-
done
620+
AC_CHECK_LIB(tk, main, TK_LIB=tk)
639621
if test -z "$TK_LIB"; then
640622
AC_MSG_WARN(tcl support disabled; Tk library missing)
641623
USE_TCL=

0 commit comments

Comments
 (0)