You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

  1. dnl Copyright (C) 2004-2017 Julien Pommier
  2. dnl
  3. dnl This file is free software; you can redistribute it and/or modify it
  4. dnl under the terms of the GNU Lesser General Public License as published
  5. dnl by the Free Software Foundation; either version 3 of the License, or
  6. dnl (at your option) any later version along with the GCC Runtime Library
  7. dnl Exception either version 3.1 or (at your option) any later version.
  8. dnl This program is distributed in the hope that it will be useful, but
  9. dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  11. dnl License and GCC Runtime Library Exception for more details.
  12. dnl You should have received a copy of the GNU Lesser General Public License
  13. dnl along with this program; if not, write to the Free Software Foundation,
  14. dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  15. AC_DEFUN([AC_CHECK_CXX_FLAG],
  16. [AC_MSG_CHECKING([whether ${CXX} accepts $1])
  17. echo 'int main(){}' > conftest.c
  18. if test -z "`${CXX} $1 -o conftest conftest.c 2>&1`"; then
  19. $2="${$2} $1"
  20. echo "yes"
  21. else
  22. echo "no"
  23. $3
  24. fi
  25. dnl echo "$2=${$2}"
  26. rm -f conftest*
  27. ])