Index: slang-2.3.3/autoconf/aclocal.m4
===================================================================
--- slang-2.3.3.orig/autoconf/aclocal.m4
+++ slang-2.3.3/autoconf/aclocal.m4
@@ -362,8 +362,11 @@ then
   if test -n "$gcc_warnings"
   then
     CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
- -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
- -Wformat=2"
+    -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
+    -Wformat -Wformat-security"
+    ELF_CFLAGS="$ELF_CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
+    -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
+    -Wformat -Wformat-security"
     # Now trim excess whitespace
     CFLAGS=`echo $CFLAGS`
   fi
@@ -578,7 +581,7 @@ dnl # Check for dynamic linker
 dnl #-------------------------------------------------------------------------
 DYNAMIC_LINK_LIB=""
 
-dnl# AH_TEMPLATE([HAVE_DLOPEN],1,[Define if you have dlopen])
+AH_TEMPLATE([HAVE_DLOPEN],1,[Define if you have dlopen])
 
 AC_CHECK_HEADER(dlfcn.h,[
   AC_DEFINE(HAVE_DLFCN_H,1,[Define if you have the dlfcn.h header])
Index: slang-2.3.3/autoconf/configure.ac
===================================================================
--- slang-2.3.3.orig/autoconf/configure.ac
+++ slang-2.3.3/autoconf/configure.ac
@@ -17,6 +17,62 @@ dnl# fi
 AC_CONFIG_AUX_DIR(autoconf)
 AC_CANONICAL_HOST
 
+AH_TOP([
+/* -*- c -*- */
+/* Note: this is for unix only. */
+
+#ifndef SL_CONFIG_H
+#define SL_CONFIG_H
+])
+
+AH_BOTTOM([
+#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
+# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
+#  define SLANG_POSIX_SIGNALS
+# endif
+#endif
+
+/* Define if you need to in order for stat and other things to work.  */
+#undef _POSIX_SOURCE
+
+#ifdef _AIX
+# ifndef _POSIX_SOURCE
+#  define _POSIX_SOURCE 1
+# endif
+# ifndef _ALL_SOURCE
+#  define _ALL_SOURCE
+# endif
+/* This may generate warnings but the fact is that without it, xlc will 
+ * INCORRECTLY inline many str* functions. */
+# undef __STR__
+#endif
+
+/* define USE_TERMCAP if you want to use it instead of terminfo. */
+#if defined(sequent) || defined(NeXT)
+# ifndef USE_TERMCAP
+#  define USE_TERMCAP
+# endif
+#endif
+
+#if defined(ultrix) && !defined(__GNUC__)
+# ifndef NO_PROTOTYPES
+#  define NO_PROTOTYPES
+# endif
+#endif
+
+#ifndef unix
+# define unix 1
+#endif
+
+#ifndef __unix__
+# define __unix__ 1
+#endif
+
+#define _SLANG_SOURCE_	1
+#endif /* SL_CONFIG_H */
+])
+
+
 JD_INIT
 JD_ANSI_CC
 
@@ -308,7 +364,7 @@ else
 fi
 AC_SUBST(ZLIB_MODULE)
 
-m4_include([./iconv.m4])
+dnl m4_include([./iconv.m4])
 
 ICONV_MODULE=""
 JD_CHECK_FOR_LIBRARY(iconv)