summaryrefslogtreecommitdiff
blob: 214285293910a97aa543a24feb16c0769517e6e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
--- a/configure
+++ b/configure
@@ -15253,7 +15253,7 @@ else
 fi
 
 
-if test "${cxxstd}" == 17 ; then
+if test "${cxxstd}" = 17 ; then
       ax_cxx_compile_alternatives="17 1z"    ax_cxx_compile_cxx17_required=true
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -16966,7 +16966,7 @@ $as_echo "$as_me: WARNING: C++17 is not
 
 	CXXFLAGS="$CXXFLAGS -std=c++17"
 else
-  if test "${cxxstd}" == 14 ; then
+  if test "${cxxstd}" = 14 ; then
         ax_cxx_compile_alternatives="14 1y"    ax_cxx_compile_cxx14_required=true
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -17874,7 +17874,7 @@ $as_echo "#define HAVE_CXX14 1" >>confde
 
   	CXXFLAGS="$CXXFLAGS -std=c++14"
   else
-    if test "${cxxstd}" == 11 ; then
+    if test "${cxxstd}" = 11 ; then
         ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -18542,7 +18542,7 @@ $as_echo "#define HAVE_CXX11 1" >>confde
 
       CXXFLAGS="$CXXFLAGS -std=c++11"
     else
-      if test "${cxxstd}" == 03 ; then
+      if test "${cxxstd}" = 03 ; then
         $as_echo "#define ILMBASE_FORCE_CXX03 1" >>confdefs.h
 
         CXXFLAGS="$CXXFLAGS -std=c++03"
@@ -21827,11 +21827,11 @@ $as_echo "#define HAVE_CXX17 1" >>confde
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++17 is not yet standardized, so the checks may change in incompatible ways anytime" >&5
 $as_echo "$as_me: WARNING: C++17 is not yet standardized, so the checks may change in incompatible ways anytime" >&2;}
 
-        if test "$HAVE_CXX14" == 1 ; then
+        if test "$HAVE_CXX14" = 1 ; then
   	      CXXFLAGS="$CXXFLAGS -std=c++14"
           cxxstd = 14
         else
-          if test "$HAVE_CXX11" == 1 ; then
+          if test "$HAVE_CXX11" = 1 ; then
   	        CXXFLAGS="$CXXFLAGS -std=c++11"
             cxxstd = 11
           fi
@@ -22768,7 +22768,7 @@ LIB_SUFFIX=""
 lib_suffix_valid="no"
 
 lib_namespace=""
-if test "x${library_namespace_versioning}" == xyes ; then
+if test "x${library_namespace_versioning}" = xyes ; then
     cat >>confdefs.h <<_ACEOF
 #define IMATH_INTERNAL_NAMESPACE Imath_${ILMBASE_VERSION_API}
 _ACEOF
@@ -22787,7 +22787,7 @@ _ACEOF
     lib_namespace="${ILMBASE_VERSION_API}"
     LIB_SUFFIX="${ILMBASE_VERSION_API}"
     lib_suffix_valid="yes"
-elif test "x${library_namespace_versioning}" == xno ; then
+elif test "x${library_namespace_versioning}" = xno ; then
     cat >>confdefs.h <<_ACEOF
 #define IMATH_INTERNAL_NAMESPACE Imath
 _ACEOF
@@ -22823,7 +22823,7 @@ _ACEOF
 fi
 
 
-if test "x${lib_suffix_valid}" == xyes ; then
+if test "x${lib_suffix_valid}" = xyes ; then
 LIB_SUFFIX_DASH="-${LIB_SUFFIX}"
 
  if true; then
@@ -22858,7 +22858,7 @@ else
 fi
 
 
-if test "x${custom_public_namespace}" == xyes ; then
+if test "x${custom_public_namespace}" = xyes ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling 'custom user namespace' requires an additional argument, reverting to default" >&5
 $as_echo "$as_me: WARNING: Enabling 'custom user namespace' requires an additional argument, reverting to default" >&2;}
     $as_echo "#define IMATH_NAMESPACE Imath" >>confdefs.h
@@ -22870,7 +22870,7 @@ $as_echo "$as_me: WARNING: Enabling 'cus
 
     public_namespace=""
     custom_public_namespace=no
-elif test "x${custom_public_namespace}" == xno ; then
+elif test "x${custom_public_namespace}" = xno ; then
     $as_echo "#define IMATH_NAMESPACE Imath" >>confdefs.h
 
     $as_echo "#define IEX_NAMESPACE Iex" >>confdefs.h
@@ -22912,12 +22912,11 @@ fi
 
 
   if test "${osx_arch}" != default ; then
-          osx_arch_flags="-arch ${osx_arch// / -arch }"
+     osx_arch_flags=$(printf ' -arch %s' ${osx_arch})
      CXXFLAGS="$CXXFLAGS $osx_arch_flags"
 
           if test "$enable_dependency_tracking" != no ; then
-        osx_arch_array=( ${osx_arch} )
-        if test ${#osx_arch_array[@]} -gt 1 ; then
+	if echo "$osx_arch" | grep >/dev/null " " ; then
           as_fn_error $? "building multiple OS X architectures requires --disable-dependency-tracking.
 Please re-run configure with these options:
   --enable-osx-arch=\"${osx_arch}\" --disable-dependency-tracking
--- a/configure.ac
+++ b/configure.ac
@@ -45,19 +45,19 @@ AC_ARG_ENABLE(cxxstd,
                              [enable ISO c++ standard 11/14 [[default=auto]]]),
               [cxxstd="${enableval}"], [cxxstd=14])
 
