Ignore:
Timestamp:
Mar 30, 2011, 9:49:25 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/configure.in

    r2170 r2179  
    4040AC_SUBST(SHLIB_SUFFIX)
    4141
    42 gui_with_tcl=""
     42with_tcl=""
     43with_tk=""
    4344
    4445make_command=""
     
    7576    [with_tclsh=yes])
    7677
     78with_tcl="yes"
     79AC_ARG_WITH(
     80    [tk],
     81    [AS_HELP_STRING([--with-tcl[=DIR]],
     82        [path of tclConfig.sh @<:@default=yes@:>@])],
     83    [],
     84    [with_tcl="yes"])
     85
     86with_tk="yes"
     87AC_ARG_WITH(
     88    [tk],
     89    [AS_HELP_STRING([--with-tk[=DIR]],
     90        [path of tkConfig.sh @<:@default=yes@:>@])],
     91    [],
     92    [with_tk=yes])
    7793TCLSH=
     94
    7895# -----------------------------------------------------------------------
    7996#
     
    8198#
    8299# -----------------------------------------------------------------------
    83 
    84100AC_MSG_CHECKING([for tclConfig.sh])
    85101tcl_config_sh=""
    86 if test "x$gui_with_tcl" != "x" ; then
     102if test "$with_tcl" != "yes" ; then
    87103
    88104  # Verify that a tclConfig.sh file exists in the directory specified
     
    90106
    91107  for dir in \
    92    $gui_with_tcl
     108        $with_tcl
    93109  do
    94110    if test -r "$dir/tclConfig.sh" ; then
     
    128144fi
    129145. ${tcl_config_sh}
    130 TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
     146
     147
     148# -----------------------------------------------------------------------
     149#
     150#       Find the Tcl build configuration file "tclConfig.sh"
     151#
     152# -----------------------------------------------------------------------
     153AC_MSG_CHECKING([for tkConfig.sh])
     154tk_config_sh=""
     155if test "$with_tk" != "yes" ; then
     156
     157  # Verify that a tclConfig.sh file exists in the directory specified
     158  # by --with-tk.
     159
     160  for dir in \
     161        $with_tk \
     162        $with_tcl \
     163  do
     164    if test -r "$dir/tkConfig.sh" ; then
     165      tcl_config_sh="$dir/tkConfig.sh"
     166      break
     167    elif test -r "$dir/lib/tkConfig.sh" ; then
     168      tcl_config_sh="$dir/lib/tkConfig.sh"
     169      break
     170    fi
     171  done
     172else
     173
     174  # Otherwise, search for Tcl configuration file. 
     175
     176  #  1. Search previously named locations.
     177
     178  for dir in \
     179   $prefix \
     180   $exec_prefix \
     181  do
     182    if test -r "$dir/tkConfig.sh" ; then
     183      tcl_config_sh="$dir/tkConfig.sh"
     184      break
     185    elif test -r "$dir/lib/tkConfig.sh" ; then
     186      tcl_config_sh="$dir/lib/tkConfig.sh"
     187      break
     188    fi
     189  done
     190fi
     191
     192AC_MSG_RESULT([${tk_config_sh}])
     193
     194if test "x$tk_config_sh" = "x" ; then
     195  echo "can't find Tk configuration script \"tkConfig.sh\""
     196  exit 1
     197fi
     198. ${tk_config_sh}
     199
    131200
    132201case $target in
     
    148217AC_SUBST(TCLSH)
    149218
     219
    150220AC_SUBST(TCL_VERSION)
    151221AC_SUBST(TCL_INC_SPEC)
    152222AC_SUBST(TCL_LIB_SPEC)
    153 
    154 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
    155   . ${exec_prefix}/lib/tclConfig.sh
    156 fi
    157 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
    158   . ${exec_prefix}/lib/tkConfig.sh     
    159 fi
     223AC_SUBST(TK_LIB_SPEC)
     224AC_SUBST(TK_INC_SPEC)
    160225AC_SUBST(TCL_VERSION)
    161226AC_SUBST(TK_VERSION)
Note: See TracChangeset for help on using the changeset viewer.