From Windows XP users who keep their machines up to date should all have DirectX 9.0c installed and likewise Vista uses will have DirectX 10 and Windows 7 and Windows 10 users DirectX 11 and 12. However the D3DX dlls (and sometimes others like XAudio) usedto get updated every few months (when a new SDK was released) and so many users got errors about missing d3dx9_xx.dll. The best solution was to distribute the DirectX runtime with your app. You could also of course just include the dll. although this is against the agreement (EULA) and may cause problems. Another solution is to forward users to the Microsoft DirectX end user runtime download via the Microsoft Web Installer
Note: these installers will not install DirectX 9.0c, they will only install the missing dlls from the SDK updates. Most people should have DirectX 9.0c as part of Windows XP SP2 or later OS but if you do not you can get it via the online Microsoft update page here: Microsoft Web Installer
In 2010 Microsoft changed how it updated DirectX and instead of a separate SDK for developers and a runtime distribution for end users it was made a part of the Platform SDK. This means that new versions of DirectX are linked to platform updates e.g. a change in windows version or a service pack release. For end users the DirectX files should be installed automatically but if not see this page for manual installation of DirectX: https://support.microsoft.com/en-us/kb/179113. In addition Microsoft stopped developing DirectX9 and the d3dx extensions and concentrated on more pure graphics library firstly with DirectX 11 and now with 12.
Note: if you are missing d3dx9d_xx.dll files e.g. d3dx9d_43.dll these files are debug versions of the libraries for development purposes only. Nobody should be distributing these in an application. To use these you need the full developers DirectX SDK (mow part of the platform SDK)..