~ubuntu-branches/ubuntu/dapper/freeradius/dapper-updates

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2004-12-29 20:19:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229201942-uj2e95la965uthc7
Tags: 1.0.1-2
* freeradius-dialupadmin Suggests php4-mysql | php4-pgsql
   Closes: #279419
* Added a two-second pause to restart in init.d script
   Closes: #262635
* FreeRADIUS module packages now depend on the same source
  version of the main FreeRADIUS package.
   Closes: #284353
* FreeRADIUS-dialupadmin's default paths in admin.conf are
  now correct.
   Closes: #280942
* FreeRADIUS-dialupadmin's help.php3 can now find README.
   Closes: #280941
* Fixes stolen from 1.0.2 CVS:
  - Bug fix to make udpfromto code work
  - radrelay shouldn't dump core if it can't read a VP from the
    detail file.
  - Only initialize the random pool once.
  - In rlm_sql, don't escape characters twice.
  - In rlm_ldap, only claim Auth-Type if a plain text password is present.
  - Locking fixes in threading code
  - Fix building on gcc-4.0 by not trying to access static auth_port from
    other files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
AC_INIT(src/main/radiusd.c)
24
24
AC_CONFIG_HEADER(src/include/autoconf.h)
25
 
AC_REVISION($Revision: 1.177.2.12 $)dnl
 
25
AC_REVISION($Revision: 1.198.2.8 $)dnl
26
26
 
27
27
dnl # The version of the software
28
 
RADIUSD_MAJOR_VERSION=0
29
 
RADIUSD_MINOR_VERSION=9.3
 
28
RADIUSD_MAJOR_VERSION=1
 
29
RADIUSD_MINOR_VERSION=0.1
30
30
RADIUSD_VERSION="${RADIUSD_MAJOR_VERSION}.${RADIUSD_MINOR_VERSION}"
31
31
 
32
32
dnl #############################################################
41
41
AC_PROG_CC_SUNPRO
42
42
AC_PROG_RANLIB
43
43
 
 
44
abs_top_builddir=`pwd`
 
45
AC_SUBST(abs_top_builddir)
 
46
 
44
47
dnl # autoconf 2.50 and later
45
48
dnl # AC_SYS_LARGEFILE
46
49
 
255
258
)
256
259
 
257
260
dnl #
 
261
dnl # extra argument: --openssl-includes=dir
 
262
dnl #
 
263
AC_ARG_WITH(openssl-includes,
 
264
[  --with-openssl-includes=DIR      Directory to look for OpenSSL include files],
 
265
[ case "$withval" in
 
266
    *) OPENSSL_INCLUDE="$withval"
 
267
        ;;
 
268
  esac ]
 
269
)
 
270
AC_SUBST(OPENSSL_INCLUDE)
 
271
 
 
272
dnl #
 
273
dnl # extra argument: --openssl-libraries=dir
 
274
dnl #
 
275
AC_ARG_WITH(openssl-libraries,
 
276
[  --with-openssl-libraries=DIR     Directory to look for OpenSSL library files],
 
277
[ case "$withval" in
 
278
    *) OPENSSL_LIBS="$withval"
 
279
        ;;
 
280
  esac ]
 
281
)
 
282
AC_SUBST(OPENSSL_LIBS)
 
283
 
 
284
 
 
285
dnl #
258
286
dnl #  These next two arguments don't actually do anything.  They're
259
287
dnl #  place holders so that the top-level configure script can tell
260
288
dnl #  the user how to configure lower-level modules
300
328
dnl AC_SUBST(INCLUDE)
301
329
dnl AC_SUBST(IQUOTE)
302
330
 
 
331
dnl extra argument: --with-udpfromto
 
332
WITH_UDPFROMTO=no
 
333
AC_ARG_WITH(udpfromto,
 
334
[  --with-udpfromto        Compile in UDPFROMTO support. (default=no)],
 
335
[ case "$withval" in
 
336
    yes)
 
337
        WITH_UDPFROMTO=yes
 
338
        ;;
 
339
    *)
 
340
        WITH_UDPFROMTO=no
 
341
  esac ]
 
342
)
 
343
 
 
344
if test "x$WITH_UDPFROMTO" = "xyes"; then
 
345
        AC_DEFINE(WITH_UDPFROMTO)
 