-if test "${cxxstd}" == 17 ; then
+if test "${cxxstd}" = 17 ; then
     AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
 	CXXFLAGS="$CXXFLAGS -std=c++17"
 else
-  if test "${cxxstd}" == 14 ; then
+  if test "${cxxstd}" = 14 ; then
       AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
   	CXXFLAGS="$CXXFLAGS -std=c++14"
   else
-    if test "${cxxstd}" == 11 ; then
+    if test "${cxxstd}" = 11 ; then
       AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
       CXXFLAGS="$CXXFLAGS -std=c++11"
     else
-      if test "${cxxstd}" == 03 ; then
+      if test "${cxxstd}" = 03 ; then
         AC_DEFINE(ILMBASE_FORCE_CXX03)
         CXXFLAGS="$CXXFLAGS -std=c++03"
       else
@@ -65,11 +65,11 @@ else
         AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
         AX_CXX_COMPILE_STDCXX([14], [noext], [optional])
         AX_CXX_COMPILE_STDCXX([17], [noext], [optional])
-        if test "$HAVE_CXX14" == 1 ; then
+        if test "$HAVE_CXX14" = 1 ; then
   	      CXXFLAGS="$CXXFLAGS -std=c++14"
           cxxstd = 14
         else
-          if test "$HAVE_CXX11" == 1 ; then
+          if test "$HAVE_CXX11" = 1 ; then
   	        CXXFLAGS="$CXXFLAGS -std=c++11"
             cxxstd = 11
           fi
@@ -212,7 +212,7 @@ lib_suffix_valid="no"
 dnl Internal library namespace
 dnl 
 lib_namespace=""
-if test "x${library_namespace_versioning}" == xyes ; then
+if test "x${library_namespace_versioning}" = xyes ; then
     AC_DEFINE_UNQUOTED(IMATH_INTERNAL_NAMESPACE,     Imath_${ILMBASE_VERSION_API})
     AC_DEFINE_UNQUOTED(IEX_INTERNAL_NAMESPACE,       Iex_${ILMBASE_VERSION_API})
     AC_DEFINE_UNQUOTED(ILMTHREAD_INTERNAL_NAMESPACE, IlmThread_${ILMBASE_VERSION_API})
@@ -221,7 +221,7 @@ if test "x${library_namespace_versioning
     lib_namespace="${ILMBASE_VERSION_API}"
     LIB_SUFFIX="${ILMBASE_VERSION_API}"
     lib_suffix_valid="yes"
-elif test "x${library_namespace_versioning}" == xno ; then
+elif test "x${library_namespace_versioning}" = xno ; then
     AC_DEFINE_UNQUOTED(IMATH_INTERNAL_NAMESPACE,     Imath)
     AC_DEFINE_UNQUOTED(IEX_INTERNAL_NAMESPACE,       Iex)
     AC_DEFINE_UNQUOTED(ILMTHREAD_INTERNAL_NAMESPACE, IlmThread)
@@ -238,7 +238,7 @@ else
 fi
 AC_SUBST(LIB_SUFFIX)
 
-if test "x${lib_suffix_valid}" == xyes ; then
+if test "x${lib_suffix_valid}" = xyes ; then
 AC_SUBST(LIB_SUFFIX_DASH,"-${LIB_SUFFIX}")
 AM_CONDITIONAL(LIB_SUFFIX_EXISTS,true)
 else
@@ -257,7 +257,7 @@ AC_ARG_ENABLE(customusernamespace,
         [custom_public_namespace="${enableval}"], 
         [custom_public_namespace=no])
 
-if test "x${custom_public_namespace}" == xyes ; then
+if test "x${custom_public_namespace}" = xyes ; then
     AC_MSG_WARN([Enabling 'custom user namespace' requires an additional argument, reverting to default])
     AC_DEFINE(IMATH_NAMESPACE,     Imath)
     AC_DEFINE(IEX_NAMESPACE,       Iex)
@@ -265,7 +265,7 @@ if test "x${custom_public_namespace}" ==
 
     public_namespace=""
     custom_public_namespace=no
-elif test "x${custom_public_namespace}" == xno ; then
+elif test "x${custom_public_namespace}" = xno ; then
     AC_DEFINE(IMATH_NAMESPACE,     Imath)
     AC_DEFINE(IEX_NAMESPACE,       Iex)
     AC_DEFINE(ILMTHREAD_NAMESPACE, IlmThread)
@@ -296,14 +296,12 @@ case "$host" in
 	      [osx_arch="${enableval}"], [osx_arch=default])
 
   if test "${osx_arch}" != default ; then
-     dnl Replace "a b c" with "-arch a -arch b -arch c". Should probably use an all-whitespace regexp rather than a single character for the search string.
-     osx_arch_flags="-arch ${osx_arch// / -arch }"
+     osx_arch_flags=$(printf ' -arch %s' ${osx_arch})
      CXXFLAGS="$CXXFLAGS $osx_arch_flags"
 
      dnl If multiple archs specified, make sure that --disable-dependency-tracking was also specified
      if test "$enable_dependency_tracking" != no ; then
-        osx_arch_array=( ${osx_arch} )
-        if test ${#osx_arch_array[@]} -gt 1 ; then
+	if echo "$osx_arch" | grep >/dev/null " " ; then
           AC_MSG_ERROR([building multiple OS X architectures requires --disable-dependency-tracking.
 Please re-run configure with these options:
   --enable-osx-arch="${osx_arch}" --disable-dependency-tracking