Diff

Differences From Artifact [e980cfaf2c]:

To Artifact [91d2c06e40]:


    28     28   		fi
    29     29   	else
    30     30   		tclconfigshdir="${with_tcl}"
    31     31   		tclconfigsh="${tclconfigshdir}/tclConfig.sh"
    32     32   	fi
    33     33   
    34     34   	if test -f "${tclconfigsh}"; then
    35         -		source "${tclconfigsh}"
           35  +		. "${tclconfigsh}"
    36     36   
    37     37   		CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}"
    38     38   		CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}"
    39     39   		LDFLAGS="${LDFLAGS}"
    40     40   		LIBS="${LIBS} ${TCL_LIBS}"
    41     41   	fi
    42     42   
................................................................................
    78     78   		fi
    79     79   	else
    80     80   		tkconfigshdir="${with_tk}"
    81     81   		tkconfigsh="${tkconfigshdir}/tkConfig.sh"
    82     82   	fi
    83     83   
    84     84   	if test -f "${tkconfigsh}"; then
    85         -		source "${tkconfigsh}"
           85  +		. "${tkconfigsh}"
    86     86   
    87     87   		CFLAGS="${CFLAGS} ${TK_INCLUDE_SPEC} -I${TK_SRC_DIR}/generic -I${tkconfigshdir}"
    88     88   		CPPFLAGS="${CPPFLAGS} ${TK_INCLUDE_SPEC} -I${TK_SRC_DIR}/generic -I${tkconfigshdir}"
    89     89   		LDFLAGS="${LDFLAGS}"
    90     90   		LIBS="${LIBS} ${TK_LIBS}"
    91     91   	fi
    92     92   
................................................................................
    99     99   ])
   100    100   
   101    101   AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
   102    102   	AC_MSG_CHECKING([for how to statically link to libstdc++])
   103    103   
   104    104   	SAVELIBS="${LIBS}"
   105    105   	staticlibcxx=""
   106         -	for trylink in "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-lCstd -lCrun" "-lstdc++"; do
          106  +	dnl HP/UX uses -Wl,-a,archive -lstdc++ -Wl,-a,shared_archive
          107  +	dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic
          108  +	dnl
          109  +	dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++
          110  +	for trylink in "-Wl,-a,archive -lstdc++ -Wl,-a,shared_archive" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-lCstd -lCrun" "-lstdc++"; do
   107    111   		LIBS="${SAVELIBS} ${trylink}"
   108    112   
   109    113   		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [
   110    114   			staticlibcxx="${trylink}"
   111    115   
   112    116   			break
   113    117   		])
................................................................................
   169    173   			AC_DEFINE(BUILD_tcl, [1], [Define if you need to pretend to be building Tcl (Windows)])
   170    174   			AC_DEFINE(BUILD_tk, [1], [Define if you need to pretend to be building Tk (Windows)])
   171    175   			;;
   172    176   		cygwin*)
   173    177   			CFLAGS="${CFLAGS} -mms-bitfields"
   174    178   			;;
   175    179   	esac
          180  +])
          181  +
          182  +AC_DEFUN(DC_STATIC_LIBGCC, [
          183  +	AC_MSG_CHECKING([how to link statically against libgcc])
          184  +
          185  +	SAVELDFLAGS="${LDFLAGS}"
          186  +	staticlibgcc=""
          187  +	for trylink in "-static-libgcc"; do
          188  +		LDFLAGS="${SAVELDFLAGS} ${trylink}"
          189  +		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [
          190  +			staticlibgcc="${trylink}"
          191  +
          192  +			break
          193  +		])
          194  +	done
          195  +	if test -n "${staticlibgcc}"; then
          196  +		LDFLAGS="${SAVELDFLAGS} ${staticlibgcc}"
          197  +		AC_MSG_RESULT([${staticlibgcc}])
          198  +	else
          199  +		LDFLAGS="${SAVELDFLAGS}"
          200  +		AC_MSG_RESULT([not needed])
          201  +	fi
          202  +
   176    203   ])