From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Apr, 25 2026 09:44:54 +0000
Subject: [PATCH] <short summary of the patch>

TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-<Vendor>: <vendor-bugtracker-url>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>

--- xmpi-2.2.3b8.orig/Makefile.am
+++ xmpi-2.2.3b8/Makefile.am
@@ -14,6 +14,8 @@
 # $Id: Makefile.am,v 1.8 2003/08/23 13:39:49 jsquyres Exp $
 #
 
+ACLOCAL_AMFLAGS = -I m4
+
 include $(top_srcdir)/config/Makefile.options
 
 SUBDIRS			= src man
--- xmpi-2.2.3b8.orig/config/cxx_have_stl.m4
+++ xmpi-2.2.3b8/config/cxx_have_stl.m4
@@ -34,7 +34,7 @@ fi
 
 # Do the test
 AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG([C++])
 AC_CHECK_HEADER(map, LSC_CXX_STL=1, LSC_CXX_STL=0)
 
 # Set the result
--- xmpi-2.2.3b8.orig/config/lsc_find_motif.m4
+++ xmpi-2.2.3b8/config/lsc_find_motif.m4
@@ -29,15 +29,15 @@ AC_REQUIRE([AC_PATH_XTRA])
 motif_includes=
 motif_libraries=
 AC_ARG_WITH(motif,
-    AC_HELP_STRING([--with-motif=DIR], 
+    AS_HELP_STRING([--with-motif=DIR], 
 		   [Motif files are in DIR/include and DIR/lib]),
 motif_includes="$withval/include" ; motif_libraries="$withval/lib")
 AC_ARG_WITH(motif-includes,
-    AC_HELP_STRING([--with-motif-includes=DIR],
+    AS_HELP_STRING([--with-motif-includes=DIR],
 		   [Motif include files are in DIR]),
 motif_includes="$withval")
 AC_ARG_WITH(motif-libs,
-    AC_HELP_STRING([--with-motif-libs=DIR],
+    AS_HELP_STRING([--with-motif-libs=DIR],
 		   [Motif libraries are in DIR]),
 motif_libraries="$withval")
 AC_MSG_CHECKING(for Motif)
@@ -59,7 +59,8 @@ CFLAGS="$X_CFLAGS $CFLAGS"
 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 
-AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
+AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <Xm/Xm.h>]],[[int a;]])],
 [
 # Xm/Xm.h is in the standard search path.
 lsc_cv_motif_includes=
@@ -118,10 +119,11 @@ LDFLAGS="$X_LIBS $LDFLAGS"
 #
 # We use XtToolkitInitialize() here since it takes no arguments
 # and thus also works with a C++ compiler.
-AC_TRY_LINK([
+AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[
 #include <X11/Intrinsic.h>
 #include <Xm/Xm.h>
-],[XtToolkitInitialize();],
+]],[[XtToolkitInitialize();]])],
 [
 # libXm.a is in the standard search path.
 lsc_cv_motif_libraries=
--- /dev/null
+++ xmpi-2.2.3b8/configure.ac
@@ -0,0 +1,316 @@
+# -*- shell-script -*-
+#
+# Copyright (c) 2001-2003 The Trustees of Indiana University.  
+#                         All rights reserved.
+# Copyright (c) 1998-2001 University of Notre Dame. 
+#                         All rights reserved.
+# Copyright (c) 1994-1998 The Ohio State University.  
+#                         All rights reserved.
+# 
+# This file is part of the XMPI software package.  For license
+# information, see the LICENSE file in the top level directory of the
+# XMPI source distribution.
+#
+# $Id: configure.in,v 1.34 2003/08/23 13:30:46 jsquyres Exp $
+#
+
+#
+# Init autoconf
+#
+
+#AC_INIT
+AC_CONFIG_SRCDIR([src/xmpi/xmpi.cc])
+AC_CONFIG_AUX_DIR(config)
+
+#
+# Init automake
+#
+
+XMPI_VERSION=`cat $srcdir/VERSION`
+AC_SUBST(XMPI_VERSION)
+echo "Configuring XMPI version $XMPI_VERSION"
+
+# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and
+# VERSION macors
+AC_INIT([xmpi], m4_esyscmd([tr -d '\n' < ./VERSION]), [no])
+AC_CONFIG_MACRO_DIRS([m4])
+AM_INIT_AUTOMAKE
+
+AH_TOP([/* -*- c -*-
+ *
+ * Copyright (c) 2001-2003 The Trustees of Indiana University.  
+ *                         All rights reserved.
+ * Copyright (c) 1998-2001 University of Notre Dame. 
+ *                         All rights reserved.
+ * Copyright (c) 1994-1998 The Ohio State University.  
+ *                         All rights reserved.
+ * 
+ * This file is part of the XMPI software package.  For license
+ * information, see the LICENSE file in the top level directory of the
+ * XMPI source distribution.
+ *
+ * Function: - OS, CPU and compiler dependent configuration 
+ */
+
+#ifndef XMPI_CONFIG_H
+#define XMPI_CONFIG_H
+])
+
+AH_BOTTOM([#endif /* XMPI_CONFIG_H */])
+
+AC_DEFINE_UNQUOTED(XMPI_VERSION, "$XMPI_VERSION", [Version of XMPI])
+
+# Get our host type...
+AC_CANONICAL_HOST
+AC_DEFINE_UNQUOTED(XMPI_ARCH, "$host", [Architecture])
+
+AC_PREFIX_DEFAULT(/usr/local)
+
+# check for specification of C++ compiler
+# overrules default mpiCC with lam
+
+CXX=mpic++
+CC=mpicc
+
+AC_ARG_WITH(cc,       
+    AS_HELP_STRING([--with-cc=cc],[use C compiler cc]))
+AC_ARG_WITH(cflags,
+    AS_HELP_STRING([--with-cflags=CFLAGS],[use C compiler flags CFLAGS]))
+AC_ARG_WITH(cxx,
+    AS_HELP_STRING([--with-cxx=CC],[use C++ compiler CC]))
+AC_ARG_WITH(cxxflags,
+    AS_HELP_STRING([--with-cxxflags=CXXFLAGS],[use C++ compiler flags CXXFLAGS]))
+
+if test -n "$with_cxx"; then
+    if test $with_cxx = yes; then
+	AC_MSG_ERROR(the --with-cxx option requires the compiler name)
+    fi
+
+    AC_MSG_WARN(*** You are not using the mpic++ compiler recommended)
+    AC_MSG_WARN(*** for building the LAM libxmpi. Be sure to set)
+    AC_MSG_WARN(*** the approprate include paths to the needed files)
+
+    CXX="$with_cxx"
+fi
+
+if test -n "$with_cxxflags"; then
+    if test $with_cxxflags = yes; then
+	AC_MSG_ERROR(the --with-cxxflags option requires some option)
+    fi
+
+    CXXFLAGS="$with_cxxflags"
+fi
+
+if test -n "$with_cc"; then
+    if test $with_cc = yes; then
+	AC_MSG_ERROR(the --with-cc option requires the compiler name)
+    fi
+
+    AC_MSG_WARN(*** You are not using the mpicc compiler recommended)
+    AC_MSG_WARN(*** for building the LAM libxmpi. Be sure to set)
+    AC_MSG_WARN(*** the approprate include paths to the needed files)
+
+    CC="$with_cc"
+fi
+
+if test -n "$with_cflags"; then
+    if test $with_cflags = yes; then
+	AC_MSG_ERROR(the --with-cflags option requires some option)
+    fi
+
+    CFLAGS="$with_cflags"
+fi
+
+#
+# In theory, we have a working compiler set now.  
+# Tell everyone C++ is our primary language and get our 
+#  copmilers.  We need C++ 'cuz that's what our code is in
+#  and C 'cuz that is what libtool wants...
+#
+AC_LANG([C])
+AC_PROG_CXX
+AC_PROG_CC
+
+if test -z "$CXXFLAGS"; then
+    lam_cxxflags_save="$CXXFLAGS"
+    if test "$GCC" = yes; then
+	CXXFLAGS=-O
+    else
+	case "$host_os" in
+	    solaris) CXXFLAGS=-fast;;
+	    *) CXXFLAGS=-O;;
+	esac
+    fi
+fi
+
+# BWB: There was a time when XMPI worked with MPI implementations
+# other than LAM.  This is no longer the case.  Since most of the code
+# to make that work (build wise) bit-rotted into uselessness long ago,
+# it has been removed.  It is believed (although not tested) that to
+# make it work again, all you have to do is set LIBXMPI to the vendor
+# name and set LDFLAGS to the right place so that it can find -lxmpi
+#
+# The AM_CONDITIONAL is so that we can decide whether to buld the
+# included libxmpi that works with LAM.  So don't set LIBXMPI to
+# lib-lam unless you want to buld the LAM libxmpi
+
+LIBXMPI=lib-lam
+AM_CONDITIONAL(WANT_LAM_XMPI,test "$LIBXMPI"="lib-lam")
+AC_SUBST(LIBXMPI)
+
+# Take care of some specific compiler options. 
+# Force use of ANSI C under HP-UX.
+
+if test "$ac_cv_c_compiler_gnu" = no; then
+    us=`(uname -s) 2>/dev/null` || us=unknown
+    case "$us" in
+        HP-UX) CXXFLAGS="$CXXFLAGS -Ae" ;;
+	*)	;;
+    esac
+fi
+
+AC_SUBST(CXXFLAGS)
+
+#
+# Check for X11 and Motif libraries..
+#
+
+AC_LANG_SAVE
+AC_LANG([C])
+AC_PATH_XTRA
+
+if test "$no_x" = yes; then
+    AC_MSG_ERROR([Could not find X includes or libs.  Cannot continue.])
+fi
+
+LSC_FIND_MOTIF
+if test "$motif_libraries_result" = "(none)" -o \
+    "$motif_includes_result" = "(none)"; then
+    AC_MSG_ERROR([Could not find Motif includes or libs.  Cannot continue.])
+fi
+
+X_CXXFLAGS="$X_CFLAGS"
+
+AC_SUBST(X_CXXFLAGS)
+AC_SUBST(X_LIBS)
+
+AC_LANG_RESTORE
+
+#
+# Make sure that we have the LAM header files.
+# Only do this if compiling for use with LAM
+#
+
+LSC_MPI_CHECK_TRILLIUM
+
+#
+# Some constants changed in the LAM header files
+# Run this test to figure out which ones we should use
+#
+
+#LAM_CHECK_CONSTANTS
+
+# Check for programs.
+# Abort if we cannot find one of them
+
+AC_PROG_CXXCPP
+if test "$CXXCPP" = ""; then
+    AC_MSG_ERROR([Could not find C preprocessor.  Cannot continue.])
+fi
+
+AC_PATH_PROG(RM,rm)
+if test "$RM" = ""; then
+    AC_MSG_ERROR([Could not find rm.  Cannot continue.])
+fi
+
+AC_PATH_PROG(SHELL_CMD, sh)
+if test "$SHELL_CMD" = ""; then
+    AC_MSG_ERROR([Could not find Bourne shell.  Cannot continue.])
+fi
+
+# Used to Check for typedefs, structures, and compiler characteristics.
+
+AC_C_BIGENDIAN
+
+# Check for library functions.
+
+AC_CHECK_FUNCS(atexit getcwd)
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>]], [[fd_set s; FD_ZERO(&s);]])],[lam_cv_need_sys_select_h=no],[lam_cv_need_sys_select_h=yes])]
+if test $lam_cv_need_sys_select_h = yes; then
+    value=1
+else
+    value=0
+fi
+AC_DEFINE_UNQUOTED(NEED_SYS_SELECT, $value,
+    [Whether we need <sys/select.h> or not])
+
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(float, 4)
+AC_CHECK_SIZEOF(double, 4)
+
+# Checks for header files
+
+# m4_warn([obsolete],
+# [The preprocessor macro 'STDC_HEADERS' is obsolete.
+#   Except in unusual embedded environments, you can safely include all
+#   C89 headers unconditionally.])dnl
+# # Autoupdate added the next two lines to ensure that your configure
+# # script's behavior did not change.  They are probably safe to remove.
+# AC_CHECK_INCLUDES_DEFAULT
+# AC_PROG_EGREP
+
+LSC_MPI_CHECK_MPI_H
+
+#
+# Find the template repository for our C++ compiler. 
+# This is used for make clean
+#
+
+LSC_CXX_FIND_TEMPLATE_REPOSITORY(XMPI)
+
+#
+# Make automake clean emacs ~ files for "make clean"
+#
+
+CLEANFILES="-r *~ $XMPI_CXX_TEMPLATE_REPOSITORY"
+AC_SUBST(CLEANFILES)
+
+#
+# ARGH! Some Sun Solaris Workshop 5.0 compilers appear to have a
+# broken version of getline.  I hate Sun.  I hate Sun.  I hate Sun.
+# But they do make bcheck...
+#
+
+LSC_CXX_HAVE_BROKEN_GETLINE(XMPI)
+
+#
+# Libtool magic
+# Disable the shared build default (users can override this, though)
+#
+
+AC_DISABLE_SHARED([])
+LT_INIT
+
+#
+# All done.  Party on.
+#
+
+AC_CONFIG_HEADERS([src/xmpi/xmpi_config.h])
+AC_CONFIG_FILES([
+    Makefile
+    app-defaults/Makefile
+    config/Makefile
+    man/Makefile
+    man/man1/Makefile
+    src/Makefile
+    src/Bitmaps/Makefile
+    src/Pixmaps/Makefile
+    src/libxmpi/Makefile
+    src/xmpi/Makefile
+])
+AC_OUTPUT
+    
