Se você estiver dentro do ambiente cygwin, você pode usar o comando ldd , ele retornará as dependências de um executável, veja:
- Dependências do ls.exe , o cygwin1.dll é uma dependência
$ ldd /bin/ls.exe
ntdll.dll => /mnt/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffd413d0000)
KERNEL32.DLL => /mnt/c/WINDOWS/System32/KERNEL32.DLL (0x7ffd40af0000)
KERNELBASE.dll => /mnt/c/WINDOWS/System32/KERNELBASE.dll (0x7ffd3e570000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3e8b40000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3f2300000)
- Dependências de C: /Windows/System32/control.exe , cygwin1.dll não é uma dependência
$ ldd c:/Windows/System32/control.exe
ntdll.dll => /mnt/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffd413d0000)
KERNEL32.DLL => /mnt/c/WINDOWS/System32/KERNEL32.DLL (0x7ffd40af0000)
KERNELBASE.dll => /mnt/c/WINDOWS/System32/KERNELBASE.dll (0x7ffd3e570000)
ADVAPI32.dll => /mnt/c/WINDOWS/System32/ADVAPI32.dll (0x7ffd40d30000)
msvcrt.dll => /mnt/c/WINDOWS/System32/msvcrt.dll (0x7ffd40520000)
[...]
Você também pode executar a seguinte linha:
ldd $PROGRAM | grep cygwin1.dll | wc -l
Ele retornará 1 no caso de $ PROGRAM conter uma dependência do cygwin1.dll