aboutsummaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-26 10:43:27 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-27 01:18:22 -0400
commitd57b6533281b33d74d8820f44bc2f76d36ead4b2 (patch)
tree1a3c993d8b7969571a6138da19c5f47feb37271e /sim/m4
parentf1fa7a3d88561cef54dd5cf9422c29a802af6ce3 (diff)
downloadgdb-d57b6533281b33d74d8820f44bc2f76d36ead4b2.zip
gdb-d57b6533281b33d74d8820f44bc2f76d36ead4b2.tar.gz
gdb-d57b6533281b33d74d8820f44bc2f76d36ead4b2.tar.bz2
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.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_platform.m49
-rw-r--r--sim/m4/sim_ac_toolchain.m41
2 files changed, 10 insertions, 0 deletions
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index b757356..2a84a01 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -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)
])
diff --git a/sim/m4/sim_ac_toolchain.m4 b/sim/m4/sim_ac_toolchain.m4
index 47b9928..fdd5406 100644
--- a/sim/m4/sim_ac_toolchain.m4
+++ b/sim/m4/sim_ac_toolchain.m4
@@ -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