@@ -66,11 +66,6 @@ OAC_PUSH_PREFIX([OPAL])
6666
6767OPAL_CAPTURE_CONFIGURE_CLI([OPAL_CONFIGURE_CLI])
6868
69- #
70- # Init automake
71- #
72- AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 tar-pax])
73-
7469# Get our platform support file. This has to be done very, very early
7570# because it twiddles random bits of autoconf
7671OPAL_LOAD_PLATFORM
@@ -85,6 +80,23 @@ OPAL_MAKEDIST_DISABLE=""
8580. $srcdir /VERSION
8681OPAL_CONFIGURE_SETUP
8782opal_show_title " Configuring project_name_long"
83+
84+ opal_show_subtitle " Startup tests"
85+
86+ # These have to be invoked before AM INIT_AUTOMAKE
87+ AC_CANONICAL_HOST
88+ AC_CANONICAL_TARGET
89+ AC_DEFINE_UNQUOTED(OPAL_ARCH, " $target " , [OMPI architecture string])
90+ AS_IF([test " $host " != " $target " ],
91+ [AC_MSG_WARN([Cross-compile detected])
92+ AC_MSG_WARN([Cross-compiling is only partially supported])
93+ AC_MSG_WARN([Proceed at your own risk! ])])
94+
95+ #
96+ # Init automake
97+ #
98+ AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 tar-pax])
99+
88100opal_show_subtitle " Prerequisites"
89101
90102OMPI_TOP_BUILDDIR=" ` pwd` "
@@ -105,20 +117,6 @@ AS_IF([test "X$PERL" = "Xno"],
105117AM_PATH_PYTHON([$python_min_version ], [],
106118 [AC_MSG_ERROR([Open MPI requires Python >= v$python_min_version to build. Aborting.])])
107119
108- #
109- # Setup some things that must be done before AM-INIT-AUTOMAKE
110- #
111-
112- opal_show_subtitle " Startup tests"
113- AC_CANONICAL_HOST
114- AC_CANONICAL_TARGET
115- AC_DEFINE_UNQUOTED(OPAL_ARCH, " $target " , [OMPI architecture string])
116- AS_IF([test " $host " != " $target " ],
117- [AC_MSG_WARN([Cross-compile detected])
118- AC_MSG_WARN([Cross-compiling is only partially supported])
119- AC_MSG_WARN([Proceed at your own risk! ])])
120-
121-
122120# SILENT_RULES is new in AM 1.11, but we require 1.11 or higher via
123121# autogen. Limited testing shows that calling SILENT_RULES directly
124122# works in more cases than adding "silent-rules" to INIT_AUTOMAKE
@@ -128,25 +126,6 @@ AM_SILENT_RULES([yes])
128126# Make configure depend on the VERSION file, since it's used in AC_INIT
129127AC_SUBST([CONFIGURE_DEPENDENCIES], [' $(top_srcdir)/VERSION' ])
130128
131- # Sanity checks
132- AC_DEFUN([OMPI_CHECK_DIR_FOR_SPACES],[
133- dir= " $1 "
134- article= " $2 "
135- label= " $3 "
136-
137- AC_MSG_CHECKING([directory of $label ])
138- AC_MSG_RESULT([$dir ])
139- AS_IF([test -n " ` echo $dir | grep ' ' ` " ],
140- [AC_MSG_WARN([This version of Open MPI does not support $article $label ])
141- AC_MSG_WARN([with a path that contains spaces])
142- AC_MSG_ERROR([Cannot continue.])])
143- ])
144-
145- ompi_dir=` pwd`
146- OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir ], [a], [build tree])
147- OMPI_CHECK_DIR_FOR_SPACES([$srcdir ], [a], [source tree])
148- OMPI_CHECK_DIR_FOR_SPACES([$prefix ], [a], [prefix])
149-
150129opal_show_subtitle " Checking versions"
151130
152131# Get the version of OMPI that we are installing
@@ -224,6 +203,25 @@ if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
224203 AC_MSG_NOTICE([Detected VPATH build])
225204fi
226205
206+ # Sanity checks
207+ AC_DEFUN([OMPI_CHECK_DIR_FOR_SPACES],[
208+ dir= " $1 "
209+ article= " $2 "
210+ label= " $3 "
211+
212+ AC_MSG_CHECKING([directory of $label ])
213+ AC_MSG_RESULT([$dir ])
214+ AS_IF([test -n " ` echo $dir | grep ' ' ` " ],
215+ [AC_MSG_WARN([This version of Open MPI does not support $article $label ])
216+ AC_MSG_WARN([with a path that contains spaces])
217+ AC_MSG_ERROR([Cannot continue.])])
218+ ])
219+
220+ ompi_dir=` pwd`
221+ OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir ], [a], [build tree])
222+ OMPI_CHECK_DIR_FOR_SPACES([$srcdir ], [a], [source tree])
223+ OMPI_CHECK_DIR_FOR_SPACES([$prefix ], [a], [prefix])
224+
227225# Check for deprecated/deleted options
228226OMPI_CHECK_DELETED_OPTIONS
229227
0 commit comments