# How to configure a port and how to use make variables?



## m_pahlevanzadeh (Sep 8, 2014)

Dear all,

Suppose, I preconfigure  my port such as apache22 with the make(1) command. I got a blue screen and some options, and start to compile! Everything is OK.
I have two questions:

After configuring once, how do I configure again (the blue screen configuration)?
How can I use options of ./configure of a source? (I mean make variables) such as: `./configure --enable-so --enable-mods-shared=all`


----------



## junovitch@ (Sep 9, 2014)

m_pahlevanzadeh said:
			
		

> Dear all,
> After once configuration, how I configure again (such as blue screen configuration) ?



`make config`

Quoting some of the target arguements from /usr/ports/Mk/bsd.port.mk, you can also do the following:

```
# config                - Configure options for this port (using ${DIALOG}).
#                                 Automatically run prior to extract, patch, configure, build,
#                                 install, and package.
# config-recursive
#                               - Configure options for this port for a port and all its
#                                 dependencies.
# showconfig    - Display options config for this port.
# showconfig-recursive
#                               - Display options config for this port and all its
#                                 dependencies.
# rmconfig              - Remove the options config for this port.
# rmconfig-recursive
#                               - Remove the options config for this port and all its
#                                 dependencies.
```



			
				m_pahlevanzadeh said:
			
		

> How can I use options of ./configure of a source? (my mean in make variable)such as :
> 
> 
> ```
> ...



This is most likely in the Makefile of the port in question under the CONFIGURE_ARGS variable.  The knobs you turn using the ports system typically adds or removes variables.  The most correct answer if there is a variable that should be changeable is to update the port to add an option to change it or ask the maintainer to make that addition.  However, I suppose in a pinch you can just add or remove an option from the Makefile yourself.


----------

