By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,607 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,607 IT Pros & Developers. It's quick & easy.

FreeBSD ports config and makefiles

P: 1

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
  14. .if !defined(WITHOUT_REMEMBER)
  15. CONFIGURE_ARGS+=    --enable-remember
  16. .else
  17. CONFIGURE_ARGS+=    --disable-remember
  18. .endif
  20. .if !defined(WITHOUT_SLIT)
  21. CONFIGURE_ARGS+=    --enable-slit
  22. .else
  23. CONFIGURE_ARGS+=    --disable-slit
  24. .endif
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.
Sep 30 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 7,435
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
Oct 8 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.