- Lay out autotools foundations
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@134 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
7972672d8b
commit
d3b4e61d94
14 changed files with 607 additions and 21 deletions
23
m4/Makefile.am
Normal file
23
m4/Makefile.am
Normal file
|
@ -0,0 +1,23 @@
|
|||
# m4/Makefile.am - Copyright 2005, University
|
||||
# of Padova, dept. of Pure and Applied
|
||||
# Mathematics
|
||||
#
|
||||
# This file is part of SGPEMv2.
|
||||
#
|
||||
# This is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# SGPEMv2 is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with SGPEMv2; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
aclocaldir = $(datadir)/aclocal
|
||||
aclocal_DATA = compilerflags.m4
|
50
m4/compilerflags.m4
Normal file
50
m4/compilerflags.m4
Normal file
|
@ -0,0 +1,50 @@
|
|||
dnl **************************************************
|
||||
dnl Copyright (C) 2004 Matteo Settenvini
|
||||
dnl **************************************************
|
||||
|
||||
dnl ---------- AX_CHECK_CXXFLAG ---------------------
|
||||
dnl This macro checks if a particular flag for the
|
||||
dnl C++ compiler works. If it is so, it adds the flag
|
||||
dnl to the CXXFLAGS variable.
|
||||
dnl Example of usage : AC_CHECK_CXXFLAG([Wall])
|
||||
dnl -------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_CXXFLAG],
|
||||
[ AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_MSG_CHECKING([whether $CXX supports the -$1 flag])
|
||||
ac_check_cxxflags=$CXXFLAGS
|
||||
CXXFLAGS="-$1"
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [return 0;]),
|
||||
[AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="-$1 $ac_check_cxxflags" ],
|
||||
[AC_MSG_RESULT([no])
|
||||
CXXFLAGS=$ac_check_cxxflags ]
|
||||
)
|
||||
AC_LANG_POP
|
||||
])dnl ------- AC_CHECK_CXXFLAG ----------------------
|
||||
|
||||
|
||||
|
||||
dnl ---------- AC_CHECK_CFLAG ---------------------
|
||||
dnl This macro checks if a particular flag for the
|
||||
dnl C compiler works. If it is so, it adds the flag
|
||||
dnl to the CFLAGS variable.
|
||||
dnl Example of usage : AC_CHECK_CFLAG([Wall])
|
||||
dnl -------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_CFLAG],
|
||||
[ AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether $CC supports the -$1 flag])
|
||||
ac_check_cflags=$CFLAGS
|
||||
CFLAGS="-$1"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [return 0;]),
|
||||
[AC_MSG_RESULT([yes])
|
||||
CFLAGS="-$1 $ac_check_cflags" ],
|
||||
[AC_MSG_RESULT([no])
|
||||
CFLAGS=$ac_check_cflags ]
|
||||
)
|
||||
AC_LANG_POP
|
||||
])dnl ------- AC_CHECK_CFLAG ----------------------
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue