More work on improving build system.

This commit is contained in:
Lymia Aluysia
2017-01-18 16:07:02 -06:00
parent 76cf6fc0d6
commit 91026c5341
7 changed files with 1650 additions and 1626 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ AM_LDFLAGS = $(BOOST_LDFLAGS)
.gch.o:
gcc -x c - -c -o $@ <<<""
magicseteditor_LDADD = @WX_LIBS@ $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB)
magicseteditor_LDADD = @WX_LIBS@ $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) $(LDADD) -lhunspell
magicseteditor_CXXFLAGS = $(AM_CXXFLAGS)
magicseteditor_SOURCES =
+69 -69
View File
@@ -23,7 +23,7 @@ AM_LDFLAGS = $(BOOST_LDFLAGS)
.gch.o:
gcc -x c - -c -o $@ <<<""
magicseteditor_LDADD = @WX_LIBS@ $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB)
magicseteditor_LDADD = @WX_LIBS@ $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) $(LDADD) -lhunspell
magicseteditor_CXXFLAGS = $(AM_CXXFLAGS)
magicseteditor_SOURCES =
@@ -44,6 +44,7 @@ magicseteditor_SOURCES += ./src/data/action/set.cpp
magicseteditor_SOURCES += ./src/data/action/symbol.cpp
magicseteditor_SOURCES += ./src/data/action/symbol_part.cpp
magicseteditor_SOURCES += ./src/data/action/value.cpp
magicseteditor_SOURCES += ./src/data/statistics.cpp
magicseteditor_SOURCES += ./src/data/field/boolean.cpp
magicseteditor_SOURCES += ./src/data/field/choice.cpp
magicseteditor_SOURCES += ./src/data/field/color.cpp
@@ -63,88 +64,79 @@ magicseteditor_SOURCES += ./src/data/format/mse1.cpp
magicseteditor_SOURCES += ./src/data/format/mse2.cpp
magicseteditor_SOURCES += ./src/data/format/mtg_editor.cpp
magicseteditor_SOURCES += ./src/data/format/mws.cpp
magicseteditor_SOURCES += ./src/data/add_cards_script.cpp
magicseteditor_SOURCES += ./src/data/card.cpp
magicseteditor_SOURCES += ./src/data/export_template.cpp
magicseteditor_SOURCES += ./src/data/field.cpp
magicseteditor_SOURCES += ./src/data/font.cpp
magicseteditor_SOURCES += ./src/data/game.cpp
magicseteditor_SOURCES += ./src/data/installer.cpp
magicseteditor_SOURCES += ./src/data/keyword.cpp
magicseteditor_SOURCES += ./src/data/locale.cpp
magicseteditor_SOURCES += ./src/data/pack.cpp
magicseteditor_SOURCES += ./src/data/set.cpp
magicseteditor_SOURCES += ./src/data/settings.cpp
magicseteditor_SOURCES += ./src/data/statistics.cpp
magicseteditor_SOURCES += ./src/data/stylesheet.cpp
magicseteditor_SOURCES += ./src/data/symbol.cpp
magicseteditor_SOURCES += ./src/data/symbol_font.cpp
magicseteditor_SOURCES += ./src/data/locale.cpp
magicseteditor_SOURCES += ./src/data/word_list.cpp
magicseteditor_SOURCES += ./src/gfx/blend_image.cpp
magicseteditor_SOURCES += ./src/data/add_cards_script.cpp
magicseteditor_SOURCES += ./src/data/font.cpp
magicseteditor_SOURCES += ./src/data/settings.cpp
magicseteditor_SOURCES += ./src/data/card.cpp
magicseteditor_SOURCES += ./src/data/export_template.cpp
magicseteditor_SOURCES += ./src/data/symbol.cpp
magicseteditor_SOURCES += ./src/data/stylesheet.cpp
magicseteditor_SOURCES += ./src/data/keyword.cpp
magicseteditor_SOURCES += ./src/gfx/color.cpp
magicseteditor_SOURCES += ./src/gfx/combine_image.cpp
magicseteditor_SOURCES += ./src/gfx/generated_image.cpp
magicseteditor_SOURCES += ./src/gfx/image_effects.cpp
magicseteditor_SOURCES += ./src/gfx/mask_image.cpp
magicseteditor_SOURCES += ./src/gfx/polynomial.cpp
magicseteditor_SOURCES += ./src/gfx/resample_image.cpp
magicseteditor_SOURCES += ./src/gfx/resample_text.cpp
magicseteditor_SOURCES += ./src/gfx/rotate_image.cpp
magicseteditor_SOURCES += ./src/gfx/bezier.cpp
magicseteditor_SOURCES += ./src/gui/control/card_viewer.cpp
magicseteditor_SOURCES += ./src/gui/control/native_look_editor.cpp
magicseteditor_SOURCES += ./src/gui/control/card_list_column_select.cpp
magicseteditor_SOURCES += ./src/gui/control/filtered_card_list.cpp
magicseteditor_SOURCES += ./src/gui/control/item_list.cpp
magicseteditor_SOURCES += ./src/gui/control/package_list.cpp
magicseteditor_SOURCES += ./src/gui/control/text_ctrl.cpp
magicseteditor_SOURCES += ./src/gui/control/tree_list.cpp
magicseteditor_SOURCES += ./src/gui/control/card_editor.cpp
magicseteditor_SOURCES += ./src/gfx/blend_image.cpp
magicseteditor_SOURCES += ./src/gfx/generated_image.cpp
magicseteditor_SOURCES += ./src/gfx/mask_image.cpp
magicseteditor_SOURCES += ./src/gfx/resample_text.cpp
magicseteditor_SOURCES += ./src/gfx/combine_image.cpp
magicseteditor_SOURCES += ./src/gfx/image_effects.cpp
magicseteditor_SOURCES += ./src/gfx/resample_image.cpp
magicseteditor_SOURCES += ./src/gfx/polynomial.cpp
magicseteditor_SOURCES += ./src/gfx/rotate_image.cpp
magicseteditor_SOURCES += ./src/gui/package_update_list.cpp
magicseteditor_SOURCES += ./src/gui/control/card_list.cpp
magicseteditor_SOURCES += ./src/gui/control/card_list_column_select.cpp
magicseteditor_SOURCES += ./src/gui/control/card_viewer.cpp
magicseteditor_SOURCES += ./src/gui/control/filter_ctrl.cpp
magicseteditor_SOURCES += ./src/gui/control/filtered_card_list.cpp
magicseteditor_SOURCES += ./src/gui/control/keyword_list.cpp
magicseteditor_SOURCES += ./src/gui/control/package_list.cpp
magicseteditor_SOURCES += ./src/gui/control/gallery_list.cpp
magicseteditor_SOURCES += ./src/gui/control/item_list.cpp
magicseteditor_SOURCES += ./src/gui/control/graph.cpp
magicseteditor_SOURCES += ./src/gui/control/image_card_list.cpp
magicseteditor_SOURCES += ./src/gui/control/keyword_list.cpp
magicseteditor_SOURCES += ./src/gui/control/card_editor.cpp
magicseteditor_SOURCES += ./src/gui/control/native_look_editor.cpp
magicseteditor_SOURCES += ./src/gui/control/select_card_list.cpp
magicseteditor_SOURCES += ./src/gui/package_update_list.cpp
magicseteditor_SOURCES += ./src/gui/packages_window.cpp
magicseteditor_SOURCES += ./src/gui/preferences_window.cpp
magicseteditor_SOURCES += ./src/gui/control/text_ctrl.cpp
magicseteditor_SOURCES += ./src/gui/control/tree_list.cpp
magicseteditor_SOURCES += ./src/gui/print_window.cpp
magicseteditor_SOURCES += ./src/gui/set/random_pack_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/stats_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/panel.cpp
magicseteditor_SOURCES += ./src/gui/set/keywords_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/window.cpp
magicseteditor_SOURCES += ./src/gui/set/cards_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/console_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/keywords_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/panel.cpp
magicseteditor_SOURCES += ./src/gui/set/random_pack_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/set_info_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/stats_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/style_panel.cpp
magicseteditor_SOURCES += ./src/gui/set/window.cpp
magicseteditor_SOURCES += ./src/gui/symbol/basic_shape_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/control.cpp
magicseteditor_SOURCES += ./src/gui/symbol/editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/part_list.cpp
magicseteditor_SOURCES += ./src/gui/symbol/point_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/select_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/selection.cpp
magicseteditor_SOURCES += ./src/gui/symbol/basic_shape_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/select_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/symmetry_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/point_editor.cpp
magicseteditor_SOURCES += ./src/gui/symbol/control.cpp
magicseteditor_SOURCES += ./src/gui/symbol/part_list.cpp
magicseteditor_SOURCES += ./src/gui/symbol/window.cpp
magicseteditor_SOURCES += ./src/gui/symbol/editor.cpp
magicseteditor_SOURCES += ./src/gui/value/symbol.cpp
magicseteditor_SOURCES += ./src/gui/value/multiple_choice.cpp
magicseteditor_SOURCES += ./src/gui/value/choice.cpp
magicseteditor_SOURCES += ./src/gui/value/color.cpp
magicseteditor_SOURCES += ./src/gui/value/editor.cpp
magicseteditor_SOURCES += ./src/gui/value/information.cpp
magicseteditor_SOURCES += ./src/gui/value/multiple_choice.cpp
magicseteditor_SOURCES += ./src/gui/value/package_choice.cpp
magicseteditor_SOURCES += ./src/gui/value/symbol.cpp
magicseteditor_SOURCES += ./src/gui/value/text.cpp
magicseteditor_SOURCES += ./src/gui/value/image.cpp
magicseteditor_SOURCES += ./src/gui/print_window.cpp
magicseteditor_SOURCES += ./src/gui/profiler_window.cpp
magicseteditor_SOURCES += ./src/gui/thumbnail_thread.cpp
magicseteditor_SOURCES += ./src/gui/update_checker.cpp
magicseteditor_SOURCES += ./src/gui/util.cpp
magicseteditor_SOURCES += ./src/gui/value/information.cpp
magicseteditor_SOURCES += ./src/gui/value/text.cpp
magicseteditor_SOURCES += ./src/gui/value/package_choice.cpp
magicseteditor_SOURCES += ./src/gui/welcome_window.cpp
magicseteditor_SOURCES += ./src/gui/about_window.cpp
magicseteditor_SOURCES += ./src/gui/auto_replace_window.cpp
magicseteditor_SOURCES += ./src/gui/card_select_window.cpp
magicseteditor_SOURCES += ./src/gui/drop_down_list.cpp
magicseteditor_SOURCES += ./src/gui/html_export_window.cpp
@@ -152,6 +144,14 @@ magicseteditor_SOURCES += ./src/gui/icon_menu.cpp
magicseteditor_SOURCES += ./src/gui/image_slice_window.cpp
magicseteditor_SOURCES += ./src/gui/images_export_window.cpp
magicseteditor_SOURCES += ./src/gui/new_window.cpp
magicseteditor_SOURCES += ./src/gui/packages_window.cpp
magicseteditor_SOURCES += ./src/gui/preferences_window.cpp
magicseteditor_SOURCES += ./src/gui/about_window.cpp
magicseteditor_SOURCES += ./src/gui/profiler_window.cpp
magicseteditor_SOURCES += ./src/gui/thumbnail_thread.cpp
magicseteditor_SOURCES += ./src/gui/update_checker.cpp
magicseteditor_SOURCES += ./src/gui/util.cpp
magicseteditor_SOURCES += ./src/gui/auto_replace_window.cpp
magicseteditor_SOURCES += ./src/render/card/viewer.cpp
magicseteditor_SOURCES += ./src/render/symbol/filter.cpp
magicseteditor_SOURCES += ./src/render/symbol/viewer.cpp
@@ -173,9 +173,9 @@ magicseteditor_SOURCES += ./src/script/functions/basic.cpp
magicseteditor_SOURCES += ./src/script/functions/construction.cpp
magicseteditor_SOURCES += ./src/script/functions/editor.cpp
magicseteditor_SOURCES += ./src/script/functions/english.cpp
magicseteditor_SOURCES += ./src/script/functions/regex.cpp
magicseteditor_SOURCES += ./src/script/functions/export.cpp
magicseteditor_SOURCES += ./src/script/functions/image.cpp
magicseteditor_SOURCES += ./src/script/functions/regex.cpp
magicseteditor_SOURCES += ./src/script/functions/spelling.cpp
magicseteditor_SOURCES += ./src/script/context.cpp
magicseteditor_SOURCES += ./src/script/dependency.cpp
@@ -184,26 +184,26 @@ magicseteditor_SOURCES += ./src/script/parser.cpp
magicseteditor_SOURCES += ./src/script/profiler.cpp
magicseteditor_SOURCES += ./src/script/script.cpp
magicseteditor_SOURCES += ./src/script/script_manager.cpp
magicseteditor_SOURCES += ./src/script/scriptable.cpp
magicseteditor_SOURCES += ./src/script/value.cpp
magicseteditor_SOURCES += ./src/util/spell_checker.cpp
magicseteditor_SOURCES += ./src/script/scriptable.cpp
magicseteditor_SOURCES += ./src/util/io/get_member.cpp
magicseteditor_SOURCES += ./src/util/io/package.cpp
magicseteditor_SOURCES += ./src/util/io/package_manager.cpp
magicseteditor_SOURCES += ./src/util/io/reader.cpp
magicseteditor_SOURCES += ./src/util/io/writer.cpp
magicseteditor_SOURCES += ./src/util/vcs/subversion.cpp
magicseteditor_SOURCES += ./src/util/spec_sort.cpp
magicseteditor_SOURCES += ./src/util/string.cpp
magicseteditor_SOURCES += ./src/util/tagged_string.cpp
magicseteditor_SOURCES += ./src/util/vcs.cpp
magicseteditor_SOURCES += ./src/util/version.cpp
magicseteditor_SOURCES += ./src/util/action_stack.cpp
magicseteditor_SOURCES += ./src/util/age.cpp
magicseteditor_SOURCES += ./src/util/alignment.cpp
magicseteditor_SOURCES += ./src/util/error.cpp
magicseteditor_SOURCES += ./src/util/file_utils.cpp
magicseteditor_SOURCES += ./src/util/version.cpp
magicseteditor_SOURCES += ./src/util/age.cpp
magicseteditor_SOURCES += ./src/util/vcs/subversion.cpp
magicseteditor_SOURCES += ./src/util/regex.cpp
magicseteditor_SOURCES += ./src/util/rotation.cpp
magicseteditor_SOURCES += ./src/util/spec_sort.cpp
magicseteditor_SOURCES += ./src/util/spell_checker.cpp
magicseteditor_SOURCES += ./src/util/tagged_string.cpp
magicseteditor_SOURCES += ./src/util/string.cpp
magicseteditor_SOURCES += ./src/util/vcs.cpp
magicseteditor_SOURCES += ./src/util/alignment.cpp
magicseteditor_SOURCES += ./src/util/action_stack.cpp
magicseteditor_SOURCES += ./src/util/error.cpp
magicseteditor_SOURCES += ./src/code_template.cpp
magicseteditor_SOURCES += ./src/main.cpp
+1184 -1188
View File
File diff suppressed because it is too large Load Diff
Executable
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
clean=0
build_win32() {
./configure --enable-pch --target=i686-w64-mingw32 --with-wx-config=/usr/i686-w64-mingw32/lib/wx/config/i686-w64-mingw32-msw-unicode-release-static-2.8 \
--with-boost=/usr/i686-w64-mingw32/ CXX="i686-w64-mingw32-g++" LDFLAGS="-static" LDADD="-lgdiplus -llzma"
if [ $clean = 1 ]; then
make clean
fi
make -j4
strip magicseteditor.exe
i686-w64-mingw32-g++ -static -s -o magicseteditor.com src/cli/win32_cli_wrapper.cpp
}
build_linux() {
./configure --target=i686- --with-wx-config=wx-config-2.8
if [ $clean = 1 ]; then
make clean
fi
make -j4
strip magicseteditor
}
build_dist() {
upx -9 magicseteditor magicseteditor.com magicseteditor.exe
}
rm magicseteditor magicseteditor.*
case $1 in
win32)
build_win32
;;
linux)
build_linux
;;
dist)
clean=1
build_win32
build_linux
build_dist
;;
esac
Vendored
+322 -351
View File
@@ -643,14 +643,15 @@ WX_CPPFLAGS
WX_CONFIG_PATH
BOOST_SYSTEM_LIB
BOOST_REGEX_LIB
BOOST_LDFLAGS
BOOST_CPPFLAGS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
ac_ct_CC
CFLAGS
CC
BOOST_LDFLAGS
BOOST_CPPFLAGS
LDADD
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
@@ -3749,16 +3750,322 @@ fi
if test "x${enable_debug}" = "xyes"; then
DEFAULT_CXXFLAGS="-ggdb -O0"
DEFAULT_LDFLAGS=""
WXCONFIG_FLAGS="--debug"
else
DEFAULT_CXXFLAGS="-O2"
DEFAULT_LDFLAGS=""
WXCONFIG_FLAGS=""
fi
CXXFLAGS="${CXXFLAGS} ${DEFAULT_CXXFLAGS} -std=gnu++98 -DBOOST_USE_WINDOWS_H"
LDFLAGS="${LDFLAGS}"
case "${host_os}" in
linux*)
build_linux=yes;
;;
cygwin*|mingw*)
build_windows=yes
;;
esac
if test -n "${CXXFLAGS}"; then
user_set_cxxflags=yes
fi
CXXFLAGS="${CXXFLAGS} ${DEFAULT_CXXFLAGS} -std=gnu++98 -DBOOST_USE_WINDOWS_H"
LDFLAGS="${LDFLAGS} ${DEFAULT_LDFLAGS}"
# Check for Boost
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
else
want_boost="yes"
fi
# Check whether --with-boost-libdir was given.
if test "${with_boost_libdir+set}" = set; then :
withval=$with_boost_libdir;
if test -d "$withval"
then
ac_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
fi
else
ac_boost_lib_path=""
fi
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=1.37.0
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5
$as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
succeeded=no
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
x86_64)
libsubdirs="lib64 libx32 lib lib64"
;;
ppc64|s390x|sparc64|aarch64|ppc64le)
libsubdirs="lib64 lib lib64"
;;
esac
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
case ${host_cpu} in
i?86)
libsubdirs="lib/i386-${host_os} $libsubdirs"
;;
esac
if test "$ac_boost_path" != ""; then
BOOST_CPPFLAGS="-I$ac_boost_path/include"
for ac_boost_path_tmp in $libsubdirs; do
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
break
fi
done
elif test "$cross_compiling" != yes; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
for libsubdir in $libsubdirs ; do
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
if test "$ac_boost_lib_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_lib_path"
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
succeeded=yes
found_system=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$succeeded" != "xyes"; then
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
BOOST_CPPFLAGS=
BOOST_LDFLAGS=
_version=0
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
if test -z "$BOOST_CPPFLAGS"; then
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
BOOST_CPPFLAGS="-I$ac_boost_path"
fi
fi
fi
else
if test "$cross_compiling" != yes; then
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
if test "$ac_boost_lib_path" = ""; then
for libsubdir in $libsubdirs ; do
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$best_path/$libsubdir"
fi
fi
if test "x$BOOST_ROOT" != "x"; then
for libsubdir in $libsubdirs ; do
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5
$as_echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
succeeded=yes
found_system=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
$as_echo "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
fi
# execute ACTION-IF-NOT-FOUND (if present):
:
else
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h
# execute ACTION-IF-FOUND (if present):
:
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Checks for libraries.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4486,342 +4793,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Hunspell_create in -lhunspell" >&5
$as_echo_n "checking for Hunspell_create in -lhunspell... " >&6; }
if ${ac_cv_lib_hunspell_Hunspell_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lhunspell $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Hunspell_create ();
int
main ()
{
return Hunspell_create ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_hunspell_Hunspell_create=yes
else
ac_cv_lib_hunspell_Hunspell_create=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hunspell_Hunspell_create" >&5
$as_echo "$ac_cv_lib_hunspell_Hunspell_create" >&6; }
if test "x$ac_cv_lib_hunspell_Hunspell_create" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBHUNSPELL 1
_ACEOF
LIBS="-lhunspell $LIBS"
fi
# Check for Boost
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
else
want_boost="yes"
fi
# Check whether --with-boost-libdir was given.
if test "${with_boost_libdir+set}" = set; then :
withval=$with_boost_libdir;
if test -d "$withval"
then
ac_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
fi
else
ac_boost_lib_path=""
fi
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=1.37.0
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5
$as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
succeeded=no
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
x86_64)
libsubdirs="lib64 libx32 lib lib64"
;;
ppc64|s390x|sparc64|aarch64|ppc64le)
libsubdirs="lib64 lib lib64"
;;
esac
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
case ${host_cpu} in
i?86)
libsubdirs="lib/i386-${host_os} $libsubdirs"
;;
esac
if test "$ac_boost_path" != ""; then
BOOST_CPPFLAGS="-I$ac_boost_path/include"
for ac_boost_path_tmp in $libsubdirs; do
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
break
fi
done
elif test "$cross_compiling" != yes; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
for libsubdir in $libsubdirs ; do
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
if test "$ac_boost_lib_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_lib_path"
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
succeeded=yes
found_system=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$succeeded" != "xyes"; then
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
BOOST_CPPFLAGS=
BOOST_LDFLAGS=
_version=0
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
if test -z "$BOOST_CPPFLAGS"; then
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
BOOST_CPPFLAGS="-I$ac_boost_path"
fi
fi
fi
else
if test "$cross_compiling" != yes; then
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
if test "$ac_boost_lib_path" = ""; then
for libsubdir in $libsubdirs ; do
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$best_path/$libsubdir"
fi
fi
if test "x$BOOST_ROOT" != "x"; then
for libsubdir in $libsubdirs ; do
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5
$as_echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
int
main ()
{
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
succeeded=yes
found_system=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
$as_echo "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
fi
# execute ACTION-IF-NOT-FOUND (if present):
:
else
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h
# execute ACTION-IF-FOUND (if present):
:
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-boost-regex was given.
@@ -5557,17 +5528,17 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; }
if test "${HAVE_WX}" != 1; then
as_fn_error $? "
wxWindows must be installed on your system
but could not be configured.
as_fn_error $? "
wxWindows must be installed on your system
but could not be configured.
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows version is 2.6.0 or
above. If --enable-debug was passed, please ensure
debugging libraries are installed.
" "$LINENO" 5
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows version is 2.6.0 or
above. If --enable-debug was passed, please ensure
debugging libraries are installed.
" "$LINENO" 5
fi
# Check whether --enable-pch was given.
+29 -15
View File
@@ -21,17 +21,31 @@ AC_ARG_ENABLE(debug, [--enable-debug Enable debug build (requires debug
versions of wxWidgets and libstdc++.])
if test "x${enable_debug}" = "xyes"; then
DEFAULT_CXXFLAGS="-ggdb -O0"
DEFAULT_LDFLAGS=""
WXCONFIG_FLAGS="--debug"
else
DEFAULT_CXXFLAGS="-O2"
DEFAULT_LDFLAGS=""
WXCONFIG_FLAGS=""
fi
CXXFLAGS="${CXXFLAGS} ${DEFAULT_CXXFLAGS} -std=gnu++98 -DBOOST_USE_WINDOWS_H"
LDFLAGS="${LDFLAGS}"
case "${host_os}" in
linux*)
build_linux=yes;
;;
cygwin*|mingw*)
build_windows=yes
;;
esac
# Checks for libraries.
AC_CHECK_LIB([hunspell],[Hunspell_create])
if test -n "${CXXFLAGS}"; then
user_set_cxxflags=yes
fi
CXXFLAGS="${CXXFLAGS} ${DEFAULT_CXXFLAGS} -std=gnu++98 -DBOOST_USE_WINDOWS_H"
LDFLAGS="${LDFLAGS} ${DEFAULT_LDFLAGS}"
AC_SUBST(LDADD)
# Check for Boost
AX_BOOST_BASE([1.37.0])
@@ -42,17 +56,17 @@ AX_BOOST_SYSTEM
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG([2.8.0],[HAVE_WX=1],[HAVE_WX=0],,${WXCONFIG_FLAGS})
if test "${HAVE_WX}" != 1; then
AC_MSG_ERROR([
wxWindows must be installed on your system
but could not be configured.
AC_MSG_ERROR([
wxWindows must be installed on your system
but could not be configured.
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows version is 2.6.0 or
above. If --enable-debug was passed, please ensure
debugging libraries are installed.
])
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows version is 2.6.0 or
above. If --enable-debug was passed, please ensure
debugging libraries are installed.
])
fi
AC_ARG_ENABLE(pch, [--enable-pch Enable precompiled headers (Requires
@@ -76,5 +90,5 @@ AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([floor memset pow select sqrt])
AC_OUTPUT([
Makefile
Makefile
])
+3 -2
View File
@@ -158,8 +158,9 @@ BOOL WINAPI HandleCtrlEvent(DWORD type) {
// TODO: don't exit child on Ctrl+C
bool wait = false;
if (in_mine != INVALID_HANDLE_VALUE) {
CopyFileBuffer(in_mine,":quit\n",6);
CopyFileBuffer(out_real,":quit\n",6);
char str[16] = ":quit\n";
CopyFileBuffer(in_mine,str,6);
CopyFileBuffer(out_real,str,6);
wait = true;
}
if (wait && WaitForSingleObject(child_process_info.hProcess,100) == WAIT_OBJECT_0) {