Check-in [dd35aeb62b]
Overview
Comment:Started versioning aclocal files and updated to find an appropriate Tclsh
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:dd35aeb62be3047d301a9e8674b49b3abb91b0e1
User & Date: rkeene on 2014-06-21 18:50:40
Other Links: manifest | tags
Context
2014-06-21
19:04
Added a "linktclcommand" subcommand to create a Tcl command that references a C symbol check-in: a520862b78 user: rkeene tags: trunk
18:50
Started versioning aclocal files and updated to find an appropriate Tclsh check-in: dd35aeb62b user: rkeene tags: trunk
18:26
Fixed typo check-in: d680a4ffbf user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [163df1cbc6] to [fb72cf2d2f].

     1      1   aclocal.m4
     2         -aclocal/shobj.m4
     3         -aclocal/tcl.m4
     4         -aclocal/versionscript.m4
     5      2   config.guess
     6      3   config.sub
     7      4   config.log
     8      5   config.status
     9      6   configure
    10      7   install-sh
    11      8   Makefile

Modified Makefile.in from [21664f4410] to [7a39a34a3e].

    10     10   RANLIB = @RANLIB@
    11     11   CFLAGS = @CFLAGS@ @SHOBJFLAGS@
    12     12   CPPFLAGS = @CPPFLAGS@ -I$(shell cd @srcdir@ && pwd) -I$(shell cd @srcdir@ && pwd)/tcc -I$(shell pwd)/tcc @DEFS@ @SHOBJCPPFLAGS@
    13     13   LDFLAGS = @LDFLAGS@
    14     14   SHOBJLDFLAGS = @SHOBJLDFLAGS@
    15     15   LIBS = @LIBS@
    16     16   INSTALL = @INSTALL@
    17         -TCLSH = tclsh
           17  +TCLSH = @TCLSH_PROG@
    18     18   
    19     19   PACKAGE_NAME = @PACKAGE_NAME@
    20     20   PACKAGE_VERSION = @PACKAGE_VERSION@
    21     21   
    22     22   TCLCONFIGPATH = @TCLCONFIGPATH@
    23     23   TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
    24     24   tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi)

