From 53409c238434a0eaeddcfa407255c0cb42f2c15b Mon Sep 17 00:00:00 2001
From: Daniel Koester <Koester@Math.Uni-Augsburg.DE>
Date: Thu, 13 Jun 2002 16:47:17 +0000
Subject: [PATCH] Added some SUN support (-lnsl for xdr-routines)

---
 config.h.in  |  6 ++++++
 configure.ac | 15 +++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/config.h.in b/config.h.in
index f197148..806338f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -36,6 +36,9 @@
 /* Define to 1 if you have the `MesaGL' library (-lMesaGL). */
 #undef HAVE_LIBMESAGL
 
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
 /* Define to 1 if you have the `X11' library (-lX11). */
 #undef HAVE_LIBX11
 
@@ -54,6 +57,9 @@
 /* Define to 1 if you have the `pow' function. */
 #undef HAVE_POW
 
+/* Define to 1 if you have the <rpc/xdr.h> header file. */
+#undef HAVE_RPC_XDR_H
+
 /* Define to 1 if you have the `sqrt' function. */
 #undef HAVE_SQRT
 
diff --git a/configure.ac b/configure.ac
index 66806f2..3150a77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ AC_FUNC_VPRINTF
 AC_HEADER_STDC
 AC_CHECK_HEADERS([malloc.h unistd.h X11/Xlib.h X11/Xutil.h],,
 		 [AC_MSG_ERROR([Exiting...])])
-AC_CHECK_HEADERS([GL/gl.h GL/glx.h])
+AC_CHECK_HEADERS([GL/gl.h GL/glx.h rpc/xdr.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -64,6 +64,8 @@ AC_PATH_XTRA
 # Prevent -g from being set here automatically...
 # ******************************************************************************
 
+CFLAGS=
+FFLAGS=
 AM_CFLAGS=
 AM_FFLAGS=
 
@@ -81,11 +83,12 @@ plot_for_ibm=false
 plot_for_tit=false
 
 case "$build_vendor" in
-*sgi*) AC_MSG_RESULT([Building for SGI system, using -n32 linker flag...])
-       object_type=-n32;;
-*ibm*) AC_MSG_RESULT([Building for IBM system, affects PLOT_Ansi...])
-       plot_for_ibm=true
-       plot_for_sun=false;;
+*sgi*)	AC_MSG_RESULT([Building for SGI system, affects PLOT_Ansi...]);;
+*ibm*)	AC_MSG_RESULT([Building for IBM system, affects PLOT_Ansi...])
+       	plot_for_ibm=true
+       	plot_for_sun=false;;
+*sun*)	AC_MSG_RESULT([Building fo a SUN system, affects PLOT_Ansi and xdr-routines...])
+	AC_CHECK_LIB(nsl, main);;
 esac
 
 case "$build" in
-- 
GitLab