diff --git a/configure.ac b/configure.ac index a5553a1..b4cd185 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,7 @@ fi if test "${ac_cv_my_have_elf}" = "yes"; then AC_DEFINE(HAVE_LIBELF, 1, Define if you have libelf.) + ELK_LIBS="${ELK_LIBS} -lelf" ac_cv_my_can_dump=yes ac_cv_my_can_load_obj=yes ac_cv_my_can_load_lib=yes @@ -470,7 +471,9 @@ AC_SUBST(MOTIF_LIBS) dnl Export variables INCLUDES="${INCLUDES} -I\$(top_srcdir)/include" +ELK_LIBS="${ELK_LIBS} -lm -ldl" AC_SUBST(INCLUDES) +AC_SUBST(ELK_LIBS) AC_OUTPUT([ Makefile diff --git a/src/Makefile.am b/src/Makefile.am index f3a8074..36aea52 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ NULL = lib_LTLIBRARIES = libelk.la libelk_la_CFLAGS = -I/usr/include/libelf -DNOMAIN libelk_la_LDFLAGS = -libelk_la_LIBADD = -lm -lelf -ldl +libelk_la_LIBADD = @ELK_LIBS@ libelk_la_SOURCES = \ autoload.c \ bignum.c \