Check-in [ea89461e7c]
Overview
Comment:Updated to check for define subprojects working as found

Updated to only link against C++ libs if Mk4tcl worked

Updated to check for MK4TCL available before referencing it

Added SunStudio C++ libraries

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ea89461e7c1e70b9c0f5b853243f736038220180
User & Date: rkeene on 2010-09-26 04:38:55
Other Links: manifest | tags
Context
2010-09-26
04:38
KitCreator 0.0.5.x check-in: 6d978c1a18 user: rkeene tags: trunk, 0.0.5
04:38
Updated to check for define subprojects working as found

Updated to only link against C++ libs if Mk4tcl worked

Updated to check for MK4TCL available before referencing it

Added SunStudio C++ libraries check-in: ea89461e7c user: rkeene tags: trunk

04:38
Updated to pass configure arguments to configure script check-in: 48744656f9 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/aclocal.m4 from [c2b5bbda30] to [abd6ccb011].

    39     39   
    40     40   	AC_MSG_RESULT([$tclconfigsh])
    41     41   ])
    42     42   
    43     43   AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
    44     44   	AC_MSG_CHECKING([for how to statically link to libstdc++])
    45     45   
    46         -	STATICLIBCXX="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"
    47         -	LIBS="${LIBS} ${STATICLIBCXX}"
           46  +	SAVELIBS="${LIBS}"
           47  +	staticlibcxx=""
           48  +	for trylink in "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-lstdc++" "-lCstd -lCrun"; do
           49  +		LIBS="${SAVELIBS} ${trylink}"
           50  +
           51  +		AC_LINK_IFELSE(, [
           52  +			staticlibcxx="${trylink}"
           53  +
           54  +			break
           55  +		])
           56  +	done
           57  +	LIBS="${SAVELIBS} ${staticlibcxx}"
           58  +
           59  +	AC_MSG_RESULT([${staticlibcxx}])
    48     60   
    49     61   	AC_SUBST(LIBS)
    50         -
    51         -	AC_MSG_RESULT([${STATICLIBCXX}])
    52     62   ])
    53     63   
    54     64   AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
           65  +
    55     66   	for proj in mk4tcl tcl tclvfs; do
    56     67   		AC_MSG_CHECKING([for libraries required for ${proj}])
    57     68   
    58     69   		libdir="../../../${proj}/inst"
    59     70   		libfiles="`find "${libdir}" -name '*.a' | tr "\n" ' '`"
    60     71   
    61     72   		ARCHS="${ARCHS} ${libfiles}"
    62     73   
    63     74   		AC_MSG_RESULT([${libfiles}])
           75  +
           76  +		if test "${libfiles}" != ""; then
           77  +			upperproj=`echo "${proj}" | dd conv=ucase 2>/dev/null`
           78  +
           79  +			AC_DEFINE(KIT_INCLUDES_$upperproj)
           80  +
           81  +			if test "${proj}" = "mk4tcl"; then
           82  +				DC_DO_STATIC_LINK_LIBCXX
           83  +			fi
           84  +		fi
    64     85   	done
    65     86   
    66     87   	AC_SUBST(ARCHS)
    67     88   ])

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [3b08b8978d] to [f5d520c4b9].

     5      5   dnl Checks for programs.
     6      6   AC_PROG_CC
     7      7   AC_PROG_MAKE_SET
     8      8   AC_PROG_INSTALL
     9      9   AC_AIX
    10     10   AC_GNU_SOURCE
    11     11   
    12         -dnl Find the appropriate Tcl headers and libraries
    13         -DC_DO_TCL
    14         -
    15         -dnl Find out how to statically link to libstdc++ (for Metakit)
    16         -DC_DO_STATIC_LINK_LIBCXX
    17         -
    18         -dnl Find archives we need to link to
    19         -DC_FIND_TCLKIT_LIBS
    20         -
    21     12   dnl Find the appropriate libraries to link to
    22     13   AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ])
    23     14   AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
    24     15   AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])
           16  +
           17  +dnl Find the appropriate Tcl headers and libraries
           18  +DC_DO_TCL
           19  +
           20  +dnl Find archives we need to link to
           21  +DC_FIND_TCLKIT_LIBS
    25     22   
    26     23   dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
    27     24   SAVE_LIBS="${LIBS}"
    28     25   LIBS="${ARCHS} ${LIBS}"
    29     26   AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)
    30     27   LIBS="${SAVE_LIBS}"
    31     28   
    32     29   dnl Produce output
    33     30   AC_OUTPUT(Makefile)

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [04b049978f] to [9210ecc7cd].

    32     32   #endif
    33     33   
    34     34   #include "tclInt.h"
    35     35   
    36     36   #ifdef KIT_INCLUDES_ITCL
    37     37   Tcl_AppInitProc	Itcl_Init;
    38     38   #endif
    39         -Tcl_AppInitProc	Mk4tcl_Init, Vfs_Init, Rechan_Init, Zlib_Init;
           39  +#ifdef KIT_INCLUDES_MK4TCL
           40  +Tcl_AppInitProc	Mk4tcl_Init
           41  +#endif
           42  +Tcl_AppInitProc Vfs_Init, Rechan_Init, Zlib_Init;
    40     43   #if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
    41     44   Tcl_AppInitProc	Pwb_Init;
    42     45   #endif
    43     46   #ifdef TCL_THREADS
    44     47   Tcl_AppInitProc	Thread_Init;
    45     48   #endif
    46     49   #ifdef _WIN32
................................................................................
    71     74       "info script $old\n"
    72     75       "if {$code == 2} { set code 0 }\n"
    73     76       "return -code $code $res\n"
    74     77   "}\n"
    75     78   #endif
    76     79   "proc tclKitInit {} {\n"
    77     80       "rename tclKitInit {}\n"
    78         -    "load {} Mk4tcl\n"
           81  +    "catch { load {} Mk4tcl }\n"
    79     82       "mk::file open exe [info nameofexecutable] -readonly\n"
    80     83       "set n [mk::select exe.dirs!0.files name boot.tcl]\n"
    81     84       "if {$n != \"\"} {\n"
    82     85           "set s [mk::get exe.dirs!0.files!$n contents]\n"
    83     86   	"if {![string length $s]} { error \"empty boot.tcl\" }\n"
    84     87           "catch {load {} zlib}\n"
    85     88           "if {[mk::get exe.dirs!0.files!$n size] != [string length $s]} {\n"
................................................................................
   129    132   
   130    133   int 
   131    134   TclKit_AppInit(Tcl_Interp *interp)
   132    135   {
   133    136   #ifdef KIT_INCLUDES_ITCL
   134    137       Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
   135    138   #endif 
          139  +#ifdef KIT_INCLUDES_MK4TCL
   136    140       Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
          141  +#endif
   137    142   #if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
   138    143       Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
   139    144   #endif 
   140    145       Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
   141    146       Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
   142    147       Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
   143    148   #ifdef TCL_THREADS