I checked on one of my Ubuntu 24.04 systems here and i had to install the following.
apt install build-essential
apt install automake
apt install libsnmp-dev
Then i executed the
./autogen.sh
inside the source folder. After this only
make
The finished plugins you will find inside
plugins/
plugins-root/
plugins-scripts/
The “check_icmp” will be inside “plugins-root”
Test after compile looks like this.
./check_icmp -H 192.168.188.1
[OK] - ok=1, warning=0, critical=0, unknown=0
\_[OK] - 192.168.188.1
\_[OK] - 192.168.188.1
\_[OK] - rta 5.754ms
\_[OK] - packet loss 0.0%|'192.168.188.1rta'=5ms;;; '192.168.188.1rtmin'=5.096000ms;;; '192.168.188.1rtmax'=5.925000ms;;;'192.168.188.1pl'=0.000000%;;;
Pay attention - the performance data names are completely different than they are now.
For this check_icmp it would be better to use the json output and use this output as datasource for some own check code 
If you replace the old check_icmp with the new one all the old graphing data will be gone.
Example JSON output.
{"state":"OK","summary":"ok=1, warning=0, critical=0, unknown=0","checks":[{"output":"192.168.188.1","state":"OK","checks":[{"output":"192.168.188.1","state":"OK","checks":[{"output":"rta 4.777ms","state":"OK","perfdata":[{"label":"192.168.188.1rta","value":{"type":"int","value":"4"},"uom":"ms"},{"label":"192.168.188.1rtmin","value":{"type":"double","value":"4.239000"},"uom":"ms"},{"label":"192.168.188.1rtmax","value":{"type":"double","value":"5.571000"},"uom":"ms"}]},{"output":"packet loss 0.0%","state":"OK","perfdata":[{"label":"192.168.188.1pl","value":{"type":"double","value":"0.000000"},"uom":"%"}]}]}]}]}
Good thing for the new check_icmp is the multi host check.
./check_icmp -H www.google.de -H www.heise.de -H www.akamai.com
[OK] - ok=3, warning=0, critical=0, unknown=0
\_[OK] - www.akamai.com
\_[OK] - 2.16.241.211
\_[OK] - rta 15.887ms
\_[OK] - packet loss 0.0%
\_[OK] - www.heise.de
\_[OK] - 193.99.144.85
\_[OK] - rta 17.374ms
\_[OK] - packet loss 0.0%
\_[OK] - www.google.de
\_[OK] - 142.250.185.67
\_[OK] - rta 16.227ms
\_[OK] - packet loss 0.0%|'2.16.241.211rta'=15ms;;; '2.16.241.211rtmin'=15.604000ms;;; '2.16.241.211rtmax'=16.560000ms;;;'2.16.241.211pl'=0.000000%;;; '193.99.144.85rta'=17ms;;; '193.99.144.85rtmin'=16.528000ms;;; '193.99.144.85rtmax'=17.917000ms;;;'193.99.144.85pl'=0.000000%;;; '142.250.185.67rta'=16ms;;; '142.250.185.67rtmin'=15.614000ms;;; '142.250.185.67rtmax'=16.590000ms;;;'142.250.185.67pl'=0.000000%;;;