title: MinGW: error: unrecognized command line option '-V'
body: <p>I'm trying to compile modsecurity using minGW. It may be this is in fact not possible, since it appears the directions specify to use MSVC. However, I was hoping someone could either tell me how to do it, or explain why it won't work.</p>
  
  <p>My full config.log can be found at <a href="http://pastebin.com/WsprFZqK" rel="nofollow">http://pastebin.com/WsprFZqK</a>, but for the sake of posterity I've attempted to trim it to something that would fit here.</p>
  
  <pre><code>        This file contains any messages produced by compilers while
  running configure, to aid debugging if configure makes a mistake.
  
  It was created by modsecurity configure 2.7, which was
  generated by GNU Autoconf 2.68.  Invocation command line was
  
    $ ./configure --enable-standalone-module --enable-java-module
  
  ## --------- ##
  ## Platform. ##
  ## --------- ##
  
  hostname = Phoenix
  uname -m = i686
  uname -r = 1.0.18(0.48/3/2)
  uname -s = MINGW32_NT-6.2
  uname -v = 2012-11-21 22:34
  
  /usr/bin/uname -p = unknown
  /bin/uname -X     = unknown
  
  /bin/arch              = unknown
  /usr/bin/arch -k       = unknown
  /usr/convex/getsysinfo = unknown
  /usr/bin/hostinfo      = unknown
  /bin/machine           = unknown
  /usr/bin/oslevel       = unknown
  /bin/universe          = unknown
  
  PATH: .
  PATH: /usr/local/bin
  PATH: /mingw/bin
  PATH: /bin
  PATH: /c/WINDOWS/system32
  PATH: /c/WINDOWS
  PATH: /c/WINDOWS/System32/Wbem
  PATH: /c/WINDOWS/System32/WindowsPowerShell/v1.0/
  PATH: /c/Program Files/Calibre2/
  PATH: /c/Program Files/android-sdk/sdk/platform-tools
  PATH: /c/Program Files/android-sdk/sdk/tools
  PATH: /c/Program Files/android-sdk/dex2jar-0.0.9.13
  PATH: /c/Program Files/coreutils-5.3.0/bin
  PATH: /c/Program Files/Microsoft SQL Server/110/Tools/Binn/
  PATH: /c/Program Files/Microsoft/Web Platform Installer/
  PATH: /c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/
  PATH: /c/Program Files (x86)/Windows Live/Shared
  PATH: /c/Program Files (x86)/Common Files/Adobe/AGL
  PATH: /c/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x86
  PATH: /c/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x64
  PATH: /c/Program Files (x86)/QuickTime/QTSystem/
  PATH: /c/Program Files (x86)/SysInternals
  PATH: /c/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/
  PATH: /c/Program Files/Microsoft SQL Server/110/DTS/Binn/
  PATH: /c/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/ManagementStudio/
  PATH: /c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn/
  PATH: /c/Program Files (x86)/GNU/GnuPG/pub
  PATH: /c/Program Files/nodejs/
  PATH: /c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/
  PATH: /c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0/
  PATH: /c/Program Files (x86)/Git/cmd
  PATH: /c/Program Files (x86)/Git/bin
  PATH: /c/Program Files/OpenVPN/bin
  PATH: /c/Users/dlogan/AppData/Roaming/npm
  PATH: /c/Program Files/android-sdk/sdk/platform-tools
  PATH: /c/Program Files/android-sdk/sdk/tools
  PATH: /c/Program Files/NetBeans 7.4/extide/ant/bin
  PATH: /c/Program Files (x86)/Nmap
  
  
  ## ----------- ##
  ## Core tests. ##
  ## ----------- ##
  
  configure:2650: checking for a BSD-compatible install
  configure:2718: result: /bin/install -c
  configure:2729: checking whether build environment is sane
  configure:2779: result: yes
  configure:2920: checking for a thread-safe mkdir -p
  configure:2959: result: /bin/mkdir -p
  configure:2972: checking for gawk
  configure:2988: found /bin/gawk
  configure:2999: result: gawk
  configure:3010: checking whether make sets $(MAKE)
  configure:3032: result: yes
  configure:3145: checking build system type
  configure:3159: result: i686-pc-mingw32
  configure:3179: checking host system type
  configure:3192: result: i686-pc-mingw32
  configure:3233: checking how to print strings
  configure:3260: result: printf
  configure:3293: checking for style of include used by make
  configure:3321: result: GNU
  configure:3391: checking for gcc
  configure:3407: found /mingw/bin/gcc
  configure:3418: result: gcc
  configure:3647: checking for C compiler version
  configure:3656: gcc --version &gt;&amp;5
  gcc.exe (GCC) 4.8.1
  Copyright (C) 2013 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
  configure:3667: $? = 0
  configure:3656: gcc -v &gt;&amp;5
  Using built-in specs.
  COLLECT_GCC=c:\mingw\bin\gcc.exe
  COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
  Target: mingw32
  Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
  Thread model: win32
  gcc version 4.8.1 (GCC) 
  configure:3667: $? = 0
  configure:3656: gcc -V &gt;&amp;5
  gcc.exe: error: unrecognized command line option '-V'
  gcc.exe: fatal error: no input files
  compilation terminated.
  configure:3667: $? = 1
  configure:3656: gcc -qversion &gt;&amp;5
  gcc.exe: error: unrecognized command line option '-qversion'
  gcc.exe: fatal error: no input files
  compilation terminated.
  configure:3667: $? = 1
  configure:3687: checking whether the C compiler works
  configure:3709: gcc    conftest.c  &gt;&amp;5
  configure:3713: $? = 0
  configure:3761: result: yes
  configure:3764: checking for C compiler default output file name
  configure:3766: result: a.exe
  configure:3772: checking for suffix of executables
  configure:3779: gcc -o conftest.exe    conftest.c  &gt;&amp;5
  configure:3783: $? = 0
  configure:3805: result: .exe
  configure:3827: checking whether we are cross compiling
  configure:3835: gcc -o conftest.exe    conftest.c  &gt;&amp;5
  configure:3839: $? = 0
  configure:3846: ./conftest.exe
  configure:3850: $? = 0
  configure:3865: result: no
  configure:3870: checking for suffix of object files
  configure:3892: gcc -c   conftest.c &gt;&amp;5
  configure:3896: $? = 0
  configure:3917: result: o
  configure:3921: checking whether we are using the GNU C compiler
  configure:3940: gcc -c   conftest.c &gt;&amp;5
  configure:3940: $? = 0
  configure:3949: result: yes
  configure:3958: checking whether gcc accepts -g
  configure:3978: gcc -c -g  conftest.c &gt;&amp;5
  configure:3978: $? = 0
  configure:4019: result: yes
  configure:4036: checking for gcc option to accept ISO C89
  configure:4100: gcc  -c -g -O2  conftest.c &gt;&amp;5
  configure:4100: $? = 0
  configure:4113: result: none needed
  configure:4135: checking dependency style of gcc
  configure:4245: result: gcc3
  configure:4260: checking for a sed that does not truncate output
  configure:4324: result: /bin/sed
  configure:4342: checking for grep that handles long lines and -e
  configure:4400: result: /bin/grep
  configure:4405: checking for egrep
  configure:4467: result: /bin/grep -E
  configure:4472: checking for fgrep
  configure:4534: result: /bin/grep -F
  configure:4569: checking for ld used by gcc
  configure:4636: result: c:/mingw/mingw32/bin/ld.exe
  configure:4643: checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld
  configure:4658: result: yes
  configure:4670: checking for BSD- or MS-compatible name lister (nm)
  configure:4719: result: /mingw/bin/nm
  configure:4849: checking the name lister (/mingw/bin/nm) interface
  configure:4856: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:4859: /mingw/bin/nm "conftest.o"
  configure:4862: output
  00000000 b .bss
  00000000 d .data
  00000000 N .debug_abbrev
  00000000 N .debug_aranges
  00000000 N .debug_info
  00000000 N .debug_line
  00000000 r .rdata$zzz
  00000000 t .text
  00000000 B _some_variable
  configure:4869: result: BSD nm
  configure:4872: checking whether ln -s works
  configure:4879: result: no, using cp -p
  configure:4884: checking the maximum length of command line arguments
  configure:5009: result: 8192
  configure:5026: checking whether the shell understands some XSI constructs
  configure:5036: result: yes
  configure:5040: checking whether the shell understands "+="
  configure:5046: result: yes
  configure:5081: checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format
  configure:5121: result: func_convert_file_msys_to_w32
  configure:5128: checking how to convert i686-pc-mingw32 file names to toolchain format
  configure:5148: result: func_convert_file_msys_to_w32
  configure:5155: checking for c:/mingw/mingw32/bin/ld.exe option to reload object files
  configure:5162: result: -r
  configure:5236: checking for objdump
  configure:5252: found /mingw/bin/objdump
  configure:5263: result: objdump
  configure:5295: checking how to recognize dependent libraries
  configure:5497: result: file_magic ^x86 archive import|^x86 DLL
  configure:5582: checking for dlltool
  configure:5598: found /mingw/bin/dlltool
  configure:5609: result: dlltool
  configure:5642: checking how to associate runtime and link libraries
  configure:5669: result: func_cygming_dll_for_implib
  configure:5730: checking for ar
  configure:5746: found /mingw/bin/ar
  configure:5757: result: ar
  configure:5794: checking for archiver @FILE support
  configure:5811: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:5811: $? = 0
  configure:5814: ar cru libconftest.a @conftest.lst &gt;&amp;5
  configure:5817: $? = 0
  configure:5822: ar cru libconftest.a @conftest.lst &gt;&amp;5
  c:\mingw\bin\ar.exe: conftest.o: No such file or directory
  configure:5825: $? = 1
  configure:5837: result: @
  configure:5895: checking for strip
  configure:5911: found /mingw/bin/strip
  configure:5922: result: strip
  configure:5994: checking for ranlib
  configure:6010: found /mingw/bin/ranlib
  configure:6021: result: ranlib
  configure:6123: checking command to parse /mingw/bin/nm output from gcc object
  configure:6242: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:6245: $? = 0
  configure:6249: /mingw/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \&gt; conftest.nm
  configure:6252: $? = 0
  cannot find nm_test_var in conftest.nm
  configure:6242: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:6245: $? = 0
  configure:6249: /mingw/bin/nm conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' \&gt; conftest.nm
  configure:6252: $? = 0
  configure:6318: gcc -o conftest.exe -g -O2   conftest.c conftstm.o &gt;&amp;5
  configure:6321: $? = 0
  configure:6359: result: ok
  configure:6396: checking for sysroot
  configure:6426: result: no
  configure:6669: checking for mt
  configure:6699: result: no
  configure:6719: checking if : is a manifest tool
  configure:6725: : '-?'
  configure:6733: result: no
  configure:7365: checking how to run the C preprocessor
  configure:7396: gcc -E  conftest.c
  configure:7396: $? = 0
  configure:7410: gcc -E  conftest.c
  conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory
   #include &lt;ac_nonexistent.h&gt;
                              ^
  compilation terminated.
  configure:7410: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME "modsecurity"
  | #define PACKAGE_TARNAME "modsecurity"
  | #define PACKAGE_VERSION "2.7"
  | #define PACKAGE_STRING "modsecurity 2.7"
  | #define PACKAGE_BUGREPORT "support@modsecurity.org"
  | #define PACKAGE_URL ""
  | #define PACKAGE "modsecurity"
  | #define VERSION "2.7"
  | /* end confdefs.h.  */
  | #include &lt;ac_nonexistent.h&gt;
  configure:7435: result: gcc -E
  configure:7455: gcc -E  conftest.c
  configure:7455: $? = 0
  configure:7469: gcc -E  conftest.c
  conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory
   #include &lt;ac_nonexistent.h&gt;
                              ^
  compilation terminated.
  configure:7469: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME "modsecurity"
  | #define PACKAGE_TARNAME "modsecurity"
  | #define PACKAGE_VERSION "2.7"
  | #define PACKAGE_STRING "modsecurity 2.7"
  | #define PACKAGE_BUGREPORT "support@modsecurity.org"
  | #define PACKAGE_URL ""
  | #define PACKAGE "modsecurity"
  | #define VERSION "2.7"
  | /* end confdefs.h.  */
  | #include &lt;ac_nonexistent.h&gt;
  configure:7498: checking for ANSI C header files
  configure:7518: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7518: $? = 0
  configure:7591: gcc -o conftest.exe -g -O2   conftest.c  &gt;&amp;5
  configure:7591: $? = 0
  configure:7591: ./conftest.exe
  configure:7591: $? = 0
  configure:7602: result: yes
  configure:7615: checking for sys/types.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for sys/stat.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for stdlib.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for string.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for memory.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for strings.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for inttypes.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for stdint.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7615: checking for unistd.h
  configure:7615: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7615: $? = 0
  configure:7615: result: yes
  configure:7629: checking for dlfcn.h
  configure:7629: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:7629: $? = 0
  configure:7629: result: yes
  configure:7815: checking for objdir
  configure:7830: result: .libs
  configure:8101: checking if gcc supports -fno-rtti -fno-exceptions
  configure:8119: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c &gt;&amp;5
  cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
  configure:8123: $? = 0
  configure:8136: result: no
  configure:8446: checking for gcc option to produce PIC
  configure:8453: result: -DDLL_EXPORT -DPIC
  configure:8461: checking if gcc PIC flag -DDLL_EXPORT -DPIC works
  configure:8479: gcc -c -g -O2  -DDLL_EXPORT -DPIC -DPIC conftest.c &gt;&amp;5
  configure:8483: $? = 0
  configure:8496: result: yes
  configure:8525: checking if gcc static flag -static works
  configure:8553: result: yes
  configure:8568: checking if gcc supports -c -o file.o
  configure:8589: gcc -c -g -O2  -o out/conftest2.o conftest.c &gt;&amp;5
  configure:8593: $? = 0
  configure:8615: result: yes
  configure:8623: checking if gcc supports -c -o file.o
  configure:8670: result: yes
  configure:8703: checking whether the gcc linker (c:/mingw/mingw32/bin/ld.exe) supports shared libraries
  configure:9861: result: yes
  configure:9898: checking whether -lc should be explicitly linked in
  configure:9906: gcc -c -g -O2  conftest.c &gt;&amp;5
  configure:9909: $? = 0
  configure:9924: gcc -shared conftest.o  -v -o ./conftest -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker conftest 2\&gt;\&amp;1 \| /bin/grep  -lc  \&gt;/dev/null 2\&gt;\&amp;1
  configure:9927: $? = 1
  configure:9941: result: yes
  configure:10106: checking dynamic linker characteristics
  configure:10842: result: Win32 ld.exe
  configure:10949: checking how to hardcode library paths into programs
  configure:10974: result: immediate
  configure:11514: checking whether stripping libraries is possible
  configure:11519: result: yes
  configure:11554: checking if libtool supports shared libraries
  configure:11556: result: yes
  configure:11559: checking whether to build shared libraries
  configure:11580: result: yes
  configure:11583: checking whether to build static libraries
  configure:11587: result: yes
  configure:11628: checking for gawk
  configure:11655: result: gawk
  configure:11714: checking for gcc
  configure:11741: result: gcc
  configure:11970: checking for C compiler version
  configure:11979: gcc --version &gt;&amp;5
  gcc.exe (GCC) 4.8.1
  Copyright (C) 2013 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
  configure:11990: $? = 0
  configure:11979: gcc -v &gt;&amp;5
  Using built-in specs.
  COLLECT_GCC=c:\mingw\bin\gcc.exe
  COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
  Target: mingw32
  Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
  Thread model: win32
  gcc version 4.8.1 (GCC) 
  configure:11990: $? = 0
  configure:11979: gcc -V &gt;&amp;5
  gcc.exe: error: unrecognized command line option '-V'
  gcc.exe: fatal error: no input files
  compilation terminated.
  configure:11990: $? = 1
  configure:11979: gcc -qversion &gt;&amp;5
  gcc.exe: error: unrecognized command line option '-qversion'
  gcc.exe: fatal error: no input files
  compilation terminated.
  configure:11990: $? = 1
  configure:11994: checking whether we are using the GNU C compiler
  configure:12022: result: yes
  configure:12031: checking whether gcc accepts -g
  configure:12092: result: yes
  configure:12109: checking for gcc option to accept ISO C89
  configure:12186: result: none needed
  configure:12208: checking dependency style of gcc
  configure:12318: result: gcc3
  configure:12338: checking how to run the C preprocessor
  configure:12408: result: gcc -E
  configure:12428: gcc -E  conftest.c
  configure:12428: $? = 0
  configure:12442: gcc -E  conftest.c
  conftest.c:23:28: fatal error: ac_nonexistent.h: No such file or directory
   #include &lt;ac_nonexistent.h&gt;
                              ^
  compilation terminated.
  configure:12442: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME "modsecurity"
  | #define PACKAGE_TARNAME "modsecurity"
  | #define PACKAGE_VERSION "2.7"
  | #define PACKAGE_STRING "modsecurity 2.7"
  | #define PACKAGE_BUGREPORT "support@modsecurity.org"
  | #define PACKAGE_URL ""
  | #define PACKAGE "modsecurity"
  | #define VERSION "2.7"
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define HAVE_DLFCN_H 1
  | #define LT_OBJDIR ".libs/"
  | /* end confdefs.h.  */
  | #include &lt;ac_nonexistent.h&gt;
  configure:12471: checking whether ln -s works
  configure:12478: result: no, using cp -p
  configure:12482: checking whether make sets $(MAKE)
  configure:12504: result: yes
  configure:12513: checking for grep that handles long lines and -e
  configure:12571: result: /bin/grep
  configure:12634: checking for g++
  configure:12650: found /mingw/bin/g++
  configure:12661: result: g++
  configure:12688: checking for C++ compiler version
  configure:12697: g++ --version &gt;&amp;5
  g++.exe (GCC) 4.8.1
  Copyright (C) 2013 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  ...
  </code></pre>