File: configure.in

package info (click to toggle)
gsambad 0.1.4-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,228 kB
  • ctags: 644
  • sloc: ansic: 9,448; sh: 3,637; makefile: 218
file content (187 lines) | stat: -rw-r--r-- 6,583 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
175
176
177
178
179
180
181
182
183
184
185
186
187
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)

AM_INIT_AUTOMAKE(gsambad, 0.1.4)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_CANONICAL_HOST
AC_MSG_CHECKING([for OS type])
case $host in
    *-linux*)
    AC_MSG_RESULT([Linux ($host) found.])
    AC_DEFINE(USE_LINUX,1,[using linux macros...])
    ;;
    *-solaris*)
    AC_MSG_RESULT([Solaris ($host) found.])
    AC_DEFINE(USE_SUNOS,1,[using sunos macros...])
    ;;
    *-sunos*)
    AC_MSG_RESULT([Solaris ($host) found.])
    AC_DEFINE(USE_SUNOS,1,[using sunos macros...])
    ;;
    *-freebsd*)
    AC_MSG_RESULT([Free BSD ($host) found.])
    AC_DEFINE(USE_FREEBSD,1,[using freebsd macros...])
    ;;
    *-openbsd*)
    AC_MSG_RESULT([Open BSD ($host) found.])
    AC_DEFINE(USE_OPENBSD,1,[using openbsd macros...])
    ;;
    *-netbsd*)
    AC_MSG_RESULT([Net BSD ($host) found.])
    AC_DEFINE(USE_NETBSD,1,[using netbsd macros...])
    ;;
    *-darwin*)
    AC_MSG_RESULT([Darwin Mac OS X ($host) found.])
    AC_DEFINE(USE_DARWIN,1,[using darwin macros...])
    ;;
    *-aix*)
    AC_MSG_RESULT([AIX ($host) found.])
    AC_DEFINE(USE_AIX,1,[using aix macros...])
    ;;
    *-hpux*)
    AC_MSG_RESULT([HP UX ($host) found.])
    AC_DEFINE(USE_HPUX,1,[using hpux macros...])
    ;;
    *)
    AC_MSG_RESULT([Unknown host found: ($host). Using Linux macros...])
    AC_DEFINE(USE_LINUX,1,[using Linux macros...])
    ;;
esac

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

pkg_modules="gtk+-2.0 >= 1.3.13"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

GETTEXT_PACKAGE=gsambad
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[needed for gettext...])

dnl Add the languages which your application supports here.
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT

dnl Use -Wall if we have gcc (added -lcrypt for crypt).
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl


dnl Determine if we can link with -lcrypt
AC_SEARCH_LIBS(crypt, [crypt],
[test "$ac_cv_search_crypt" = "none required" || AUTHLIBS="-lcrypt $AUTHLIBS"
AC_DEFINE_UNQUOTED(HAVE_CRYPT,1,[Define for linking with -lcrypt])])


dnl some dynamic defines and corrections for configure options
SYSCONFDIR=`eval echo $sysconfdir`
AC_SUBST(SYSCONFDIR)

LOCALSTATEDIR=`eval echo $localstatedir`
AC_SUBST(LOCALSTATEDIR)

test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'


dnl Path to the smbd binary.
default_smbd_binary="smbd"
test "x$SMBD_BINARY" = x && SMBD_BINARY=$default_smbd_binary
AC_DEFINE_UNQUOTED(SMBD_BINARY,"`eval echo "${SMBD_BINARY}"`",[Path to the smbd binary])
AC_MSG_RESULT([Using SMBD binary: (${SMBD_BINARY})])

dnl Path to the nmbd binary.
default_nmbd_binary="nmbd"
test "x$NMBD_BINARY" = x && NMBD_BINARY=$default_nmbd_binary
AC_DEFINE_UNQUOTED(NMBD_BINARY,"`eval echo "${NMBD_BINARY}"`",[Path to the nmbd binary])
AC_MSG_RESULT([Using NMBD binary: (${NMBD_BINARY})])

dnl Path to the winbindd binary.
default_winbindd_binary="winbindd"
test "x$WINBINDD_BINARY" = x && WINBINDD_BINARY=$default_winbindd_binary
AC_DEFINE_UNQUOTED(WINBINDD_BINARY,"`eval echo "${WINBINDD_BINARY}"`",[Path to the winbindd binary])
AC_MSG_RESULT([Using WINBINDD binary: (${WINBINDD_BINARY})])

