|
23 | 23 | # OPAL_LOAD_PLATFORM() |
24 | 24 | # -------------------- |
25 | 25 | AC_DEFUN([OPAL_LOAD_PLATFORM], [ |
| 26 | + AC_ARG_WITH([platform-patches-dir], |
| 27 | + [AC_HELP_STRING([--with-platform-patches-dir=DIR], |
| 28 | + [Location of the platform patches directory. If you use this option, you must also use --with-platform.])]) |
| 29 | + |
26 | 30 | AC_ARG_WITH([platform], |
27 | 31 | [AC_HELP_STRING([--with-platform=FILE], |
28 | 32 | [Load options for build from FILE. Options on the |
@@ -98,6 +102,19 @@ AC_DEFUN([OPAL_LOAD_PLATFORM], [ |
98 | 102 | fi |
99 | 103 |
|
100 | 104 | patch_dir="${with_platform}.patches" |
| 105 | + if test -n "$with_platform_patches_dir"; then |
| 106 | + if test "$with_platform_patches_dir" = "yes"; then |
| 107 | + patch_dir="${with_platform}.patches" |
| 108 | + elif test "$with_platform_patches_dir" = "no"; then |
| 109 | + AC_MSG_NOTICE([Disabling platform patches on user request]) |
| 110 | + patch_dir="" |
| 111 | + elif test -d "$with_platform_patches_dir"; then |
| 112 | + patch_dir=$with_platform_patches_dir |
| 113 | + else |
| 114 | + AC_MSG_ERROR([User provided patches directory: $with_platform_patches_dir not found]) |
| 115 | + fi |
| 116 | + fi |
| 117 | + |
101 | 118 | patch_done="${srcdir}/.platform_patches" |
102 | 119 | patch_found=no |
103 | 120 |
|
@@ -155,15 +172,16 @@ AC_DEFUN([OPAL_LOAD_PLATFORM], [ |
155 | 172 |
|
156 | 173 | AC_MSG_NOTICE([Platform patches applied, created stamp file ${patch_done}]) |
157 | 174 | touch ${patch_done} |
| 175 | + else |
| 176 | + AC_MSG_NOTICE([No platform patches in ${patch_dir}]) |
158 | 177 | fi |
159 | 178 |
|
160 | 179 | else |
161 | 180 | AC_MSG_WARN([Platform patches already applied, skipping. ${patch_done} can be removed to re-apply ]) |
162 | 181 | fi |
163 | | - else |
164 | | - AC_MSG_NOTICE([No platform patches in ${patch_dir}]) |
| 182 | + elif test -n "${patch_dir}"; then |
| 183 | + AC_MSG_NOTICE([No platform patches in ${patch_dir}]) |
165 | 184 | fi |
166 | | - |
167 | 185 | else |
168 | 186 | AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [openmpi-mca-params.conf]) |
169 | 187 | fi |
|
0 commit comments