2 Unix SMB/Netbios implementation.
4 Build Options for Samba Suite
5 Copyright (C) Vance Lankhaar <vlankhaar@hotmail.com> 2001
6 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2001
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "build_env.h"
25 #include "dynconfig.h"
27 static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3);
30 #define OUTPUT(x) snprintf(outstring,sizeof(outstring),x); output(screen,outstring);
32 /****************************************************************************
33 helper function for build_options
34 ****************************************************************************/
35 static void output(BOOL screen, char *format, ...)
41 vasprintf(&ptr,format,ap);
53 /****************************************************************************
54 options set at build time for the samba suite
55 ****************************************************************************/
56 void build_options(BOOL screen)
58 if ((DEBUGLEVEL < 4) && (!screen)) {
63 /* Output information about the build environment */
64 output(screen,"Build environment:\n");
65 output(screen," Built by: %s@%s\n",BUILD_ENV_USER,BUILD_ENV_HOST);
66 output(screen," Built on: %s\n",BUILD_ENV_DATE);
68 output(screen," Built using: %s\n",BUILD_ENV_COMPILER);
69 output(screen," Build host: %s\n",BUILD_ENV_UNAME);
70 output(screen," SRCDIR: %s\n",BUILD_ENV_SRCDIR);
71 output(screen," BUILDDIR: %s\n",BUILD_ENV_BUILDDIR);
76 /* Output various options (most correspond to --with options) */
77 output(screen,"\nBuild options:\n");
78 #ifdef WITH_SMBWRAPPER
79 output(screen," WITH_SMBWRAPPER\n");
82 output(screen," WITH_AFS\n");
85 output(screen," WITH_DFS\n");
88 output(screen," KRB4_AUTH");
91 output(screen," HAVE_KRB5");
94 output(screen," WITH_AUTOMOUNT\n");
97 output(screen," WITH_SMBMOUNT\n");
100 output(screen," WITH_PAM\n");
103 output(screen," WITH_TDB_SAM\n");
106 output(screen," WITH_LDAP_SAM\n");
108 #ifdef WITH_SMBPASSWD_SAM
109 output(screen," WITH_SMBPASSWD_SAM\n");
111 #ifdef WITH_NISPLUS_SAM
112 output(screen," WITH_NISPLUS_SAM\n");
114 #ifdef WITH_NISPLUS_HOME
115 output(screen," WITH_NISPLUS_HOME\n");
118 output(screen," WITH_SSL\n");
121 output(screen," SSL_DIR: %s\n",SSL_DIR);
124 output(screen," WITH_SYSLOG\n");
127 output(screen," WITH_PROFILE\n");
130 output(screen," WITH_QUOTAS\n");
133 output(screen," WITH_MSDFS\n");
136 output(screen," WITH_VFS\n");
139 output(screen," USE_SPINLOCKS\n");
141 #ifdef SPARC_SPINLOCKS
142 output(screen," SPARC_SPINLOCKS\n");
144 #ifdef INTEL_SPINLOCKS
145 output(screen," INTEL_SPINLOCKS\n");
147 #ifdef MIPS_SPINLOCKS
148 output(screen," MIPS_SPINLOCKS\n");
150 #ifdef POWERPC_SPINLOCKS
151 output(screen," POWERPC_SPINLOCKS\n");
153 #ifdef HAVE_UNIXWARE_ACLS
154 output(screen," HAVE_UNIXWARE_ACLS\n");
156 #ifdef HAVE_SOLARIS_ACLS
157 output(screen," HAVE_SOLARIS_ACLS\n");
159 #ifdef HAVE_IRIX_ACLS
160 output(screen," HAVE_IRIX_ACLS\n");
163 output(screen," HAVE_AIX_ACLS\n");
165 #ifdef HAVE_POSIX_ACLS
166 output(screen," HAVE_POSIX_ACLS\n");
168 #ifdef HAVE_TRU64_ACLS
169 output(screen," HAVE_TRU64_ACLS\n");
172 #ifdef HAVE_ACL_GET_PERM_NP
173 output(screen," HAVE_ACL_GET_PERM_NP\n");
176 output(screen," HAVE_NO_ACLS\n");
178 #ifdef HAVE_LIBREADLINE
179 output(screen," HAVE_LIBREADLINE\n");
182 output(screen," WITH_LIBICONV: %s\n",WITH_LIBICONV);
186 /* Output various paths to files and directories */
187 output(screen,"\nPaths:\n");
188 output(screen," CONFIGFILE: %s\n", dyn_CONFIGFILE);
190 output(screen," PRIVATE_DIR: %s\n",PRIVATE_DIR);
193 output(screen," LMHOSTSFILE: %s\n",LMHOSTSFILE);
195 output(screen," SBINDIR: %s\n", dyn_SBINDIR);
196 output(screen," BINDIR: %s\n", dyn_BINDIR);
198 output(screen," LOCKDIR: %s\n",LOCKDIR);
201 output(screen," DRIVERFILE: %s\n",DRIVERFILE);
203 output(screen," LOGFILEBASE: %s\n", dyn_LOGFILEBASE);
205 output(screen," FORMSFILE: %s\n",FORMSFILE);
208 output(screen," NTDRIVERSDIR: %s\n",NTDRIVERSDIR);
211 /*Output various other options (most map to defines in the configure script*/
212 output(screen,"\nOther Build Options:\n");
214 output(screen," HAVE_VOLATILE\n");
217 output(screen," HAVE_SHADOW_H\n");
220 output(screen," HAVE_CRYPT\n");
222 #ifdef USE_BOTH_CRYPT_CALLS
223 output(screen," USE_BOTH_CRYPT_CALLS\n");
225 #ifdef HAVE_TRUNCATED_SALT
226 output(screen," HAVE_TRUNCATED_SALT\n");
229 output(screen," HAVE_CUPS\n");
231 #ifdef HAVE_CUPS_CUPS_H
232 output(screen," HAVE_CUPS_CUPS_H\n");
234 #ifdef HAVE_CUPS_LANGUAGE_H
235 output(screen," HAVE_CUPS_LANGUAGE_H\n");
238 output(screen," HAVE_LIBDL\n");
240 #ifdef HAVE_UNIXSOCKET
241 output(screen," HAVE_UNIXSOCKET\n");
243 #ifdef HAVE_SOCKLEN_T_TYPE
244 output(screen," HAVE_SOCKLEN_T_TYPE\n");
246 #ifdef HAVE_SIG_ATOMIC_T_TYPE
247 output(screen," HAVE_SIG_ATOMIC_T_TYPE\n");
249 #ifdef HAVE_SETRESUID
250 output(screen," HAVE_SETRESUID\n");
252 #ifdef HAVE_SETRESGID
253 output(screen," HAVE_SETRESGID\n");
256 output(screen," HAVE_CONNECT\n");
258 #ifdef HAVE_YP_GET_DEFAULT_DOMAIN
259 output(screen," HAVE_YP_GET_DEFAULT_DOMAIN\n");
262 output(screen," HAVE_STAT64\n");
265 output(screen," HAVE_LSTAT64\n");
268 output(screen," HAVE_FSTAT64\n");
270 #ifdef HAVE_STRCASECMP
271 output(screen," HAVE_STRCASECMP\n");
274 output(screen," HAVE_MEMSET\n");
277 output(screen," HAVE_LONGLONG\n");
279 #ifdef COMPILER_SUPPORTS_LL
280 output(screen," COMPILER_SUPPORTS_LL\n");
283 output(screen," SIZEOF_OFF_T: %d\n",SIZEOF_OFF_T);
286 output(screen," HAVE_OFF64_T\n");
289 output(screen," SIZEOF_INO_T: %d\n",SIZEOF_INO_T);
292 output(screen," HAVE_INO64_T\n");
294 #ifdef HAVE_STRUCT_DIRENT64
295 output(screen," HAVE_STRUCT_DIRENT64\n");
297 #ifdef HAVE_UNSIGNED_CHAR
298 output(screen," HAVE_UNSIGNED_CHAR\n");
300 #ifdef HAVE_SOCK_SIN_LEN
301 output(screen," HAVE_SOCK_SIN_LEN\n");
303 #ifdef SEEKDIR_RETURNS_VOID
304 output(screen," SEEKDIR_RETURNS_VOID\n");
306 #ifdef HAVE_FILE_MACRO
307 output(screen," HAVE_FILE_MACRO\n");
309 #ifdef HAVE_FUNCTION_MACRO
310 output(screen," HAVE_FUNCTION_MACRO\n");
312 #ifdef HAVE_GETTIMEOFDAY
313 output(screen," HAVE_GETTIMEOFDAY\n");
315 #ifdef HAVE_C99_VSNPRINTF
316 output(screen," HAVE_C99_VSNPRINTF\n");
318 #ifdef HAVE_BROKEN_READDIR
319 output(screen," HAVE_BROKEN_READDIR\n");
321 #ifdef HAVE_NATIVE_ICONV
322 output(screen," HAVE_NATIVE_ICONV\n");
324 #ifdef HAVE_KERNEL_OPLOCKS_LINUX
325 output(screen," HAVE_KERNEL_OPLOCKS_LINUX\n");
327 #ifdef HAVE_KERNEL_CHANGE_NOTIFY
328 output(screen," HAVE_KERNEL_CHANGE_NOTIFY\n");
330 #ifdef HAVE_KERNEL_SHARE_MODES
331 output(screen," HAVE_KERNEL_SHARE_MODES\n");
333 #ifdef HAVE_KERNEL_OPLOCKS_IRIX
334 output(screen," HAVE_KERNEL_OPLOCKS_IRIX\n");
336 #ifdef HAVE_IRIX_SPECIFIC_CAPABILITIES
337 output(screen," HAVE_IRIX_SPECIFIC_CAPABILITIES\n");
339 #ifdef HAVE_INT16_FROM_RPC_RPC_H
340 output(screen," HAVE_INT16_FROM_RPC_RPC_H\n");
342 #ifdef HAVE_UINT16_FROM_RPC_RPC_H
343 output(screen," HAVE_UINT16_FROM_RPC_RPC_H\n");
345 #ifdef HAVE_INT32_FROM_RPC_RPC_H
346 output(screen," HAVE_INT16_FROM_RPC_RPC_H\n");
348 #ifdef HAVE_UINT32_FROM_RPC_RPC_H
349 output(screen," HAVE_UINT32_FROM_RPC_RPC_H\n");
351 #ifdef HAVE_RPC_AUTH_ERROR_CONFLICT
352 output(screen," HAVE_RPC_AUTH_ERROR_CONFLICT\n");
354 #ifdef HAVE_FTRUNCATE_EXTEND
355 output(screen," HAVE_FTRUNCATE_EXTEND\n");
357 #ifdef HAVE_WORKING_AF_LOCAL
358 output(screen," HAVE_WORKING_AF_LOCAL\n");
360 #ifdef HAVE_BROKEN_GETGROUPS
361 output(screen," HAVE_BROKEN_GETGROUPS\n");
363 #ifdef REPLACE_GETPASS
364 output(screen," REPLACE_GETPASS\n");
366 #ifdef REPLACE_INET_NTOA
367 output(screen," REPLACE_INET_NTOA\n");
369 #ifdef HAVE_SECURE_MKSTEMP
370 output(screen," HAVE_SECURE_MKSTEMP\n");
372 #ifdef SYSCONF_SC_NGROUPS_MAX
373 output(screen," SYSCONF_SC_NGROUPS_MAX\n");
375 #ifdef HAVE_IFACE_AIX
376 output(screen," HAVE_IFACE_AIX\n");
378 #ifdef HAVE_IFACE_IFCONF
379 output(screen," HAVE_IFACE_IFCONF\n");
381 #ifdef HAVE_IFACE_IFREQ
382 output(screen," HAVE_IFACE_IFREQ\n");
385 output(screen," USE_SETRESUID\n");
388 output(screen," USE_SETREUID\n");
391 output(screen," USE_SETEUID\n");
394 output(screen," USE_SETUIDX\n");
397 output(screen," HAVE_MMAP\n");
399 #ifdef MMAP_BLACKLIST
400 output(screen," MMAP_BLACKLIST\n");
402 #ifdef FTRUNCATE_NEEDS_ROOT
403 output(screen," FTRUNCATE_NEEDS_ROOT\n");
405 #ifdef HAVE_FCNTL_LOCK
406 output(screen," HAVE_FCNTL_LOCK\n");
408 #ifdef HAVE_BROKEN_FCNTL64_LOCKS
409 output(screen," HAVE_BROKEN_FCNTL64_LOCKS\n");
411 #ifdef HAVE_STRUCT_FLOCK64
412 output(screen," HAVE_STRUCT_FLOCK64\n");
414 #ifdef BROKEN_NISPLUS_INCLUDE_FILES
415 output(screen," BROKEN_NISPLUS_INCLUDE_FILES\n");
418 output(screen," HAVE_LIBPAM\n");
420 #ifdef STAT_STATVFS64
421 output(screen," STAT_STATVFS64\n");
424 output(screen," STAT_STATVFS\n");
426 #ifdef STAT_STATFS3_OSF1
427 output(screen," STAT_STATFS3_OSF1\n");
429 #ifdef STAT_STATFS2_BSIZE
430 output(screen," STAT_STATFS2_BSIZE\n");
433 output(screen," STAT_STATFS4\n");
435 #ifdef STAT_STATFS2_FSIZE
436 output(screen," STAT_STATFS2_FSIZE\n");
438 #ifdef STAT_STATFS2_FS_DATA
439 output(screen," STAT_STATFS2_FS_DATA\n");
441 #ifdef HAVE_EXPLICIT_LARGEFILE_SUPPORT
442 output(screen," HAVE_EXPLICIT_LARGEFILE_SUPPORT\n");
446 /* Output UTMP Stuff */
447 output(screen,"\nUTMP Related:\n");
448 output(screen," WITH_UTMP\n");
451 output(screen," HAVE_UTIMBUF\n");
453 #ifdef HAVE_UT_UT_NAME
454 output(screen," HAVE_UT_UT_NAME\n");
456 #ifdef HAVE_UT_UT_USER
457 output(screen," HAVE_UT_UT_USER\n");
460 output(screen," HAVE_UT_UT_ID\n");
462 #ifdef HAVE_UT_UT_HOST
463 output(screen," HAVE_UT_UT_HOST\n");
465 #ifdef HAVE_UT_UT_TIME
466 output(screen," HAVE_UT_UT_TIME\n");
469 output(screen," HAVE_UT_UT_TV\n");
471 #ifdef HAVE_UT_UT_TYPE
472 output(screen," HAVE_UT_UT_TYPE\n");
474 #ifdef HAVE_UT_UT_PID
475 output(screen," HAVE_UT_UT_PID\n");
477 #ifdef HAVE_UT_UT_EXIT
478 output(screen," HAVE_UT_UT_EXIT\n");
480 #ifdef HAVE_UT_UT_ADDR
481 output(screen," HAVE_UT_UT_ADDR\n");
483 #ifdef PUTUTLINE_RETURNS_UTMP
484 output(screen," PUTUTLINE_RETURNS_UTMP\n");
486 #ifdef HAVE_UX_UT_SYSLEN
487 output(screen," HAVE_UX_UT_SYSLEN\n");
489 #endif /* WITH_UTMP */
491 /* Output Build OS */
492 output(screen,"\nBuilt for host os:\n");
494 output(screen," LINUX\n");
497 output(screen," SUNOS5\n");
500 output(screen," SUNOS4\n");
502 /* BSD Isn't Defined in the configure script, but there is something about it in include/config.h.in (and I guess acconfig.h) */
504 output(screen," BSD\n");
507 output(screen," IRIX\n");
510 output(screen," IRIX6\n");
513 output(screen," AIX\n");
516 output(screen," HPUX\n");
519 output(screen," QNX\n");
522 output(screen," OSF1\n");
525 output(screen," SCO\n");
528 output(screen," UNIXWARE\n");
531 output(screen," NEXT2\n");
534 output(screen," RELIANTUNIX\n");
537 /* Output the sizes of the various types */
538 output(screen,"\nType sizes:\n");
539 output(screen," sizeof(char): %d\n",sizeof(char));
540 output(screen," sizeof(int): %d\n",sizeof(int));
541 output(screen," sizeof(long): %d\n",sizeof(long));
542 output(screen," sizeof(uint8): %d\n",sizeof(uint8));
543 output(screen," sizeof(uint16): %d\n",sizeof(uint16));
544 output(screen," sizeof(uint32): %d\n",sizeof(uint32));
545 output(screen," sizeof(short): %d\n",sizeof(short));
546 output(screen," sizeof(void*): %d\n",sizeof(void*));