Source
10
10
# This program is distributed in the hope that it will be useful,
11
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
# GNU General Public License for more details.
14
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
18
#
19
19
20
-
AC_DEFUN([CMOCKA_CHECK_CONFIG],
20
+
AC_DEFUN([CMOCKA_TRY_LINK],
21
21
[
22
-
AC_DEFUN([CMOCKA_TRY_LINK],
23
-
[
24
-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
25
-
#include <stdint.h>
26
-
#include <stdarg.h>
27
-
#include <stddef.h>
28
-
#include <setjmp.h>
22
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
23
+
#include <stdint.h>
24
+
#include <stdarg.h>
25
+
#include <stddef.h>
26
+
#include <setjmp.h>
29
27
30
-
#include <cmocka.h>
31
-
]],[[
32
-
cmocka_run_group_tests(NULL, NULL, NULL);
33
-
]])],[found_cmocka="yes"],[AC_MSG_FAILURE([error])])
34
-
])dnl
28
+
#include <cmocka.h>
29
+
]],[[
30
+
cmocka_run_group_tests(NULL, NULL, NULL);
31
+
]])],[found_cmocka="yes"],[])
32
+
])dnl
35
33
34
+
AC_DEFUN([CMOCKA_CHECK_CONFIG],
35
+
[
36
36
AC_ARG_WITH([cmocka],[
37
37
If you want to specify cmocka installation directories:
38
38
AS_HELP_STRING([--with-cmocka@<:@=DIR@:>@],[use specific cmocka library @<:@default=yes@:>@, DIR is the cmocka library install directory.])],
39
39
[
40
40
if test "$withval" = "no"; then
41
41
want_cmocka="no"
42
42
_libcmocka_dir="no"
43
43
elif test "$withval" = "yes"; then
44
44
want_cmocka="yes"
45
45
_libcmocka_dir="no"