wxWidgets GUI can now be built through autoconf (use '--enable-wx').
This commit is contained in:
parent
7fe91626d6
commit
23b2ae0d9d
6 changed files with 3373 additions and 514 deletions
52
configure.ac
52
configure.ac
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
AC_INIT(PCem, v12, Sarah Walker <pcem-emulator@pcem-emulator.co.uk>, pcem)
|
||||
AC_INIT(PCem, v12, Sarah Walker <pcem@pcem-emulator.co.uk>, pcem)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
|
|
@ -24,6 +24,15 @@ else
|
|||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to use the wxWidgets-based GUI])
|
||||
AC_ARG_ENABLE(wx,
|
||||
AC_HELP_STRING([--enable-wx], [use wxWidgets GUI]))
|
||||
if test "$enable_wx" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for cpu])
|
||||
case "${host_cpu}" in
|
||||
i?86)
|
||||
|
|
@ -48,14 +57,39 @@ AM_CONDITIONAL(CPU_X86_64, test "$CPU" = "x86_64")
|
|||
AM_CONDITIONAL(OS_WIN, test "$OS" = "win")
|
||||
AM_CONDITIONAL(OS_LINUX, test "$OS" = "linux")
|
||||
|
||||
# Do not run test for Allegro with Win32/MinGW version, as binary builds have
|
||||
# `allegro-config' missing.
|
||||
# NOTE: For the following Autoconf macro to be supported, you need to extract
|
||||
# allegro.m4 from the DOS/Windows Allegro sources (the file is contained
|
||||
# in `misc') and copy it to this directory or MSYS's `/share/aclocal'.
|
||||
if test "$OS" != "win"; then
|
||||
AC_CONFIG_MACRO_DIR([./])
|
||||
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building PCem requires Allegro to be installed))
|
||||
AM_CONDITIONAL(USE_WX, test "$enable_wx" = "yes")
|
||||
|
||||
if test "$enable_wx" != "yes"; then
|
||||
# Do not run test for Allegro with Win32/MinGW version, as binary builds have
|
||||
# `allegro-config' missing.
|
||||
# NOTE: For the following Autoconf macro to be supported, you need to extract
|
||||
# allegro.m4 from the DOS/Windows Allegro sources (the file is contained
|
||||
# in `misc') and copy it to this directory or MSYS's `/share/aclocal'.
|
||||
if test "$OS" != "win"; then
|
||||
AC_CONFIG_MACRO_DIR([./])
|
||||
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building PCem requires Allegro to be installed))
|
||||
fi
|
||||
else
|
||||
SDL_VERSION=2.0.0
|
||||
AM_PATH_SDL2($SDL_VERSION,
|
||||
:,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
)
|
||||
AM_OPTIONS_WXCONFIG
|
||||
reqwx=3.0.0
|
||||
AM_PATH_WXCONFIG($reqwx, wxWin=1)
|
||||
if test "$wxWin" != 1; then
|
||||
AC_MSG_ERROR([
|
||||
wxWidgets must be installed on your system.
|
||||
|
||||
Please check that wx-config is in path, the directory
|
||||
where wxWidgets libraries are installed (returned by
|
||||
'wx-config --libs' or 'wx-config --static --libs' command)
|
||||
is in LD_LIBRARY_PATH or equivalent variable and
|
||||
wxWidgets version is $reqwx or above.
|
||||
])
|
||||
fi
|
||||
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([openal], [alGetError], [], \
|
||||
|
|
|
|||
Loading…
Reference in a new issue