FreeBSD ports config and makefiles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kelvinfo
    New Member
    • Sep 2008
    • 1

    FreeBSD ports config and makefiles

    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

    Code:
    .if !defined(WITHOUT_NLS)
    USE_ICONV=		yes
    CONFIGURE_ENV=		CPPFLAGS="-I${LOCALBASE}/include" \
    			LIBS="-L${LOCALBASE}/lib -liconv"
    CONFIGURE_ARGS+=	--enable-nls
    PLIST_SUB+=		NLS:=""
    .else
    CONFIGURE_ENV=		CPPFLAGS="-I${LOCALBASE}/include" \
    			LIBS="-L${LOCALBASE}/lib"
    CONFIGURE_ARGS+=	--disable-nls
    PLIST_SUB+=		NLS:="@comment "
    .endif
    
    .if !defined(WITHOUT_REMEMBER)
    CONFIGURE_ARGS+=	--enable-remember
    .else
    CONFIGURE_ARGS+=	--disable-remember
    .endif
    
    .if !defined(WITHOUT_SLIT)
    CONFIGURE_ARGS+=	--enable-slit
    .else
    CONFIGURE_ARGS+=	--disable-slit
    .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.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    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

    Comment

    Working...