# HG changeset patch # User Jonathan Schleifer # Date 1190923791 -7200 # Node ID 81b524aa7fcd023eeaf3b3a311b5d26555ff2a0e # Parent a0c7cf5638de4b538d8fbb68674bbed914f0e8a9 implib. diff -r a0c7cf5638de -r 81b524aa7fcd buildsys.mk.in --- a/buildsys.mk.in Thu Sep 27 00:38:59 2007 -0500 +++ b/buildsys.mk.in Thu Sep 27 22:09:51 2007 +0200 @@ -35,6 +35,8 @@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ +PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ PROG_SUFFIX = @EXEEXT@ LIB_CPPFLAGS = @LIB_CPPFLAGS@ LIB_CFLAGS = @LIB_CFLAGS@ @@ -73,7 +75,7 @@ .SILENT: .SUFFIXES: .beam .c .cc .cxx .d .erl .m -.PHONY: all subdirs depend install uninstall clean distclean +.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ @@ -93,7 +95,6 @@ if test x"$$regen" = x"1"; then \ list=""; \ ${DEPEND_STATUS}; \ - rm -f .deps; \ for i in ${SRCS}; do \ case $${i##*.} in \ c|cc|cxx|m) \ @@ -101,10 +102,12 @@ ;; \ esac; \ done; \ - if ${CPP} ${CPPFLAGS} ${CFLAGS} -M $$list >.deps; then \ - ${DEPEND_OK}; \ - else \ - ${DEPEND_FAILED}; \ + if test x"$$list" != "x"; then \ + if ${CPP} ${CPPFLAGS} -M $$list >.deps; then \ + ${DEPEND_OK}; \ + else \ + ${DEPEND_FAILED}; \ + fi; \ fi; \ fi @@ -208,7 +211,7 @@ for i in ${STATIC_LIB}; do \ ${INSTALL_STATUS}; \ - if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i; then \ + if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ diff -r a0c7cf5638de -r 81b524aa7fcd configure.ac --- a/configure.ac Thu Sep 27 00:38:59 2007 -0500 +++ b/configure.ac Thu Sep 27 22:09:51 2007 +0200 @@ -185,6 +185,8 @@ dnl ======================== BUILDSYS_SHARED_LIB +BUILDSYS_PROG_IMPLIB +test x"$PROG_IMPLIB_NEEDED" = x"yes" && LIBS="$LIBS -L\${libdir} -laudacious.exe" dnl Ok, first we find out what flags we need to use. AC_MSG_CHECKING([for what extension and flags to use for plugin compilation]) diff -r a0c7cf5638de -r 81b524aa7fcd m4/buildsys.m4 --- a/m4/buildsys.m4 Thu Sep 27 00:38:59 2007 -0500 +++ b/m4/buildsys.m4 Thu Sep 27 22:09:51 2007 +0200 @@ -18,6 +18,25 @@ dnl POSSIBILITY OF SUCH DAMAGE. dnl +AC_DEFUN([BUILDSYS_PROG_IMPLIB], [ + AC_MSG_CHECKING(wether we need an implib) + case "$target" in + *-*-cygwin | *-*-mingw32) + AC_MSG_RESULT(yes) + PROG_IMPLIB_NEEDED='yes' + PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a' + ;; + *) + AC_MSG_RESULT(no) + PROG_IMPLIB_NEEDED='no' + PROG_IMPLIB_LDFLAGS='' + ;; + esac + + AC_SUBST(PROG_IMPLIB_NEEDED) + AC_SUBST(PROG_IMPLIB_LDFLAGS) +]) + AC_DEFUN([BUILDSYS_SHARED_LIB], [ AC_MSG_CHECKING(for shared library system) case "$target" in