[ -z "$OBJDUMP" ] && OBJDUMP=i686-pc-mingw32-objdump
+# Get the list of files.
+
filelist=`sed "s/['\"]/\\\&/g"`
-dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll')
+# Everything requires mingw-filesystem of at least the current version
+# and mingw-runtime.
+echo 'mingw-filesystem >= @VERSION@'
+echo 'mingw-runtime'
+
+dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$')
for f in $dlls; do
- $OBJDUMP -p $f | grep 'DLL Name' | grep -Eo '[[:alnum:]_]+\.dll' |
+ $OBJDUMP -p $f | grep 'DLL Name' | grep -Eo '[-._[:alnum:]]+\.dll' |
tr [:upper:] [:lower:] |
sed 's/\(.*\)/mingw(\1)/'
done | sort -u