### ImageMagick version

7.1.1-16 (Beta) Q16-HDRI x86_64 2f14769ce:20230906

### Operating system

Linux

### Operating system, version and so on

Ubuntu 20/04 (but that doesn't matter)

### Description

I wanted to create a PR to add jp2 support to the AppImage release of ImageMagick, and while testing I discovered the current version does not support JPEG.

When looking [at the build logs](https://github.com/ImageMagick/ImageMagick/actions/runs/6106020498/job/16570415421), something seems broken:
```
 checking for JPEG... 
checking for jconfig.h... yes
checking for jerror.h... yes
checking for jmorecfg.h... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... no
checking if JPEG package is complete... no -- some components failed test
```

[The build from yesterday does not have this issue.](https://github.com/ImageMagick/ImageMagick/actions/runs/6093333950/job/16532840133)

As a result, ImageMagick cannot convert to JPEG files any more (I haven't tried converting a JPEGg to something else)

### Steps to Reproduce

1. [Get the AppImage from the affected version](https://github.com/ImageMagick/ImageMagick/actions/runs/6106020498)
2. Convert anything to a jpeg
3. See that it doesn't work
4. go outside for a bit,the weather is nice.

### Images

_No response_
Latest AppImage release does NOT support JPEG
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Latest AppImage release does NOT support JPEG
Issue date:

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

7.1.1-16 (Beta) Q16-HDRI x86_64 2f14769ce:20230906

### Operating system

Linux

### Operating system, version and so on

Ubuntu 20/04 (but that doesn't matter)

### Description

I wanted to create a PR to add jp2 support to the AppImage release of ImageMagick, and while testing I discovered the current version does not support JPEG.

When looking [at the build logs](https://github.com/ImageMagick/ImageMagick/actions/runs/6106020498/job/16570415421), something seems broken:
```
 checking for JPEG... 
checking for jconfig.h... yes
checking for jerror.h... yes
checking for jmorecfg.h... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... no
checking if JPEG package is complete... no -- some components failed test
```

[The build from yesterday does not have this issue.](https://github.com/ImageMagick/ImageMagick/actions/runs/6093333950/job/16532840133)

As a result, ImageMagick cannot convert to JPEG files any more (I haven't tried converting a JPEGg to something else)

### Steps to Reproduce

1. [Get the AppImage from the affected version](https://github.com/ImageMagick/ImageMagick/actions/runs/6106020498)
2. Convert anything to a jpeg
3. See that it doesn't work
4. go outside for a bit,the weather is nice.

### Images

_No response_
--- end body ---

None