File: configure.ac

package info (click to toggle)
mptp 0.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 620 kB
  • sloc: ansic: 4,465; python: 1,274; yacc: 301; lex: 132; makefile: 57; sh: 1
file content (108 lines) | stat: -rw-r--r-- 2,867 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([mptp], [0.2.4], [t.flouris@ucl.ac.uk])
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C])
AC_CONFIG_SRCDIR([src/mptp.c])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST

${CFLAGS=""}

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_SED
AC_PROG_LEX
if test "x$LEX" != xflex; then
  AC_MSG_ERROR(could not find required installation of FLEX)
fi

AC_PROG_YACC
if test "x$YACC" != x"bison -y"; then
  AC_MSG_ERROR(could not find required installation of BISON)
fi

AC_PROG_INSTALL

# Checks for header files.
AC_CHECK_HEADERS([assert.h stdio.h stdarg.h string.h getopt.h stdlib.h regex.h ctype.h locale.h limits.h string.h sys/time.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STRTOD
AC_FUNC_ALLOCA
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memcpy gettimeofday memchr memset pow regcomp strcasecmp strchr strcspn sysinfo])

AC_CHECK_LIB([m],[cos])
AC_CHECK_LIB([gslcblas], [cblas_dgemm])
AC_CHECK_LIB([gsl], [gsl_cdf_chisq_P])

# Bash completions
AC_ARG_WITH([bash-completions],
  AC_HELP_STRING([--with-bash-completions=[DIR]], [Bash completions directory [default=no]]),
  [with_bash_completions="$withval"],
  [with_bash_completions="no"]
)
AS_CASE([$with_bash_completions],
#  [yes], [PKG_CHECK_VAR([bash_completions_dir], [bash-completion], [completionsdir], [], [AC_MSG_ERROR([bash completions not found])])],
  [no], [bash_completions_dir=],
  [bash_completions_dir="$with_bash_completions"]
)
AC_SUBST([bash_completions_dir])
AM_CONDITIONAL(HAVE_BASH_COMPLETIONS, test -n "$bash_completions_dir")
AS_IF([test -n "$bash_completions_dir"],
  [bash_completions_output="${bash_completions_dir}"],
  [bash_completions_output=no]
)

have_ps2pdf=no
AC_ARG_ENABLE(pdfman, AS_HELP_STRING([--disable-pdfman], [Disable PDF manual creation]))
AS_IF([test "x$enable_pdfman" != "xno"], [
  have_ps2pdf=yes
  AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no)
  if test "x$HAVE_PS2PDF" = "xno"; then
    AC_MSG_WARN([*** ps2pdf is required to build a PDF version of the manual])
    have_ps2pdf=no
  fi
])

# Various OS-related dependencies
case "${host_os}" in
    linux*)
        ;;
    cygwin*|mingw*)
        AC_CHECK_LIB([psapi],[GetProcessMemoryInfo])
        ;;
    darwin*)
        ;;
esac


AM_CONDITIONAL(HAVE_PS2PDF, test "x${have_ps2pdf}" = "xyes")
AM_PROG_CC_C_O

AC_CONFIG_FILES([Makefile
                 src/Makefile
                 man/Makefile
                 completion/Makefile])

AC_OUTPUT

AC_MSG_RESULT([
  $PACKAGE $VERSION

    Target:    $host_os $host_cpu
    Compiler:  ${CC}
    CFLAGS:    ${CFLAGS} ${CPPFLAGS}
    LIBS:      ${LIBS} ${LDFLAGS}
  
  Continue  with 'make' command
])