Here is a short note about how to get FreeRADIUS 0.9.0 to compile under 
CYGWIN on Windows 2000 or XP.

I have used the latest CYGWIN version available at the time of writing -
version 1.30.22.

This note concentrates on making the EAP modules work under CYGWIN. If 
you are trying to get other modules to work this note may not help you.



Configuring FreeRADIUS 0.9.0 for EAP under CygWin.

1.      Installing CygWin

Install the latest version of CygWin (at time of writing 1.3.22-1) from
the web download (http://www.cygwin.com).

2.      Install the following CYGWIN packages

Package              Version
_update-info-dir     00197-1
ash                  20020731-1
autoconf             2.54-1
autoconf-devel       2.57-1
autoconf-stable      2.13-4
automake             1.7.1-1
automake-devel       1.7.6-1
automake-stable      1.4p5-5
base-files           2.1-1
base-passwd          1.1-1
bash                 2.05b-9
bc                   1.06-1
binutils             20030307-1
byacc                1.9-1
bzip2                1.0.2-2
crypt                1.0-2
cygrunsrv            0.96-1
cygutils             1.1.4-2
cygwin               1.3.22-1
cygwin-doc           1.3-4
diff                 1.0-1
diffutils            2.8.1-1
ed                   0.2-1
file                 4.02-1
fileutils            4.1-1
findutils            4.1.7-4
gawk                 3.1.3-1
gcc                  3.2-3
gcc-mingw            20020817-5
gdbm                 1.8.3-3
gettext              0.11.5-1
grep                 2.5-1
groff                1.18.1-2
gzip                 1.3.3-4
less                 378-1
libbz2_0             1.0.2-1
libbz2_1             1.0.2-2
libdb3.1             3.1.17-2
libgdbm              1.8.0-5
libgdbm-devel        1.8.3-3
libgdbm3             1.8.3-3
libgdbm4             1.8.3-7
libiconv2            1.8-3
libintl              0.10.38-3
libintl1             0.10.40-1
libintl2             0.11.5-1
libltdl3             1.5-1
libncurses5          5.2-1
libncurses6          5.2-8
libncurses7          5.3-1
libpcre              4.1-1
libpcre0             4.3-2
libpng               1.2.5-1
libpng10             1.0.15-1
libpng12             1.2.5-1
libpopt0             1.6.4-4
libreadline4         4.1-2
libreadline5         4.3-2
libtool              20020705-1
libtool-devel        1.5-1
libtool-stable       1.4.3-1
login                1.9-5
m4                   1.4-1
make                 3.80-1
man                  1.5j-2
mingw-runtime        3.0-1
mktemp               1.4-1
more                 2.11o-1
nasm                 0.98.36-1
ncurses              5.3-1
newlib-man           20020801
openssl              0.9.7b-1
openssl-devel        0.9.7b-1
openssl096           0.9.6j-1
patch                2.5.8-3
pcre                 4.3-2
pcre-doc             4.3-2
perl                 5.8.0-3
perl_manpages        5.8.0-3
readline             4.3-2
sed                  4.0.7-1
sh-utils             2.0.15-3
tar                  1.13.25-1
termcap              20021106-2
terminfo             5.3_20030726-1
texinfo              4.2-4
textutils            2.0.21-1
unzip                5.50-2
vim                  6.2-1
w32api               2.3-1
wget                 1.8.2-2
which                1.5-1
zip                  2.3-2
zlib                 1.1.4-1
zsh                  4.0.6-5

3.      Download the FreeRADIUS version 0.9.0 source code form
http://www.freeradius.org/.

4. Expand the freeradius.tar.gz file. Eg ~/freeradius-0.9.0/

5. Apply the following patches to the source code.

~/freeradius-0.9.0/Make.inc.in

--- Make.inc.in.orig    2003-08-22 16:50:15.000000000 +1000
+++ Make.inc.in 2003-07-31 09:11:51.000000000 +1000
@@ -38,6 +38,8 @@
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 INSTALLSTRIP   = @INSTALLSTRIP@

+EXEEXT         = @EXEEXT@
+
 LCRYPT         = @CRYPTLIB@
 LIBS           = @LIBS@ @LFS_LIBS@
 LDFLAGS                = @LDFLAGS@ @LFS_LDFLAGS@

~/freeradius-0.9.0/configure

--- configure.orig      2003-08-22 16:46:12.000000000 +1000
+++ configure   2003-07-31 09:11:52.000000000 +1000
@@ -5685,6 +5685,10 @@
     STATIC_MODULES="$STATIC_MODULES -dlpreopen
../modules/rlm_$i/rlm_$i.la"
   done

+  for i in $withval; do
+    STATIC_MODULES="$STATIC_MODULES -dlpreopen
../modules/rlm_eap/types/rlm_$i.la"
+  done
+
 fi


@@ -8483,6 +8487,7 @@
 [EMAIL PROTECTED]@%$RADIUSD_MAJOR_VERSION%g
 [EMAIL PROTECTED]@%$RADIUSD_MINOR_VERSION%g
 [EMAIL PROTECTED]@%$RADIUSD_VERSION%g
[EMAIL PROTECTED]@%$EXEEXT%g

 CEOF
 EOF


~/freeradius-0.9.0/src/main/Makefile.in

--- Makefile.in.orig    2003-08-22 16:56:20.000000000 +1000
+++ Makefile.in 2003-07-31 09:11:52.000000000 +1000
@@ -25,7 +25,9 @@
 #
 ifneq ($(USE_SHARED_LIBS),yes)
 MODULE_LIBS    += $(shell for x in $(MODULES);do test -f
../modules/$$x/$$x.la && echo -dlpreopen ../modules/$$x/$$x.la;done)
+MODULE_LIBS    += $(shell for x in $(MODULES);do test -f
../modules/rlm_eap/types/$$x/$$x.la && echo -dlpreopen
../modules/rlm_eap/types/$$x/$$x.la;done)
 MODULE_OBJS    += $(shell for x in $(MODULES);do test -f
../modules/$$x/$$x.la && echo ../modules/$$x/$$x.la;done)
+MODULE_OBJS    += $(shell for x in $(MODULES);do test -f
../modules/rlm_eap/types/$$x/$$x.la && echo
../modules/rlm_eap/types/$$x/$$x.la;done)
 endif

 all:   $(BINARIES)
@@ -33,8 +35,8 @@
 radiusd: $(SERVER_OBJS) ../lib/libradius.a $(MODULE_OBJS)
        $(LIBTOOL) --mode=link $(CC) -export-dynamic -dlopen self \
                $(CFLAGS) $(LDFLAGS) -o $@ \
-               $(SERVER_OBJS) $(LCRYPT) $(LIBS) \
-               $(PTHREADLIB) $(LIBLTDL) $(MODULE_LIBS)
+               $(SERVER_OBJS) $(LIBS) \
+               $(PTHREADLIB) $(LIBLTDL) $(MODULE_LIBS) $(LCRYPT)

 radiusd.o: radiusd.c $(INCLUDES)  ../include/request_list.h
../include/modules.h ../include/modcall.h ../include/modpriv.h
        $(CC) $(CFLAGS) -c radiusd.c
@@ -130,12 +132,12 @@
        rm -rf *.o *.so *~ $(BINARIES) .libs

 install:
-       $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP)
radiusd$(R)$(sbindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) radwho
$(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) radzap
$(R)$(bindir)
+       $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP)
radiusd$(EXEEXT)    $(R)$(sbindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) radwho$(EXEEXT)
$(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) radzap$(EXEEXT)
$(R)$(bindir)
        $(INSTALL) -m 755    radlast            $(R)$(bindir)