346
fi
 
347
 
303
348
dnl #############################################################
304
349
dnl #
305
350
dnl #  1. Checks for programs
404
449
dnl #
405
450
dnl #############################################################
406
451
 
 
452
dnl #
 
453
dnl # Interix requires us to set -D_ALL_SOURCE, otherwise
 
454
dnl # getopt will be #included, but won't link.  <sigh>
 
455
dnl # 
 
456
dnl # 
 
457
case "$host" in
 
458
*-interix*)
 
459
        CFLAGS="$CFLAGS -D_ALL_SOURCE"
 
460
        ;;
 
461
esac
 
462
 
407
463
AC_HEADER_DIRENT
408
464
AC_HEADER_STDC
409
465
AC_HEADER_TIME
468
524
  AC_DEFINE(OSFSIA)
469
525
fi
470
526
 
 
527
smart_try_dir="$OPENSSL_INCLUDE"
 
528
dnl # stupid RedHat shit
 
529
CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
 
530
AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
 
531
if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
 
532
  AC_DEFINE(HAVE_OPENSSL_SSL_H)
 
533
  old_CPPFLAGS="$CPPFLAGS"
 
534
  if test "x$OPENSSL_INCLUDE" != "x"; then
 
535
      CPPFLAGS="-I$OPENSSL_INCLUDE $CPPFLAGS"
 
536
  fi
 
537
  AC_CHECK_HEADERS( \
 
538
          openssl/err.h \
 
539
          openssl/crypto.h \
 
540
          openssl/rand.h \
 
541
          openssl/engine.h
 
542
  )
 
543
  CPPFLAGS="$old_CPPFLAGS"
 
544
 
 
545
  AC_MSG_CHECKING([for OpenSSL version >= 0.9.7])
 
546
       old_CPPFLAGS=$CPPFLAGS
 
547
       if test "x$OPENSSL_INCLUDE" != "x"; then
 
548
           CPPFLAGS="-I$OPENSSL_INCLUDE"
 
549
           fi
 
550
       AC_EGREP_CPP(yes,
 
551
       [#include <openssl/crypto.h>
 
552
       #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
 
553
        yes
 
554
       #endif
 
555
       ], goodssl="yes")
 
556
           if test "x$goodssl" != "xyes"; then
 
557
             AC_MSG_RESULT(no)
 
558
             OPENSSL_INCLUDE=
 
559
             OPENSSL_LIBS=
 
560
           else
 
561
             AC_MSG_RESULT(yes)
 
562
 
 
563
             # Look for the OpenSSL libraries.
 
564
             smart_try_dir=$OPENSSL_LIBS
 
565
             AC_SMART_CHECK_LIB(crypto, DH_new)
 
566
             if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
 
567
               AC_SMART_CHECK_LIB(ssl, SSL_new)
 
568
               if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
 
569
                 OPENSSL_INCLUDE=
 
570
                 OPENSSL_LIBS=
 
571
               fi
 
572
               export OPENSSL_INCLUDE OPENSSL_LIBS
 
573
             fi
 
574
           fi
 
575
       CPPFLAGS=$old_CPPFLAGS
 
576
fi
471
577
 
472
578
dnl #############################################################
473
579
dnl #
545
651
        gmtime_r \
546
652
        strsep \
547
653
        inet_aton \
 
654
        inet_pton \
 
655
        inet_ntop \
548
656
        gethostname \
549
657
        setlinebuf \
550
658
        setvbuf \
551
 
        getusershell
 
659
        getusershell \
 
660
        initgroups
552
661
)
553
662
RADIUSD_NEED_DECLARATIONS( \
554
663
        crypt \
575
684
 fi
576
685
fi
577
686
 
 
687
dnl # struct ip_pktinfo
 
688
AC_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr)
 
689
if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
 
690
then
 
691
        AC_DEFINE(HAVE_IP_PKTINFO)
 
692
fi
 
693
 
578
694
dnl #############################################################
579
695
dnl #
580
696
dnl #  6. Checks for compiler characteristics
608
724
 
609
725
AC_MSG_CHECKING(for developer gcc flags)
610
726
if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
611
 
  devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
 
727
  devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"
612
728
  CFLAGS="$CFLAGS $devflags"
613
729
  INSTALLSTRIP=""
