mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-21 23:43:54 +01:00
- added checking for SDL2 libraries.
This commit is contained in:
parent
9eb3e8cc50
commit
712aa55755
@ -331,6 +331,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POSUB = @POSUB@
|
||||
SDL2_CONFIG = @SDL2_CONFIG@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
114
configure
vendored
114
configure
vendored
@ -648,6 +648,7 @@ LTLIBOBJS
|
||||
LIBOBJS
|
||||
ENABLE_COMPLETION_FALSE
|
||||
ENABLE_COMPLETION_TRUE
|
||||
SDL2_CONFIG
|
||||
WISH
|
||||
COMPLETION_DIR
|
||||
PKG_CONFIG
|
||||
@ -8084,6 +8085,64 @@ if test "$WISH" = "no" ; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
for ac_prog in sdl2-config
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_path_SDL2_CONFIG+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) case $SDL2_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_SDL2_CONFIG="$SDL2_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_SDL2_CONFIG="$as_dir$ac_word$ac_exec_ext"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
SDL2_CONFIG=$ac_cv_path_SDL2_CONFIG
|
||||
if test -n "$SDL2_CONFIG"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SDL2_CONFIG" >&5
|
||||
printf "%s\n" "$SDL2_CONFIG" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$SDL2_CONFIG" && break
|
||||
done
|
||||
test -n "$SDL2_CONFIG" || SDL2_CONFIG="no"
|
||||
|
||||
|
||||
if test "$SDL2_CONFIG" = "no" ; then
|
||||
as_fn_error $? "Can not find libsdl2 development library." "$LINENO" 5
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if test "$COMPLETION_DIR" != ""; then
|
||||
ENABLE_COMPLETION_TRUE=
|
||||
ENABLE_COMPLETION_FALSE='#'
|
||||
@ -8316,6 +8375,61 @@ esac
|
||||
fi
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTF_Init in -lSDL2_ttf" >&5
|
||||
printf %s "checking for TTF_Init in -lSDL2_ttf... " >&6; }
|
||||
if test ${ac_cv_lib_SDL2_ttf_TTF_Init+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lSDL2_ttf $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.
|
||||
The 'extern "C"' is for builds by C++ compilers;
|
||||
although this is not generally supported in C code supporting it here
|
||||
has little cost and some practical benefit (sr 110532). */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char TTF_Init (void);
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return TTF_Init ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_lib_SDL2_ttf_TTF_Init=yes
|
||||
else case e in #(
|
||||
e) ac_cv_lib_SDL2_ttf_TTF_Init=no ;;
|
||||
esac
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS ;;
|
||||
esac
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL2_ttf_TTF_Init" >&5
|
||||
printf "%s\n" "$ac_cv_lib_SDL2_ttf_TTF_Init" >&6; }
|
||||
if test "x$ac_cv_lib_SDL2_ttf_TTF_Init" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_LIBSDL2_TTF 1" >>confdefs.h
|
||||
|
||||
LIBS="-lSDL2_ttf $LIBS"
|
||||
|
||||
else case e in #(
|
||||
e) as_fn_error $? "Can not find libsdl ttf." "$LINENO" 5 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_header= ac_cache=
|
||||
for ac_item in $ac_header_c_list
|
||||
|
@ -157,6 +157,13 @@ if test "$WISH" = "no" ; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
AC_PATH_PROGS([SDL2_CONFIG],[sdl2-config],[no])
|
||||
|
||||
if test "$SDL2_CONFIG" = "no" ; then
|
||||
AC_MSG_ERROR([Can not find libsdl2 development library.])
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_COMPLETION],[test "$COMPLETION_DIR" != ""])
|
||||
|
||||
AC_PROG_MKDIR_P
|
||||
@ -171,6 +178,8 @@ AC_CHECK_LIB([sqlite3], [sqlite3_libversion], [], AC_MSG_ERROR([Can not find lib
|
||||
|
||||
AC_CHECK_LIB([turbojpeg], [tjInitDecompress], [], AC_MSG_ERROR([Can not find libturbojpeg0.]))
|
||||
|
||||
AC_CHECK_LIB([SDL2_ttf], [TTF_Init], [], AC_MSG_ERROR([Can not find libsdl ttf.]))
|
||||
|
||||
dnl check headers
|
||||
|
||||
AC_CHECK_HEADER([turbojpeg.h], [], [Can not find libturbojpeg0 headers file.], [])
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -18,6 +18,7 @@ Build-Depends:
|
||||
libgettextpo0,
|
||||
libncurses-dev,
|
||||
libsdl2-dev,
|
||||
libsdl2-ttf-dev,
|
||||
libsqlite3-dev,
|
||||
libssl-dev,
|
||||
libturbojpeg0-dev,
|
||||
@ -45,6 +46,7 @@ Depends:
|
||||
libgettextpo0,
|
||||
libncurses-dev,
|
||||
libsdl2-dev,
|
||||
libsdl2-ttf-dev,
|
||||
libsqlite3-dev,
|
||||
libssl-dev,
|
||||
libturbojpeg0-dev,
|
||||
|
Loading…
Reference in New Issue
Block a user