From de7ea1ad636ab5b6cc3d8873ff6eac7d4b6ccabc Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 6 Sep 2003 16:05:42 +0000 Subject: [PATCH] * Conditionally define CAN_DUMP, CAN_LOAD_OBJ and CAN_LOAD_LIB. git-svn-id: svn://svn.zoy.org/elk/trunk@113 55e467fa-43c5-0310-a8a2-de718669efc6 --- configure.ac | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a8529bb..a5553a1 100644 --- a/configure.ac +++ b/configure.ac @@ -162,11 +162,17 @@ if false; then AC_DEFINE(HP9K, 1, [FIXME HARD]) fi -ac_cv_my_have_aout_format=yes if test "${ac_cv_my_have_elf}" = "yes"; then AC_DEFINE(HAVE_LIBELF, 1, Define if you have libelf.) + ac_cv_my_can_dump=yes + ac_cv_my_can_load_obj=yes + ac_cv_my_can_load_lib=yes + CAN_DUMP=1 + CAN_LOAD_OBJ=1 else - : + ac_cv_my_can_dump=no + ac_cv_my_can_load_obj=no + ac_cv_my_can_load_lib=no dnl AC_MSG_ERROR([could not handle the native object format, if you are running Linux please install the libelf development headers]) fi @@ -179,8 +185,13 @@ fi # dl SysVR4/SunOS5 dlopen() # # Leave load_obj empty if dynamic loading is not supported. -AC_DEFINE(CAN_LOAD_OBJ, 1, [FIXME HARD]) -AC_DEFINE(CAN_LOAD_LIB, 1, [FIXME HARD]) +if test "${ac_cv_my_can_load_obj}" = "yes"; then + AC_DEFINE(CAN_LOAD_OBJ, 1, [FIXME HARD]) +fi +if test "${ac_cv_my_can_load_lib}" = "yes"; then + AC_DEFINE(CAN_LOAD_LIB, 1, [FIXME HARD]) +fi + if false; then AC_DEFINE(USE_LD, 1, [FIXME HARD]) fi @@ -228,7 +239,9 @@ AC_DEFINE(INIT_PREFIX, "elk_init_", [FIXME HARD]) AC_DEFINE(FINIT_PREFIX, "elk_finit_", [FIXME HARD]) # Is the "dump" function supported? -AC_DEFINE(CAN_DUMP, 1, [FIXME HARD]) +if test "${ac_cv_my_can_dump}" = "yes"; then + AC_DEFINE(CAN_DUMP, 1, [FIXME HARD]) +fi # Is the fchmod system call broken or unavailable? if false; then