[go: up one dir, main page]

File: configure.in

package info (click to toggle)
console-tools 1%3A0.2.3-10.3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,172 kB
  • ctags: 1,130
  • sloc: ansic: 11,866; sh: 8,109; yacc: 984; makefile: 389; lex: 287; perl: 127; sed: 93
file content (174 lines) | stat: -rw-r--r-- 4,264 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
dnl -*- sh -*-
dnl Process this file with autoconf to produce a configure script.

# Initialize
AC_INIT(kbdtools/loadkeys.y)

define(ct_unicodedata_default,/usr/share/unidata/UnicodeData-2.txt)
ct_localdatadir_default=/usr/local/share     # iff --enable-localdatadir without specific dir

#AC_CONFIG_AUX_DIR(autoconf)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(console-tools, 0.2.3)

# Defaults
AC_PREFIX_DEFAULT(/usr)

# Header
AM_CONFIG_HEADER(config.h)

# Checks for programs.
AM_PROG_LIBTOOL
AM_PROG_LEX
AC_PROG_YACC

# i18n stuff
ALL_LINGUAS="cs de ru da et_EE ga fr it"
AM_GNU_GETTEXT
AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])

AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/share/locale")


# Turn around -rpath problem with libtool 1.0c
# This define should be improbable enough to not conflict with anything
case ${host} in
  *-pc-linux-gnu)
    AC_MSG_RESULT([Fixing libtool for -rpath problems.])
    sed < libtool > libtool-2 \
    's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__FOO_132_BUZZ_191_BAR__ "/'
    mv libtool-2 libtool
    chmod 755 libtool
  ;;
esac

dnl loadkeys can only be built with both LEX and YACC:
if test ! -z "$LEX" -a ! -z "$YACC" ; then
  LOADKEYS=loadkeys
else
  AC_MSG_WARN([\`loadkeys\' will not be built, since it needs both LEX and YACC])
fi
AC_SUBST(LOADKEYS)


# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)


# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_STRUCT_TM		dnl used


# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strspn strtol getline)


#
# Additional features
#

AC_ARG_ENABLE([debugging],
    [  --enable-debugging      do extra warnings, tests and comments], 
    [if test $enableval = yes 
     then
       CFLAGS="$CFLAGS -O0 -Wall"
     else
       AC_DEFINE(NDEBUG)
     fi],
    [AC_DEFINE(NDEBUG)])

####################
#
EXTRAS=""
# TODO:
#
#  Find the relevant test for "[gs]etkeycodes" => AC_SUBST(KEYCODES)
#	was "! m68k && ! sparc"
#
AC_ARG_ENABLE([keycode-progs],
  [  --disable-keycode-progs don't build keycodes-handling programs], ,
  KEYCODES="getkeycodes setkeycodes" ; EXTRAS="${EXTRAS} ${KEYCODES}" )
AC_SUBST(KEYCODES)

# Enable `resizecons' only on i386 arch
case $target_cpu in
i?86)
    RESIZECONS="resizecons"
    ;;
esac
AC_SUBST(RESIZECONS)

if test "$EXTRAS" != ""
then
    AC_MSG_WARN([The following programs may not build on all archs: $EXTRAS.
Please send a build-log if it is the case, so that we can fix it.])
fi
#
####################

# Use UnicodeData if available
AC_ARG_WITH([unicodedata],
  [  --with-unicodedata[=file]  Use UnicodeData (default=]ct_unicodedata_default[)],
  [ case ${withval} in
      no) ;;
      yes) UNICODEDATA=]ct_unicodedata_default[ ;;
      *) UNICODEDATA=$withval ;;
  esac;
  ],[UNICODEDATA=]ct_unicodedata_default)

if test ! -z "$UNICODEDATA" -a -r "$UNICODEDATA"
then
  UNICODELISTS=unicodelists
else
  UNICODELISTS=
  UNICODEDATA=
fi

AC_SUBST(UNICODEDATA)
AC_SUBST(UNICODELISTS)


# Allow local data dir, but not do that by default (not FSSTND-compliant ?)
AC_ARG_ENABLE([localdatadir], 
  [  --enable-localdatadir   additional directory to search for data files [NONE]],
  [ case ${enableval} in
      no) ;;
      yes) ] AC_DEFINE_UNQUOTED(LOCALDATADIR, "$ct_localdatadir_default") [ ;;
      *) ] AC_DEFINE_UNQUOTED(LOCALDATADIR, "$enableval") [ ;;
  esac;
  ])

# Allow installing kbd-compat scripts
AC_ARG_ENABLE([kbd-compat],
  [  --enable-kbd-compat     install wrapper scripts for compatibility with kbd],
  [case ${enable_kbd_compat} in
   yes) COMPAT=compat ;;
   no) COMPAT=nocompat ;;
   esac],
  [COMPAT=nocompat])
AC_SUBST(COMPAT)

# Additional defs to ensure consistency
TRANSDIR=consoletrans
FONTDIR=consolefonts
KEYMAPDIR=keymaps
VIDEOMODEDIR=videomodes

AC_SUBST(TRANSDIR)
AC_SUBST(FONTDIR)
AC_SUBST(KEYMAPDIR)
AC_SUBST(VIDEOMODEDIR)

# Output
AC_OUTPUT([Makefile lib/Makefile fontfiletools/Makefile vttools/Makefile
  kbdtools/Makefile screenfonttools/Makefile contrib/Makefile
  include/Makefile include/lct/Makefile compat/Makefile
  doc/Makefile doc/man/Makefile examples/Makefile
  po/Makefile.in intl/Makefile])