On Wed, Jul 02, 2003 at 12:22:10AM -0500, Juan Fdo Gallego Gómez wrote: > I tried to compile pppd, just a checkout from the cvs at cvs.samba.org > What I saw was that the support for freebsd was discontinued since > freebsd-3.0 (1999), also it patches the kernel.
Yep; as Nathan said, FreeBSD support isn't being merged into pppd because FreeBSD people are being lazy and maintain their own pppd patches. It must be somewhere in http://www.freebsd.org/cgi/cvsweb.cgi/ > cd pppd > cp Makefile.linux Makefile.gfbsd > vi Makefile.gfbsd (I changed sys-linux.c to sys-bsd.c) > make -f Makefile.gfbsd Looking at the sources, it seems the root of the configuration is in ./configure. Instead of copying the makefile, we probably can go with fixing ./configure. It's usualy best to avoid copying files specific to our platform, since we'd end up maintaining them ourselves. I haven't tested this, but: - "makext" probably means userland, so "sys-bsd.c" is highly likely to assume FreeBSD. we have GNU userland, which is what the sources call "linux", so we set makext="linux" (it's ugly to call it like this, but i can live with it ;)) - "ksrc" means the obvious The attached patch would restore generic FreeBSD|GNU/FreeBSD support in ./configure, please have it a look. After this, you'd just need to steal the new "freebsd-5.x" directories from FreeBSD's cvs and add them to ./configure. > And a lot of errors about symbols explicetely defined in sys-bsd.c and > others. If my guess about makext is right, sys-linux.c would work for us after getting rid of some linuxisms. (the first "#if __GLIBC__ >= 2" looks very nice :)) > Checking the configure script at the top level seems that it patches the > freebsd kernel (version 3 and others ancient versions). This is getting more confusing :(. Maybe it means FreeBSD 3.x and lower didn't support PPP natively.. Anyway, if FreeBSD 5.x supports their own PPP, their kernel must be patched already. -- Robert Millan
diff -ur ppp-2.4.1.uus.old/configure ppp-2.4.1.uus/configure --- ppp-2.4.1.uus.old/configure 2000-04-24 09:41:40.000000000 +0200 +++ ppp-2.4.1.uus/configure 2003-07-02 17:27:35.000000000 +0200 @@ -27,7 +27,7 @@ *) ;; esac;; esac;; - NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V) + NetBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V) state="notincluded";; # NetBSD) # makext="bsd"; @@ -54,15 +54,20 @@ # V4.*) state="known"; ksrc="osf1";; # V[5-9]*) state="late"; ksrc="osf1";; # esac;; -# FreeBSD) -# makext="bsd"; -# case $release in -# 1.*) state="known"; ksrc="freebsd-old";; -# 2.[01]*) state="known"; ksrc="freebsd-2.0";; -# 2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";; -# 2.2.8*) state="known"; ksrc="freebsd-2.2.8";; -# 3.[0-1]*) state="known"; ksrc="freebsd-3.0";; -# esac;; + FreeBSD|GNU/FreeBSD) + case $system in + FreeBSD) + makext="bsd";; + GNU/FreeBSD) + makext="linux";; + esac + case $release in + 1.*) state="known"; ksrc="freebsd-old";; + 2.[01]*) state="known"; ksrc="freebsd-2.0";; + 2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";; + 2.2.8*) state="known"; ksrc="freebsd-2.2.8";; + 3.[0-1]*) state="known"; ksrc="freebsd-3.0";; + esac;; # NeXTStep) # makext="NeXT"; # ksrc="NeXT";