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
, 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
, 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");
108 output(screen
," WITH_TDB_SAM\n");
110 #ifdef WITH_SMBPASSWD_SAM
111 output(screen
," WITH_SMBPASSWD_SAM\n");
113 #ifdef WITH_NISPLUS_SAM
114 output(screen
," WITH_NISPLUS_SAM\n");
116 #ifdef WITH_NISPLUS_HOME
117 output(screen
," WITH_NISPLUS_HOME\n");
120 output(screen
," WITH_SYSLOG\n");
123 output(screen
," WITH_PROFILE\n");
126 output(screen
," WITH_QUOTAS\n");
129 output(screen
," WITH_VFS\n");
132 output(screen
," USE_SPINLOCKS\n");
134 #ifdef SPARC_SPINLOCKS
135 output(screen
," SPARC_SPINLOCKS\n");
137 #ifdef INTEL_SPINLOCKS
138 output(screen
," INTEL_SPINLOCKS\n");
140 #ifdef MIPS_SPINLOCKS
141 output(screen
," MIPS_SPINLOCKS\n");
143 #ifdef POWERPC_SPINLOCKS
144 output(screen
," POWERPC_SPINLOCKS\n");
146 #ifdef HAVE_UNIXWARE_ACLS
147 output(screen
," HAVE_UNIXWARE_ACLS\n");
149 #ifdef HAVE_SOLARIS_ACLS
150 output(screen
," HAVE_SOLARIS_ACLS\n");
152 #ifdef HAVE_IRIX_ACLS
153 output(screen
," HAVE_IRIX_ACLS\n");
156 output(screen
," HAVE_AIX_ACLS\n");
158 #ifdef HAVE_POSIX_ACLS
159 output(screen
," HAVE_POSIX_ACLS\n");
161 #ifdef HAVE_TRU64_ACLS
162 output(screen
," HAVE_TRU64_ACLS\n");
165 #ifdef HAVE_ACL_GET_PERM_NP
166 output(screen
," HAVE_ACL_GET_PERM_NP\n");
169 output(screen
," HAVE_NO_ACLS\n");
171 #ifdef HAVE_LIBREADLINE
172 output(screen
," HAVE_LIBREADLINE\n");
175 output(screen
," WITH_LIBICONV: %s\n",WITH_LIBICONV
);
179 /* Output various paths to files and directories */
180 output(screen
,"\nPaths:\n");
181 output(screen
," CONFIGFILE: %s\n", dyn_CONFIGFILE
);
183 output(screen
," PRIVATE_DIR: %s\n",PRIVATE_DIR
);
186 output(screen
," LMHOSTSFILE: %s\n",LMHOSTSFILE
);
188 output(screen
," SBINDIR: %s\n", dyn_SBINDIR
);
189 output(screen
," BINDIR: %s\n", dyn_BINDIR
);
190 output(screen
," LOCKDIR: %s\n",dyn_LOCKDIR
);
191 output(screen
," DRIVERFILE: %s\n", dyn_DRIVERFILE
);
192 output(screen
," LOGFILEBASE: %s\n", dyn_LOGFILEBASE
);
194 /*Output various other options (most map to defines in the configure script*/
195 output(screen
,"\nOther Build Options:\n");
197 output(screen
," HAVE_VOLATILE\n");
200 output(screen
," HAVE_SHADOW_H\n");
203 output(screen
," HAVE_CRYPT\n");
205 #ifdef USE_BOTH_CRYPT_CALLS
206 output(screen
," USE_BOTH_CRYPT_CALLS\n");
208 #ifdef HAVE_TRUNCATED_SALT
209 output(screen
," HAVE_TRUNCATED_SALT\n");
212 output(screen
," HAVE_CUPS\n");
214 #ifdef HAVE_CUPS_CUPS_H
215 output(screen
," HAVE_CUPS_CUPS_H\n");
217 #ifdef HAVE_CUPS_LANGUAGE_H
218 output(screen
," HAVE_CUPS_LANGUAGE_H\n");
221 output(screen
," HAVE_DLOPEN\n");
224 output(screen
," HAVE_DLCLOSE\n");
227 output(screen
," HAVE_DLSYM\n");
230 output(screen
," HAVE_DLERROR\n");
232 #ifdef HAVE_UNIXSOCKET
233 output(screen
," HAVE_UNIXSOCKET\n");
235 #ifdef HAVE_SOCKLEN_T_TYPE
236 output(screen
," HAVE_SOCKLEN_T_TYPE\n");
238 #ifdef HAVE_SIG_ATOMIC_T_TYPE
239 output(screen
," HAVE_SIG_ATOMIC_T_TYPE\n");
241 #ifdef HAVE_SETRESUID
242 output(screen
," HAVE_SETRESUID\n");
244 #ifdef HAVE_SETRESGID
245 output(screen
," HAVE_SETRESGID\n");
248 output(screen
," HAVE_CONNECT\n");
250 #ifdef HAVE_YP_GET_DEFAULT_DOMAIN
251 output(screen
," HAVE_YP_GET_DEFAULT_DOMAIN\n");
254 output(screen
," HAVE_STAT64\n");
257 output(screen
," HAVE_LSTAT64\n");
260 output(screen
," HAVE_FSTAT64\n");
262 #ifdef HAVE_STRCASECMP
263 output(screen
," HAVE_STRCASECMP\n");
266 output(screen
," HAVE_MEMSET\n");
269 output(screen
," HAVE_LONGLONG\n");
271 #ifdef COMPILER_SUPPORTS_LL
272 output(screen
," COMPILER_SUPPORTS_LL\n");
275 output(screen
," SIZEOF_OFF_T: %d\n",SIZEOF_OFF_T
);
278 output(screen
," HAVE_OFF64_T\n");
281 output(screen
," SIZEOF_INO_T: %d\n",SIZEOF_INO_T
);
284 output(screen
," HAVE_INO64_T\n");
286 #ifdef HAVE_STRUCT_DIRENT64
287 output(screen
," HAVE_STRUCT_DIRENT64\n");
289 #ifdef HAVE_UNSIGNED_CHAR
290 output(screen
," HAVE_UNSIGNED_CHAR\n");
292 #ifdef HAVE_SOCK_SIN_LEN
293 output(screen
," HAVE_SOCK_SIN_LEN\n");
295 #ifdef SEEKDIR_RETURNS_VOID
296 output(screen
," SEEKDIR_RETURNS_VOID\n");
298 #ifdef HAVE_FILE_MACRO
299 output(screen
," HAVE_FILE_MACRO\n");
301 #ifdef HAVE_FUNCTION_MACRO
302 output(screen
," HAVE_FUNCTION_MACRO\n");
304 #ifdef HAVE_GETTIMEOFDAY
305 output(screen
," HAVE_GETTIMEOFDAY\n");
307 #ifdef HAVE_C99_VSNPRINTF
308 output(screen
," HAVE_C99_VSNPRINTF\n");
310 #ifdef HAVE_BROKEN_READDIR
311 output(screen
," HAVE_BROKEN_READDIR\n");
313 #ifdef HAVE_NATIVE_ICONV
314 output(screen
," HAVE_NATIVE_ICONV\n");
316 #ifdef HAVE_KERNEL_OPLOCKS_LINUX
317 output(screen
," HAVE_KERNEL_OPLOCKS_LINUX\n");
319 #ifdef HAVE_KERNEL_CHANGE_NOTIFY
320 output(screen
," HAVE_KERNEL_CHANGE_NOTIFY\n");
322 #ifdef HAVE_KERNEL_SHARE_MODES
323 output(screen
," HAVE_KERNEL_SHARE_MODES\n");
325 #ifdef HAVE_KERNEL_OPLOCKS_IRIX
326 output(screen
," HAVE_KERNEL_OPLOCKS_IRIX\n");
328 #ifdef HAVE_IRIX_SPECIFIC_CAPABILITIES
329 output(screen
," HAVE_IRIX_SPECIFIC_CAPABILITIES\n");
331 #ifdef HAVE_INT16_FROM_RPC_RPC_H
332 output(screen
," HAVE_INT16_FROM_RPC_RPC_H\n");
334 #ifdef HAVE_UINT16_FROM_RPC_RPC_H
335 output(screen
," HAVE_UINT16_FROM_RPC_RPC_H\n");
337 #ifdef HAVE_INT32_FROM_RPC_RPC_H
338 output(screen
," HAVE_INT16_FROM_RPC_RPC_H\n");
340 #ifdef HAVE_UINT32_FROM_RPC_RPC_H
341 output(screen
," HAVE_UINT32_FROM_RPC_RPC_H\n");
343 #ifdef HAVE_RPC_AUTH_ERROR_CONFLICT
344 output(screen
," HAVE_RPC_AUTH_ERROR_CONFLICT\n");
346 #ifdef HAVE_FTRUNCATE_EXTEND
347 output(screen
," HAVE_FTRUNCATE_EXTEND\n");
349 #ifdef HAVE_WORKING_AF_LOCAL
350 output(screen
," HAVE_WORKING_AF_LOCAL\n");
352 #ifdef HAVE_BROKEN_GETGROUPS
353 output(screen
," HAVE_BROKEN_GETGROUPS\n");
355 #ifdef REPLACE_GETPASS
356 output(screen
," REPLACE_GETPASS\n");
358 #ifdef REPLACE_INET_NTOA
359 output(screen
," REPLACE_INET_NTOA\n");
361 #ifdef HAVE_SECURE_MKSTEMP
362 output(screen
," HAVE_SECURE_MKSTEMP\n");
364 #ifdef SYSCONF_SC_NGROUPS_MAX
365 output(screen
," SYSCONF_SC_NGROUPS_MAX\n");
367 #ifdef HAVE_IFACE_AIX
368 output(screen
," HAVE_IFACE_AIX\n");
370 #ifdef HAVE_IFACE_IFCONF
371 output(screen
," HAVE_IFACE_IFCONF\n");
373 #ifdef HAVE_IFACE_IFREQ
374 output(screen
," HAVE_IFACE_IFREQ\n");
377 output(screen
," USE_SETRESUID\n");
380 output(screen
," USE_SETREUID\n");
383 output(screen
," USE_SETEUID\n");
386 output(screen
," USE_SETUIDX\n");
389 output(screen
," HAVE_MMAP\n");
391 #ifdef MMAP_BLACKLIST
392 output(screen
," MMAP_BLACKLIST\n");
394 #ifdef FTRUNCATE_NEEDS_ROOT
395 output(screen
," FTRUNCATE_NEEDS_ROOT\n");
397 #ifdef HAVE_FCNTL_LOCK
398 output(screen
," HAVE_FCNTL_LOCK\n");
400 #ifdef HAVE_BROKEN_FCNTL64_LOCKS
401 output(screen
," HAVE_BROKEN_FCNTL64_LOCKS\n");
403 #ifdef HAVE_STRUCT_FLOCK64
404 output(screen
," HAVE_STRUCT_FLOCK64\n");
406 #ifdef BROKEN_NISPLUS_INCLUDE_FILES
407 output(screen
," BROKEN_NISPLUS_INCLUDE_FILES\n");
410 output(screen
," HAVE_LIBPAM\n");
412 #ifdef STAT_STATVFS64
413 output(screen
," STAT_STATVFS64\n");
416 output(screen
," STAT_STATVFS\n");
418 #ifdef STAT_STATFS3_OSF1
419 output(screen
," STAT_STATFS3_OSF1\n");
421 #ifdef STAT_STATFS2_BSIZE
422 output(screen
," STAT_STATFS2_BSIZE\n");
425 output(screen
," STAT_STATFS4\n");
427 #ifdef STAT_STATFS2_FSIZE
428 output(screen
," STAT_STATFS2_FSIZE\n");
430 #ifdef STAT_STATFS2_FS_DATA
431 output(screen
," STAT_STATFS2_FS_DATA\n");
433 #ifdef HAVE_EXPLICIT_LARGEFILE_SUPPORT
434 output(screen
," HAVE_EXPLICIT_LARGEFILE_SUPPORT\n");
438 /* Output UTMP Stuff */
439 output(screen
,"\nUTMP Related:\n");
440 output(screen
," WITH_UTMP\n");
443 output(screen
," HAVE_UTIMBUF\n");
445 #ifdef HAVE_UT_UT_NAME
446 output(screen
," HAVE_UT_UT_NAME\n");
448 #ifdef HAVE_UT_UT_USER
449 output(screen
," HAVE_UT_UT_USER\n");
452 output(screen
," HAVE_UT_UT_ID\n");
454 #ifdef HAVE_UT_UT_HOST
455 output(screen
," HAVE_UT_UT_HOST\n");
457 #ifdef HAVE_UT_UT_TIME
458 output(screen
," HAVE_UT_UT_TIME\n");
461 output(screen
," HAVE_UT_UT_TV\n");
463 #ifdef HAVE_UT_UT_TYPE
464 output(screen
," HAVE_UT_UT_TYPE\n");
466 #ifdef HAVE_UT_UT_PID
467 output(screen
," HAVE_UT_UT_PID\n");
469 #ifdef HAVE_UT_UT_EXIT
470 output(screen
," HAVE_UT_UT_EXIT\n");
472 #ifdef HAVE_UT_UT_ADDR
473 output(screen
," HAVE_UT_UT_ADDR\n");
475 #ifdef PUTUTLINE_RETURNS_UTMP
476 output(screen
," PUTUTLINE_RETURNS_UTMP\n");
478 #ifdef HAVE_UX_UT_SYSLEN
479 output(screen
," HAVE_UX_UT_SYSLEN\n");
481 #endif /* WITH_UTMP */
483 /* Output Build OS */
484 output(screen
,"\nBuilt for host os:\n");
486 output(screen
," LINUX\n");
489 output(screen
," SUNOS5\n");
492 output(screen
," SUNOS4\n");
494 /* BSD Isn't Defined in the configure script, but there is something about it in include/config.h.in (and I guess acconfig.h) */
496 output(screen
," BSD\n");
499 output(screen
," IRIX\n");
502 output(screen
," IRIX6\n");
505 output(screen
," AIX\n");
508 output(screen
," HPUX\n");
511 output(screen
," QNX\n");
514 output(screen
," OSF1\n");
517 output(screen
," SCO\n");
520 output(screen
," UNIXWARE\n");
523 output(screen
," NEXT2\n");
526 output(screen
," RELIANTUNIX\n");
529 /* Output the sizes of the various types */
530 output(screen
,"\nType sizes:\n");
531 output(screen
," sizeof(char): %d\n",sizeof(char));
532 output(screen
," sizeof(int): %d\n",sizeof(int));
533 output(screen
," sizeof(long): %d\n",sizeof(long));
534 output(screen
," sizeof(uint8): %d\n",sizeof(uint8
));
535 output(screen
," sizeof(uint16): %d\n",sizeof(uint16
));
536 output(screen
," sizeof(uint32): %d\n",sizeof(uint32
));
537 output(screen
," sizeof(short): %d\n",sizeof(short));
538 output(screen
," sizeof(void*): %d\n",sizeof(void*));