llvm.org GIT mirror llvm / e520b70
[autoconf] Detect OLE32 for mingw. It has been done in CMake build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239989 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 4 years ago
4 changed file(s) with 88 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
16311631 AC_CHECK_LIB(m,sin)
16321632 if test "$llvm_cv_os_type" = "MingW" ; then
16331633 AC_CHECK_LIB(imagehlp, main)
1634 AC_CHECK_LIB(ole32, main)
16341635 AC_CHECK_LIB(psapi, main)
16351636 AC_CHECK_LIB(shell32, main)
16361637 fi
87328732 fi
87338733
87348734
8735 { echo "$as_me:$LINENO: checking for main in -lole32" >&5
8736 echo $ECHO_N "checking for main in -lole32... $ECHO_C" >&6; }
8737 if test "${ac_cv_lib_ole32_main+set}" = set; then
8738 echo $ECHO_N "(cached) $ECHO_C" >&6
8739 else
8740 ac_check_lib_save_LIBS=$LIBS
8741 LIBS="-lole32 $LIBS"
8742 cat >conftest.$ac_ext <<_ACEOF
8743 /* confdefs.h. */
8744 _ACEOF
8745 cat confdefs.h >>conftest.$ac_ext
8746 cat >>conftest.$ac_ext <<_ACEOF
8747 /* end confdefs.h. */
8748
8749
8750 int
8751 main ()
8752 {
8753 return main ();
8754 ;
8755 return 0;
8756 }
8757 _ACEOF
8758 rm -f conftest.$ac_objext conftest$ac_exeext
8759 if { (ac_try="$ac_link"
8760 case "(($ac_try" in
8761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8762 *) ac_try_echo=$ac_try;;
8763 esac
8764 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8765 (eval "$ac_link") 2>conftest.er1
8766 ac_status=$?
8767 grep -v '^ *+' conftest.er1 >conftest.err
8768 rm -f conftest.er1
8769 cat conftest.err >&5
8770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771 (exit $ac_status); } &&
8772 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8773 { (case "(($ac_try" in
8774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8775 *) ac_try_echo=$ac_try;;
8776 esac
8777 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8778 (eval "$ac_try") 2>&5
8779 ac_status=$?
8780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8781 (exit $ac_status); }; } &&
8782 { ac_try='test -s conftest$ac_exeext'
8783 { (case "(($ac_try" in
8784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8785 *) ac_try_echo=$ac_try;;
8786 esac
8787 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8788 (eval "$ac_try") 2>&5
8789 ac_status=$?
8790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 ac_cv_lib_ole32_main=yes
8793 else
8794 echo "$as_me: failed program was:" >&5
8795 sed 's/^/| /' conftest.$ac_ext >&5
8796
8797 ac_cv_lib_ole32_main=no
8798 fi
8799
8800 rm -f core conftest.err conftest.$ac_objext \
8801 conftest$ac_exeext conftest.$ac_ext
8802 LIBS=$ac_check_lib_save_LIBS
8803 fi
8804 { echo "$as_me:$LINENO: result: $ac_cv_lib_ole32_main" >&5
8805 echo "${ECHO_T}$ac_cv_lib_ole32_main" >&6; }
8806 if test $ac_cv_lib_ole32_main = yes; then
8807 cat >>confdefs.h <<_ACEOF
8808 #define HAVE_LIBOLE32 1
8809 _ACEOF
8810
8811 LIBS="-lole32 $LIBS"
8812
8813 fi
8814
8815
87358816 { echo "$as_me:$LINENO: checking for main in -lpsapi" >&5
87368817 echo $ECHO_N "checking for main in -lpsapi... $ECHO_C" >&6; }
87378818 if test "${ac_cv_lib_psapi_main+set}" = set; then
130130 /* Define to 1 if you have the `m' library (-lm). */
131131 #undef HAVE_LIBM
132132
133 /* Define to 1 if you have the `ole32' library (-lole32). */
134 #undef HAVE_LIBOLE32
135
133136 /* Define to 1 if you have the `psapi' library (-lpsapi). */
134137 #cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI}
135138
142142 /* Define to 1 if you have the `m' library (-lm). */
143143 #undef HAVE_LIBM
144144
145 /* Define to 1 if you have the `ole32' library (-lole32). */
146 #undef HAVE_LIBOLE32
147
145148 /* Define to 1 if you have the `psapi' library (-lpsapi). */
146149 #undef HAVE_LIBPSAPI
147150