summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2005-11-02 01:47:45 +0000
committerJan Nieuwenhuizen <janneke@gnu.org>2005-11-02 01:47:45 +0000
commit141066c66766291aa2f77188efd3c442cb77616c (patch)
tree46762dda43bd09e0dc698850317195e505d82bbf
parent7bd94ae712e871613a39092e275005a73c11a27c (diff)
* lily/main.cc (setup_paths)[!__MINGW32__]: Bugfix: if argv0 is
not absolute, make it absolute using PATH. * python/midi.c (initmidi): Fix type for mingw. * stepmake/stepmake/compile-vars.make (SHARED_FLAGS): Support mingw. * stepmake/stepmake/generic-vars.make (MINGW_BUILD): Detect mingw cross compiling. * stepmake/aclocal.m4: Support python cross compiling. * stepmake/stepmake/python-module-vars.make (SHARED_MODULE_SUFFIX): Add mingw section.
-rw-r--r--ChangeLog22
-rw-r--r--GNUmakefile.in2
-rw-r--r--VERSION2
-rw-r--r--configure.in2
-rw-r--r--lily/main.cc6
-rw-r--r--python/GNUmakefile2
-rw-r--r--python/midi.c4
-rw-r--r--stepmake/aclocal.m431
-rw-r--r--stepmake/stepmake/compile-vars.make4
-rw-r--r--stepmake/stepmake/generic-vars.make7
-rw-r--r--stepmake/stepmake/python-module-vars.make10
-rw-r--r--stepmake/stepmake/shared-library-vars.make21
12 files changed, 91 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index d56a8b53ab..47836027e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2005-11-01 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * lily/main.cc (setup_paths)[!__MINGW32__]: Bugfix: if argv0 is
+ not absolute, make it absolute using PATH.
+
+2005-10-28 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * python/midi.c (initmidi): Fix type for mingw.
+
+2005-10-27 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * stepmake/stepmake/compile-vars.make (SHARED_FLAGS): Support mingw.
+
+ * stepmake/stepmake/generic-vars.make (MINGW_BUILD): Detect mingw
+ cross compiling.
+
+ * stepmake/aclocal.m4: Support python cross compiling.
+
+ * stepmake/stepmake/python-module-vars.make (SHARED_MODULE_SUFFIX):
+ Add mingw section.
+
2005-11-02 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scm/output-lib.scm (chain-grob-member-functions): replace
@@ -89,6 +110,7 @@
* lily/lily-guile.cc (procedure_arity): new function.
+>>>>>>> 1.4221
2005-10-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
* Documentation/topdocs/INSTALL.texi (Top): add perl flex bison.
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 574cf4b7b1..4e14224e25 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -168,5 +168,3 @@ $(config_h): config.hh.in
@echo ' rm $(config_h); ./autogen.sh'
@echo
@false
-
-
diff --git a/VERSION b/VERSION
index 7f57d381b8..5f707c66b8 100644
--- a/VERSION
+++ b/VERSION
@@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=7
PATCH_LEVEL=14
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=1
diff --git a/configure.in b/configure.in
index beefed504c..4bac637b43 100644
--- a/configure.in
+++ b/configure.in
@@ -64,7 +64,7 @@ STEPMAKE_TEXMF(REQUIRED)
STEPMAKE_TEXMF_DIRS
STEPMAKE_GUILE_DEVEL(REQUIRED, 1.6.5)
STEPMAKE_MAKEINFO(REQUIRED)
-STEPMAKE_PYTHON_DEVEL(REQUIRED)
+STEPMAKE_PYTHON_DEVEL(OPTIONAL)
STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15)
diff --git a/lily/main.cc b/lily/main.cc
index 6430874bde..1aae18e923 100644
--- a/lily/main.cc
+++ b/lily/main.cc
@@ -322,7 +322,13 @@ setup_paths (char const *argv0)
if (getenv ("LILYPOND_VERBOSE"))
be_verbose_global = true;
+#ifndef __MINGW32__
+ File_path p;
+ p.parse_path (getenv ("PATH"));
+ String bindir = dir_name (p.find (argv0));
+#else /* __MINGW32__ */
String bindir = dir_name (argv0);
+#endif
String argv0_prefix = dir_name (bindir);
if (argv0_prefix != dir_name (dir_name (dir_name (prefix_directory))))
{
diff --git a/python/GNUmakefile b/python/GNUmakefile
index b8a8a913a2..9ff5560c30 100644
--- a/python/GNUmakefile
+++ b/python/GNUmakefile
@@ -4,6 +4,7 @@ STEPMAKE_TEMPLATES=c python-module install-out po
include $(depth)/make/stepmake.make
+CFLAGS += -DPy_BUILD_CORE
# unset al guile stuff from configure
CONFIG_LDFLAGS=
@@ -15,5 +16,4 @@ INSTALLATION_OUT_DIR=$(local_lilypond_libdir)/python
INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/python
INSTALLATION_OUT_FILES1=$(OUT_PY_MODULES) $(OUT_PYC_MODULES)
-
$(outdir)/midi.lo: $(outdir)/config.hh
diff --git a/python/midi.c b/python/midi.c
index 0f2c5c931c..e0e81c16a1 100644
--- a/python/midi.c
+++ b/python/midi.c
@@ -399,8 +399,8 @@ static PyMethodDef MidiMethods[] =
{0, 0} /* Sentinel */
};
-void
-initmidi ()
+PyMODINIT_FUNC
+initmidi (void)
{
PyObject *m, *d;
m = Py_InitModule ("midi", MidiMethods);
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index ff4295584f..8beb120b33 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -989,26 +989,41 @@ AC_DEFUN(STEPMAKE_PYTHON, [
])
AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
- unset PYTHON_HEADER PYTHON_INCLUDE
- if test -n "$PYTHON"; then
+ AC_ARG_WITH(python-include,
+ [ --with-python-include=DIR
+ location of the python include dir],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-include=includedir)
+ else
+ PYTHON_CFLAGS="-I${withval}"
+ fi
+ ])
+
+ AC_ARG_WITH(python-lib,
+ [ --with-python-lib=NAME name of the python lib],[
+ if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_WARN(Usage: --with-python-lib=name)
+ else
+ LDFLAGS="$LDFLAGS -l${withval}"
+ fi
+ ])
+
+ if test "$cross_compiling" = "no" -a -z "$PYTHON_CFLAGS"; then
changequote(<<, >>)#dnl
# alternatively, for python >= 2.0
# 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
+ PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
changequote([, ])#dnl
fi
- ##AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
if test -z "$PYTHON_HEADER"; then
- #URG -- how to extend include path?
- ac_compile="$ac_compile -I$PYTHON_INCLUDE"
- ac_cpp="$ac_cpp -I$PYTHON_INCLUDE"
- CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDE"
+ CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
fi
if test -z "$PYTHON_HEADER"; then
- warn="$PYTHON_INCLUDE/Python.h (python-devel, python-dev or libpython-dev package)"
+ warn="Python.h (python-devel, python-dev or libpython-dev package)"
STEPMAKE_ADD_ENTRY($1, $warn)
fi
])
diff --git a/stepmake/stepmake/compile-vars.make b/stepmake/stepmake/compile-vars.make
index 27ec062bfa..b39499b0dd 100644
--- a/stepmake/stepmake/compile-vars.make
+++ b/stepmake/stepmake/compile-vars.make
@@ -3,7 +3,11 @@ ARFLAGS = ru
ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
PIC_FLAGS = -fpic -fPIC
+ifeq ($(MINGW_BUILD),)
SHARED_FLAGS = -shared
+else
+SHARED_FLAGS = -mdll
+endif
o-dep-out = $(outdir)/$(subst .o,.dep,$(notdir $@))#
DO_O_DEP = rm -f $(o-dep-out); DEPENDENCIES_OUTPUT="$(o-dep-out) $(outdir)/$(notdir $@)"
diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make
index 146d1d25b7..fc7e89e2f5 100644
--- a/stepmake/stepmake/generic-vars.make
+++ b/stepmake/stepmake/generic-vars.make
@@ -104,3 +104,10 @@ endif
ifeq ($(HOST_ARCH),i686-cygwin)
CYGWIN_BUILD = yes
endif
+
+ifeq ($(HOST_ARCH),i586-mingw32msvc)
+MINGW_BUILD = yes
+endif
+ifeq ($(HOST_ARCH),i386-mingw32)
+MINGW_BUILD = yes
+endif
diff --git a/stepmake/stepmake/python-module-vars.make b/stepmake/stepmake/python-module-vars.make
index 1bed3158c7..3244ca12bd 100644
--- a/stepmake/stepmake/python-module-vars.make
+++ b/stepmake/stepmake/python-module-vars.make
@@ -1,10 +1,16 @@
+ALL_LDFLAGS = $(LDFLAGS)
PY_MODULES_IN = $(call src-wildcard,*.py)
OUT_PY_MODULES = $(PY_MODULES_IN:%=$(outdir)/%)
OUT_PYC_MODULES = $(OUT_PY_MODULES:%.py=%.pyc)
+ifeq ($(MINGW_BUILD)$(CYGWIN_BUILD),)
+SHARED_MODULE_SUFFIX = .so
+else
ifneq ($(CYGWIN_BUILD),)
SHARED_MODULE_SUFFIX = .dll
-else
-SHARED_MODULE_SUFFIX = .so
+endif
+ifneq ($(MINGW_BUILD),)
+SHARED_MODULE_SUFFIX = .dll
+endif
endif
OUT_SO_MODULES = $(addprefix $(outdir)/, $(C_FILES:.c=$(SHARED_MODULE_SUFFIX)))
EXTRA_DIST_FILES += $(PY_MODULES_IN)
diff --git a/stepmake/stepmake/shared-library-vars.make b/stepmake/stepmake/shared-library-vars.make
index d7afa17544..e638ec5ccd 100644
--- a/stepmake/stepmake/shared-library-vars.make
+++ b/stepmake/stepmake/shared-library-vars.make
@@ -1,15 +1,26 @@
+ifeq ($(CYGWIN_BUILD)$(MINGW_BUILD),)
+ SHARED_LIB_PREFIX = lib
+ SHARED_LIB_SUFFIX = .so
+ SHARED_LIB_VERSION = $(VERSION)
+ SHARED_LIB_VERSION_SUFFIX =
+else
ifneq ($(CYGWIN_BUILD),)
SHARED_LIB_PREFIX = cyg
SHARED_LIB_SUFFIX =
SHARED_LIB_VERSION = $(subst .,-,$(VERSION))
SHARED_LIB_VERSION_SUFFIX = .dll
- ALL_LDFLAGS += -Wl,--image-base=0x10000000 -Wl,--out-implib,lib$(NAME).a
-else
+# ALL_LDFLAGS += -Wl,--image-base=0x10000000 -Wl,--out-implib,lib$(NAME).a
+ ALL_LDFLAGS += -Wl,--enable-auto-image-base -Wl,--out-implib,lib$(NAME).a
+endif
+ifneq ($(MINGW_BUILD),)
SHARED_LIB_PREFIX = lib
- SHARED_LIB_SUFFIX = .so
- SHARED_LIB_VERSION = $(VERSION)
- SHARED_LIB_VERSION_SUFFIX =
+ SHARED_LIB_SUFFIX =
+ SHARED_LIB_VERSION = $(subst .,-,$(VERSION))
+ SHARED_LIB_VERSION_SUFFIX = .dll
+## ALL_LDFLAGS += -Wl,--image-base=0x10000000 -Wl,--out-implib,lib$(NAME).a
+ ALL_LDFLAGS += -Wl,--out-implib,lib$(NAME).a
+endif
endif
INSTALL_SHARED_LIBRARY = $(SHARED_LIB_PREFIX)$(NAME)$(SHARED_LIB_SUFFIX)$(SHARED_LIB_VERSION)$(SHARED_LIB_VERSION_SUFFIX)