sim: bfin: move pkg-config & SDL checks to common code

This reduces the unique logic in bfin/configure to make it easier to
(eventually) unify it entirely.
This commit is contained in:
Mike Frysinger
2021-06-26 10:43:27 -04:00
parent f1fa7a3d88
commit d57b653328
12 changed files with 319 additions and 1196 deletions

View File

@@ -162,4 +162,13 @@ AC_CHECK_LIB(socket, bind)
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(m, fabs)
AC_CHECK_LIB(m, log2)
PKG_CHECK_MODULES(SDL, sdl, [dnl
AC_CHECK_LIB(dl, dlopen, [dnl
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL"
SDL_LIBS="-ldl"
], [SDL_CFLAGS= SDL_LIBS=])
], [:])
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
])

View File

@@ -49,6 +49,7 @@ AC_SUBST(LDFLAGS_FOR_BUILD)
AC_SUBST(CFLAGS)
AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG
# Require C11 or newer. Autoconf-2.70 provides ac_cv_prog_cc_c11 when using
# AC_PROG_CC, but we're still using Autoconf-2.69, and the newest it understands