diff options
-rw-r--r-- | config.h.in | 18 | ||||
-rwxr-xr-x | configure | 63 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 2 | ||||
-rw-r--r-- | src/nukectl.c | 1 |
6 files changed, 89 insertions, 4 deletions
diff --git a/config.h.in b/config.h.in index abfdb80..7999a05 100644 --- a/config.h.in +++ b/config.h.in @@ -3,6 +3,9 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the <errno.h> header file. */ +#undef HAVE_ERRNO_H + /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -18,6 +21,12 @@ /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD +/* Define to 1 if you have the `ssl' library (-lssl). */ +#undef HAVE_LIBSSL + +/* Define to 1 if you have the <linux/fs.h> header file. */ +#undef HAVE_LINUX_FS_H + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC @@ -34,6 +43,9 @@ /* Define to 1 if you have the <ncurses.h> header file. */ #undef HAVE_NCURSES_H +/* Define to 1 if you have the <openssl/ssl.h> header file. */ +#undef HAVE_OPENSSL_SSL_H + /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC @@ -74,12 +86,18 @@ /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the <sys/syslog.h> header file. */ +#undef HAVE_SYS_SYSLOG_H + /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `usleep' function. */ +#undef HAVE_USLEEP + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -2329,12 +2329,16 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_list " errno.h" as_fn_append ac_header_list " fcntl.h" +as_fn_append ac_header_list " linux/fs.h" as_fn_append ac_header_list " ncurses.h" +as_fn_append ac_header_list " openssl/ssl.h" as_fn_append ac_header_list " stddef.h" as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " string.h" as_fn_append ac_header_list " sys/ioctl.h" +as_fn_append ac_header_list " sys/syslog.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " getpagesize" as_fn_append ac_func_list " memmove" @@ -2344,6 +2348,7 @@ as_fn_append ac_func_list " strerror" as_fn_append ac_func_list " strncasecmp" as_fn_append ac_func_list " strrchr" as_fn_append ac_func_list " strstr" +as_fn_append ac_func_list " usleep" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -11182,6 +11187,54 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_library_init (); +int +main () +{ +return SSL_library_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_library_init=yes +else + ac_cv_lib_ssl_SSL_library_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +else + as_fn_error $? "required library openssl missing" "$LINENO" 5 +fi + + # Checks for header files. @@ -11216,6 +11269,14 @@ done + + + + + + + + # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } @@ -11785,6 +11846,8 @@ done + + ac_config_files="$ac_config_files Makefile libsysfs/Makefile src/Makefile" diff --git a/configure.in b/configure.in index 4d79e8d..e8bd7ef 100644 --- a/configure.in +++ b/configure.in @@ -26,9 +26,12 @@ AC_CHECK_LIB([pthread], [pthread_create], [], AC_CHECK_LIB([ncurses], [initscr], [], [AC_MSG_ERROR([required library ncurses missing])]) + +AC_CHECK_LIB([ssl], [SSL_library_init], [], + [AC_MSG_ERROR([required library openssl missing])]) # Checks for header files. -AC_CHECK_HEADERS_ONCE([fcntl.h ncurses.h stddef.h stdlib.h string.h sys/ioctl.h unistd.h]) +AC_CHECK_HEADERS_ONCE([errno.h fcntl.h linux/fs.h ncurses.h openssl/ssl.h stddef.h stdlib.h string.h sys/ioctl.h sys/syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE @@ -51,7 +54,7 @@ fi AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_REALLOC -AC_CHECK_FUNCS_ONCE([getpagesize memmove memset strchr strerror strncasecmp strrchr strstr]) +AC_CHECK_FUNCS_ONCE([getpagesize memmove memset strchr strerror strncasecmp strrchr strstr usleep]) AC_CONFIG_FILES([Makefile libsysfs/Makefile src/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index d14b3bd..90e0f9c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ sbin_PROGRAMS= netnuke netnuke_CFLAGS=-Wall -W -Wstrict-prototypes -I../include -static -netnuke_LDFLAGS=-L../libsysfs -lncurses -lpthread -lsysfs -all-static +netnuke_LDFLAGS=-L../libsysfs -lssl -lncurses -lpthread -lsysfs -all-static netnuke_SOURCES= bus.c \ misc.c \ diff --git a/src/Makefile.in b/src/Makefile.in index bd9829b..e1fd2c2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -185,7 +185,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ netnuke_CFLAGS = -Wall -W -Wstrict-prototypes -I../include -static -netnuke_LDFLAGS = -L../libsysfs -lncurses -lpthread -lsysfs -all-static +netnuke_LDFLAGS = -L../libsysfs -lssl -lncurses -lpthread -lsysfs -all-static netnuke_SOURCES = bus.c \ misc.c \ netnuke.c \ diff --git a/src/nukectl.c b/src/nukectl.c index 2404a5b..3ee3bc5 100644 --- a/src/nukectl.c +++ b/src/nukectl.c @@ -25,6 +25,7 @@ #include <unistd.h> #include <pthread.h> #include <fcntl.h> +#include <openssl/ssl.h> #include "netnuke.h" FILE* randfp; |