Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit b5e02e2

Browse files
committed
Reconfigured project
1 parent c4a5707 commit b5e02e2

File tree

5 files changed

+2251
-1298
lines changed

5 files changed

+2251
-1298
lines changed

Makefile.in

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ AWK = @AWK@
196196
CC = @CC@
197197
CCDEPMODE = @CCDEPMODE@
198198
CFLAGS = @CFLAGS@
199+
CHECK_CFLAGS = @CHECK_CFLAGS@
200+
CHECK_LIBS = @CHECK_LIBS@
199201
CPP = @CPP@
200202
CPPFLAGS = @CPPFLAGS@
201203
CXX = @CXX@

aclocal.m4

+133
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,139 @@ You have another version of autoconf. It may work, but is not guaranteed to.
2020
If you have problems, you may need to regenerate the build system entirely.
2121
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2222

23+
dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
24+
dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
25+
dnl
26+
27+
AC_DEFUN([AM_PATH_CHECK],
28+
[
29+
AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated])
30+
AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
31+
AC_ARG_WITH([check],
32+
[ --with-check=PATH prefix where check is installed [default=auto]])
33+
34+
min_check_version=ifelse([$1], ,0.8.2,$1)
35+
36+
AC_MSG_CHECKING(for check - version >= $min_check_version)
37+
38+
if test x$with_check = xno; then
39+
AC_MSG_RESULT(disabled)
40+
ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
41+
else
42+
if test "x$with_check" != x; then
43+
CHECK_CFLAGS="-I$with_check/include"
44+
CHECK_LIBS="-L$with_check/lib -lcheck"
45+
else
46+
CHECK_CFLAGS=""
47+
CHECK_LIBS="-lcheck"
48+
fi
49+
50+
ac_save_CFLAGS="$CFLAGS"
51+
ac_save_LIBS="$LIBS"
52+
53+
CFLAGS="$CFLAGS $CHECK_CFLAGS"
54+
LIBS="$CHECK_LIBS $LIBS"
55+
56+
rm -f conf.check-test
57+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([])
58+
#include <check.h>
59+
60+
int main ()
61+
{
62+
int major, minor, micro;
63+
char *tmp_version;
64+
65+
system ("touch conf.check-test");
66+
67+
/* HP/UX 9 (%@#!) writes to sscanf strings */
68+
tmp_version = strdup("$min_check_version");
69+
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
70+
printf("%s, bad version string\n", "$min_check_version");
71+
return 1;
72+
}
73+
74+
if ((CHECK_MAJOR_VERSION != check_major_version) ||
75+
(CHECK_MINOR_VERSION != check_minor_version) ||
76+
(CHECK_MICRO_VERSION != check_micro_version))
77+
{
78+
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
79+
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
80+
printf("*** the check library (version %d.%d.%d).\n",
81+
check_major_version, check_minor_version, check_micro_version);
82+
return 1;
83+
}
84+
85+
if ((check_major_version > major) ||
86+
((check_major_version == major) && (check_minor_version > minor)) ||
87+
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
88+
{
89+
return 0;
90+
}
91+
else
92+
{
93+
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
94+
check_major_version, check_minor_version, check_micro_version);
95+
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
96+
printf("***\n");
97+
printf("*** If you have already installed a sufficiently new version, this error\n");
98+
printf("*** probably means that the wrong copy of the check library and header\n");
99+
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
100+
printf("*** to specify the prefix where the correct version was installed.\n");
101+
}
102+
103+
return 1;
104+
}
105+
])],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
106+
107+
CFLAGS="$ac_save_CFLAGS"
108+
LIBS="$ac_save_LIBS"
109+
110+
if test "x$no_check" = x ; then
111+
AC_MSG_RESULT(yes)
112+
ifelse([$2], , :, [$2])
113+
else
114+
AC_MSG_RESULT(no)
115+
if test -f conf.check-test ; then
116+
:
117+
else
118+
echo "*** Could not run check test program, checking why..."
119+
CFLAGS="$CFLAGS $CHECK_CFLAGS"
120+
LIBS="$CHECK_LIBS $LIBS"
121+
AC_TRY_LINK([
122+
#include <stdio.h>
123+
#include <stdlib.h>
124+
125+
#include <check.h>
126+
], , [ echo "*** The test program compiled, but did not run. This usually means"
127+
echo "*** that the run-time linker is not finding check. You'll need to set your"
128+
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
129+
echo "*** to the installed location Also, make sure you have run ldconfig if that"
130+
echo "*** is required on your system"
131+
echo "***"
132+
echo "*** If you have an old version installed, it is best to remove it, although"
133+
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
134+
[ echo "*** The test program failed to compile or link. See the file config.log for"
135+
echo "*** the exact error that occured." ])
136+
137+
CFLAGS="$ac_save_CFLAGS"
138+
LIBS="$ac_save_LIBS"
139+
fi
140+
141+
CHECK_CFLAGS=""
142+
CHECK_LIBS=""
143+
144+
rm -f conf.check-test
145+
ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
146+
fi
147+
148+
AC_SUBST(CHECK_CFLAGS)
149+
AC_SUBST(CHECK_LIBS)
150+
151+
rm -f conf.check-test
152+
153+
fi
154+
])
155+
23156
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
24157
#
25158
# This file is free software; the Free Software Foundation

0 commit comments

Comments
 (0)