As of MySQL 5.7.4, for binary distributions for Solaris,
mysql_config does not provide arguments for
linking with the embedded library. To get linking arguments
for the embedded library, use the
mysql_server_config script instead.

C Compiler flags to find include files and critical compiler
flags and defines used when compiling the
libmysqlclient library. The options
returned are tied to the specific compiler that was used
when the library was created and might clash with the
settings for your own compiler. Use
--include for more
portable options that contain only include paths.

Libraries and options required to link with the thread-safe
MySQL client library. In MySQL 5.7, all client
libraries are thread-safe, so this option need not be used.
The --libs option can
be used in all cases.

You can use mysql_config within a command
line using backticks to include the output that it produces for
particular options. For example, to compile and link a MySQL
client program, use mysql_config as follows: