Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -55,10 +55,11 @@ tcc4tcl-static.a: tcc4tcl.o tcc/libtcc.a cp tcc/libtcc.a tcc4tcl-static.new.a $(AR) rcu tcc4tcl-static.new.a tcc4tcl.o -$(RANLIB) tcc4tcl-static.new.a mv tcc4tcl-static.new.a tcc4tcl-static.a + -@WEAKENSYMS@ tcc4tcl-static.a install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc4tcl.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk $(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" $(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib" $(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include" Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -12,13 +12,13 @@ DC_CHK_OS_INFO dnl Determine if a shared or static build is requested AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [build static library instead of shared library]), [ if test "$enableval" = "no"; then - TCC4TCL_TARGET=static + TCC4TCL_TARGET=shared else - TCC4TCL_TARGET=shared + TCC4TCL_TARGET=static fi ], [ TCC4TCL_TARGET=shared ]) @@ -35,57 +35,25 @@ dnl Determine how to make shared objects DC_GET_SHOBJFLAGS dnl Only export symbols we wish to expose TARGET="tcc4tcl.${SHOBJEXT}" - - AC_CHECK_HEADERS(windows.h) - AC_CHECK_HEADERS(psapi.h,,, [ -#ifdef HAVE_WINDOWS_H -# include -#endif -]) - - AC_MSG_CHECKING([for EnumProcessModules in -lpsapi]) - SAVE_LIBS="$LIBS" - LIBS="-lpsapi $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([ -#ifdef HAVE_WINDOWS_H -# include -#endif -#ifdef HAVE_PSAPI_H -# include -#endif -], [ - EnumProcessModules(NULL, NULL, 0, NULL); -])], [ - AC_MSG_RESULT([found]) -], [ - AC_MSG_RESULT([not found]) - LIBS="$SAVE_LIBS" -]) else + AC_CHECK_TOOL([RANLIB], [ranlib]) + AC_CHECK_TOOL([AR], [ar]) + TARGET="tcc4tcl-static.a" fi AC_SUBST(TARGET) AC_SUBST(TCC4TCL_TARGET) -dnl Find out if we have the functions needed to open shared objects -AC_SEARCH_LIBS(dlopen, dl,, [ - AC_SEARCH_LIBS(shl_load, dld dl) -]) -AC_CHECK_FUNCS(dlopen shl_load) - -dnl Look for appropriate headers -AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h dlfcn.h dl.h) - dnl Perform Tcl Extension required stuff TCLEXT_INIT dnl This must be done last since it breaks the compilation if test "${TCC4TCL_TARGET}" = "shared"; then DC_SETVERSIONSCRIPT([tcc4tcl.syms], [tcc4tcl.vers]) - DC_FIND_STRIP_AND_REMOVESYMS([tcc4tcl.syms]) fi +DC_FIND_STRIP_AND_REMOVESYMS([tcc4tcl.syms]) dnl Produce output AC_OUTPUT(Makefile pkgIndex.tcl tcc4tcl.syms)