614
730
  AC_MSG_RESULT(yes.  Using $devflags)
687
803
], [ gethostbyaddr(NULL, 0, 0)  ], [
688
804
                AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE)
689
805
                gethostbyaddrrstyle=BSD
690
 
                AC_MSG_WARN([ ****** BSD Style gethostbyaddr might NOT be thread-safe! ****** ])
691
806
        ])
692
807
fi
693
808
 
697
812
        AC_MSG_RESULT([${gethostbyaddrrstyle}-style])
698
813
fi
699
814
 
 
815
if test "x$gethostbyaddrrstyle" = "xBSD"; then
 
816
        AC_MSG_WARN([ ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** ])
 
817
fi
 
818
 
700
819
dnl Check the style of gethostbyname, in order of preference
701
820
dnl GNU (_r seven args)
702
821
dnl SYSV (_r five args)
729
848
], [ gethostbyname(NULL)  ], [
730
849
                AC_DEFINE(GETHOSTBYNAMERSTYLE, BSDSTYLE)
731
850
                gethostbynamerstyle=BSD
732
 
                AC_MSG_WARN([ ****** BSD Style gethostbyname might NOT be thread-safe! ****** ])
733
851
        ])
734
852
fi
735
853
 
739
857
        AC_MSG_RESULT([${gethostbynamerstyle}-style])
740
858
fi
741
859
 
 
860
if test "x$gethostbynamerstyle" = "xBSD"; then
 
861
        AC_MSG_WARN([ ****** BSD-style gethostbyname might NOT be thread-safe! ****** ])
 
862
fi
 
863
 
 
864
dnl check for non-posix solaris ctime_r (extra buflen int arg)
 
865
ctimerstyle=""
 
866
AC_MSG_CHECKING([ctime_r() syntax])
 
867
AC_TRY_LINK([
 
868
#include <time.h>
 
869
], [ ctime_r(NULL, NULL, 0) ], [
 
870
        AC_DEFINE(CTIMERSTYLE, SOLARISSTYLE)
 
871
        ctimerstyle="SOLARIS"
 
872
])
 
873
if test "x$ctimerstyle" = "x"; then
 
874
        AC_TRY_LINK([
 
875
#include <time.h>
 
876
], [ ctime_r(NULL, NULL) ], [
 
877
                AC_DEFINE(CTIMERSTYLE, POSIXSTYLE)
 
878
                ctimerstyle="POSIX"
 
879
        ])
 
880
fi
 
881
 
 
882
if test "x$ctimerstyle" = "x"; then
 
883
        AC_MSG_RESULT([none!  It must not exist, here.])
 
884
else
 
885
        AC_MSG_RESULT([${ctimerstyle}-style])
 
886
fi
 
887
 
 
888
 
742
889
dnl If configuring with large file support, determine the right flags to
743
890
dnl use based on the platform.  This is the wrong approach; autoconf 2.50
744
891
dnl comes with a macro that takes the right approach.  But this works well
796
943
    AC_SUBST(LFS_LIBS)
797
944
fi
798
945
 
 
946
AC_SUBST(HOSTINFO, $host)
 
947
 
799
948
dnl #############################################################
800
949
dnl #
801
950
dnl #  8. Checks for system services
808
957
top_builddir=`pwd`
809
958
export top_builddir
810
959
AC_MSG_RESULT([top_builddir=$top_builddir])
811
 
AC_SUBST(top_builddir)
 
960
dnl # AC_SUBST(top_builddir)
812
961
AC_SUBST(LIBLTDL)
813
962
AC_SUBST(INCLTDL)
814
963
 
910
1059
AC_OUTPUT_COMMANDS([(cd ./src/include && /bin/sh ./build-radpaths-h)])
911
1060
AC_OUTPUT_COMMANDS([(cd ./src/main   && chmod +x checkrad.pl radlast radtest)])
912
1061
AC_OUTPUT_COMMANDS([(cd ./scripts    && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)])
913
 
AC_OUTPUT_COMMANDS([
914
 
cat >> src/include/autoconf.h <<EOF
915
 
 
916
 
#define HOSTINFO        "$host"
917
 
#define RADIUSD_VERSION "$RADIUSD_VERSION"
918
 
EOF
919
 
],host=$host)