dos2unix configure
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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
diff --git a/configure b/configure
index 96f9ee0..7d44f17 100755
--- a/configure
+++ b/configure
@@ -1,166 +1,166 @@
-#!/bin/sh
-# dlfcn-win32 configure script
-#
-# Parts copied from FFmpeg's configure
-#
-
-set_all(){
- value=$1
- shift
- for var in $*; do
- eval $var=$value
- done
-}
-
-enable(){
- set_all yes $*
-}
-
-disable(){
- set_all no $*
-}
-
-enabled(){
- eval test "x\$$1" = "xyes"
-}
-
-disabled(){
- eval test "x\$$1" = "xno"
-}
-
-show_help(){
- echo "Usage: configure [options]"
- echo "Options: [defaults in brackets after descriptions]"
- echo "All \"enable\" options have \"disable\" counterparts"
- echo
- echo " --help print this message"
- echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
- echo " --libdir=DIR install libs in DIR [$PREFIX/lib]"
- echo " --incdir=DIR install includes in DIR [$PREFIX/include]"
- echo " --enable-shared build shared libraries [no]"
- echo " --enable-static build static libraries [yes]"
- echo " --enable-msvc create msvc-compatible import lib [auto]"
- echo " --enable-strip strip shared library [yes]"
- echo
- echo " --cc=CC use C compiler CC [$cc]"
- echo " --make=MAKE use specified make [$make]"
- exit 1
-}
-
-die_unknown(){
- echo "Unknown option \"$1\"."
- echo "See $0 --help for available options."
- exit 1
-}
-
-PREFIX="/mingw"
-libdir="${PREFIX}/lib"
-incdir="${PREFIX}/include"
-cc="gcc"
-
-DEFAULT="msvc
-"
-
-DEFAULT_NO="shared
-"
-
-DEFAULT_YES="static
- strip
-"
-
-CMDLINE_SELECT="$DEFAULT
- $DEFAULT_NO
- $DEFAULT_YES
-"
-
-enable $DEFAULT_YES
-disable $DEFAULT_NO
-
-for opt do
- optval="${opt#*=}"
- case "$opt" in
- --help)
- show_help
- ;;
- --prefix=*)
- PREFIX="$optval"
- ;;
- --libdir=*)
- libdir="$optval"
- ;;
- --incdir=*)
- incdir="$optval"
- ;;
- --cc=*)
- cc="$optval"
- ;;
- --make=*)
- make="$optval"
- ;;
- --enable-?*|--disable-?*)
- eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
- echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt
- $action $option
- ;;
- *)
- die_unknown $opt
- ;;
- esac
-done
-
-disabled shared && disabled static && {
- echo "At least one library type must be set.";
- exit 1;
-}
-
-# simple cc test
-cat > /tmp/test.c << EOF
-#include <windows.h>
-void function(void)
-{ LoadLibrary(NULL); }
-EOF
-$cc -shared -o /tmp/test.dll /tmp/test.c
-
-test "$?" = !0 && {
- echo "$cc could not create shared file with Windows API functions.";
- echo "Make sure your MinGW system is working properly.";
- exit 1;
-}
-
-if enabled msvc; then
- disabled shared && {
- echo "MSVC understands static libraries created by gcc."
- echo "There's no need to create an import lib."
- exit 1
- }
- lib /? >& /dev/null || {
- echo "MSVC's lib command not found."
- echo "Make sure MSVC is installed and its bin folder is in your \$PATH."
- exit 1
- }
-fi
-
-if enabled shared; then
- lib /? >& /dev/null && enable msvc || disable msvc
-fi
-
-echo "# Automatically generated by configure" > config.mak
-echo "PREFIX=$PREFIX" >> config.mak
-echo "libdir=$libdir" >> config.mak
-echo "incdir=$incdir" >> config.mak
-echo "CC=$cc" >> config.mak
-echo "BUILD_SHARED=$shared" >> config.mak
-echo "BUILD_STATIC=$static" >> config.mak
-echo "BUILD_MSVC=$msvc" >> config.mak
-echo "DO_STRIP=$strip" >> config.mak
-
-echo "prefix: $PREFIX"
-echo "libdir: $libdir"
-echo "incdir: $incdir"
-echo "cc: $cc"
-echo "static: $static"
-echo "shared: $shared"
-enabled shared && {
- echo "msvc: $msvc";
- echo "strip: $strip";
-}
+#!/bin/sh
+# dlfcn-win32 configure script
+#
+# Parts copied from FFmpeg's configure
+#
+
+set_all(){
+ value=$1
+ shift
+ for var in $*; do
+ eval $var=$value
+ done
+}
+
+enable(){
+ set_all yes $*
+}
+
+disable(){
+ set_all no $*
+}
+
+enabled(){
+ eval test "x\$$1" = "xyes"
+}
+
+disabled(){
+ eval test "x\$$1" = "xno"
+}
+
+show_help(){
+ echo "Usage: configure [options]"
+ echo "Options: [defaults in brackets after descriptions]"
+ echo "All \"enable\" options have \"disable\" counterparts"
+ echo
+ echo " --help print this message"
+ echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
+ echo " --libdir=DIR install libs in DIR [$PREFIX/lib]"
+ echo " --incdir=DIR install includes in DIR [$PREFIX/include]"
+ echo " --enable-shared build shared libraries [no]"
+ echo " --enable-static build static libraries [yes]"
+ echo " --enable-msvc create msvc-compatible import lib [auto]"
+ echo " --enable-strip strip shared library [yes]"
+ echo
+ echo " --cc=CC use C compiler CC [$cc]"
+ echo " --make=MAKE use specified make [$make]"
+ exit 1
+}
+
+die_unknown(){
+ echo "Unknown option \"$1\"."
+ echo "See $0 --help for available options."
+ exit 1
+}
+
+PREFIX="/mingw"
+libdir="${PREFIX}/lib"
+incdir="${PREFIX}/include"
+cc="gcc"
+
+DEFAULT="msvc
+"
+
+DEFAULT_NO="shared
+"
+
+DEFAULT_YES="static
+ strip
+"
+
+CMDLINE_SELECT="$DEFAULT
+ $DEFAULT_NO
+ $DEFAULT_YES
+"
+
+enable $DEFAULT_YES
+disable $DEFAULT_NO
+
+for opt do
+ optval="${opt#*=}"
+ case "$opt" in
+ --help)
+ show_help
+ ;;
+ --prefix=*)
+ PREFIX="$optval"
+ ;;
+ --libdir=*)
+ libdir="$optval"
+ ;;
+ --incdir=*)
+ incdir="$optval"
+ ;;
+ --cc=*)
+ cc="$optval"
+ ;;
+ --make=*)
+ make="$optval"
+ ;;
+ --enable-?*|--disable-?*)
+ eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
+ echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt
+ $action $option
+ ;;
+ *)
+ die_unknown $opt
+ ;;
+ esac
+done
+
+disabled shared && disabled static && {
+ echo "At least one library type must be set.";
+ exit 1;
+}
+
+# simple cc test
+cat > /tmp/test.c << EOF
+#include <windows.h>
+void function(void)
+{ LoadLibrary(NULL); }
+EOF
+$cc -shared -o /tmp/test.dll /tmp/test.c
+
+test "$?" = !0 && {
+ echo "$cc could not create shared file with Windows API functions.";
+ echo "Make sure your MinGW system is working properly.";
+ exit 1;
+}
+
+if enabled msvc; then
+ disabled shared && {
+ echo "MSVC understands static libraries created by gcc."
+ echo "There's no need to create an import lib."
+ exit 1
+ }
+ lib /? >& /dev/null || {
+ echo "MSVC's lib command not found."
+ echo "Make sure MSVC is installed and its bin folder is in your \$PATH."
+ exit 1
+ }
+fi
+
+if enabled shared; then
+ lib /? >& /dev/null && enable msvc || disable msvc
+fi
+
+echo "# Automatically generated by configure" > config.mak
+echo "PREFIX=$PREFIX" >> config.mak
+echo "libdir=$libdir" >> config.mak
+echo "incdir=$incdir" >> config.mak
+echo "CC=$cc" >> config.mak
+echo "BUILD_SHARED=$shared" >> config.mak
+echo "BUILD_STATIC=$static" >> config.mak
+echo "BUILD_MSVC=$msvc" >> config.mak
+echo "DO_STRIP=$strip" >> config.mak
+
+echo "prefix: $PREFIX"
+echo "libdir: $libdir"
+echo "incdir: $incdir"
+echo "cc: $cc"
+echo "static: $static"
+echo "shared: $shared"
+enabled shared && {
+ echo "msvc: $msvc";
+ echo "strip: $strip";
+}