-       $(INSTALL) -m 755    radclient          $(R)$(bindir)
-       $(INSTALL) -m 755    radrelay           $(R)$(bindir)
+       $(INSTALL) -m 755    radclient$(EXEEXT)         $(R)$(bindir)
+       $(INSTALL) -m 755    radrelay$(EXEEXT)          $(R)$(bindir)
        $(INSTALL) -m 755    radtest            $(R)$(bindir)
        $(INSTALL) -d -m 755                    $(R)$(logdir)
        $(INSTALL) -d -m 755                    $(R)$(radacctdir)

~/freeradius-0.9.0/src/modules/stable

--- stable.orig 2003-08-22 16:52:37.000000000 +1000
+++ stable      2003-07-31 09:11:52.000000000 +1000
@@ -8,6 +8,9 @@
 rlm_detail
 rlm_digest
 rlm_eap
+rlm_eap_leap
+rlm_eap_md5
+rlm_eap_tls
 rlm_exec
 rlm_expr
 rlm_fastusers

~/freeradius-0.9.0/src/modules/rlm_dbm/Makefile.in

--- Makefile.in.orig    2003-08-22 16:58:41.000000000 +1000
+++ Makefile.in 2003-07-31 09:11:52.000000000 +1000
@@ -19,5 +19,5 @@
 #
 rlm_dbm_install:
        $(INSTALL) -d -m 755                            $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_parser $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_cat    $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_parser$(EXEEXT)
$(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_cat$(EXEEXT)
$(R)$(bindir)

~/freeradius-0.9.0/src/modules/rlm_mschap/Makefile

--- Makefile.orig       2003-08-22 16:57:51.000000000 +1000
+++ Makefile    2003-07-31 09:11:52.000000000 +1000
@@ -17,4 +17,4 @@

 smbencrypt-install:
        $(INSTALL) -d -m 755 $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) smbencrypt $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) smbencrypt$(EXEEXT)
$(R)$(bindir)

6. Run configure with the following command line

./configure --without-snmp --disable-shared --enable-static

7. Execute make and then make install

8. Configure FreeRADIUS as usual.

9. If you want to run FreeRADIUS as a service, execute the following
command

cygrunsrv --install "FreeRADIUS" --path /usr/local/sbin/radiusd --args
"-y -s -f" --shutdown --desc "FreeRADIUS 0.9.0 - Cygwin" --env
"PATH=/usr/local/bin:$PATH"


Philip Blow
Senior Technical Manager
Simply Wireless
[EMAIL PROTECTED]

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to