#ifdef INSTALLING
library-dirs: LIB_DIR PAPI_LIB_DIR
-# ifdef mingw32_HOST_OS
- , LIB_DIR"/gcc-lib"
- /* force the dist-provided gcc-lib/ into scope. */
-# endif
#else /* !INSTALLING */
library-dirs: TOP"/rts/dist/build" PAPI_LIB_DIR
#endif
hs-libraries: "HSrts"
-extra-libraries: "m" /* for ldexp() */
+extra-libraries:
+#ifdef HAVE_LIBM
+ "m" /* for ldexp() */
+#endif
#ifdef HAVE_LIBRT
, "rt"
#endif