Sometimes you may want to find out the configuration options that were used to build a package that you download and install. For example, if a certain feature has not been built into a program or library from a package, you may need to build that program or library from source to use that feature.
Finding out the build rules used to build a package is easy:
Figure out the source package name that corresponds to the package you are interested in. For example, the source package of
libopencv-dev is named
Download the source package. For example:
$ apt-get source opencv
Tried with: OpenCV 2.4.8 and Ubuntu 14.04