Check-in [66b966ddc3]
Overview
SHA1:66b966ddc3f286bdc194101963108c461c0d3f68
Date: 2014-12-13 22:52:03
User: rkeene
Comment:Updated to latest autoconf macros
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-12-13
23:02
[9e821bdcac] Updated to only update remote files if requested (user: rkeene, tags: trunk)
22:52
[66b966ddc3] Updated to latest autoconf macros (user: rkeene, tags: trunk)
22:51
[fd2c314964] Updated ignores (user: rkeene, tags: trunk)
Changes

Modified aclocal/shobj.m4 from [2c7adb586d] to [9a0374cc5c].

     1      1   dnl Usage:
     2      2   dnl    DC_TEST_SHOBJFLAGS(shobjflags, shobjldflags, action-if-not-found)
     3      3   dnl
     4         -AC_DEFUN(DC_TEST_SHOBJFLAGS, [
            4  +AC_DEFUN([DC_TEST_SHOBJFLAGS], [
     5      5     AC_SUBST(SHOBJFLAGS)
            6  +  AC_SUBST(SHOBJCPPFLAGS)
     6      7     AC_SUBST(SHOBJLDFLAGS)
     7      8   
     8      9     OLD_LDFLAGS="$LDFLAGS"
           10  +  OLD_CFLAGS="$CFLAGS"
           11  +  OLD_CPPFLAGS="$CPPFLAGS"
           12  +
     9     13     SHOBJFLAGS=""
           14  +  SHOBJCPPFLAGS=""
           15  +  SHOBJLDFLAGS=""
    10     16   
    11         -  LDFLAGS="$OLD_LDFLAGS $1 $2"
           17  +  CFLAGS="$OLD_CFLAGS $1"
           18  +  CPPFLAGS="$OLD_CPPFLAGS $2"
           19  +  LDFLAGS="$OLD_LDFLAGS $3"
    12     20   
    13     21     AC_TRY_LINK([#include <stdio.h>
    14         -int unrestst(void);], [ printf("okay\n"); unrestst(); return(0); ], [ SHOBJFLAGS="$1"; SHOBJLDFLAGS="$2" ], [
    15         -  LDFLAGS="$OLD_LDFLAGS"
    16         -  $3
    17         -])
           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  +  ])
    18     28   
    19     29     LDFLAGS="$OLD_LDFLAGS"
           30  +  CFLAGS="$OLD_CFLAGS"
           31  +  CPPFLAGS="$OLD_CPPFLAGS"
    20     32   ])
    21     33   
    22         -AC_DEFUN(DC_GET_SHOBJFLAGS, [
           34  +AC_DEFUN([DC_GET_SHOBJFLAGS], [
    23     35     AC_SUBST(SHOBJFLAGS)
           36  +  AC_SUBST(SHOBJCPPFLAGS)
    24     37     AC_SUBST(SHOBJLDFLAGS)
           38  +
           39  +  DC_CHK_OS_INFO
    25     40   
    26     41     AC_MSG_CHECKING(how to create shared objects)
    27     42   
    28         -  if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS"; then
    29         -    DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic], [
    30         -      DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared], [
    31         -        DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -mimpure-text], [
    32         -          DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -mimpure-text], [
    33         -            DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
    34         -              DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -Wl,-G,-z,textoff], [
    35         -                DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
    36         -                  DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
    37         -                    DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
    38         -                      DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
    39         -                        DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib], [
    40         -                          AC_MSG_RESULT(cant)
    41         -                          AC_MSG_ERROR([We are unable to make shared objects.])
           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.])
    42     57                           ])
    43         -                      ])
    44         -                    ])
    45         -                  ])
    46         -                ])
    47         -              ])
    48         -            ])
    49         -          ])
    50         -        ])
           58  +		      ])
           59  +		    ])
           60  +		  ])
           61  +		])
           62  +	      ])
           63  +	    ])
           64  +	  ])
           65  +	])
    51     66         ])
    52     67       ])
    53     68     fi
    54     69   
    55         -  AC_MSG_RESULT($SHOBJLDFLAGS $SHOBJFLAGS)
           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
    56    110   ])
    57    111   
    58         -AC_DEFUN(DC_CHK_OS_INFO, [
          112  +AC_DEFUN([DC_CHK_OS_INFO], [
    59    113   	AC_CANONICAL_HOST
    60    114   	AC_SUBST(SHOBJEXT)
          115  +	AC_SUBST(SHOBJFLAGS)
          116  +	AC_SUBST(SHOBJCPPFLAGS)
          117  +	AC_SUBST(SHOBJLDFLAGS)
          118  +	AC_SUBST(CFLAGS)
          119  +	AC_SUBST(CPPFLAGS)
    61    120   	AC_SUBST(AREXT)
    62         -        AC_SUBST(SHOBJFLAGS)
    63         -        AC_SUBST(SHOBJLDFLAGS)
          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  +])
          172  +
          173  +AC_DEFUN(SHOBJ_SET_SONAME, [
          174  +	SAVE_LDFLAGS="$LDFLAGS"
          175  +
          176  +	AC_MSG_CHECKING([how to specify soname])
          177  +
          178  +	for try in "-Wl,--soname,$1" "Wl,-install_name,$1" '__fail__'; do
          179  +		LDFLAGS="$SAVE_LDFLAGS"
          180  +
          181  +		if test "${try}" = '__fail__'; then
          182  +			AC_MSG_RESULT([can't])
          183  +
          184  +			break
          185  +		fi
          186  +
          187  +		LDFLAGS="${LDFLAGS} ${try}"
          188  +		AC_TRY_LINK([void TestTest(void) { return; }], [], [
          189  +			LDFLAGS="${SAVE_LDFLAGS}"
          190  +			SHOBJLDFLAGS="${SHOBJLDFLAGS} ${try}"
    64    191   
    65         -        AC_MSG_CHECKING(host operating system)
    66         -        AC_MSG_RESULT($host_os)
          192  +			AC_MSG_RESULT([$try])
    67    193   
    68         -	SHOBJEXT="so"
    69         -	AREXT="a"
          194  +			break
          195  +		])
          196  +	done
    70    197   
    71         -        case $host_os in
    72         -                darwin*)
    73         -			SHOBJEXT="dylib"
    74         -                        ;;
    75         -		hpux*)
    76         -			SHOBJEXT="sl"
    77         -			;;
    78         -		mingw*)
    79         -			SHOBJEXT="dll"
    80         -			SHOBJFLAGS="-mms-bitfields -DPIC"
    81         -			SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
    82         -			;;
    83         -	esac
          198  +	AC_SUBST(SHOBJLDFLAGS)
    84    199   ])

Modified aclocal/tcl.m4 from [7c92d40f9e] to [7fd1e39b5f].

     1      1   dnl Tcl M4 Routines
     2      2   
     3      3   dnl Must call AC_CANONICAL_HOST  before calling us
     4         -AC_DEFUN(TCLEXT_FIND_TCLCONFIG, [
            4  +AC_DEFUN([TCLEXT_FIND_TCLCONFIG], [
     5      5   	AC_MSG_CHECKING([for path to tclConfig.sh])
     6      6   
     7      7   	TCLCONFIGPATH=""
     8      8   	AC_ARG_WITH([tcl], AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), [
     9      9   		if test "x$withval" = "xno"; then
    10     10   			AC_MSG_ERROR([cant build without tcl])
    11     11   		fi
................................................................................
    21     21   		done
    22     22   	])
    23     23   
    24     24   	if test -z "$TCLCONFIGPATH"; then
    25     25   		AC_MSG_ERROR([unable to locate tclConfig.sh.  Try --with-tcl.])
    26     26   	fi
    27     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 2>/dev/null` \
           33  +	                 `which tclsh8.6 2>/dev/null` \
           34  +	                 `which tclsh8.5 2>/dev/null` \
           35  +	                 `which tclsh8.4 2>/dev/null` \
           36  +	                 tclsh; do
           37  +		if test -x "$try_tclsh"; then
           38  +			break
           39  +		fi
           40  +	done
           41  +	TCLSH_PROG="${try_tclsh}"
           42  +
    28     43   	AC_SUBST(TCLCONFIGPATH)
           44  +	AC_SUBST(TCLSH_PROG)
    29     45   
    30     46   	AC_MSG_RESULT([$TCLCONFIGPATH])
    31     47   ])
    32     48   
    33     49   dnl Must define TCLCONFIGPATH before calling us (i.e., by TCLEXT_FIND_TCLCONFIG)
    34         -AC_DEFUN(TCLEXT_LOAD_TCLCONFIG, [
           50  +AC_DEFUN([TCLEXT_LOAD_TCLCONFIG], [
    35     51   	AC_MSG_CHECKING([for working tclConfig.sh])
    36     52   
    37     53   	if test -f "$TCLCONFIGPATH/tclConfig.sh"; then
    38     54   		. "$TCLCONFIGPATH/tclConfig.sh"
    39     55   	else
    40     56   		AC_MSG_ERROR([unable to load tclConfig.sh])
    41     57   	fi
    42     58   
    43     59   
    44     60   	AC_MSG_RESULT([found])
    45     61   ])
    46     62   
    47         -AC_DEFUN(TCLEXT_INIT, [
           63  +AC_DEFUN([TCLEXT_INIT], [
    48     64   	AC_CANONICAL_HOST
    49     65   
    50     66   	TCLEXT_FIND_TCLCONFIG
    51     67   	TCLEXT_LOAD_TCLCONFIG
    52     68   
    53         -
    54     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  +	])
    55     78   
    56     79   	if test "$TCL_SUPPORTS_STUBS" = "1"; then
    57     80   		AC_DEFINE([USE_TCL_STUBS], [1], [Define if you are using the Tcl Stubs Mechanism])
    58     81   
    59     82   		TCL_STUB_LIB_SPEC="`eval echo "${TCL_STUB_LIB_SPEC}"`"
    60     83   		LIBS="${LIBS} ${TCL_STUB_LIB_SPEC}"
    61     84   	else
................................................................................
    66     89   	TCL_INCLUDE_SPEC="`eval echo "${TCL_INCLUDE_SPEC}"`"
    67     90   
    68     91   	CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC}"
    69     92   	CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
    70     93   	DEFS="${DEFS} ${TCL_DEFS}"
    71     94   
    72     95   	dnl Needed for package installation
    73         -	TCL_PACKAGE_PATH="`echo "${TCL_PACKAGE_PATH}" | sed 's@  *$''@@'`"
           96  +	TCL_PACKAGE_PATH="`echo "${TCL_PACKAGE_PATH}" | sed 's@  *$''@@' | awk '{ print [$]1 }'`"
    74     97   	AC_SUBST(TCL_PACKAGE_PATH)
    75     98   
    76     99   	AC_SUBST(LIBS)
    77    100   ])

Modified build/autogen.sh from [01ca528618] to [3d66c1a312].

     1      1   #! /bin/bash
            2  +
            3  +(
            4  +	mkdir aclocal >/dev/null 2>/dev/null
            5  +	cd aclocal || exit 1
            6  +
            7  +	for file in shobj.m4 tcl.m4; do
            8  +		rm -f "${file}"
            9  +
           10  +		wget -O "${file}.new" "http://rkeene.org/devel/autoconf/${file}" || continue
           11  +
           12  +		mv "${file}.new" "${file}"
           13  +	done
           14  +)
     2     15   
     3     16   cat aclocal/*.m4 > aclocal.m4 || exit 1
     4     17   autoconf || exit 1
     5     18   rm -rf autom4te.cache/
     6     19   
     7     20   exit 0