Added aclocal/shobj.m4 version [455eb6a4ce].

            1  +dnl Usage:
            2  +dnl    DC_TEST_SHOBJFLAGS(shobjflags, shobjldflags, action-if-not-found)
            3  +dnl
            4  +AC_DEFUN([DC_TEST_SHOBJFLAGS], [
            5  +  AC_SUBST(SHOBJFLAGS)
            6  +  AC_SUBST(SHOBJCPPFLAGS)
            7  +  AC_SUBST(SHOBJLDFLAGS)
            8  +
            9  +  OLD_LDFLAGS="$LDFLAGS"
           10  +  OLD_CFLAGS="$CFLAGS"
           11  +  OLD_CPPFLAGS="$CPPFLAGS"
           12  +
           13  +  SHOBJFLAGS=""
           14  +  SHOBJCPPFLAGS=""
           15  +  SHOBJLDFLAGS=""
           16  +
           17  +  CFLAGS="$OLD_CFLAGS $1"
           18  +  CPPFLAGS="$OLD_CPPFLAGS $2"
           19  +  LDFLAGS="$OLD_LDFLAGS $3"
           20  +
           21  +  AC_TRY_LINK([#include <stdio.h>
           22  +int unrestst(void);], [ printf("okay\n"); unrestst(); return(0); ], [ SHOBJFLAGS="$1"; SHOBJCPPFLAGS="$2"; SHOBJLDFLAGS="$3" ], [
           23  +    LDFLAGS="$OLD_LDFLAGS"
           24  +    CFLAGS="$OLD_CFLAGS"
           25  +    CPPFLAGS="$OLD_CPPFLAGS"
           26  +    $4
           27  +  ])
           28  +
           29  +  LDFLAGS="$OLD_LDFLAGS"
           30  +  CFLAGS="$OLD_CFLAGS"
           31  +  CPPFLAGS="$OLD_CPPFLAGS"
           32  +])
           33  +
           34  +AC_DEFUN([DC_GET_SHOBJFLAGS], [
           35  +  AC_SUBST(SHOBJFLAGS)
           36  +  AC_SUBST(SHOBJCPPFLAGS)
           37  +  AC_SUBST(SHOBJLDFLAGS)
           38  +
           39  +  DC_CHK_OS_INFO
           40  +
           41  +  AC_MSG_CHECKING(how to create shared objects)
           42  +
           43  +  if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS" -a -z "$SHOBJCPPFLAGS"; then
           44  +    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic], [
           45  +      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared], [
           46  +	DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -mimpure-text], [
           47  +	  DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -mimpure-text], [
           48  +	    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
           49  +	      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -Wl,-G], [
           50  +		DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           51  +		  DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
           52  +		    DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
           53  +		      DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
           54  +		        DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib], [
           55  +		          AC_MSG_RESULT(cant)
           56  +		          AC_MSG_ERROR([We are unable to make shared objects.])
           57  +                        ])
           58  +		      ])
           59  +		    ])
           60  +		  ])
           61  +		])
           62  +	      ])
           63  +	    ])
           64  +	  ])
           65  +	])
           66  +      ])
           67  +    ])
           68  +  fi
           69  +
           70  +  AC_MSG_RESULT($SHOBJCPPFLAGS $SHOBJFLAGS $SHOBJLDFLAGS)
           71  +
           72  +  DC_SYNC_SHLIBOBJS
           73  +])
           74  +
           75  +AC_DEFUN([DC_SYNC_SHLIBOBJS], [
           76  +  AC_SUBST(SHLIBOBJS)
           77  +  SHLIBOBJS=""
           78  +  for obj in $LIB@&t@OBJS; do
           79  +    SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
           80  +  done
           81  +])
           82  +
           83  +AC_DEFUN([DC_SYNC_RPATH], [
           84  +  OLD_LDFLAGS="$LDFLAGS"
           85  +
           86  +  for tryrpath in "-Wl,-rpath" "-Wl,--rpath" "-Wl,-R"; do
           87  +    LDFLAGS="$OLD_LDFLAGS $tryrpath -Wl,/tmp"
           88  +    AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ return(0); ]), [
           89  +      rpathldflags="$tryrpath"
           90  +      break
           91  +    ])
           92  +  done
           93  +  unset tryrpath
           94  +
           95  +  LDFLAGS="$OLD_LDFLAGS"
           96  +  unset OLD_LDFLAGS
           97  +
           98  +  ADDLDFLAGS=""
           99  +  for opt in $LDFLAGS; do
          100  +    if echo "$opt" | grep '^-L' >/dev/null; then
          101  +      rpathdir=`echo "$opt" | sed 's@^-L *@@'`
          102  +      ADDLDFLAGS="$ADDLDFLAGS $rpathldflags -Wl,$rpathdir"
          103  +    fi
          104  +  done
          105  +  unset opt rpathldflags
          106  +
          107  +  LDFLAGS="$LDFLAGS $ADDLDFLAGS"
          108  +
          109  +  unset ADDLDFLAGS
          110  +])
          111  +
          112  +AC_DEFUN([DC_CHK_OS_INFO], [
          113  +	AC_CANONICAL_HOST
          114  +	AC_SUBST(SHOBJEXT)
          115  +	AC_SUBST(SHOBJFLAGS)
          116  +	AC_SUBST(SHOBJCPPFLAGS)
          117  +	AC_SUBST(SHOBJLDFLAGS)
          118  +	AC_SUBST(CFLAGS)
          119  +	AC_SUBST(CPPFLAGS)
          120  +	AC_SUBST(AREXT)
          121  +
          122  +	if test "$dc_cv_dc_chk_os_info_called" != '1'; then
          123  +		dc_cv_dc_chk_os_info_called='1'
          124  +
          125  +		AC_MSG_CHECKING(host operating system)
          126  +		AC_MSG_RESULT($host_os)
          127  +
          128  +		SHOBJEXT="so"
          129  +		AREXT="a"
          130  +
          131  +		case $host_os in
          132  +			darwin*)
          133  +				SHOBJEXT="dylib"
          134  +				;;
          135  +			hpux*)
          136  +				case "$host_cpu" in
          137  +					ia64)
          138  +						SHOBJEXT="so"
          139  +						;;
          140  +					*)
          141  +						SHOBJEXT="sl"
          142  +						;;
          143  +				esac
          144  +				;;
          145  +			aix[0-9].*)
          146  +				SHOBJEXT="a"
          147  +				;;
          148  +			mingw32|mingw32msvc*)
          149  +				SHOBJEXT="dll"
          150  +				CFLAGS="$CFLAGS -mms-bitfields"
          151  +				CPPFLAGS="$CPPFLAGS -mms-bitfields"
          152  +				SHOBJCPPFLAGS="-DPIC"
          153  +				SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
          154  +				;;
          155  +			msvc)
          156  +				SHOBJEXT="dll"
          157  +				CFLAGS="$CFLAGS -nologo"
          158  +				SHOBJCPPFLAGS='-DPIC'
          159  +				SHOBJLDFLAGS='/LD /LINK /NODEFAULTLIB:MSVCRT'
          160  +				;;
          161  +			cygwin*)
          162  +				SHOBJEXT="dll"
          163  +				SHOBJFLAGS="-fPIC"
          164  +				SHOBJCPPFLAGS="-DPIC"
          165  +				CFLAGS="$CFLAGS -mms-bitfields"
          166  +				CPPFLAGS="$CPPFLAGS -mms-bitfields"
          167  +				SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
          168  +				;;
          169  +		esac
          170  +	fi
          171  +])

