D compiler sanity checks in configure; check D2 by default if no D1 compiler can be found.
For both D1 and D2, if the compiler has not been specified explicitly via a command line option, the configure script tries to compile a minimal program stub. Only if this succeeds, the respective compiler is enabled. If neither a working D1 nor a working D2 compiler has been found, D is skipped completely as usual. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12334 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
56dfa781ff
commit
e120dfcc70
2 changed files with 55 additions and 7 deletions
|
|
@ -1219,6 +1219,10 @@ go_clean:
|
|||
|
||||
DLIBPREFIX = @DLIBPREFIX@
|
||||
|
||||
ifeq (,$(D_VERSION))
|
||||
D_VERSION = @DDEFAULTVERSION@
|
||||
endif
|
||||
|
||||
ifeq (2,$(D_VERSION))
|
||||
SWIGD = $(SWIG) -d -d2
|
||||
DCOMPILER = @D2COMPILER@
|
||||
|
|
@ -1229,7 +1233,7 @@ endif
|
|||
|
||||
ifeq (dmd,$(DCOMPILER))
|
||||
# DMD is 32bit only by now
|
||||
CFLAGS += -m32
|
||||
DCFLAGS = -m32
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
|
@ -1238,8 +1242,8 @@ endif
|
|||
|
||||
d: $(SRCS)
|
||||
$(SWIGD) $(SWIGOPT) $(INTERFACEPATH)
|
||||
$(CC) -c $(CCSHARED) $(CFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
|
||||
$(LDSHARED) $(CFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
|
||||
$(CC) -c $(CCSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
|
||||
$(LDSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Build a dynamically loadable D wrapper for a C++ module
|
||||
|
|
@ -1247,8 +1251,8 @@ d: $(SRCS)
|
|||
|
||||
d_cpp: $(SRCS)
|
||||
$(SWIGD) -c++ $(SWIGOPT) $(INTERFACEPATH)
|
||||
$(CXX) -c $(CCSHARED) $(CFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
|
||||
$(CXXSHARED) $(CFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
|
||||
$(CXX) -c $(CCSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
|
||||
$(CXXSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Compile D files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue