*** ./src/sldisply.c.ORIG	Thu Nov 25 12:10:07 2010
--- ./src/sldisply.c	Thu Nov 25 12:10:43 2010
***************
*** 57,64 ****
--- 57,66 ----
  #ifdef SYSV
  # include <sys/termio.h>
  # include <sys/stream.h>
+ #ifndef _AIX
  # include <sys/ptem.h>
  # include <sys/tty.h>
+ #endif
  #endif
  
  #if defined (_AIX) && !defined (FD_SET)
*** ./src/slutty.c.ORIG	Thu Nov 25 12:15:56 2010
--- ./src/slutty.c	Thu Nov 25 12:16:52 2010
***************
*** 38,45 ****
--- 38,47 ----
  # ifndef CRAY
  #  include <sys/termio.h>
  #  include <sys/stream.h>
+ #ifndef _AIX
  #  include <sys/ptem.h>
  #  include <sys/tty.h>
+ #endif
  # endif
  #endif
  
*** ./configure.ORIG	Thu Aug  2 21:36:06 2012
--- ./configure	Thu Aug  2 22:13:17 2012
***************
*** 7876,7881 ****
--- 7876,7890 ----
      ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
      CC_SHARED="\$(CC) \$(CFLAGS) -shared -fPIC"
      ;;
+   *aix* )
+     ELF_CC="\$(CC)"
+     ELF_CFLAGS="\$(CFLAGS)"
+     ELF_LINK="\$(CC) \$(CFLAGS) \$(LDFLAGS) -shared"
+     ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
+     CC_SHARED="\$(CC) \$(CFLAGS) -shared"
+     CC_SHARED_FLAGS="-shared"
+     SLANG_LIB_FOR_MODULES="-L\$(ELFDIR) -lslang"
+     ;;
    *solaris* )
      if test "$GCC" = yes
      then

--- src/Makefile.in.orig	2017-04-24 04:57:26 -0500
+++ src/Makefile.in	2017-04-24 04:58:17 -0500
@@ -15,7 +15,7 @@
 #---------------------------------------------------------------------------
 ELF_CC 		= @ELF_CC@
 ELF_CFLAGS	= @ELF_CFLAGS@
-ELF_LINK        = @ELF_LINK@
+ELF_LINK        = @ELF_LINK@ @ELF_CFLAGS@
 ELF_DEP_LIBS	= @ELF_DEP_LIBS@
 
 #---------------------------------------------------------------------------