Added aclocal/tcl.m4 version [8dba8a3a63].

            1  +dnl Tcl M4 Routines
            2  +
            3  +dnl Must call AC_CANONICAL_HOST  before calling us
            4  +AC_DEFUN([TCLEXT_FIND_TCLCONFIG], [
            5  +	AC_MSG_CHECKING([for path to tclConfig.sh])
            6  +
            7  +	TCLCONFIGPATH=""
            8  +	AC_ARG_WITH([tcl], AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), [
            9  +		if test "x$withval" = "xno"; then
           10  +			AC_MSG_ERROR([cant build without tcl])
           11  +		fi
           12  +
           13  +		TCLCONFIGPATH="$withval"
           14  +	], [
           15  +		for dir in "/usr/$host_alias/lib" /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64; do
           16  +			if test -f "$dir/tclConfig.sh"; then
           17  +				TCLCONFIGPATH="$dir"
           18  +
           19  +				break
           20  +			fi
           21  +		done
           22  +	])
           23  +
           24  +	if test -z "$TCLCONFIGPATH"; then
           25  +		AC_MSG_ERROR([unable to locate tclConfig.sh.  Try --with-tcl.])
           26  +	fi
           27  +
           28  +	for try_tclsh in "$TCLCONFIGPATH/../bin/tclsh" \
           29  +	                 "$TCLCONFIGPATH/../bin/tclsh8.6" \
           30  +	                 "$TCLCONFIGPATH/../bin/tclsh8.5" \
           31  +	                 "$TCLCONFIGPATH/../bin/tclsh8.4" \
           32  +	                 `which tclsh` \
           33  +	                 `which tclsh8.6` \
           34  +	                 `which tclsh8.5` \
           35  +	                 `which tclsh8.4` \
           36  +	                 tclsh; do
           37  +		if test -x "$try_tclsh"; then
           38  +			break
           39  +		fi
           40  +	done
           41  +	TCLSH_PROG="${try_tclsh}"
           42  +
           43  +	AC_SUBST(TCLCONFIGPATH)
           44  +	AC_SUBST(TCLSH_PROG)
           45  +
           46  +	AC_MSG_RESULT([$TCLCONFIGPATH])
           47  +])
           48  +
           49  +dnl Must define TCLCONFIGPATH before calling us (i.e., by TCLEXT_FIND_TCLCONFIG)
           50  +AC_DEFUN([TCLEXT_LOAD_TCLCONFIG], [
           51  +	AC_MSG_CHECKING([for working tclConfig.sh])
           52  +
           53  +	if test -f "$TCLCONFIGPATH/tclConfig.sh"; then
           54  +		. "$TCLCONFIGPATH/tclConfig.sh"
           55  +	else
           56  +		AC_MSG_ERROR([unable to load tclConfig.sh])
           57  +	fi
           58  +
           59  +
           60  +	AC_MSG_RESULT([found])
           61  +])
           62  +
           63  +AC_DEFUN([TCLEXT_INIT], [
           64  +	AC_CANONICAL_HOST
           65  +
           66  +	TCLEXT_FIND_TCLCONFIG
           67  +	TCLEXT_LOAD_TCLCONFIG
           68  +
           69  +	AC_DEFINE_UNQUOTED([MODULE_SCOPE], [static], [Define how to declare a function should only be visible to the current module])
           70  +
           71  +	AC_ARG_ENABLE([stubs], AS_HELP_STRING([--disable-stubs], [disable use of Tcl stubs]), [
           72  +		if test "$enableval" = "no"; then
           73  +			TCL_SUPPORTS_STUBS=0
           74  +		else
           75  +			TCL_SUPPORTS_STUBS=1
           76  +		fi
           77  +	])
           78  +
           79  +	if test "$TCL_SUPPORTS_STUBS" = "1"; then
           80  +		AC_DEFINE([USE_TCL_STUBS], [1], [Define if you are using the Tcl Stubs Mechanism])
           81  +
           82  +		TCL_STUB_LIB_SPEC="`eval echo "${TCL_STUB_LIB_SPEC}"`"
           83  +		LIBS="${LIBS} ${TCL_STUB_LIB_SPEC}"
           84  +	else
           85  +		TCL_LIB_SPEC="`eval echo "${TCL_LIB_SPEC}"`"
           86  +		LIBS="${LIBS} ${TCL_LIB_SPEC}"
           87  +	fi
           88  +
           89  +	TCL_INCLUDE_SPEC="`eval echo "${TCL_INCLUDE_SPEC}"`"
           90  +
           91  +	CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC}"
           92  +	CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
           93  +	DEFS="${DEFS} ${TCL_DEFS}"
           94  +
           95  +	dnl Needed for package installation
           96  +	TCL_PACKAGE_PATH="`echo "${TCL_PACKAGE_PATH}" | sed 's@  *$''@@' | awk '{ print [$]1 }'`"
           97  +	AC_SUBST(TCL_PACKAGE_PATH)
           98  +
           99  +	AC_SUBST(LIBS)
          100  +])

