File: configure.ac

package info (click to toggle)
cbedic 4.0-4
  • links: PTS
  • area: contrib
  • in suites: bullseye, buster, sid, stretch
  • size: 604 kB
  • ctags: 277
  • sloc: cpp: 1,658; sh: 817; ansic: 798; makefile: 61
file content (57 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download | duplicates (3)
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
dnl autoconf script for CBEdic
dnl This file is part of the CBE Dictionary package
dnl Copyright (c) 2003 Antoby - antoby@users.sourceforge.net

AC_PREREQ(2.57)
AC_INIT
AC_CONFIG_SRCDIR([src/cbedic.cpp])
AM_INIT_AUTOMAKE(CBEdic, 4.0)

dnl Check for C++ compiler
AC_PROG_CC
AC_PROG_CXX
AC_LANG([C++])
AC_C_CONST

dnl Check for headers
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([libintl.h stdlib.h],,AC_MSG_ERROR(you need this header!))

dnl Check for several functions
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memmove memset strchr strrchr strstr strncasecmp],,AC_MSG_ERROR(you need this function!))


dnl Get the data dir and substitute
DATA_DIR=""
if test "$datadir" = '${prefix}/share'; then
    if test "$prefix" = 'NONE'; then
	DATA_DIR="$ac_default_prefix/share"
    else
	DATA_DIR="$prefix/share"
    fi
else
    DATA_DIR="$datadir"
fi
AC_SUBST(DATA_DIR)
AC_OUTPUT(src/config_dict.h)

dnl Generated files
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT


dnl Print some building guidelines
echo ""
echo "Program directory: $prefix/bin"
echo "Data directory: $DATA_DIR"
echo ""
echo "1. make (or gmake)        builds the program (you need GNU make)"
echo "2. make install           installs the program and data"
echo "3. cbedic -h              see how to use the program"
echo "4. make uninstall         removes the program (You don't want to do that :))"
echo ""
echo "For 'make install/uninstall' you must be root (su)"
echo ""