### ImageMagick version

7.1.1-25

### Operating system

Linux

### Operating system, version and so on

Fedora 39

### Description

Magick++-config fails when the .pc file is not installed in a place searched by pkg-config by default.

### Steps to Reproduce

```
$ ./configure CFLAGS=-O3 CXXFLAGS=-O3 --disable-static --prefix ~/local
$ make
$ make install
$ Magick++-config --libs
Package Magick++-7.Q16HDRI was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++-7.Q16HDRI.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Magick++-7.Q16HDRI', required by 'virtual:world', not found
```

### Images

_No response_
Magick++-config fails when the .pc file is not installed in a place searched by pkg-config by default
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Magick++-config fails when the .pc file is not installed in a place searched by pkg-config by default
Issue date:

--- start body ---
### ImageMagick version

7.1.1-25

### Operating system

Linux

### Operating system, version and so on

Fedora 39

### Description

Magick++-config fails when the .pc file is not installed in a place searched by pkg-config by default.

### Steps to Reproduce

```
$ ./configure CFLAGS=-O3 CXXFLAGS=-O3 --disable-static --prefix ~/local
$ make
$ make install
$ Magick++-config --libs
Package Magick++-7.Q16HDRI was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++-7.Q16HDRI.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Magick++-7.Q16HDRI', required by 'virtual:world', not found
```

### Images

_No response_
--- end body ---
