Tk-Components

Check-in [056c1e8a73]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More update for Windows
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:056c1e8a73390100c2af8e48903683f199b13abd
User & Date: kevin 2015-09-12 22:11:12
Context
2015-09-12
22:18
more updates for windows check-in: 000cda35a5 user: kevin tags: trunk
22:11
More update for Windows check-in: 056c1e8a73 user: kevin tags: trunk
19:36
More updates for Windows check-in: db756c7d84 user: kevin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to customfont/configure.

   645    645   TCL_THREADS
   646    646   XMKMF
   647    647   TK_INCLUDES
   648    648   TCL_INCLUDES
   649    649   CLEANFILES
   650    650   PKG_OBJECTS
   651    651   PKG_SOURCES
          652  +ac_ct_CXX
          653  +CXXFLAGS
          654  +CXX
   652    655   MATH_LIBS
   653    656   EGREP
   654    657   GREP
   655    658   RANLIB
   656    659   SET_MAKE
   657    660   INSTALL_DATA
   658    661   INSTALL_SCRIPT
................................................................................
   761    764   target_alias
   762    765   CC
   763    766   CFLAGS
   764    767   LDFLAGS
   765    768   LIBS
   766    769   CPPFLAGS
   767    770   CPP
          771  +CXX
          772  +CXXFLAGS
          773  +CCC
   768    774   XMKMF'
   769    775   
   770    776   
   771    777   # Initialize some variables set by options.
   772    778   ac_init_help=
   773    779   ac_init_version=false
   774    780   ac_unrecognized_opts=
