File: configure.ac

package info (click to toggle)
nabi 0.99.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,908 kB
  • ctags: 1,749
  • sloc: ansic: 19,011; sh: 3,987; cpp: 802; makefile: 144
file content (103 lines) | stat: -rw-r--r-- 2,502 bytes parent folder | download
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
AC_INIT(nabi, 0.99.7, http://kldp.net/projects/nabi/)

AM_INIT_AUTOMAKE(nabi, 0.99.7)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs
AC_PROG_CC
AC_OBJEXT
AC_PROG_RANLIB
AC_PROG_INSTALL

dnl Checks for header files.
AC_PATH_X
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([langinfo.h libintl.h locale.h stddef.h stdint.h stdlib.h string.h sys/param.h])

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

AC_TYPE_SIZE_T
AC_STRUCT_TM

dnl Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_VPRINTF
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostname memmove memset mkdir putenv setlocale strchr strdup strtol localtime_r])

dnl Checks for X window system
AC_PATH_XTRA
case $X_PRE_LIBS in
*"-lSM"*)
    AC_DEFINE_UNQUOTED(HAVE_LIBSM, 1, Define to 1 if you have the libSM library.)
esac

dnl Checks for GTK+ libraries.
AC_PATH_PROG(PKG_CONFIG, pkg-config,
	     AC_MSG_ERROR([nabi needs pkg-config]))
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0,,
		  AC_MSG_ERROR([nabi needs GTK+ 2.4.0 or higher]))

# checks for libhangul
PKG_CHECK_MODULES(LIBHANGUL, libhangul >= 0.0.10,,
		  AC_MSG_ERROR([nabi needs libhangul 0.0.10 or higher]))

dnl gettext stuff
ALL_LINGUAS="ko de"
AM_GLIB_GNU_GETTEXT

GETTEXT_PACKAGE="$PACKAGE"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", gettext package name)

dnl data dir
NABI_DATA_DIR="${datadir}/$PACKAGE"
NABI_THEMES_DIR="${NABI_DATA_DIR}/themes"
AC_SUBST(NABI_DATA_DIR)
AC_SUBST(NABI_THEMES_DIR)

# configure options
AC_ARG_ENABLE(debug,
	      [  --enable-debug          include debug code],
              enable_debug=yes, enable_debug=no)

dnl default keyboard
AC_ARG_WITH(default-keyboard, [  --with-default-keyboard=2/39/3f   default hangul keyboard])
case "$with_default_keyboard" in
    2)
	AC_DEFINE_UNQUOTED(DEFAULT_KEYBOARD, "2",
			   [Define default hangul keyboard])
	;;
    39)
	AC_DEFINE_UNQUOTED(DEFAULT_KEYBOARD, "39",
			   [Define default hangul keyboard])
	;;
    3f)
	AC_DEFINE_UNQUOTED(DEFAULT_KEYBOARD, "3f",
			   [Define default hangul keyboard])
	;;
    *)
	AC_DEFINE_UNQUOTED(DEFAULT_KEYBOARD, "2",
			   [Define default hangul keyboard])
	;;
esac

if test "$enable_debug" = "yes"; then
    AC_DEFINE(NABI_DEBUG, 1, [Define to 1 if you want to use debug code])
    CFLAGS="$CFLAGS -Wall -g"
    CXXFLAGS="$CXXFLAGS -Wall -g"
fi

AC_OUTPUT([
Makefile
IMdkit/Makefile
src/Makefile
tables/Makefile
themes/Makefile
po/Makefile.in 
])