X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.ac;fp=configure.ac;h=c13be33aa022615ed1e65fbcee6d1e606d865a8a;hb=9698c399cc7d01b09164ceae297b12e856975b5b;hp=e52697698bd88503f069dec89c5581fc96b10b70;hpb=14bd6e120a6b3db76464422af52d13b17673898d;p=librseq.git diff --git a/configure.ac b/configure.ac index e526976..c13be33 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,20 @@ AC_CHECK_FUNCS([ \ # AC_FUNC_MALLOC causes problems when cross-compiling. #AC_FUNC_MALLOC +# Check dor dlopen() in -ldl or -lc +AC_CHECK_LIB([dl], [dlopen], [ + libdl_name=dl + DL_LIBS="-ldl" +], [ + # dlopen not found in libdl, check in libc + AC_CHECK_LIB([c], [dlopen], [ + libdl_name=c + DL_LIBS="-lc" + ], [ + AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.]) + ]) +]) +AC_SUBST(DL_LIBS) ## ## ## Substitute variables for use in Makefile.am ##