................................................................................
  1405   1411     CFLAGS      C compiler flags
  1406   1412     LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
  1407   1413                 nonstandard directory <lib dir>
  1408   1414     LIBS        libraries to pass to the linker, e.g. -l<library>
  1409   1415     CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
  1410   1416                 you have headers in a nonstandard directory <include dir>
  1411   1417     CPP         C preprocessor
         1418  +  CXX         C++ compiler command
         1419  +  CXXFLAGS    C++ compiler flags
  1412   1420     XMKMF       Path to xmkmf, Makefile generator for X Window System
  1413   1421   
  1414   1422   Use these variables to override the choices made by `configure' or to help
  1415   1423   it to find libraries and programs with nonstandard names/locations.
  1416   1424   
  1417   1425   Report bugs to the package provider.
  1418   1426   _ACEOF
................................................................................
  1834   1842   eval ac_res=\$$3
  1835   1843   	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  1836   1844   $as_echo "$ac_res" >&6; }
  1837   1845   fi
  1838   1846     eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  1839   1847   
  1840   1848   } # ac_fn_c_check_header_mongrel
         1849  +
         1850  +# ac_fn_cxx_try_compile LINENO
         1851  +# ----------------------------
         1852  +# Try to compile conftest.$ac_ext, and return whether this succeeded.
         1853  +ac_fn_cxx_try_compile ()
         1854  +{
         1855  +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
         1856  +  rm -f conftest.$ac_objext
         1857  +  if { { ac_try="$ac_compile"
         1858  +case "(($ac_try" in
         1859  +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
         1860  +  *) ac_try_echo=$ac_try;;
         1861  +esac
         1862  +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
         1863  +$as_echo "$ac_try_echo"; } >&5
         1864  +  (eval "$ac_compile") 2>conftest.err
         1865  +  ac_status=$?
         1866  +  if test -s conftest.err; then
         1867  +    grep -v '^ *+' conftest.err >conftest.er1
         1868  +    cat conftest.er1 >&5
         1869  +    mv -f conftest.er1 conftest.err
         1870  +  fi
         1871  +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
         1872  +  test $ac_status = 0; } && {
         1873  +	 test -z "$ac_cxx_werror_flag" ||
         1874  +	 test ! -s conftest.err
         1875  +       } && test -s conftest.$ac_objext; then :
         1876  +  ac_retval=0
         1877  +else
         1878  +  $as_echo "$as_me: failed program was:" >&5
         1879  +sed 's/^/| /' conftest.$ac_ext >&5
         1880  +
         1881  +	ac_retval=1
         1882  +fi
         1883  +  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
         1884  +  as_fn_set_status $ac_retval
         1885  +
         1886  +} # ac_fn_cxx_try_compile
  1841   1887   cat >config.log <<_ACEOF
  1842   1888   This file contains any messages produced by compilers while
  1843   1889   running configure, to aid debugging if configure makes a mistake.
  1844   1890   
  1845   1891   It was created by customfont $as_me 1.1, which was
  1846   1892   generated by GNU Autoconf 2.69.  Invocation command line was
  1847   1893   
................................................................................
  5071   5117   # You can add more files to clean if your extension creates any extra
  5072   5118   # files.
  5073   5119   #
  5074   5120   # TEA_ADD_* any platform specific compiler/build info here.
  5075   5121   #--------------------------------------------------------------------
  5076   5122   if test "${TEA_PLATFORM}" = "windows" ; then
  5077   5123   
         5124  +    ac_ext=cpp
         5125  +ac_cpp='$CXXCPP $CPPFLAGS'
         5126  +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
         5127  +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
         5128  +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
         5129  +if test -z "$CXX"; then
         5130  +  if test -n "$CCC"; then
         5131  +    CXX=$CCC
         5132  +  else
         5133  +    if test -n "$ac_tool_prefix"; then
         5134  +  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
         5135  +  do
         5136  +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
         5137  +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
         5138  +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
         5139  +$as_echo_n "checking for $ac_word... " >&6; }
         5140  +if ${ac_cv_prog_CXX+:} false; then :
         5141  +  $as_echo_n "(cached) " >&6
         5142  +else
         5143  +  if test -n "$CXX"; then
         5144  +  ac_cv_prog_CXX="$CXX" # Let the user override the test.
         5145  +else
         5146  +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
         5147  +for as_dir in $PATH
         5148  +do
         5149  +  IFS=$as_save_IFS
         5150  +  test -z "$as_dir" && as_dir=.
         5151  +    for ac_exec_ext in '' $ac_executable_extensions; do
         5152  +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
         5153  +    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
         5154  +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
         5155  +    break 2
         5156  +  fi
         5157  +done
         5158  +  done
         5159  +IFS=$as_save_IFS
         5160  +
         5161  +fi
         5162  +fi
         5163  +CXX=$ac_cv_prog_CXX
         5164  +if test -n "$CXX"; then
         5165  +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
         5166  +$as_echo "$CXX" >&6; }
         5167  +else
         5168  +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
         5169  +$as_echo "no" >&6; }
         5170  +fi
         5171  +
         5172  +
         5173  +    test -n "$CXX" && break
         5174  +  done
         5175  +fi
         5176  +if test -z "$CXX"; then
         5177  +  ac_ct_CXX=$CXX
         5178  +  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
         5179  +do
         5180  +  # Extract the first word of "$ac_prog", so it can be a program name with args.
         5181  +set dummy $ac_prog; ac_word=$2
         5182  +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
         5183  +$as_echo_n "checking for $ac_word... " >&6; }
         5184  +if ${ac_cv_prog_ac_ct_CXX+:} false; then :
         5185  +  $as_echo_n "(cached) " >&6
         5186  +else
         5187  +  if test -n "$ac_ct_CXX"; then
         5188  +  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
         5189  +else
         5190  +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
         5191  +for as_dir in $PATH
         5192  +do
         5193  +  IFS=$as_save_IFS
         5194  +  test -z "$as_dir" && as_dir=.
         5195  +    for ac_exec_ext in '' $ac_executable_extensions; do
         5196  +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
         5197  +    ac_cv_prog_ac_ct_CXX="$ac_prog"
         5198  +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
         5199  +    break 2
         5200  +  fi
         5201  +done
         5202  +  done
         5203  +IFS=$as_save_IFS
         5204  +
         5205  +fi
         5206  +fi
         5207  +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
         5208  +if test -n "$ac_ct_CXX"; then
         5209  +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
         5210  +$as_echo "$ac_ct_CXX" >&6; }
         5211  +else
         5212  +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
         5213  +$as_echo "no" >&6; }
         5214  +fi
         5215  +
         5216  +
         5217  +  test -n "$ac_ct_CXX" && break
         5218  +done
         5219  +
         5220  +  if test "x$ac_ct_CXX" = x; then
         5221  +    CXX="g++"
         5222  +  else
         5223  +    case $cross_compiling:$ac_tool_warned in
         5224  +yes:)
         5225  +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
         5226  +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
         5227  +ac_tool_warned=yes ;;
         5228  +esac
         5229  +    CXX=$ac_ct_CXX
         5230  +  fi
         5231  +fi
         5232  +
         5233  +  fi
         5234  +fi
         5235  +# Provide some information about the compiler.
         5236  +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
         5237  +set X $ac_compile
         5238  +ac_compiler=$2
         5239  +for ac_option in --version -v -V -qversion; do
         5240  +  { { ac_try="$ac_compiler $ac_option >&5"
         5241  +case "(($ac_try" in
         5242  +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
         5243  +  *) ac_try_echo=$ac_try;;
         5244  +esac
         5245  +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
         5246  +$as_echo "$ac_try_echo"; } >&5
         5247  +  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
         5248  +  ac_status=$?
         5249  +  if test -s conftest.err; then
         5250  +    sed '10a\
         5251  +... rest of stderr output deleted ...
         5252  +         10q' conftest.err >conftest.er1
         5253  +    cat conftest.er1 >&5
         5254  +  fi
         5255  +  rm -f conftest.er1 conftest.err
         5256  +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
         5257  +  test $ac_status = 0; }
         5258  +done
         5259  +
         5260  +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
         5261  +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
         5262  +if ${ac_cv_cxx_compiler_gnu+:} false; then :
         5263  +  $as_echo_n "(cached) " >&6
         5264  +else
         5265  +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         5266  +/* end confdefs.h.  */
         5267  +
         5268  +int
         5269  +main ()
         5270  +{
         5271  +#ifndef __GNUC__
         5272  +       choke me
         5273  +#endif
         5274  +
         5275  +  ;
         5276  +  return 0;
         5277  +}
         5278  +_ACEOF
         5279  +if ac_fn_cxx_try_compile "$LINENO"; then :
         5280  +  ac_compiler_gnu=yes
         5281  +else
         5282  +  ac_compiler_gnu=no
         5283  +fi
         5284  +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         5285  +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
         5286  +
         5287  +fi
         5288  +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
         5289  +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
         5290  +if test $ac_compiler_gnu = yes; then
         5291  +  GXX=yes
         5292  +else
         5293  +  GXX=
         5294  +fi
         5295  +ac_test_CXXFLAGS=${CXXFLAGS+set}
         5296  +ac_save_CXXFLAGS=$CXXFLAGS
         5297  +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
         5298  +$as_echo_n "checking whether $CXX accepts -g... " >&6; }
         5299  +if ${ac_cv_prog_cxx_g+:} false; then :
         5300  +  $as_echo_n "(cached) " >&6
         5301  +else
         5302  +  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
         5303  +   ac_cxx_werror_flag=yes
         5304  +   ac_cv_prog_cxx_g=no
         5305  +   CXXFLAGS="-g"
         5306  +   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         5307  +/* end confdefs.h.  */
         5308  +
         5309  +int
         5310  +main ()
         5311  +{
         5312  +
         5313  +  ;
         5314  +  return 0;
         5315  +}
         5316  +_ACEOF
         5317  +if ac_fn_cxx_try_compile "$LINENO"; then :
         5318  +  ac_cv_prog_cxx_g=yes
         5319  +else
         5320  +  CXXFLAGS=""
         5321  +      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         5322  +/* end confdefs.h.  */
         5323  +
         5324  +int
         5325  +main ()
         5326  +{
         5327  +
         5328  +  ;
         5329  +  return 0;
         5330  +}
         5331  +_ACEOF
         5332  +if ac_fn_cxx_try_compile "$LINENO"; then :
         5333  +
         5334  +else
         5335  +  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
         5336  +	 CXXFLAGS="-g"
         5337  +	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         5338  +/* end confdefs.h.  */
         5339  +
         5340  +int
         5341  +main ()
         5342  +{
         5343  +
         5344  +  ;
         5345  +  return 0;
         5346  +}
         5347  +_ACEOF
         5348  +if ac_fn_cxx_try_compile "$LINENO"; then :
         5349  +  ac_cv_prog_cxx_g=yes
         5350  +fi
         5351  +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         5352  +fi
         5353  +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         5354  +fi
         5355  +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         5356  +   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
         5357  +fi
         5358  +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
         5359  +$as_echo "$ac_cv_prog_cxx_g" >&6; }
         5360  +if test "$ac_test_CXXFLAGS" = set; then
         5361  +  CXXFLAGS=$ac_save_CXXFLAGS
         5362  +elif test $ac_cv_prog_cxx_g = yes; then
         5363  +  if test "$GXX" = yes; then
         5364  +    CXXFLAGS="-g -O2"
         5365  +  else
         5366  +    CXXFLAGS="-g"
         5367  +  fi
         5368  +else
         5369  +  if test "$GXX" = yes; then
         5370  +    CXXFLAGS="-O2"
         5371  +  else
         5372  +    CXXFLAGS=
         5373  +  fi
         5374  +fi
         5375  +ac_ext=c
         5376  +ac_cpp='$CPP $CPPFLAGS'
         5377  +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
         5378  +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
         5379  +ac_compiler_gnu=$ac_cv_c_compiler_gnu
         5380  +
         5381  +    CC=$CXX
  5078   5382   
  5079   5383       PKG_CFLAGS="$PKG_CFLAGS -DUNICODE -D_UNICODE"
  5080   5384   
  5081   5385   
  5082   5386   
  5083   5387       vars="win/customfont_win.c"
  5084   5388       for i in $vars; do
................................................................................
  5110   5414   		;;
  5111   5415   	esac
  5112   5416       done
  5113   5417   
  5114   5418   
  5115   5419   
  5116   5420   
  5117         -    vars="kernel32.lib user32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib gdi32.lib"
         5421  +    vars="gdiplus.lib gdi32.lib"
  5118   5422       for i in $vars; do
  5119   5423   	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
  5120   5424   	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
  5121   5425   	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
  5122   5426   	fi
  5123   5427   	PKG_LIBS="$PKG_LIBS $i"
  5124   5428       done
  5125   5429   
  5126   5430   
         5431  +    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
         5432  +
         5433  +    ## Check if the compiler accepts -static-libstdc++ (i.e. mingw)...
         5434  +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -static-libstdc++" >&5
         5435  +$as_echo_n "checking if the compiler understands -static-libstdc++... " >&6; }
         5436  +if ${tcl_cv_cc_staticlib+:} false; then :
         5437  +  $as_echo_n "(cached) " >&6
         5438  +else
         5439  +
         5440  +        hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -static-libstdc++"
         5441  +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         5442  +/* end confdefs.h.  */
         5443  +
         5444  +int
         5445  +main ()
         5446  +{
         5447  +
         5448  +  ;
         5449  +  return 0;
         5450  +}
         5451  +_ACEOF
         5452  +if ac_fn_c_try_compile "$LINENO"; then :
         5453  +  tcl_cv_cc_staticlib=yes
         5454  +else
         5455  +  tcl_cv_cc_staticlib=no
         5456  +fi
         5457  +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         5458  +        CFLAGS=$hold_cflags
         5459  +fi
         5460  +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_staticlib" >&5
         5461  +$as_echo "$tcl_cv_cc_staticlib" >&6; }
  5127   5462   
  5128   5463   
  5129   5464   $as_echo "#define BUILD_customfont 1" >>confdefs.h
  5130   5465   
  5131   5466   
  5132   5467       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
  5133   5468       #TEA_ADD_SOURCES([win/winFile.c])

Changes to customfont/configure.in.

    83     83   # You can add more files to clean if your extension creates any extra
    84     84   # files.
    85     85   #
    86     86   # TEA_ADD_* any platform specific compiler/build info here.
    87     87   #--------------------------------------------------------------------
    88     88   if test "${TEA_PLATFORM}" = "windows" ; then
    89     89   
           90  +    AC_PROG_CXX
           91  +    CC=$CXX
    90     92       TEA_ADD_CFLAGS([-DUNICODE -D_UNICODE])
    91     93       TEA_ADD_SOURCES([win/customfont_win.c])
    92         -    TEA_ADD_LIBS(kernel32.lib user32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib gdi32.lib)
           94  +    TEA_ADD_LIBS([gdiplus.lib gdi32.lib])
           95  +    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
           96  +
           97  +    ## Check if the compiler accepts -static-libstdc++ (i.e. mingw)...
           98  +    AC_CACHE_CHECK([if the compiler understands -static-libstdc++],
           99  +        tcl_cv_cc_staticlib, [
          100  +        hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -static-libstdc++"
          101  +        AC_TRY_COMPILE(,, tcl_cv_cc_staticlib=yes, tcl_cv_cc_staticlib=no)
          102  +        CFLAGS=$hold_cflags])
    93    103   
    94    104         AC_DEFINE(BUILD_customfont, 1, [Build windows export dll])
    95    105   
    96    106       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
    97    107       #TEA_ADD_SOURCES([win/winFile.c])
    98    108       #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
    99    109   else