diff --git a/ao-config.in b/ao-config.in
index 592f9e02a7960d8c16d8043676d34251c2287608..f412054d396bee0a3197d9bcfa87ca0852cecc24 100644
--- a/ao-config.in
+++ b/ao-config.in
@@ -98,9 +98,9 @@ else
 fi
 
 if test "$lib_dir" != "/usr/lib"; then
-    libs="-L$lib_dir $esd_libs -lao"
+    libs="-L$lib_dir $esd_libs -lao -ldl"
 else
-    libs="$esd_libs -lao"
+    libs="$esd_libs -lao -ldl"
 fi
 
 if test "$echo_cflags" = "yes"; then
diff --git a/libao.spec b/libao.spec
index 66f6015eaf6e8be191e7d8c78818698c8bf0c525..8caec1e8d9fe8f19b0aa262bcb1047e0f22614b9 100644
--- a/libao.spec
+++ b/libao.spec
@@ -47,12 +47,15 @@ make DESTDIR=$RPM_BUILD_ROOT install
 %doc COPYING
 %doc README
 /usr/lib/libao.so.*
-/usr/lib/libao.a
 
 %files devel
 %doc doc/index.html
 /usr/include/ao/ao.h
 /usr/include/ao/os_types.h
+/usr/lib/libao.a
+/usr/lib/libao.so
+/usr/bin/ao-config
+/usr/share/aclocal/ao.m4
 
 %clean 
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT