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

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Conflicts:
	configure
	configure.ac
  • Loading branch information
v3l0c1r4pt0r committed Jun 12, 2014
2 parents e5ff744 + f334178 commit ca3f338
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 17 deletions.
132 changes: 132 additions & 0 deletions check.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
dnl

AC_DEFUN([AM_PATH_CHECK],
[
AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated])
AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
AC_ARG_WITH([check],
[ --with-check=PATH prefix where check is installed [default=auto]])
min_check_version=ifelse([$1], ,0.8.2,$1)
AC_MSG_CHECKING(for check - version >= $min_check_version)
if test x$with_check = xno; then
AC_MSG_RESULT(disabled)
ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
else
if test "x$with_check" != x; then
CHECK_CFLAGS="-I$with_check/include"
CHECK_LIBS="-L$with_check/lib -lcheck"
else
CHECK_CFLAGS=""
CHECK_LIBS="-lcheck"
fi
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $CHECK_CFLAGS"
LIBS="$CHECK_LIBS $LIBS"
rm -f conf.check-test
AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([])
#include <check.h>
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.check-test");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = strdup("$min_check_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_check_version");
return 1;
}
if ((CHECK_MAJOR_VERSION != check_major_version) ||
(CHECK_MINOR_VERSION != check_minor_version) ||
(CHECK_MICRO_VERSION != check_micro_version))
{
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
printf("*** the check library (version %d.%d.%d).\n",
check_major_version, check_minor_version, check_micro_version);
return 1;
}
if ((check_major_version > major) ||
((check_major_version == major) && (check_minor_version > minor)) ||
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
check_major_version, check_minor_version, check_micro_version);
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the check library and header\n");
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
printf("*** to specify the prefix where the correct version was installed.\n");
}
return 1;
}
])],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
if test "x$no_check" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test -f conf.check-test ; then
:
else
echo "*** Could not run check test program, checking why..."
CFLAGS="$CFLAGS $CHECK_CFLAGS"
LIBS="$CHECK_LIBS $LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <check.h>
], , [ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding check. You'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for"
echo "*** the exact error that occured." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
CHECK_CFLAGS=""
CHECK_LIBS=""
rm -f conf.check-test
ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
fi
AC_SUBST(CHECK_CFLAGS)
AC_SUBST(CHECK_LIBS)
rm -f conf.check-test
fi
])
119 changes: 107 additions & 12 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xsdm 0.10.
# Generated by GNU Autoconf 2.69 for xsdm 0.1.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xsdm'
PACKAGE_TARNAME='xsdm'
PACKAGE_VERSION='0.10'
PACKAGE_STRING='xsdm 0.10'
PACKAGE_VERSION='0.1.2'
PACKAGE_STRING='xsdm 0.1.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1272,7 +1272,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xsdm 0.10 to adapt to many kinds of systems.
\`configure' configures xsdm 0.1.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1338,7 +1338,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xsdm 0.10:";;
short | recursive ) echo "Configuration of xsdm 0.1.2:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1431,7 +1431,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xsdm configure 0.10
xsdm configure 0.1.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1888,7 +1888,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xsdm $as_me 0.10, which was
It was created by xsdm $as_me 0.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2752,7 +2752,7 @@ fi

# Define the identity of the package.
PACKAGE='xsdm'
VERSION='0.10'
VERSION='0.1.2'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -3397,7 +3397,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xsdm $as_me 0.10, which was
This file was extended by xsdm $as_me 0.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -3450,7 +3450,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xsdm config.status 0.10
xsdm config.status 0.1.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down Expand Up @@ -4027,9 +4027,17 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
# AC_CONFIG_HEADERS([config.h])
<<<<<<< HEAD
#AM_PATH_CHECK([0.9], [], [
# echo "Check is required for this program"
# exit -1])
=======
#the following line not always work
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
>>>>>>> dev
# Checks for programs.
ac_ext=cpp
Expand Down Expand Up @@ -5261,6 +5269,93 @@ $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :
<<<<<<< HEAD
=======
min_check_version=0.9.4
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for check - version >= $min_check_version" >&5
$as_echo_n "checking for check - version >= $min_check_version... " >&6; }
if test x$with_check = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
echo "Check is required for this program"
exit -1
else
if test "x$with_check" != x; then
CHECK_CFLAGS="-I$with_check/include"
CHECK_LIBS="-L$with_check/lib -lcheck"
else
CHECK_CFLAGS=""
CHECK_LIBS="-lcheck"
fi
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $CHECK_CFLAGS"
LIBS="$CHECK_LIBS $LIBS"
rm -f conf.check-test
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#include <check.h>
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.check-test");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = strdup("$min_check_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_check_version");
return 1;
}
if ((CHECK_MAJOR_VERSION != check_major_version) ||
(CHECK_MINOR_VERSION != check_minor_version) ||
(CHECK_MICRO_VERSION != check_micro_version))
{
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
printf("*** the check library (version %d.%d.%d).\n",
check_major_version, check_minor_version, check_micro_version);
return 1;
}
if ((check_major_version > major) ||
((check_major_version == major) && (check_minor_version > minor)) ||
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
check_major_version, check_minor_version, check_micro_version);
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the check library and header\n");
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
printf("*** to specify the prefix where the correct version was installed.\n");
}
return 1;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
else
no_check=yes
>>>>>>> dev
fi
ac_ext=c
Expand Down Expand Up @@ -6616,7 +6711,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xsdm $as_me 0.10, which was
This file was extended by xsdm $as_me 0.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6673,7 +6768,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xsdm config.status 0.10
xsdm config.status 0.1.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
11 changes: 6 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_INIT([xsdm], [0.10])
AC_PREREQ([2.62])
AC_INIT([xsdm], [0.1.2])
AC_CONFIG_SRCDIR([src/main.h])
AM_INIT_AUTOMAKE([subdir-objects])
AC_OUTPUT(Makefile src/Makefile tests/Makefile)
# AC_CONFIG_HEADERS([config.h])
#AM_PATH_CHECK([0.9], [], [
# echo "Check is required for this program"
# exit -1])
#the following line not always work
AM_PATH_CHECK([0.9.4], [], [
echo "Check is required for this program"
exit -1])

# Checks for programs.
AC_PROG_CXX
Expand Down

0 comments on commit ca3f338

Please sign in to comment.