OSDN Git Service

Merge branch 'develop' into macos-develop ; downgrade error for missing AX_CXX_COMPIL...
authorEric Branlund <ebranlund@fastmail.com>
Fri, 19 Mar 2021 01:36:58 +0000 (18:36 -0700)
committerEric Branlund <ebranlund@fastmail.com>
Fri, 19 Mar 2021 01:36:58 +0000 (18:36 -0700)
1  2 
configure.ac
src/Makefile.am

diff --cc configure.ac
@@@ -44,7 -44,11 +44,11 @@@ AC_SUBST(DEFAULT_VAR_PATH
  dnl Checks for programs.
  AC_LANG(C++)
  AC_PROG_CXX
- AX_CXX_COMPILE_STDCXX_17
+ m4_ifdef([AX_CXX_COMPILE_STDCXX_17], [
+   AX_CXX_COMPILE_STDCXX_17
+ ], [
 -  AC_MSG_ERROR([AX_CXX_COMPILE_STDCXX_17 macro is not defined. You need to install autoconf-archive.])
++  AC_MSG_WARN([AX_CXX_COMPILE_STDCXX_17 macro is not defined. That is part of autoconf-archive . Without it, you may need to manually specify CXXFLAGS with the necessary options for compiling for the 2017 C++ standard.])
+ ])
  PKG_PROG_PKG_CONFIG
  
  AC_ARG_ENABLE(japanese,
diff --cc src/Makefile.am
@@@ -920,102 -920,18 +920,102 @@@ hengband_SOURCES = 
  
  EXTRA_hengband_SOURCES = \
        angband.ico angband.rc ang_eng.rc maid-x11.cpp main-win.cpp \
 +      main-cap.cpp main-xaw.cpp \
        makefile.bcc makefile.std term/readdib.cpp term/readdib.h wall.bmp
  
 +cocoa_xcode_files = \
 +      cocoa/AppDelegate.m \
 +      cocoa/Base.lproj/MainMenu.xib
 +cocoa_icon_files = \
 +      cocoa/hengband_Icons.icns \
 +      cocoa/Save.icns \
 +      cocoa/Edit.icns \
 +      cocoa/Data.icns
 +cocoa_plist_template = cocoa/Angband-Cocoa.xml
 +cocoa_plist_strings_template = cocoa/Angband-Cocoa.strings
 +cocoa_plist_files = \
 +      cocoa/CommandMenu.plist
 +cocoa_en_nib_files = \
 +      cocoa/Base.lproj/MainMenu.nib
 +cocoa_en_strings_files = \
 +      cocoa/en.lproj/Localizable.strings \
 +      cocoa/en.lproj/CommandMenu.strings \
 +      cocoa/en.lproj/GraphicsMenu.strings
 +cocoa_ja_strings_files = \
 +      cocoa/ja.lproj/MainMenu.strings \
 +      cocoa/ja.lproj/Localizable.strings \
 +      cocoa/ja.lproj/CommandMenu.strings \
 +      cocoa/ja.lproj/GraphicsMenu.strings
 +
  EXTRA_DIST = \
 -      gcc-wrap
 +      gcc-wrap \
 +      $(cocoa_xcode_files) \
 +      $(cocoa_icon_files) \
 +      $(cocoa_plist_template) \
 +      $(cocoa_plist_strings_template) \
 +      $(cocoa_plist_files) \
 +      $(cocoa_en_nib_files) \
 +      $(cocoa_en_strings_files) \
 +      $(cocoa_ja_strings_files)
 +
 +if COCOA
 +hengband_SOURCES += \
 +      main-cocoa.mm \
 +      system/grafmode.h \
 +      system/grafmode.cpp \
 +      cocoa/AppDelegate.h
 +AM_CFLAGS = -mmacosx-version-min=10.8 -Wunguarded-availability
 +AM_OBJCXXFLAGS = -std=c++17 -fobjc-arc -mmacosx-version-min=10.8 -Wunguarded-availability -stdlib=libc++
 +AM_CXXFLAGS = -std=c++17 -mmacosx-version-min=10.8 -Wunguarded-availability -stdlib=libc++
 +hengband_LDFLAGS = -framework cocoa $(AM_LDFLAGS)
 +hengband_LINK = MACOSX_DEPLOYMENT_TARGET=10.8 $(OBJCXXLINK) $(hengband_LDFLAGS) $(LDFLAGS) -o $@
 +APPNAME = $(PACKAGE_NAME)
 +APPEXE = hengband
 +APPDIR = $(APPNAME).app
 +BUNDLE_IDENTIFIER = jp.osdn.hengband
 +BUNDLE_VERSION = $(PACKAGE_VERSION)
 +BUNDLE_DISPLAY_NAME = $(APPNAME)
 +BUNDLE_NAME = $(BUNDLE_DISPLAY_NAME)
 +BUNDLE_DISPLAY_NAME_JA = 変愚蛮怒
 +BUNDLE_NAME_JA = $(BUNDLE_DISPLAY_NAME_JA)
 +# Be careful with characters (like '&') in the copyright that have special
 +# meanings to sed.
 +COPYRIGHT = Copyright © Mr. Hoge and many others
 +# For now, using the line that appears in news_j.txt.  Is that appropriate?
 +# The ampersand is a kanji so it doesn't seem to be treated as a special
 +# character by sed.
 +COPYRIGHT_JA = Mr.hoge (echizen@users.sourceforge.jp) & 多くの方々
 +APPBNDL = $(bindir)/$(APPDIR)
 +APPCONT = $(APPBNDL)/Contents
 +APPBIN = $(APPCONT)/MacOS
 +APPRES = $(APPCONT)/Resources
 +appbin_PROGRAMS = $(APPEXE)
 +appbindir = $(APPBIN)
 +dist_appicon_DATA = $(cocoa_icon_files)
 +appicondir = $(APPRES)
 +appplist_DATA = $(cocoa_plist_files)
 +appplistdir = $(APPRES)
 +appennib_DATA = $(cocoa_en_nib_files)
 +appennibdir = $(APPRES)/Base.lproj
 +appen_DATA = $(cocoa_en_strings_files)
 +appendir = $(APPRES)/en.lproj
 +appja_DATA = $(cocoa_ja_strings_files)
 +appjadir = $(APPRES)/ja.lproj
 +else
 +EXTRA_hengband_SOURCES += main-cocoa.mm system/grafmode.h system/grafmode.cpp \
 +      cocoa/AppDelegate.h
 +hengband_LINK = $(CXXLINK)
 +endif
  
 -DEFAULT_INCLUDES = -I$(srcdir)
 +DEFAULT_INCLUDES = -I$(srcdir) -I$(top_builddir)/src
- CFLAGS += $(XFT_CFLAGS) $(libcurl_CFLAGS)
+ CPPFLAGS += $(XFT_CFLAGS) $(libcurl_CFLAGS)
  LIBS += $(XFT_LIBS) $(libcurl_LIBS)
  COMPILE = $(srcdir)/gcc-wrap $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 +OBJCXXCOMPILE = $(srcdir)/gcc-wrap $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) \
 +      $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS)
  CXXCOMPILE = $(srcdir)/gcc-wrap $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CFLAGS)
 -      $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CXXFLAGS)
++      $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
  
  install-exec-hook:
  if SET_GID