Connecting Tech Pros Worldwide Forums | Help | Site Map

FreeBSD ports config and makefiles

Newbie
 
Join Date: Sep 2008
Posts: 1
#1: Sep 30 '08
Hi

I am trying out FreeBSD and don't know much scripting - I am trying to build some programs from the ports. Now in linux I could do something like

./configure --abcdef --ghijkl

then "make install", and the docs for various programs also tell me how to config in this way. What is the equivalent for FreeBSD ports? I have tried something like "make config" or "make showconfig" but it doesn't give the equivalent functionality or sometimes it just says "no options" evne though the program's site says there are.

Well I noticed that there is no configure script in the ports directories which is why ./configure doesn't work, but when building stuff I can see that it has extracted the script elsewhere and is running it. So how do I pass the options to that script?

I have also ventured into the makefile, for example this one

Expand|Select|Wrap|Line Numbers
  1. .if !defined(WITHOUT_NLS)
  2. USE_ICONV=        yes
  3. CONFIGURE_ENV=        CPPFLAGS="-I${LOCALBASE}/include" \
  4.             LIBS="-L${LOCALBASE}/lib -liconv"
  5. CONFIGURE_ARGS+=    --enable-nls
  6. PLIST_SUB+=        NLS:=""
  7. .else
  8. CONFIGURE_ENV=        CPPFLAGS="-I${LOCALBASE}/include" \
  9.             LIBS="-L${LOCALBASE}/lib"
  10. CONFIGURE_ARGS+=    --disable-nls
  11. PLIST_SUB+=        NLS:="@comment "
  12. .endif
  13.  
  14. .if !defined(WITHOUT_REMEMBER)
  15. CONFIGURE_ARGS+=    --enable-remember
  16. .else
  17. CONFIGURE_ARGS+=    --disable-remember
  18. .endif
  19.  
  20. .if !defined(WITHOUT_SLIT)
  21. CONFIGURE_ARGS+=    --enable-slit
  22. .else
  23. CONFIGURE_ARGS+=    --disable-slit
  24. .endif
  25.  
could someone please explain - how do I define the things like WITHOUT_SLIT and where is CONFIGURE_ARGS passed to, what is the best way to do what I want to do?

Thanks for all help.

drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,577
#2: Oct 8 '08

re: FreeBSD ports config and makefiles


It's not necessary to run ./configure because ports already has that in the Makefile by the maintainer. To add options, you just do make --OPTION install
Reply


Similar Unix / Linux / BSD bytes