Added aclocal/versionscript.m4 version [68146d5f5a].

            1  +AC_DEFUN([DC_SETUP_STABLE_API], [
            2  +	VERSIONSCRIPT="$1"
            3  +	SYMFILE="$2"
            4  +
            5  +	DC_FIND_STRIP_AND_REMOVESYMS([$SYMFILE])
            6  +	DC_SETVERSIONSCRIPT([$VERSIONSCRIPT], [$SYMFILE])
            7  +])
            8  +
            9  +
           10  +AC_DEFUN([DC_SETVERSIONSCRIPT], [
           11  +	VERSIONSCRIPT="$1"
           12  +	SYMFILE="$2"
           13  +	TMPSYMFILE="${SYMFILE}.tmp"
           14  +	TMPVERSIONSCRIPT="${VERSIONSCRIPT}.tmp"
           15  +
           16  +	echo "${SYMPREFIX}Test_Symbol" > "${TMPSYMFILE}"
           17  +
           18  +	echo '{' > "${TMPVERSIONSCRIPT}"
           19  +	echo '	local:' >> "${TMPVERSIONSCRIPT}"
           20  +	echo "		${SYMPREFIX}Test_Symbol;" >> "${TMPVERSIONSCRIPT}"
           21  +	echo '};' >> "${TMPVERSIONSCRIPT}"
           22  +
           23  +	SAVE_LDFLAGS="${LDFLAGS}"
           24  +
           25  +	AC_MSG_CHECKING([for how to set version script])
           26  +
           27  +	for tryaddldflags in "-Wl,--version-script,${TMPVERSIONSCRIPT}" "-Wl,-exported_symbols_list,${TMPSYMFILE}"; do
           28  +		LDFLAGS="${SAVE_LDFLAGS} ${tryaddldflags}"
           29  +		AC_TRY_LINK([void Test_Symbol(void) { return; }], [], [
           30  +			addldflags="`echo "${tryaddldflags}" | sed 's/\.tmp$//'`"
           31  +
           32  +			break
           33  +		])
           34  +	done
           35  +
           36  +	rm -f "${TMPSYMFILE}"
           37  +	rm -f "${TMPVERSIONSCRIPT}"
           38  +
           39  +	if test -n "${addldflags}"; then
           40  +		LDFLAGS="${SAVE_LDFLAGS} ${addldflags}"
           41  +		AC_MSG_RESULT($addldflags)
           42  +	else
           43  +		LDFLAGS="${SAVE_LDFLAGS}"
           44  +		AC_MSG_RESULT([don't know])
           45  +	fi
           46  +])
           47  +
           48  +AC_DEFUN([DC_FIND_STRIP_AND_REMOVESYMS], [
           49  +	SYMFILE="$1"
           50  +
           51  +	dnl Determine how to strip executables
           52  +	AC_CHECK_TOOLS(OBJCOPY, objcopy gobjcopy, [false])
           53  +	AC_CHECK_TOOLS(STRIP, strip gstrip, [false])
           54  +
           55  +	if test "x${STRIP}" = "xfalse"; then
           56  +		STRIP="${OBJCOPY}"
           57  +	fi
           58  +
           59  +	WEAKENSYMS='true'
           60  +	REMOVESYMS='true'
           61  +	SYMPREFIX=''
           62  +
           63  +	case $host_os in
           64  +		darwin*)
           65  +			SYMPREFIX="_"
           66  +			REMOVESYMS="${STRIP} -u -x"
           67  +			;;
           68  +		*)
           69  +			if test "x${OBJCOPY}" != "xfalse"; then
           70  +				WEAKENSYMS="${OBJCOPY} --keep-global-symbols=${SYMFILE}"
           71  +				REMOVESYMS="${OBJCOPY} --discard-all"
           72  +			elif test "x${STRIP}" != "xfalse"; then
           73  +				REMOVESYMS="${STRIP} -x"
           74  +			fi
           75  +			;;
           76  +	esac
           77  +
           78  +	AC_SUBST(WEAKENSYMS)
           79  +	AC_SUBST(REMOVESYMS)
           80  +	AC_SUBST(SYMPREFIX)
           81  +])