]> granicus.if.org Git - yasm/commitdiff
Add library install directory to ltdl search directory list.
authorPeter Johnson <peter@tortall.net>
Tue, 1 Apr 2003 06:57:37 +0000 (06:57 -0000)
committerPeter Johnson <peter@tortall.net>
Tue, 1 Apr 2003 06:57:37 +0000 (06:57 -0000)
svn path=/trunk/yasm/; revision=908

Makefile.am
frontends/yasm/yasm.c

index c9d1f21356a6d0afebb6d71b5d883165c826b020..b552a45bfcabe8e43ac171819c1d130f648a7f31 100644 (file)
@@ -6,6 +6,7 @@ AM_YFLAGS = -d
 AM_CFLAGS = @MORE_CFLAGS@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/check \
+       -DYASM_MODULEDIR="\"${libdir}\"" \
        @INCLTDL@
 
 bin_PROGRAMS =
index 164d74a52a02776ea69f80326fcca43ac3a6581e..25c508e97af776e4be810be4419d3ce1fa919ca4 100644 (file)
@@ -209,6 +209,10 @@ main(int argc, char *argv[])
        const char *path = getenv(YASM_MODULE_PATH_ENV);
        if (path)
            errors = lt_dladdsearchdir(path);
+#if defined(YASM_MODULEDIR)
+       if (errors == 0)
+           errors = lt_dladdsearchdir(YASM_MODULEDIR);
+#endif
     }
     if (errors != 0) {
        print_error(_("Module loader initialization failed"));