aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-02-25 04:32:15 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-25 04:32:15 +0100
commitbe1ae7087f6e8aa3cb7b38e1c0717198c218efe9 (patch)
tree7141ee6b1c2691225234b1d514d98b1fa9b4cae0 /m4
parent7af47b583ba8b2ab78aeec6b67c862d5eef6e9f1 (diff)
downloadnx-libs-be1ae7087f6e8aa3cb7b38e1c0717198c218efe9.tar.gz
nx-libs-be1ae7087f6e8aa3cb7b38e1c0717198c218efe9.tar.bz2
nx-libs-be1ae7087f6e8aa3cb7b38e1c0717198c218efe9.zip
m4/nx-macros.m4: add NX_TARGET_USE_ELF macro, setting TARGET_ELF automake conditional if target compiler is generating ELF binaries.
Diffstat (limited to 'm4')
-rw-r--r--m4/nx-macros.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/nx-macros.m4 b/m4/nx-macros.m4
index 1c0e1ea7a..81d6ea147 100644
--- a/m4/nx-macros.m4
+++ b/m4/nx-macros.m4
@@ -407,6 +407,23 @@ FreeBSD=
test "$nxconf_cv_freebsd" = yes && FreeBSD=yes
]) # NX_BUILD_ON_FreeBSD
+# Check to see if we're generating binaries in ELF format.
+
+AC_DEFUN([NX_TARGET_USE_ELF],
+[AC_CACHE_CHECK([if target system is ELF-based], [nxconf_cv_targetelf],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+#ifndef __ELF__
+#error not an ELF-based system
+error!
+#endif
+]],
+[[
+]])],
+[nxconf_cv_targetelf=yes], [nxconf_cv_targetelf=no])])
+AM_CONDITIONAL([TARGET_ELF], [test x"$nxconf_cv_targetelf" = "xyes"])
+]) # NX_TARGET_USE_ELF
+
AC_DEFUN([LIBJPEG_FALLBACK_CHECK],[
AC_MSG_CHECKING([for libjpeg shared libary file and headers])
AC_CHECK_LIB([jpeg], [jpeg_destroy_compress],