2 Unix SMB/CIFS implementation.
3 Build Options for Samba Suite
4 Copyright (C) Vance Lankhaar <vlankhaar@hotmail.com> 2001
5 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2001
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include "build_env.h"
24 #include "dynconfig.h"
26 static void output(BOOL screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
29 #define OUTPUT(x) snprintf(outstring,sizeof(outstring),x); output(screen,outstring);
31 /****************************************************************************
32 helper function for build_options
33 ****************************************************************************/
34 static void output(BOOL screen, const char *format, ...)
40 vasprintf(&ptr,format,ap);
52 /****************************************************************************
53 options set at build time for the samba suite
54 ****************************************************************************/
55 void build_options(BOOL screen)
57 if ((DEBUGLEVEL < 4) && (!screen)) {
62 /* Output information about the build environment */
63 output(screen,"Build environment:\n");
64 output(screen," Built by: %s@%s\n",BUILD_ENV_USER,BUILD_ENV_HOST);
65 output(screen," Built on: %s\n",BUILD_ENV_DATE);
67 output(screen," Built using: %s\n",BUILD_ENV_COMPILER);
68 output(screen," Build host: %s\n",BUILD_ENV_UNAME);
69 output(screen," SRCDIR: %s\n",BUILD_ENV_SRCDIR);
70 output(screen," BUILDDIR: %s\n",BUILD_ENV_BUILDDIR);
75 /* Output various options (most correspond to --with options) */
76 output(screen,"\nBuild options:\n");
77 #ifdef WITH_SMBWRAPPER
78 output(screen," WITH_SMBWRAPPER\n");
81 output(screen," WITH_AFS\n");
84 output(screen," WITH_DFS\n");
87 output(screen," KRB4_AUTH");
90 output(screen," HAVE_KRB5");
93 output(screen," HAVE_GSSAPI");
96 output(screen," HAVE_LDAP");
99 output(screen," WITH_AUTOMOUNT\n");
102 output(screen," WITH_SMBMOUNT\n");
105 output(screen," WITH_PAM\n");
107 #ifdef WITH_NISPLUS_HOME
108 output(screen," WITH_NISPLUS_HOME\n");
111 output(screen," WITH_SYSLOG\n");
114 output(screen," WITH_PROFILE\n");
117 output(screen," WITH_QUOTAS\n");
120 output(screen," WITH_VFS\n");
123 output(screen," USE_SPINLOCKS\n");
125 #ifdef SPARC_SPINLOCKS
126 output(screen," SPARC_SPINLOCKS\n");
128 #ifdef INTEL_SPINLOCKS
129 output(screen," INTEL_SPINLOCKS\n");
131 #ifdef MIPS_SPINLOCKS
132 output(screen," MIPS_SPINLOCKS\n");
134 #ifdef POWERPC_SPINLOCKS
135 output(screen," POWERPC_SPINLOCKS\n");
137 #ifdef HAVE_UNIXWARE_ACLS
138 output(screen," HAVE_UNIXWARE_ACLS\n");
140 #ifdef HAVE_SOLARIS_ACLS
141 output(screen," HAVE_SOLARIS_ACLS\n");
143 #ifdef HAVE_IRIX_ACLS
144 output(screen," HAVE_IRIX_ACLS\n");
147 output(screen," HAVE_AIX_ACLS\n");
149 #ifdef HAVE_POSIX_ACLS
150 output(screen," HAVE_POSIX_ACLS\n");
152 #ifdef HAVE_TRU64_ACLS
153 output(screen," HAVE_TRU64_ACLS\n");
156 #ifdef HAVE_ACL_GET_PERM_NP
157 output(screen," HAVE_ACL_GET_PERM_NP\n");
160 output(screen," HAVE_NO_ACLS\n");
162 #ifdef HAVE_LIBREADLINE
163 output(screen," HAVE_LIBREADLINE\n");
166 output(screen," WITH_LIBICONV: %s\n",WITH_LIBICONV);
170 /* Output various paths to files and directories */
171 output(screen,"\nPaths:\n");
172 output(screen," CONFIGFILE: %s\n", dyn_CONFIGFILE);
174 output(screen," PRIVATE_DIR: %s\n",PRIVATE_DIR);
177 output(screen," LMHOSTSFILE: %s\n",LMHOSTSFILE);
179 output(screen," SBINDIR: %s\n", dyn_SBINDIR);
180 output(screen," BINDIR: %s\n", dyn_BINDIR);
181 output(screen," LOCKDIR: %s\n",dyn_LOCKDIR);
182 output(screen," LOGFILEBASE: %s\n", dyn_LOGFILEBASE);
184 /*Output various other options (most map to defines in the configure script*/
185 output(screen,"\nOther Build Options:\n");
187 output(screen," HAVE_VOLATILE\n");
190 output(screen," HAVE_SHADOW_H\n");
193 output(screen," HAVE_CRYPT\n");
195 #ifdef USE_BOTH_CRYPT_CALLS
196 output(screen," USE_BOTH_CRYPT_CALLS\n");
198 #ifdef HAVE_TRUNCATED_SALT
199 output(screen," HAVE_TRUNCATED_SALT\n");
202 output(screen," HAVE_CUPS\n");
204 #ifdef HAVE_CUPS_CUPS_H
205 output(screen," HAVE_CUPS_CUPS_H\n");
207 #ifdef HAVE_CUPS_LANGUAGE_H
208 output(screen," HAVE_CUPS_LANGUAGE_H\n");
211 output(screen," HAVE_DLOPEN\n");
214 output(screen," HAVE_DLCLOSE\n");
217 output(screen," HAVE_DLSYM\n");
220 output(screen," HAVE_DLERROR\n");
222 #ifdef HAVE_UNIXSOCKET
223 output(screen," HAVE_UNIXSOCKET\n");
225 #ifdef HAVE_SOCKLEN_T_TYPE
226 output(screen," HAVE_SOCKLEN_T_TYPE\n");
228 #ifdef HAVE_SIG_ATOMIC_T_TYPE
229 output(screen," HAVE_SIG_ATOMIC_T_TYPE\n");
231 #ifdef HAVE_SETRESUID
232 output(screen," HAVE_SETRESUID\n");
234 #ifdef HAVE_SETRESGID
235 output(screen," HAVE_SETRESGID\n");
238 output(screen," HAVE_CONNECT\n");
240 #ifdef HAVE_YP_GET_DEFAULT_DOMAIN
241 output(screen," HAVE_YP_GET_DEFAULT_DOMAIN\n");
244 output(screen," HAVE_STAT64\n");
247 output(screen," HAVE_LSTAT64\n");
250 output(screen," HAVE_FSTAT64\n");
252 #ifdef HAVE_STRCASECMP
253 output(screen," HAVE_STRCASECMP\n");
256 output(screen," HAVE_MEMSET\n");
259 output(screen," HAVE_LONGLONG\n");
261 #ifdef COMPILER_SUPPORTS_LL
262 output(screen," COMPILER_SUPPORTS_LL\n");
265 output(screen," SIZEOF_OFF_T: %d\n",SIZEOF_OFF_T);
268 output(screen," HAVE_OFF64_T\n");
271 output(screen," SIZEOF_INO_T: %d\n",SIZEOF_INO_T);
274 output(screen," HAVE_INO64_T\n");
276 #ifdef HAVE_STRUCT_DIRENT64
277 output(screen," HAVE_STRUCT_DIRENT64\n");
279 #ifdef HAVE_UNSIGNED_CHAR
280 output(screen," HAVE_UNSIGNED_CHAR\n");
282 #ifdef HAVE_SOCK_SIN_LEN
283 output(screen," HAVE_SOCK_SIN_LEN\n");
285 #ifdef SEEKDIR_RETURNS_VOID
286 output(screen," SEEKDIR_RETURNS_VOID\n");
288 #ifdef HAVE_FUNCTION_MACRO
289 output(screen," HAVE_FUNCTION_MACRO\n");
291 #ifdef HAVE_GETTIMEOFDAY
292 output(screen," HAVE_GETTIMEOFDAY\n");
294 #ifdef HAVE_C99_VSNPRINTF
295 output(screen," HAVE_C99_VSNPRINTF\n");
297 #ifdef HAVE_BROKEN_READDIR
298 output(screen," HAVE_BROKEN_READDIR\n");
300 #ifdef HAVE_NATIVE_ICONV
301 output(screen," HAVE_NATIVE_ICONV\n");
303 #ifdef HAVE_KERNEL_OPLOCKS_LINUX
304 output(screen," HAVE_KERNEL_OPLOCKS_LINUX\n");
306 #ifdef HAVE_KERNEL_CHANGE_NOTIFY
307 output(screen," HAVE_KERNEL_CHANGE_NOTIFY\n");
309 #ifdef HAVE_KERNEL_SHARE_MODES
310 output(screen," HAVE_KERNEL_SHARE_MODES\n");
312 #ifdef HAVE_KERNEL_OPLOCKS_IRIX
313 output(screen," HAVE_KERNEL_OPLOCKS_IRIX\n");
315 #ifdef HAVE_IRIX_SPECIFIC_CAPABILITIES
316 output(screen," HAVE_IRIX_SPECIFIC_CAPABILITIES\n");
318 #ifdef HAVE_INT16_FROM_RPC_RPC_H
319 output(screen," HAVE_INT16_FROM_RPC_RPC_H\n");
321 #ifdef HAVE_UINT16_FROM_RPC_RPC_H
322 output(screen," HAVE_UINT16_FROM_RPC_RPC_H\n");
324 #ifdef HAVE_INT32_FROM_RPC_RPC_H
325 output(screen," HAVE_INT16_FROM_RPC_RPC_H\n");
327 #ifdef HAVE_UINT32_FROM_RPC_RPC_H
328 output(screen," HAVE_UINT32_FROM_RPC_RPC_H\n");
330 #ifdef HAVE_RPC_AUTH_ERROR_CONFLICT
331 output(screen," HAVE_RPC_AUTH_ERROR_CONFLICT\n");
333 #ifdef HAVE_FTRUNCATE_EXTEND
334 output(screen," HAVE_FTRUNCATE_EXTEND\n");
336 #ifdef HAVE_WORKING_AF_LOCAL
337 output(screen," HAVE_WORKING_AF_LOCAL\n");
339 #ifdef HAVE_BROKEN_GETGROUPS
340 output(screen," HAVE_BROKEN_GETGROUPS\n");
342 #ifdef REPLACE_GETPASS
343 output(screen," REPLACE_GETPASS\n");
345 #ifdef REPLACE_INET_NTOA
346 output(screen," REPLACE_INET_NTOA\n");
348 #ifdef HAVE_SECURE_MKSTEMP
349 output(screen," HAVE_SECURE_MKSTEMP\n");
351 #ifdef SYSCONF_SC_NGROUPS_MAX
352 output(screen," SYSCONF_SC_NGROUPS_MAX\n");
354 #ifdef HAVE_IFACE_AIX
355 output(screen," HAVE_IFACE_AIX\n");
357 #ifdef HAVE_IFACE_IFCONF
358 output(screen," HAVE_IFACE_IFCONF\n");
360 #ifdef HAVE_IFACE_IFREQ
361 output(screen," HAVE_IFACE_IFREQ\n");
364 output(screen," USE_SETRESUID\n");
367 output(screen," USE_SETREUID\n");
370 output(screen," USE_SETEUID\n");
373 output(screen," USE_SETUIDX\n");
376 output(screen," HAVE_MMAP\n");
378 #ifdef MMAP_BLACKLIST
379 output(screen," MMAP_BLACKLIST\n");
381 #ifdef FTRUNCATE_NEEDS_ROOT
382 output(screen," FTRUNCATE_NEEDS_ROOT\n");
384 #ifdef HAVE_FCNTL_LOCK
385 output(screen," HAVE_FCNTL_LOCK\n");
387 #ifdef HAVE_BROKEN_FCNTL64_LOCKS
388 output(screen," HAVE_BROKEN_FCNTL64_LOCKS\n");
390 #ifdef HAVE_STRUCT_FLOCK64
391 output(screen," HAVE_STRUCT_FLOCK64\n");
393 #ifdef BROKEN_NISPLUS_INCLUDE_FILES
394 output(screen," BROKEN_NISPLUS_INCLUDE_FILES\n");
397 output(screen," HAVE_LIBPAM\n");
399 #ifdef STAT_STATVFS64
400 output(screen," STAT_STATVFS64\n");
403 output(screen," STAT_STATVFS\n");
405 #ifdef STAT_STATFS3_OSF1
406 output(screen," STAT_STATFS3_OSF1\n");
408 #ifdef STAT_STATFS2_BSIZE
409 output(screen," STAT_STATFS2_BSIZE\n");
412 output(screen," STAT_STATFS4\n");
414 #ifdef STAT_STATFS2_FSIZE
415 output(screen," STAT_STATFS2_FSIZE\n");
417 #ifdef STAT_STATFS2_FS_DATA
418 output(screen," STAT_STATFS2_FS_DATA\n");
420 #ifdef HAVE_EXPLICIT_LARGEFILE_SUPPORT
421 output(screen," HAVE_EXPLICIT_LARGEFILE_SUPPORT\n");
425 /* Output UTMP Stuff */
426 output(screen,"\nUTMP Related:\n");
427 output(screen," WITH_UTMP\n");
430 output(screen," HAVE_UTIMBUF\n");
432 #ifdef HAVE_UT_UT_NAME
433 output(screen," HAVE_UT_UT_NAME\n");
435 #ifdef HAVE_UT_UT_USER
436 output(screen," HAVE_UT_UT_USER\n");
439 output(screen," HAVE_UT_UT_ID\n");
441 #ifdef HAVE_UT_UT_HOST
442 output(screen," HAVE_UT_UT_HOST\n");
444 #ifdef HAVE_UT_UT_TIME
445 output(screen," HAVE_UT_UT_TIME\n");
448 output(screen," HAVE_UT_UT_TV\n");
450 #ifdef HAVE_UT_UT_TYPE
451 output(screen," HAVE_UT_UT_TYPE\n");
453 #ifdef HAVE_UT_UT_PID
454 output(screen," HAVE_UT_UT_PID\n");
456 #ifdef HAVE_UT_UT_EXIT
457 output(screen," HAVE_UT_UT_EXIT\n");
459 #ifdef HAVE_UT_UT_ADDR
460 output(screen," HAVE_UT_UT_ADDR\n");
462 #ifdef PUTUTLINE_RETURNS_UTMP
463 output(screen," PUTUTLINE_RETURNS_UTMP\n");
465 #ifdef HAVE_UX_UT_SYSLEN
466 output(screen," HAVE_UX_UT_SYSLEN\n");
468 #endif /* WITH_UTMP */
470 /* Output Build OS */
471 output(screen,"\nBuilt for host os:\n");
473 output(screen," LINUX\n");
476 output(screen," SUNOS5\n");
479 output(screen," SUNOS4\n");
481 /* BSD Isn't Defined in the configure script, but there is something about it in include/config.h.in (and I guess acconfig.h) */
483 output(screen," BSD\n");
486 output(screen," IRIX\n");
489 output(screen," IRIX6\n");
492 output(screen," AIX\n");
495 output(screen," HPUX\n");
498 output(screen," QNX\n");
501 output(screen," OSF1\n");
504 output(screen," SCO\n");
507 output(screen," UNIXWARE\n");
510 output(screen," NEXT2\n");
513 output(screen," RELIANTUNIX\n");
516 /* Output the sizes of the various types */
517 output(screen,"\nType sizes:\n");
518 output(screen," sizeof(char): %d\n",sizeof(char));
519 output(screen," sizeof(int): %d\n",sizeof(int));
520 output(screen," sizeof(long): %d\n",sizeof(long));
521 output(screen," sizeof(uint8): %d\n",sizeof(uint8));
522 output(screen," sizeof(uint16): %d\n",sizeof(uint16));
523 output(screen," sizeof(uint32): %d\n",sizeof(uint32));
524 output(screen," sizeof(short): %d\n",sizeof(short));
525 output(screen," sizeof(void*): %d\n",sizeof(void*));
527 output(screen,"\nBuiltin modules:\n");
528 output(screen,"%s\n", STRING_STATIC_MODULES);