dnl Path to the smbpasswd binary.
default_smbpasswd_binary="smbpasswd"
test "x$SMBPASSWD_BINARY" = x && SMBPASSWD_BINARY=$default_smbpasswd_binary
AC_DEFINE_UNQUOTED(SMBPASSWD_BINARY,"`eval echo "${SMBPASSWD_BINARY}"`",[Path to the smbpasswd binary])
AC_MSG_RESULT([Using SMBPASSWD binary: (${SMBPASSWD_BINARY})])

dnl The default minimum accepted password length is 6.
default_min_pass_len=6
test "x$MIN_PASS_LEN" = x && MIN_PASS_LEN=$default_min_pass_len
AC_DEFINE_UNQUOTED(MIN_PASS_LEN,"`eval echo "${MIN_PASS_LEN}"`",[The minimum accepted password length.])
AC_MSG_RESULT([Using MIN_PASS_LEN: (${MIN_PASS_LEN})])

dnl The default samba server user.
default_samba_user="nobody"
test "x$SAMBA_USER" = x && SAMBA_USER=$default_samba_user
AC_DEFINE_UNQUOTED(SAMBA_USER,"`eval echo "${SAMBA_USER}"`",[The user that samba runs as IE: nobody.])
AC_MSG_RESULT([Using samba server user: (${SAMBA_USER})])

dnl Path to the smb.conf file.
default_smb_conf="/etc/samba/smb.conf"
test "x$SAMBA_CONF" = x && SAMBA_CONF=$default_smb_conf
AC_DEFINE_UNQUOTED(SAMBA_CONF,"`eval echo "${SAMBA_CONF}"`",[Path to smbd.conf])
AC_MSG_RESULT([Using smb.conf file: (${SAMBA_CONF})])

dnl Path to the backup smb.conf file.
default_smb_conf_backup="/etc/samba/smb.conf.old.gsambad_backup"
test "x$SAMBA_CONF_BACKUP" = x && SAMBA_CONF_BACKUP=$default_smb_conf_backup
AC_DEFINE_UNQUOTED(SAMBA_CONF_BACKUP,"`eval echo "${SAMBA_CONF_BACKUP}"`",[Path to backup smb.conf])
AC_MSG_RESULT([Using backup smb.conf file: (${SAMBA_CONF_BACKUP})])

dnl Path to the smbpasswd file.
default_smb_passwd_conf="/etc/samba/smbpasswd"
test "x$SAMBA_PASSWD" = x && SAMBA_PASSWD=$default_smb_passwd_conf
AC_DEFINE_UNQUOTED(SAMBA_PASSWD,"`eval echo "${SAMBA_PASSWD}"`",[Path to smbpasswd])
AC_MSG_RESULT([Using smbpasswd file: (${SAMBA_PASSWD})])

dnl Path to the smbusers file.
default_samba_usermap="/etc/samba/smbusers"
test "x$SAMBA_USERMAP" = x && SAMBA_USERMAP=$default_samba_usermap
AC_DEFINE_UNQUOTED(SAMBA_USERMAP,"`eval echo "${SAMBA_USERMAP}"`",[Path to smbusers])
AC_MSG_RESULT([Using smbusers file: (${SAMBA_USERMAP})])

dnl Path to the security log.
default_secure_log="/var/log/secure"
test "x$SECURE_LOG" = x && SECURE_LOG=$default_secure_log
AC_DEFINE_UNQUOTED(SECURE_LOG,"`eval echo "${SECURE_LOG}"`",[path to the security log])
AC_MSG_RESULT([Using security log: (${SECURE_LOG})])


dnl Path to the local state directory
AC_DEFINE_UNQUOTED(LOCALSTATEDIR,"`eval echo "${localstatedir}"`",[var dir])


dnl Hardcoded paths
AC_DEFINE_UNQUOTED(SYSCONFDIR,"`eval echo "/etc"`",[etc dir])
AC_DEFINE_UNQUOTED(APPCONFDIR,"`eval echo "/etc/gsambad"`",[application config dir])
AC_DEFINE_UNQUOTED(SETTINGS_FILE,"`eval echo "/etc/gsambad/settings.conf"`",[application config file])

AC_DEFINE_UNQUOTED(SHELLS_FILE,"`eval echo "/etc/shells"`",[path to shells])
AC_DEFINE_UNQUOTED(PASSWD_FILE,"`eval echo "/etc/passwd"`",[path to passwd])
AC_DEFINE_UNQUOTED(SHADOW_FILE,"`eval echo "/etc/shadow"`",[path to shadow])
AC_DEFINE_UNQUOTED(GROUP_FILE,"`eval echo "/etc/group"`",[path to group])
AC_DEFINE_UNQUOTED(GSHADOW_FILE,"`eval echo "/etc/gshadow"`",[path to gshadow])


AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
])