Do not add -loping do LIBS.
Use pkg-config for smbclient again but fallback to AC_SEARCH_LIBS.
Fix logic error in configure.ac