Ignore:
Timestamp:
Nov 17, 2011, 8:40:07 AM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r2528 r2690  
    22AC_INIT([RapptureGUI],[1.1],[rappture@nanohub.org])
    33AC_CONFIG_AUX_DIR(cf)
    4 
    54#------------------------------------------------------------------------
    65# Handle the --prefix=... option
     
    2019fi
    2120AC_CANONICAL_TARGET
     21AC_SUBST(LIB_SEARCH_DIRS)
    2222
    2323AC_PROG_INSTALL
     
    3232SC_ENABLE_SHARED
    3333
    34 with_tcl=""
    35 with_tk=""
     34AC_SUBST(CFLAGS_DEBUG)
     35AC_SUBST(CFLAGS_OPTIMIZE)
     36AC_SUBST(STLIB_LD)
     37AC_SUBST(SHLIB_LD)
     38AC_SUBST(SHLIB_CFLAGS)
     39AC_SUBST(SHLIB_LDFLAGS)
     40AC_SUBST(SHLIB_SUFFIX)
     41
     42gui_with_tcl=""
    3643
    3744make_command=""
     
    4653  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
    4754fi
     55AC_SUBST(MAKE, ${make_command})
    4856
    4957AC_ARG_ENABLE(
     
    5765    ENABLE_GUI="yes"
    5866fi
     67AC_SUBST(ENABLE_GUI)
    5968
    6069with_tclsh="yes"
     
    6675    [with_tclsh=yes])
    6776
    68 with_tcl="yes"
    69 AC_ARG_WITH(
    70     [tk],
    71     [AS_HELP_STRING([--with-tcl[=DIR]],
    72         [path of tclConfig.sh @<:@default=yes@:>@])],
    73     [],
    74     [with_tcl="yes"])
    75 
    76 with_tk="yes"
    77 AC_ARG_WITH(
    78     [tk],
    79     [AS_HELP_STRING([--with-tk[=DIR]],
    80         [path of tkConfig.sh @<:@default=yes@:>@])],
    81     [],
    82     [with_tk=yes])
    8377TCLSH=
    84 
    8578# -----------------------------------------------------------------------
    8679#
     
    8881#
    8982# -----------------------------------------------------------------------
     83
    9084AC_MSG_CHECKING([for tclConfig.sh])
    9185tcl_config_sh=""
    92 if test "$with_tcl" != "yes" ; then
     86if test "x$gui_with_tcl" != "x" ; then
    9387
    9488  # Verify that a tclConfig.sh file exists in the directory specified
    9589  # by --with-tcl.
    9690
    97   for dir in $with_tcl ; do
     91  for dir in \
     92   $gui_with_tcl
     93  do
    9894    if test -r "$dir/tclConfig.sh" ; then
    9995      tcl_config_sh="$dir/tclConfig.sh"
     
    110106  #  1. Search previously named locations.
    111107
    112   for dir in $prefix $exec_prefix $gui_cv_tcl_lib ; do
     108  for dir in \
     109   $prefix \
     110   $exec_prefix \
     111   $gui_cv_tcl_lib
     112  do
    113113    if test -r "$dir/tclConfig.sh" ; then
    114114      tcl_config_sh="$dir/tclConfig.sh"
     
    128128fi
    129129. ${tcl_config_sh}
    130 
    131 
    132 # -----------------------------------------------------------------------
    133 #
    134 #       Find the Tcl build configuration file "tclConfig.sh"
    135 #
    136 # -----------------------------------------------------------------------
    137 
    138 AC_MSG_CHECKING([for tkConfig.sh])
    139 tk_config_sh=""
    140 if test "$with_tk" != "yes" ; then
    141 
    142   # Verify that a tclConfig.sh file exists in the directory specified
    143   # by --with-tk.
    144 
    145   for dir in $with_tk $with_tcl  ; do
    146     if test -r "$dir/tkConfig.sh" ; then
    147       tk_config_sh="$dir/tkConfig.sh"
    148       break
    149     elif test -r "$dir/lib/tkConfig.sh" ; then
    150       tk_config_sh="$dir/lib/tkConfig.sh"
    151       break
    152     fi
    153   done
    154 else
    155 
    156   # Otherwise, search for Tcl configuration file. 
    157 
    158   #  1. Search previously named locations.
    159 
    160   for dir in $prefix $exec_prefix ; do
    161     if test -r "$dir/tkConfig.sh" ; then
    162       tk_config_sh="$dir/tkConfig.sh"
    163       break
    164     elif test -r "$dir/lib/tkConfig.sh" ; then
    165       tk_config_sh="$dir/lib/tkConfig.sh"
    166       break
    167     fi
    168   done
    169 fi
    170 
    171 AC_MSG_RESULT([${tk_config_sh}])
    172 
    173 if test "x$tk_config_sh" = "x" ; then
    174   echo "can't find Tk configuration script \"tkConfig.sh\""
    175   exit 1
    176 fi
    177 . ${tk_config_sh}
     130TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
    178131
    179132case $target in
     
    193146
    194147AC_MSG_RESULT([${TCLSH}])
     148AC_SUBST(TCLSH)
    195149
    196 AC_SUBST(CFLAGS_DEBUG)
    197 AC_SUBST(CFLAGS_OPTIMIZE)
    198 AC_SUBST(ENABLE_GUI)
    199 AC_SUBST(LIB_SEARCH_DIRS)
    200 AC_SUBST(MAKE, ${make_command})
    201 AC_SUBST(SHLIB_CFLAGS, ${TCL_SHLIB_CFLAGS})
    202 AC_SUBST(SHLIB_LD, ${TCL_SHLIB_LD})
    203 AC_SUBST(SHLIB_LDFLAGS, ${TCL_SHLIB_LDFLAGS})
    204 AC_SUBST(SHLIB_SUFFIX, ${TCL_SHLIB_SUFFIX})
    205 AC_SUBST(STLIB_LD, ${TCL_STLIB_LD})
    206 AC_SUBST(TCLSH)
     150AC_SUBST(TCL_VERSION)
    207151AC_SUBST(TCL_INC_SPEC)
    208152AC_SUBST(TCL_LIB_SPEC)
     153
     154if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     155  . ${exec_prefix}/lib/tclConfig.sh
     156fi
     157if test -f "${exec_prefix}/lib/tkConfig.sh" ; then
     158  . ${exec_prefix}/lib/tkConfig.sh     
     159fi
    209160AC_SUBST(TCL_VERSION)
    210 AC_SUBST(TCL_VERSION)
    211 AC_SUBST(TK_INC_SPEC)
    212 AC_SUBST(TK_LIB_SPEC)
    213 AC_SUBST(TK_XLIBSW)
    214161AC_SUBST(TK_VERSION)
    215162
Note: See TracChangeset for help on using the changeset viewer.