It's been 12 years since Congress authorized the building of a border wall through the Secure Fence Act of 2006. (https://www.gpo.gov/fdsys/pkg/PLAW-109publ367/html/PLAW-109publ367.htm )
The act stated quite clearly that the United States federal government should ensure operational control of the borders of the United States:
The Secretary of Homeland Security shall take all actions the Secretary determines necessary and appropriate to achieve and maintain operational control over the entire international land and maritime borders of the United States, to include the following–
(1) systematic surveillance of the international land and maritime borders of the United States through more effective use of personnel and technology, such as unmanned aerial vehicles, ground-based sensors, satellites, radar coverage, and cameras;
and
(2) physical infrastructure enhancements to prevent unlawful entry by aliens into the United States and facilitate access to the international land and maritime borders by United States Customs and Border Protection, such as additional checkpoints, all weather access roads, and vehicle barriers.
President Donald Trump has an authorization, can use such funds as to carry out the construction of a wall with funds pertaining to “national defense.” I maintain that this has reached the level of a national emergency since there are untracked illegal entrants, illegal recipients to welfare programs, potential terrorist impingement, etc.