diff --git a/buildconf b/buildconf index ef1fe56..9eee2ba 100755 --- a/buildconf +++ b/buildconf @@ -22,6 +22,6 @@ ${AUTOHEADER:-autoheader} # copy the private libssh2_config.h.in to the examples dir so that # it can be included without pointing the include path to the private # source dir -cp src/libssh2_config.h.in example/config.h.in +cp src/libssh2_config.h.in example/libssh2_config.h.in ${AUTOCONF:-autoconf} ${AUTOMAKE:-automake} --add-missing --copy diff --git a/configure.ac b/configure.ac index a7a7cbd..fc6410a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_INIT(libssh2, [-], libssh2-devel@lists.sourceforge.net) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src]) -AC_CONFIG_HEADER([src/libssh2_config.h]) +AM_CONFIG_HEADER([src/libssh2_config.h example/libssh2_config.h]) AM_MAINTAINER_MODE dnl SED is needed by some of the tools diff --git a/example/direct_tcpip.c b/example/direct_tcpip.c index bbc2272..0fc6d45 100644 --- a/example/direct_tcpip.c +++ b/example/direct_tcpip.c @@ -1,5 +1,9 @@ #include +#ifdef HAVE_CONFIG_H +#include "libssh2_config.h" +#endif + #include #ifdef HAVE_WINSOCK2_H