comparison configure @ 222:6153429ebf89

Update acinclude files to look for qt5-qmake as well as qmake-qt5
author Chris Cannam
date Sat, 30 Jan 2016 12:11:47 +0000
parents 14db41423fc3
children 382f33b7f00e
comparison
equal deleted inserted replaced
221:b1ac129e2c00 222:6153429ebf89
663 PKG_CONFIG_PATH 663 PKG_CONFIG_PATH
664 PKG_CONFIG 664 PKG_CONFIG
665 EGREP 665 EGREP
666 GREP 666 GREP
667 CXXCPP 667 CXXCPP
668 HAVE_CXX11
668 MKDIR_P 669 MKDIR_P
669 INSTALL_DATA 670 INSTALL_DATA
670 INSTALL_SCRIPT 671 INSTALL_SCRIPT
671 INSTALL_PROGRAM 672 INSTALL_PROGRAM
672 ac_ct_CXX 673 ac_ct_CXX
3409 fi 3410 fi
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3411 $as_echo "$MKDIR_P" >&6; } 3412 $as_echo "$MKDIR_P" >&6; }
3412 3413
3413 3414
3415 # We are daringly making use of C++11 now
3416
3417 ax_cxx_compile_cxx11_required=true
3418 ac_ext=cpp
3419 ac_cpp='$CXXCPP $CPPFLAGS'
3420 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3423 ac_success=no
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
3425 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
3426 if ${ax_cv_cxx_compile_cxx11+:} false; then :
3427 $as_echo_n "(cached) " >&6
3428 else
3429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3430 /* end confdefs.h. */
3431
3432 template <typename T>
3433 struct check
3434 {
3435 static_assert(sizeof(int) <= sizeof(T), "not big enough");
3436 };
3437
3438 struct Base {
3439 virtual void f() {}
3440 };
3441 struct Child : public Base {
3442 virtual void f() override {}
3443 };
3444
3445 typedef check<check<bool>> right_angle_brackets;
3446
3447 int a;
3448 decltype(a) b;
3449
3450 typedef check<int> check_type;
3451 check_type c;
3452 check_type&& cr = static_cast<check_type&&>(c);
3453
3454 auto d = a;
3455 auto l = [](){};
3456
3457 _ACEOF
3458 if ac_fn_cxx_try_compile "$LINENO"; then :
3459 ax_cv_cxx_compile_cxx11=yes
3460 else
3461 ax_cv_cxx_compile_cxx11=no
3462 fi
3463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3464 fi
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
3466 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
3467 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
3468 ac_success=yes
3469 fi
3470
3471
3472
3473 if test x$ac_success = xno; then
3474 for switch in -std=c++11 -std=c++0x; do
3475 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
3477 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
3478 if eval \${$cachevar+:} false; then :
3479 $as_echo_n "(cached) " >&6
3480 else
3481 ac_save_CXXFLAGS="$CXXFLAGS"
3482 CXXFLAGS="$CXXFLAGS $switch"
3483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3484 /* end confdefs.h. */
3485
3486 template <typename T>
3487 struct check
3488 {
3489 static_assert(sizeof(int) <= sizeof(T), "not big enough");
3490 };
3491
3492 struct Base {
3493 virtual void f() {}
3494 };
3495 struct Child : public Base {
3496 virtual void f() override {}
3497 };
3498
3499 typedef check<check<bool>> right_angle_brackets;
3500
3501 int a;
3502 decltype(a) b;
3503
3504 typedef check<int> check_type;
3505 check_type c;
3506 check_type&& cr = static_cast<check_type&&>(c);
3507
3508 auto d = a;
3509 auto l = [](){};
3510
3511 _ACEOF
3512 if ac_fn_cxx_try_compile "$LINENO"; then :
3513 eval $cachevar=yes
3514 else
3515 eval $cachevar=no
3516 fi
3517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3518 CXXFLAGS="$ac_save_CXXFLAGS"
3519 fi
3520 eval ac_res=\$$cachevar
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3522 $as_echo "$ac_res" >&6; }
3523 if eval test x\$$cachevar = xyes; then
3524 CXXFLAGS="$CXXFLAGS $switch"
3525 ac_success=yes
3526 break
3527 fi
3528 done
3529 fi
3530 ac_ext=cpp
3531 ac_cpp='$CXXCPP $CPPFLAGS'
3532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3535
3536 if test x$ax_cxx_compile_cxx11_required = xtrue; then
3537 if test x$ac_success = xno; then
3538 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
3539 fi
3540 else
3541 if test x$ac_success = xno; then
3542 HAVE_CXX11=0
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
3544 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
3545 else
3546 HAVE_CXX11=1
3547
3548 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
3549
3550 fi
3551
3552
3553 fi
3554
3414 3555
3415 ac_ext=cpp 3556 ac_ext=cpp
3416 ac_cpp='$CXXCPP $CPPFLAGS' 3557 ac_cpp='$CXXCPP $CPPFLAGS'
3417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3956 fi 4097 fi
3957 4098
3958 4099
3959 fi 4100 fi
3960 if test x$QMAKE = x ; then 4101 if test x$QMAKE = x ; then
4102 # Extract the first word of "qt5-qmake", so it can be a program name with args.
4103 set dummy qt5-qmake; ac_word=$2
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4105 $as_echo_n "checking for $ac_word... " >&6; }
4106 if ${ac_cv_prog_QMAKE+:} false; then :
4107 $as_echo_n "(cached) " >&6
4108 else
4109 if test -n "$QMAKE"; then
4110 ac_cv_prog_QMAKE="$QMAKE" # Let the user override the test.
4111 else
4112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4113 for as_dir in $QTDIR/bin/
4114 do
4115 IFS=$as_save_IFS
4116 test -z "$as_dir" && as_dir=.
4117 for ac_exec_ext in '' $ac_executable_extensions; do
4118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4119 ac_cv_prog_QMAKE="$QTDIR/bin/qt5-qmake"
4120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4121 break 2
4122 fi
4123 done
4124 done
4125 IFS=$as_save_IFS
4126
4127 fi
4128 fi
4129 QMAKE=$ac_cv_prog_QMAKE
4130 if test -n "$QMAKE"; then
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5
4132 $as_echo "$QMAKE" >&6; }
4133 else
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4135 $as_echo "no" >&6; }
4136 fi
4137
4138
4139 fi
4140 if test x$QMAKE = x ; then
3961 # Extract the first word of "qmake", so it can be a program name with args. 4141 # Extract the first word of "qmake", so it can be a program name with args.
3962 set dummy qmake; ac_word=$2 4142 set dummy qmake; ac_word=$2
3963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964 $as_echo_n "checking for $ac_word... " >&6; } 4144 $as_echo_n "checking for $ac_word... " >&6; }
3965 if ${ac_cv_prog_QMAKE+:} false; then : 4145 if ${ac_cv_prog_QMAKE+:} false; then :
4052 IFS=$as_save_IFS 4232 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=. 4233 test -z "$as_dir" && as_dir=.
4054 for ac_exec_ext in '' $ac_executable_extensions; do 4234 for ac_exec_ext in '' $ac_executable_extensions; do
4055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4056 ac_cv_prog_QMAKE="qmake-qt5" 4236 ac_cv_prog_QMAKE="qmake-qt5"
4237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4238 break 2
4239 fi
4240 done
4241 done
4242 IFS=$as_save_IFS
4243
4244 fi
4245 fi
4246 QMAKE=$ac_cv_prog_QMAKE
4247 if test -n "$QMAKE"; then
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5
4249 $as_echo "$QMAKE" >&6; }
4250 else
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252 $as_echo "no" >&6; }
4253 fi
4254
4255
4256 fi
4257 if test x$QMAKE = x ; then
4258 # Extract the first word of "qt5-qmake", so it can be a program name with args.
4259 set dummy qt5-qmake; ac_word=$2
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4261 $as_echo_n "checking for $ac_word... " >&6; }
4262 if ${ac_cv_prog_QMAKE+:} false; then :
4263 $as_echo_n "(cached) " >&6
4264 else
4265 if test -n "$QMAKE"; then
4266 ac_cv_prog_QMAKE="$QMAKE" # Let the user override the test.
4267 else
4268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269 for as_dir in $PATH
4270 do
4271 IFS=$as_save_IFS
4272 test -z "$as_dir" && as_dir=.
4273 for ac_exec_ext in '' $ac_executable_extensions; do
4274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275 ac_cv_prog_QMAKE="qt5-qmake"
4057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4058 break 2 4277 break 2
4059 fi 4278 fi
4060 done 4279 done
4061 done 4280 done