diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7119d1b572..3fe9e480db 100644 --- a/configure.ac +++ b/configure.ac @@ -167,6 +167,7 @@ AC_SUBST([flexdll_chain]) AC_SUBST([flexlink_flags]) AC_SUBST([PACKLD]) AC_SUBST([stdlib_manpages]) +AC_SUBST([compute_deps]) ## Generated files @@ -214,6 +215,12 @@ AC_ARG_ENABLE([debugger], [], [enable_debugger=auto]) +AC_ARG_ENABLE([dependency-generation], + [AS_HELP_STRING([--disable-dependency-generation], + [do not compute dependency information for C sources])], + [], + [enable_dependency_generation=auto]) + AC_ARG_VAR([DLLIBS], [which libraries to use (in addition to -ldl) to load dynamic libs]) @@ -414,6 +421,27 @@ AS_IF([test x"$host_os" = "xwindows"],[host_os=mingw]) LT_INIT host_os=$old_host_os +AS_CASE([$host], + [*-pc-windows], + [AC_CHECK_TOOLS( + [DEP_CC], + [$DEP_CC gcc cc x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc], + [false])], + [DEP_CC="$CC"]) + +AS_CASE([$enable_dependency_generation], + [yes], + [AS_IF([test "$DEP_CC" = "false"], + [AC_MSG_ERROR(m4_normalize([The MSVC ports cannot generate dependency + information. Install gcc (or another CC-like compiler)]))], + [compute_deps=true])], + [no], [compute_deps=false], + [AS_IF([test -e .git], + [AS_IF([test "$DEP_CC" = "false"], + [compute_deps=false], + [compute_deps=true])], + [compute_deps=false])]) + # Extracting information from libtool's configuration AS_IF([test -n "$RANLIB" ], [RANLIBCMD="$RANLIB"], |