# With what options was a port built?



## abarmot (Nov 20, 2008)

How can I know with what options was MySQL built, for example?
Thanks.


----------



## lme@ (Nov 20, 2008)

```
cd $portsdir && make showconfig
```


----------



## abarmot (Nov 20, 2008)

thanks for a quick reply!
i tried 2 ways:


```
s1# cd /usr/ports && make showconfig
make: don't know how to make showconfig. Stop
```

and the second shows nothing...

```
s1# cd /usr/ports/databases/mysql50-server && make showconfig
```

what wrong?


----------



## lme@ (Nov 20, 2008)

There is nothing wrong.
mysql50-server does not use the OPTIONS framework (the blue selection menu) when you compile the port. 'make showconfig' shows you the OPTIONS that were set.
For ports that don't use OPTIONS you can try to run 'make configure' so that the distsfile's own configure script is run. You often see the enabled configure options then.


----------



## s-tlk (Nov 20, 2008)

Perhaps a look in the Makefile, especially the CONFIGURE_ARGS reveal what you wanna know?
If it is not there what are you looking for, then you have to run configure and look in the config.log file, like Ime described it before.


----------



## Infracaninophile (Nov 20, 2008)

For ports like mysql that don't use the OPTIONS framework, and even some ports that do use OPTIONS (like www/apache22) or that have extra knobs to twiddle than are covered by OPTIONS, I recommend recording all your configuration info in /etc/make.conf -- like this:



```
.if ${.CURDIR:M*/databases/mysql*}
WITH_CHARSET=utf8
WITH_XCHARSET=none
WITH_COLLATION=utf8_unicode_ci
WITH_OPENSSL=yes
BUILD_OPTIMIZED=yes
WITH_INNODB=yes
WITH_ARCHIVE=yes
WITH_FEDERATED=yes
WITH_NDB=yes
WITH_CSV=yes
.endif
```

This way, whenever you upgrade, you'll get a nicely repeatable result.


----------



## Mel_Flynn (Nov 21, 2008)

Still there's something to be said for recording flags in /var/db/pkg, especially when it's installed via binary package, rather then compiled port.
It would be a mega-patch though, cause every port would have to list the switches it supports.


----------

