1 # -*- Autoconf -*- 2 # Process this file with autoconf and autoheader to produce a configure script. 3 4 # This Autoconf file was cobbled from various locations. In particular, a bunch 5 # of the platform checks have been taken straight from OpenSSH's configure.ac 6 # Huge thanks to them for dealing with the horrible platform-specifics :) 7 8 AC_PREREQ(2.50) 9 AC_INIT(buffer.c) 10 11 OLDCFLAGS=$CFLAGS 12 # Checks for programs. 13 AC_PROG_CC 14 AC_PROG_MAKE_SET 15 16 if test -z "$LD" ; then 17 LD=$CC 18 fi 19 AC_SUBST(LD) 20 21 if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then 22 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) 23 CFLAGS="-Os -W -Wall" 24 fi 25 26 # large file support is useful for scp 27 AC_SYS_LARGEFILE 28 29 # Host specific options 30 # this isn't a definitive list of hosts, they are just added as required 31 AC_CANONICAL_HOST 32 33 case "$host" in 34 35 *-*-linux*) 36 no_ptmx_check=1 37 ;; 38 39 *-*-solaris*) 40 CFLAGS="$CFLAGS -I/usr/local/include" 41 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" 42 conf_lastlog_location="/var/adm/lastlog" 43 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 44 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` 45 if test "$sol2ver" -ge 8; then 46 AC_MSG_RESULT(yes) 47 AC_DEFINE(DISABLE_UTMP,,Disable utmp) 48 AC_DEFINE(DISABLE_WTMP,,Disable wtmp) 49 else 50 AC_MSG_RESULT(no) 51 fi 52 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") 53 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") 54 ;; 55 56 *-*-aix*) 57 AC_DEFINE(AIX,,Using AIX) 58 # OpenSSH thinks it's broken. If it isn't, let me know. 59 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) 60 ;; 61 62 *-*-hpux*) 63 LIBS="$LIBS -lsec" 64 # It's probably broken. 65 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) 66 ;; 67 *-dec-osf*) 68 AC_DEFINE(BROKEN_GETADDRINFO,,Broken getaddrinfo) 69 ;; 70 esac 71 72 AC_CHECK_TOOL(AR, ar, :) 73 AC_CHECK_TOOL(RANLIB, ranlib, :) 74 AC_CHECK_TOOL(STRIP, strip, :) 75 AC_CHECK_TOOL(INSTALL, install, :) 76 77 dnl Can't use login() or logout() with uclibc 78 AC_CHECK_DECL(__UCLIBC__, 79 [ 80 no_loginfunc_check=1 81 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.]) 82 ],,,) 83 84 # Checks for libraries. 85 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") 86 87 # Check if zlib is needed 88 AC_ARG_WITH(zlib, 89 [ --with-zlib=PATH Use zlib in PATH], 90 [ 91 # option is given 92 if test -d "$withval/lib"; then 93 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 94 else 95 LDFLAGS="-L${withval} ${LDFLAGS}" 96 fi 97 if test -d "$withval/include"; then 98 CPPFLAGS="-I${withval}/include ${CPPFLAGS}" 99 else 100 CPPFLAGS="-I${withval} ${CPPFLAGS}" 101 fi 102 ] 103 ) 104 105 AC_ARG_ENABLE(zlib, 106 [ --disable-zlib Don't include zlib support], 107 [ 108 if test "x$enableval" = "xno"; then 109 AC_DEFINE(DISABLE_ZLIB,, Use zlib) 110 AC_MSG_NOTICE(Disabling zlib) 111 else 112 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) 113 AC_MSG_NOTICE(Enabling zlib) 114 fi 115 ], 116 [ 117 # if not disabled, check for zlib 118 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) 119 AC_MSG_NOTICE(Enabling zlib) 120 ] 121 ) 122 123 # Check if pam is needed 124 AC_ARG_WITH(pam, 125 [ --with-pam=PATH Use pam in PATH], 126 [ 127 # option is given 128 if test -d "$withval/lib"; then 129 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 130 else 131 LDFLAGS="-L${withval} ${LDFLAGS}" 132 fi 133 if test -d "$withval/include"; then 134 CPPFLAGS="-I${withval}/include ${CPPFLAGS}" 135 else 136 CPPFLAGS="-I${withval} ${CPPFLAGS}" 137 fi 138 ] 139 ) 140 141 142 AC_ARG_ENABLE(pam, 143 [ --enable-pam Try to include PAM support], 144 [ 145 if test "x$enableval" = "xyes"; then 146 AC_CHECK_LIB(pam, pam_authenticate, , AC_MSG_ERROR([*** PAM missing - install first or check config.log ***])) 147 AC_MSG_NOTICE(Enabling PAM) 148 else 149 AC_DEFINE(DISABLE_PAM,, Use PAM) 150 AC_MSG_NOTICE(Disabling PAM) 151 fi 152 ], 153 [ 154 # disable it by default 155 AC_DEFINE(DISABLE_PAM,, Use PAM) 156 AC_MSG_NOTICE(Disabling PAM) 157 ] 158 ) 159 160 AC_ARG_ENABLE(openpty, 161 [ --disable-openpty Don't use openpty, use alternative method], 162 [ 163 if test "x$enableval" = "xno"; then 164 AC_MSG_NOTICE(Not using openpty) 165 else 166 AC_MSG_NOTICE(Using openpty if available) 167 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)]) 168 fi 169 ], 170 [ 171 AC_MSG_NOTICE(Using openpty if available) 172 AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) 173 ] 174 ) 175 176 177 AC_ARG_ENABLE(syslog, 178 [ --disable-syslog Don't include syslog support], 179 [ 180 if test "x$enableval" = "xno"; then 181 AC_DEFINE(DISABLE_SYSLOG,, Using syslog) 182 AC_MSG_NOTICE(Disabling syslog) 183 else 184 AC_MSG_NOTICE(Enabling syslog) 185 fi 186 ], 187 [ 188 AC_MSG_NOTICE(Enabling syslog) 189 ] 190 ) 191 192 AC_ARG_ENABLE(shadow, 193 [ --disable-shadow Don't use shadow passwords (if available)], 194 [ 195 if test "x$enableval" = "xno"; then 196 AC_MSG_NOTICE(Not using shadow passwords) 197 else 198 AC_CHECK_HEADERS([shadow.h]) 199 AC_MSG_NOTICE(Using shadow passwords if available) 200 fi 201 ], 202 [ 203 AC_CHECK_HEADERS([shadow.h]) 204 AC_MSG_NOTICE(Using shadow passwords if available) 205 ] 206 ) 207 208 209 # Checks for header files. 210 AC_HEADER_STDC 211 AC_HEADER_SYS_WAIT 212 AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h pam/pam_appl.h netinet/in_systm.h]) 213 214 # Checks for typedefs, structures, and compiler characteristics. 215 AC_C_CONST 216 AC_TYPE_UID_T 217 AC_TYPE_MODE_T 218 AC_TYPE_PID_T 219 AC_TYPE_SIZE_T 220 AC_HEADER_TIME 221 222 AC_CHECK_TYPES([uint16_t, u_int16_t, struct sockaddr_storage]) 223 AC_CHECK_TYPE([socklen_t], ,[ 224 AC_MSG_CHECKING([for socklen_t equivalent]) 225 AC_CACHE_VAL([curl_cv_socklen_t_equiv], 226 [ 227 # Systems have either "struct sockaddr *" or 228 # "void *" as the second argument to getpeername 229 curl_cv_socklen_t_equiv= 230 for arg2 in "struct sockaddr" void; do 231 for t in int size_t unsigned long "unsigned long"; do 232 AC_TRY_COMPILE([ 233 #include <sys/types.h> 234 #include <sys/socket.h> 235 236 int getpeername (int, $arg2 *, $t *); 237 ],[ 238 $t len; 239 getpeername(0,0,&len); 240 ],[ 241 curl_cv_socklen_t_equiv="$t" 242 break 243 ]) 244 done 245 done 246 247 if test "x$curl_cv_socklen_t_equiv" = x; then 248 AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) 249 fi 250 ]) 251 AC_MSG_RESULT($curl_cv_socklen_t_equiv) 252 AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, 253 [type to use in place of socklen_t if not defined])], 254 [#include <sys/types.h> 255 #include <sys/socket.h>]) 256 257 # for the fake-rfc2553 stuff - straight from OpenSSH 258 259 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ 260 AC_TRY_COMPILE( 261 [ 262 #include <sys/types.h> 263 #include <sys/socket.h> 264 ], 265 [ struct sockaddr_storage s; ], 266 [ ac_cv_have_struct_sockaddr_storage="yes" ], 267 [ ac_cv_have_struct_sockaddr_storage="no" ] 268 ) 269 ]) 270 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 271 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) 272 fi 273 274 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ 275 AC_TRY_COMPILE( 276 [ 277 #include <sys/types.h> 278 #include <netinet/in.h> 279 ], 280 [ struct sockaddr_in6 s; s.sin6_family = 0; ], 281 [ ac_cv_have_struct_sockaddr_in6="yes" ], 282 [ ac_cv_have_struct_sockaddr_in6="no" ] 283 ) 284 ]) 285 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 286 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,,Have struct sockaddr_in6) 287 fi 288 289 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ 290 AC_TRY_COMPILE( 291 [ 292 #include <sys/types.h> 293 #include <netinet/in.h> 294 ], 295 [ struct in6_addr s; s.s6_addr[0] = 0; ], 296 [ ac_cv_have_struct_in6_addr="yes" ], 297 [ ac_cv_have_struct_in6_addr="no" ] 298 ) 299 ]) 300 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 301 AC_DEFINE(HAVE_STRUCT_IN6_ADDR,,Have struct in6_addr) 302 fi 303 304 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ 305 AC_TRY_COMPILE( 306 [ 307 #include <sys/types.h> 308 #include <sys/socket.h> 309 #include <netdb.h> 310 ], 311 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], 312 [ ac_cv_have_struct_addrinfo="yes" ], 313 [ ac_cv_have_struct_addrinfo="no" ] 314 ) 315 ]) 316 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 317 AC_DEFINE(HAVE_STRUCT_ADDRINFO,,Have struct addrinfo) 318 fi 319 320 321 # IRIX has a const char return value for gai_strerror() 322 AC_CHECK_FUNCS(gai_strerror,[ 323 AC_DEFINE(HAVE_GAI_STRERROR) 324 AC_TRY_COMPILE([ 325 #include <sys/types.h> 326 #include <sys/socket.h> 327 #include <netdb.h> 328 329 const char *gai_strerror(int);],[ 330 char *str; 331 332 str = gai_strerror(0);],[ 333 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, 334 [Define if gai_strerror() returns const char *])])]) 335 336 # for loginrec.c 337 338 AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_pid, struct utmp.ut_type, struct utmp.ut_tv, struct utmp.ut_id, struct utmp.ut_addr, struct utmp.ut_addr_v6, struct utmp.ut_exit, struct utmp.ut_time],,,[ 339 #include <sys/types.h> 340 #if HAVE_UTMP_H 341 #include <utmp.h> 342 #endif 343 ]) 344 345 AC_CHECK_MEMBERS([struct utmpx.ut_host, struct utmpx.ut_syslen, struct utmpx.ut_type, struct utmpx.ut_id, struct utmpx.ut_addr, struct utmpx.ut_addr_v6, struct utmpx.ut_time, struct utmpx.ut_tv],,,[ 346 #include <sys/types.h> 347 #include <sys/socket.h> 348 #if HAVE_UTMPX_H 349 #include <utmpx.h> 350 #endif 351 ]) 352 353 AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],,,[ 354 #include <sys/types.h> 355 #include <sys/socket.h> 356 ]) 357 358 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) 359 AC_CHECK_FUNCS(utmpname) 360 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) 361 AC_CHECK_FUNCS(setutxent utmpxname) 362 AC_CHECK_FUNCS(logout updwtmp logwtmp) 363 364 dnl Added from OpenSSH 3.6.1p2's configure.ac 365 366 dnl allow user to disable some login recording features 367 AC_ARG_ENABLE(lastlog, 368 [ --disable-lastlog Disable use of lastlog even if detected [no]], 369 [ AC_DEFINE(DISABLE_LASTLOG,,Disable use of lastlog()) ] 370 ) 371 AC_ARG_ENABLE(utmp, 372 [ --disable-utmp Disable use of utmp even if detected [no]], 373 [ AC_DEFINE(DISABLE_UTMP,,Disable use of utmp) ] 374 ) 375 AC_ARG_ENABLE(utmpx, 376 [ --disable-utmpx Disable use of utmpx even if detected [no]], 377 [ AC_DEFINE(DISABLE_UTMPX,,Disable use of utmpx) ] 378 ) 379 AC_ARG_ENABLE(wtmp, 380 [ --disable-wtmp Disable use of wtmp even if detected [no]], 381 [ AC_DEFINE(DISABLE_WTMP,,Disable use of wtmp) ] 382 ) 383 AC_ARG_ENABLE(wtmpx, 384 [ --disable-wtmpx Disable use of wtmpx even if detected [no]], 385 [ AC_DEFINE(DISABLE_WTMPX,,Disable use of wtmpx) ] 386 ) 387 AC_ARG_ENABLE(loginfunc, 388 [ --disable-loginfunc Disable use of login() etc. [no]], 389 [ no_loginfunc_check=1 390 AC_MSG_NOTICE(Not using login() etc) ] 391 ) 392 AC_ARG_ENABLE(pututline, 393 [ --disable-pututline Disable use of pututline() etc. ([uw]tmp) [no]], 394 [ AC_DEFINE(DISABLE_PUTUTLINE,,Disable use of pututline()) ] 395 ) 396 AC_ARG_ENABLE(pututxline, 397 [ --disable-pututxline Disable use of pututxline() etc. ([uw]tmpx) [no]], 398 [ AC_DEFINE(DISABLE_PUTUTXLINE,,Disable use of pututxline()) ] 399 ) 400 AC_ARG_WITH(lastlog, 401 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], 402 [ 403 if test "x$withval" = "xno" ; then 404 AC_DEFINE(DISABLE_LASTLOG) 405 else 406 conf_lastlog_location=$withval 407 fi 408 ] 409 ) 410 411 if test -z "$no_loginfunc_check"; then 412 dnl Checks for libutil functions (login(), logout() etc, not openpty() ) 413 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN,,Have login() function)]) 414 AC_CHECK_FUNCS(logout updwtmp logwtmp) 415 fi 416 417 dnl lastlog, [uw]tmpx? detection 418 dnl NOTE: set the paths in the platform section to avoid the 419 dnl need for command-line parameters 420 dnl lastlog and [uw]tmp are subject to a file search if all else fails 421 422 dnl lastlog detection 423 dnl NOTE: the code itself will detect if lastlog is a directory 424 AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) 425 AC_TRY_COMPILE([ 426 #include <sys/types.h> 427 #include <utmp.h> 428 #ifdef HAVE_LASTLOG_H 429 # include <lastlog.h> 430 #endif 431 #ifdef HAVE_PATHS_H 432 # include <paths.h> 433 #endif 434 #ifdef HAVE_LOGIN_H 435 # include <login.h> 436 #endif 437 ], 438 [ char *lastlog = LASTLOG_FILE; ], 439 [ AC_MSG_RESULT(yes) ], 440 [ 441 AC_MSG_RESULT(no) 442 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) 443 AC_TRY_COMPILE([ 444 #include <sys/types.h> 445 #include <utmp.h> 446 #ifdef HAVE_LASTLOG_H 447 # include <lastlog.h> 448 #endif 449 #ifdef HAVE_PATHS_H 450 # include <paths.h> 451 #endif 452 ], 453 [ char *lastlog = _PATH_LASTLOG; ], 454 [ AC_MSG_RESULT(yes) ], 455 [ 456 AC_MSG_RESULT(no) 457 system_lastlog_path=no 458 ]) 459 ] 460 ) 461 462 if test -z "$conf_lastlog_location"; then 463 if test x"$system_lastlog_path" = x"no" ; then 464 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do 465 if (test -d "$f" || test -f "$f") ; then 466 conf_lastlog_location=$f 467 fi 468 done 469 if test -z "$conf_lastlog_location"; then 470 AC_MSG_WARN([** Cannot find lastlog **]) 471 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx 472 fi 473 fi 474 fi 475 476 if test -n "$conf_lastlog_location"; then 477 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location", lastlog file location) 478 fi 479 480 dnl utmp detection 481 AC_MSG_CHECKING([if your system defines UTMP_FILE]) 482 AC_TRY_COMPILE([ 483 #include <sys/types.h> 484 #include <utmp.h> 485 #ifdef HAVE_PATHS_H 486 # include <paths.h> 487 #endif 488 ], 489 [ char *utmp = UTMP_FILE; ], 490 [ AC_MSG_RESULT(yes) ], 491 [ AC_MSG_RESULT(no) 492 system_utmp_path=no ] 493 ) 494 if test -z "$conf_utmp_location"; then 495 if test x"$system_utmp_path" = x"no" ; then 496 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do 497 if test -f $f ; then 498 conf_utmp_location=$f 499 fi 500 done 501 if test -z "$conf_utmp_location"; then 502 AC_DEFINE(DISABLE_UTMP) 503 fi 504 fi 505 fi 506 if test -n "$conf_utmp_location"; then 507 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location", utmp file location) 508 fi 509 510 dnl wtmp detection 511 AC_MSG_CHECKING([if your system defines WTMP_FILE]) 512 AC_TRY_COMPILE([ 513 #include <sys/types.h> 514 #include <utmp.h> 515 #ifdef HAVE_PATHS_H 516 # include <paths.h> 517 #endif 518 ], 519 [ char *wtmp = WTMP_FILE; ], 520 [ AC_MSG_RESULT(yes) ], 521 [ AC_MSG_RESULT(no) 522 system_wtmp_path=no ] 523 ) 524 if test -z "$conf_wtmp_location"; then 525 if test x"$system_wtmp_path" = x"no" ; then 526 for f in /usr/adm/wtmp /var/log/wtmp; do 527 if test -f $f ; then 528 conf_wtmp_location=$f 529 fi 530 done 531 if test -z "$conf_wtmp_location"; then 532 AC_DEFINE(DISABLE_WTMP) 533 fi 534 fi 535 fi 536 if test -n "$conf_wtmp_location"; then 537 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location", wtmp file location) 538 fi 539 540 541 dnl utmpx detection - I don't know any system so perverse as to require 542 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out 543 dnl there, though. 544 AC_MSG_CHECKING([if your system defines UTMPX_FILE]) 545 AC_TRY_COMPILE([ 546 #include <sys/types.h> 547 #include <utmp.h> 548 #ifdef HAVE_UTMPX_H 549 #include <utmpx.h> 550 #endif 551 #ifdef HAVE_PATHS_H 552 # include <paths.h> 553 #endif 554 ], 555 [ char *utmpx = UTMPX_FILE; ], 556 [ AC_MSG_RESULT(yes) ], 557 [ AC_MSG_RESULT(no) 558 system_utmpx_path=no ] 559 ) 560 if test -z "$conf_utmpx_location"; then 561 if test x"$system_utmpx_path" = x"no" ; then 562 AC_DEFINE(DISABLE_UTMPX) 563 fi 564 else 565 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location", utmpx file location) 566 fi 567 568 dnl wtmpx detection 569 AC_MSG_CHECKING([if your system defines WTMPX_FILE]) 570 AC_TRY_COMPILE([ 571 #include <sys/types.h> 572 #include <utmp.h> 573 #ifdef HAVE_UTMPX_H 574 #include <utmpx.h> 575 #endif 576 #ifdef HAVE_PATHS_H 577 # include <paths.h> 578 #endif 579 ], 580 [ char *wtmpx = WTMPX_FILE; ], 581 [ AC_MSG_RESULT(yes) ], 582 [ AC_MSG_RESULT(no) 583 system_wtmpx_path=no ] 584 ) 585 if test -z "$conf_wtmpx_location"; then 586 if test x"$system_wtmpx_path" = x"no" ; then 587 AC_DEFINE(DISABLE_WTMPX) 588 fi 589 else 590 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location", wtmpx file location) 591 fi 592 593 # Checks for library functions. 594 AC_PROG_GCC_TRADITIONAL 595 AC_FUNC_MEMCMP 596 AC_FUNC_SELECT_ARGTYPES 597 AC_TYPE_SIGNAL 598 AC_CHECK_FUNCS([dup2 getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo]) 599 600 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 601 602 # Solaris needs ptmx 603 if test -z "$no_ptmx_check" ; then 604 if test x"$cross_compiling" = x"no" ; then 605 AC_CHECK_FILE("/dev/ptmx", AC_DEFINE(USE_DEV_PTMX,,Use /dev/ptmx)) 606 else 607 AC_MSG_NOTICE([Not checking for /dev/ptmx, we're cross-compiling]) 608 fi 609 fi 610 611 if test -z "$no_ptc_check" ; then 612 if test x"$cross_compiling" = x"no" ; then 613 AC_CHECK_FILE("/dev/ptc", AC_DEFINE(HAVE_DEV_PTS_AND_PTC,,Use /dev/ptc & /dev/pts)) 614 else 615 AC_MSG_NOTICE([Not checking for /dev/ptc & /dev/pts since we're cross-compiling]) 616 fi 617 fi 618 619 AC_EXEEXT 620 621 # XXX there must be a nicer way to do this 622 AS_MKDIR_P(libtomcrypt/src/ciphers/aes) 623 AS_MKDIR_P(libtomcrypt/src/ciphers/safer) 624 AS_MKDIR_P(libtomcrypt/src/ciphers/twofish) 625 AS_MKDIR_P(libtomcrypt/src/encauth/ccm) 626 AS_MKDIR_P(libtomcrypt/src/encauth/eax) 627 AS_MKDIR_P(libtomcrypt/src/encauth/gcm) 628 AS_MKDIR_P(libtomcrypt/src/encauth/ocb) 629 AS_MKDIR_P(libtomcrypt/src/hashes) 630 AS_MKDIR_P(libtomcrypt/src/hashes/chc) 631 AS_MKDIR_P(libtomcrypt/src/hashes/helper) 632 AS_MKDIR_P(libtomcrypt/src/hashes/sha2) 633 AS_MKDIR_P(libtomcrypt/src/hashes/whirl) 634 AS_MKDIR_P(libtomcrypt/src/mac/hmac) 635 AS_MKDIR_P(libtomcrypt/src/mac/omac) 636 AS_MKDIR_P(libtomcrypt/src/mac/pelican) 637 AS_MKDIR_P(libtomcrypt/src/mac/pmac) 638 AS_MKDIR_P(libtomcrypt/src/misc/base64) 639 AS_MKDIR_P(libtomcrypt/src/misc/crypt) 640 AS_MKDIR_P(libtomcrypt/src/misc/mpi) 641 AS_MKDIR_P(libtomcrypt/src/misc/pkcs5) 642 AS_MKDIR_P(libtomcrypt/src/modes/cbc) 643 AS_MKDIR_P(libtomcrypt/src/modes/cfb) 644 AS_MKDIR_P(libtomcrypt/src/modes/ctr) 645 AS_MKDIR_P(libtomcrypt/src/modes/ecb) 646 AS_MKDIR_P(libtomcrypt/src/modes/ofb) 647 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/bit) 648 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/choice) 649 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/ia5) 650 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/integer) 651 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/object_identifier) 652 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/octet) 653 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/printable_string) 654 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/sequence) 655 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/short_integer) 656 AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/utctime) 657 AS_MKDIR_P(libtomcrypt/src/pk/dh) 658 AS_MKDIR_P(libtomcrypt/src/pk/dsa) 659 AS_MKDIR_P(libtomcrypt/src/pk/ecc) 660 AS_MKDIR_P(libtomcrypt/src/pk/pkcs1) 661 AS_MKDIR_P(libtomcrypt/src/pk/rsa) 662 AS_MKDIR_P(libtomcrypt/src/prng) 663 AC_CONFIG_HEADER(config.h) 664 AC_OUTPUT(Makefile) 665 AC_OUTPUT(libtomcrypt/Makefile) 666 AC_OUTPUT(libtommath/Makefile) 667 AC_MSG_NOTICE() 668 AC_MSG_NOTICE(Now edit options.h to choose features.) 669