--- mercury-extras-10.04-beta.orig/dynamic_linking/Mmakefile 2005-01-25 20:49:05.000000000 +1300 +++ mercury-extras-10.04-beta/dynamic_linking/Mmakefile 2010-02-13 15:17:10.000000000 +1300 @@ -11,7 +11,7 @@ MLFLAGS = --shared # Link in the `-ldl' library (this may not be needed on some systems) -MLLIBS = -ldl +MLLIBS = -L/usr/@libdir@ -ldl # enable C-level debugging CFLAGS = -g