File: configure.in

package info (click to toggle)
cpanel 0.4.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,612 kB
  • ctags: 777
  • sloc: ansic: 7,931; sh: 3,099; makefile: 376; yacc: 318; perl: 68
file content (89 lines) | stat: -rw-r--r-- 2,007 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
# Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(cpanel, 0.4,)
AM_CONFIG_HEADER(config.h)

# Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Checks for libraries.
# FIXME: Replace `main' with a function in `-libs':
dnl AC_CHECK_LIB([ibs], [main])

# Checks for header files.
AC_HEADER_STDC
AM_PROG_CC_STDC
AC_CHECK_HEADERS([libintl.h stdlib.h string.h sys/socket.h])

# Checks for library functions.
AC_CHECK_FUNCS([bzero setenv socket strcasecmp])

# GNU gettext

ALL_LINGUAS="zh_CN.GB2312 zh_TW.Big5"
AM_GNU_GETTEXT

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
    AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
    if test "x${prefix}" = "xNONE"; then
        AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
    else
        AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
    fi
else
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
fi

AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")

AM_PATH_GTK(1.2.1,
	[LIBS="$LIBS $GTK_LIBS"
	CFLAGS="$CFLAGS $GTK_CFLAGS"],
	AC_MSG_ERROR(Cannot find GTK+: Is gtk-config in executable path ?))


# Check for program

SLICE=
AUTOGB=

if test -z "$SLICE"; then 
	AC_PATH_PROG(SLICE, slice)
	if test -z "$SLICE"; then
		AC_MSG_ERROR([[
** Cannot found slice **
slice only needed when compiling this program.
]])
	fi
fi
AC_DEFINE_UNQUOTED(SLICE, "$SLICE")

if test -z "$AUTOGB"; then
	AC_PATH_PROG(AUTOGB, autogb)
	if test -z "$AUTOGB"; then
		AC_MSG_ERROR([[
** Cannot found autogb **
autogb only needed when compiling this program.
]])
	fi
fi
AC_DEFINE_UNQUOTED(AUTOGB, "$AUTOGB")


AC_OUTPUT(Makefile
	intl/Makefile
	help/Makefile
	po/Makefile.in
	po/Makefile
	src/Makefile)